AREA forums upgrade
Read more about the planned upgrade of our forums
  • 1/3
You are here: Forum Home / Autodesk® MotionBuilder® / Python / how to set min and max values for custom properties
IMPORTANT ANNOUNCEMENT ABOUT AREA FORUMS
  RSS 2.0 ATOM  

how to set min and max values for custom properties
Rate this thread
 
9572
 
Permlink of this thread  
avatar
  • Location: OXFORD, None Available
  • Total Posts: 22
  • Joined: 22 February 2008 07:18 PM

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......



Replies: 0
avatar
  • KxL
  • Posted: 08 March 2008 03:34 AM

you were close ;)

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

Cheers



Replies: 0
avatar
  • Location: OXFORD, None Available
  • Total Posts: 22
  • Joined: 22 February 2008 07:18 PM
  • Permlink of this post

Thanks KxL

you saved my neck (again)

ken :-)



Replies: 0