THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/04/2012 at 14:42, xxxxxxxx wrote:
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.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 it you could just return true instead of it.