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

    Create objects without showing them in the hierarc

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 488 Views
    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 Offline
      Helper
      last edited by

      On 02/04/2013 at 08:59, xxxxxxxx wrote:

      Is it possible to creating objects and have them not showing  in the hierarchy?
      For example, the Cloner creates objects (clones / instances) but you do not see them in the hierarchy?
      Also the Explosion deformer e.g. creates polygons(?), but I do not see them anywhere?
      How is this done?

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

        On 02/04/2013 at 10:24, xxxxxxxx wrote:

        See c4d.plugins.ObjectData and its GetVirtualObjects() method.

        Best,
        -Niklas

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

          On 02/04/2013 at 12:27, xxxxxxxx wrote:

          Originally posted by xxxxxxxx

          See c4d.plugins.ObjectData and its GetVirtualObjects() method.

          Best,
          -Niklas

          Thanks. I did have a short look at the mentioned examples.
          It seems a lot of code for something simple(?).

          It will take some time to understand, but I''ll gibe it a try.

          Regards, Pim

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

            On 02/04/2013 at 12:44, xxxxxxxx wrote:

            GetVirtualObjects() would be the plugin based approach, you can also always use
            NBIT_OHIDE to hide a GeListNode. While an ObjectData plugin will always create 
            one object, the NBIT allows you to entirely hide an object (hierarchy). NBITS allow
            you also to hide stuff in the material manger and the timeline. but for most cases
            GVO would be the common approach.

            an advantage would be that is a one-liner and also does work for scripts.

            myGeListNode.ChangeNBit(c4d.NBIT_OHIDE, c4d.NBITCONTROL_SET)
            
            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 02/04/2013 at 13:09, xxxxxxxx wrote:

              @pgroof: Well, it's a plugin. It requires some basic anmount of code like subclassing, registering and the
              plugin's description. You can also look at the Python Generator object. The main() function there is
              equivalent to ObjectData.GetVirtualObjects().

              @littledevil: But it also has the disadvantage that the object can be
              revealed by another script again. 🙂

              Best,
              -Niklas

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