Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Exclude Object from Generator

    SDK Help
    0
    4
    373
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            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 🙂

            1 Reply Last reply Reply Quote 0
            • First post
              Last post