Area :: Header
Meet the Experts Webinar
Learn how Black Forest Games rebooted the classic C64 platform game “Giana Sisters” from 1987 using Autodesk 3ds Max®.
Discussion Groups

Python

Reply
Contributor
kenzor
Posts: 25
Registered: ‎04-03-2012

how to set min and max values for custom properties

9 Views, 2 Replies
03-07-2008 06:45 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......
Please use plain text.
Distinguished Contributor
_KxL_
Posts: 411
Registered: ‎08-23-2006

Re: how to set min and max values for custom properties

03-08-2008 08:34 AM in reply to: kenzor
you were close :smileywink:

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


Cheers
Please use plain text.
Contributor
kenzor
Posts: 25
Registered: ‎04-03-2012

Re: how to set min and max values for custom properties

03-10-2008 11:54 AM in reply to: kenzor
Thanks KxL

you saved my neck (again)

ken :-)
Please use plain text.