THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/08/2012 at 03:23, xxxxxxxx wrote:
Hello,
I'm still confused about the GetDEnabling() thing, where we should include a call to the base-classes' method. There are several topics where the issue I'm currently having appears, and we couldn't find a solution to it.
Yannick told me he couldn't ever reproduce this error, and as soon as I wanted to show him some code that triggers it, I couldn't reproduce it either. :joy:
But now I have a piece of code that invokes the error, and I don't really understand it. Sometimes the parent-call works, and sometimes it doesn't. :angry:
This is my code so far:
def GetDEnabling(self, op, descid, data, flags, itemdesc) :
rid = descid[0].id
value = True
# Just like the original Cube primitive, we will disable PRIM_CUBE_SEP
# when PRIM_CUBE_DOFILLET is active.
if rid == c4d.PRIM_CUBE_SEP:
value = not op[c4d.PRIM_CUBE_DOFILLET]
# PRIM_CUBE_FRAD and PRIM_CUBE_SUBF will be disabled when
# PRIM_CUBE_DOFILLET is not activeated.
elif rid in (c4d.PRIM_CUBE_FRAD, c4d.PRIM_CUBE_SUBF) :
value = op[c4d.PRIM_CUBE_DOFILLET]
# NRPRIM_DCUBE_INNERFOFFSET will be disabled when PRIM_CUBE_DOFILLET
# is not activated.
elif rid == c4d.NRPRIM_DCUBE_INNERFOFFSET:
value = op[c4d.PRIM_CUBE_DOFILLET]
# Otherwise, ask your parents!
else:
print "-> Parent Call for id", rid
value = super(DoubleCubeData, self).GetDEnabling(op, descid, data,
flags, itemdesc)
return bool(value)
Fine so far. It used to work some minutes ago, and then suddenly, it didn't work for some elements.
I have made a screencast that is intended to show the error more precisely and understandable.
At the last part of the video, I do print "Parent call for id xx failed" when the parent-call failed. It will not be printed for some of the elements. That is because no parent-call is made for those elements (for example when I click in the "Seperate Surfaces" element or drag on the "Fillet Radius").
It seems like only the parent-call for the element that is currently being changed in the AM fails.
The video is located here.
Can someone enlighten me about the issue? :angry:
-Niklas