MotionBuilder Forum
Welcome to Autodesk’s MotionBuilder Forums. Share your knowledge, ask questions, and explore popular MotionBuilder topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to set min and max values for custom properties

2 REPLIES 2
Reply
Message 1 of 3
kenzor
222 Views, 2 Replies

how to set min and max values for custom properties

using python I would like to create a custom properties and set its Maximum value to 1 rather than the default of 100, and set its minimum value to -1 rather the default of 0.

ie something like

theHandle = FBHandle('out')
mbType = FBPropertyType().kFBPT_double
mbStr = 'double'
prop = theHandle.PropertyCreate(nameTxt,mbType,mbStr,True,True)
prop.SetAnimated(True)
# wish list function...
prop.SetMinimum(-1)
prop.SetMaximum(1)


is there a way of doing this? ...

If not I have to set the max and min for all the properties by hand......
2 REPLIES 2
Message 2 of 3
_KxL_
in reply to: kenzor

you were close 😉

prop.SetMin(-1)
prop.SetMax(1)


Cheers
Message 3 of 3
kenzor
in reply to: kenzor

Thanks KxL

you saved my neck (again)

ken 🙂

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report