Exclude Object from Generator

On 18/01/2013 at 15:42, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R14 
Platform:   Windows  ;   
Language(s) :     C++  ;

Hey Guys,

Is it possible to exclude an object from an specific generator? I know, there is the Stop-Tag but that means all generators with an object will not work. But I want to disable just some Boole-Generators.

Anyone an idea how to?

On 18/01/2013 at 16:00, xxxxxxxx wrote:

for custom ObjecData plugins written with that functionality in mind it is possible (just check
for the op parent and alter your ouput depending on the result), but for already existing 
object types as a tag solution i do not think so.

the only possible way i could think of might be a hook, but hat is beyond my scope.

On 19/01/2013 at 06:14, xxxxxxxx wrote:

Hey Ferdinand,
Thank you for your answer.
Could you explain what you mean with: just check for the op parent and alter your ouput depending on the result
Because I use an ObjectData plugin.

On 19/01/2013 at 07:02, xxxxxxxx wrote:

something like that :

def GetVirtualObjects(self, op, hierarchyhelp) :
        parent = op.GetUp() if (parent != None and parent.GetType() == c4d.Oboole) : return c4d.BaseObject(c4d.Onull) else: return c4d.BaseObject(c4d.Osphere)

you could do it from any other method, which provides the node instance as a parameter.
you will also have to make sure, that your object is flaged as dirty as soon as its position 
in the object tree has changed, to ensure your ouput is changed properly or it might take 
a while before GetVirtualObjectsis called again.
you might get some more fancy results to work with ObjectData.Execute() - stop the
generator/bool object execuion, instead of hiding your output. but i have not used
Exeute ye, so i have only a vague idea of what it does :)