Hi,
REAL MYOBJECT_HEIGHT { UNIT METER; CUSTOMGUI REALSLIDER; MIN 0; MAXSLIDER 200.0; STEP 20;}
I have an object that have a Description Resource element with "20" as STEP value and I want to apply the STEP value on the height value of the SetHandle() function
def SetHandle(self, op, handle_index, handle_position, info):
handle_origin = HandleInfo()
self.GetHandle(op, handle_index, handle_origin)
data = op.GetDataInstance()
if data is None or not self.handle:
return
height = data.GetFloat(c4d.LKC_KINOFLO_HEIGHT)
value = (handle_position - handle_origin.position) * info.direction
if handle_index == 0:
op[c4d.MYOBJECT_HEIGHT] += value
Thanks.