Object Childs get Layer

  • On 09/08/2015 at 01:53, xxxxxxxx wrote:

    Hello ,

    I work with a own Object and like to automatic pass on the layer to all childs of that object. 
    the childs of the object are invisible in the tree and it react correct but unexplainable for the user.


  • On 10/08/2015 at 03:56, xxxxxxxx wrote:


    I think, we will need more details. I guess you have an ObjectData generator plugin. Now, which childs are you talking about. The ones generated in GVO() or the childs in the Object Manager?
    And then, what is the correct but unexplainable result?

  • On 10/08/2015 at 04:34, xxxxxxxx wrote:

    Hi Andreas,

    Correct I use an ObjetData plugin. Under that Object is a bunch of Polygone object, lights and other objects - as childs in the Object Manager - for better overview the plugin hide the childs under my object and only show the main object.

    by changing the Layer for the Main object - the childs will not be effected from that. But the user can`t see the childs so he expect an other behavior - because the work with the main object.


  • On 10/08/2015 at 04:50, xxxxxxxx wrote:

    maybe need to make rules for hierarchy or for name of child objects

    such primitive

    i'm walking through aov of c4dtoa and get only light_group named ops under driver.
    i can easy make rules for parent driver and childs like light_group_

    import re  
    def walk(obj) :  
      if not obj: return  
      while obj.GetUp() and not obj.GetNext() :  
          obj = obj.GetUp()  
      return obj.GetNext()  
    def initlgs() :  
      obj  = doc.GetFirstObject()  
      while obj:  
          if obj.GetType() == 1030141:  
              ch = obj.GetChildren()  
              lgl = []  
              for i in ch:                  
                  if re.findall("light_group_", i.GetName()) :  
              return lgl                  
          obj = walk(obj)

  • On 11/08/2015 at 02:06, xxxxxxxx wrote:

    Thanks Ilay

    is there a "change Layer" Message I can use to do that - I like to run this as rarely as possible

    I don`t found one in the documentation

  • On 11/08/2015 at 06:16, xxxxxxxx wrote:

    post simplified example in python gen + Annotation tags with description

    is there a "change Layer" Message I can use to do that - I like to run this as rarely as possible

    hmm, i'm hobbyist-coder, but if wrap such to message callback
    _messcall = returned_op.SetLayerObject(new layer with turn off op.manager)
    if messcall:
    return True
    _and etc. _


Log in to reply