THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/04/2012 at 01:06, xxxxxxxx wrote:
Originally posted by xxxxxxxx
cinema callls GetDEnabling for each description element . by returning true or false you
enable/disable this element.something like that :
def GetDEnabling(self, node, id, t_data, flags, itemdesc) : if (id[0].id == c4d.ElementToDisable) : if (node[c4d.ElementThatDrivesDisableState] == True) return True # unhide the element else : return False # hides the element # when your criteria don't match, close with a call to the parent class of your plugin return super(yourPluginClass, self).GetDEnabling(self, node, id, t_data, flags, itemdesc)
not sure if that last line actually works this way in pyhton , i switched to c++ before getting
deeper into this. in c++ it is working for GetDDescription with :return __super::GetDDescription(node, description, flags);
however this call to the parent isn't mandatory. things will work without it, but maxon wants us
to do ityou could just return true instead of it.
I can't see how you set the itemdesc container (its a basecontainer - but how to set) no python examples (C++SDK tells me its a pointer to a basecontainer - so I;m no futher)
OK look at it from newbie world
GetDEnabling(self, node, id, t_data, flags, itemdesc) :
if you were calling this method and writing in words what the params were
JSplineObject, self.GetDEnabling(self, op(current object), 37000(ID in the res file of item ), 100 (Value in init or current vale?), flags(not used), itemdesc (a base container (set how))
and in the method
if (id[0].id == c4d.ElementToDisable) :
if (node[c4d.ElementThatDrivesDisableState] == True)
what does ElementToDisable and ElementThatDrivesDisableState refer to?
tia