Notifications
Clear all
[Closed] Custom Attributes AGAIN
Feb 25, 2010 2:59 pm
Strange problem, am i stupid?
So i have 4 points for example and i want to assign custom attributes to control the rig. Up to here all looks fine, but when i try to get attributse controllers for expression just cant do it. Please help
--- Delete All Custom attributes
for obj in $ do (
c=(custAttributes.count obj)
for x =1 to c do custAttributes.delete obj x
)
-- Create All Custom attributes
for obj in $ do (
xxx = attributes Custom_Attributes
(
parameters main rollout:params
(
FSpread type:#float ui:FSpread default:0.0
FBendUp type:#float ui:FBendUp default:0.0
FBendLow type:#float ui:FBendLow default:0.0
)
rollout params "Custom_Attributes"
(
spinner FSpread "Spread" type:#float
spinner FBendUp "Bend Up" type:#float
spinner FBendLow "Bend Low" type:#float
)
)
CustAttributes.add obj xxx #unique BaseObject:true
)
--Trying to get controolers
for obj in $ do (
Spread=obj.baseObject.Custom_Attributes.FSpread.controller
--BendUp=obj.baseObject.Custom_Attributes.FBendUp.controller
--BendLo=obj.baseObject.Custom_Attributes.FBendLow.controller
print Spread
)
2 Replies
Feb 25, 2010 2:59 pm
Solved
After creating custom attributes i had manualy assign the controller, what a shit!
So after this line:
CustAttributes.add obj xxx #unique BaseObject:true
Added:
obj.baseObject.Custom_Attributes.FSpread.controller=bezier_Float()
obj.baseObject.Custom_Attributes.FBendUp.controller=bezier_Float()
obj.baseObject.Custom_Attributes.FBendLow.controller=bezier_Float()
Feb 25, 2010 2:59 pm
This is the case much of the time in other areas as well. If a controller isn’t needed it isn’t added saving file size and over head.