Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Register
    • Login

    Object Plugin - Generator Objects - Hiding the child objects in Editor View

    Cinema 4D SDK
    windows r23 python 2023
    4
    6
    700
    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.
    • ThomasBT
      ThomasB
      last edited by ThomasB

      Hi,
      Happy New Year

      I have an internal development question.

      How does this work, for example with Generators such as the Boole Object or Spline-Mask, when two objects are under the Bool-Object as childs, but these are no longer visible in their original form in the Editor View? But only the newly created object. They have to be hidden somehow but they are still visible in the Object Manager.

      • How does this work exactly?
      • Does this happen when registering the plugin with the method and specifying the info argument and type
      plugins.RegisterObjectPlugin(info=type))
      
      • Or do they have to be saved in a variable and deleted somehow or is there a Function to make them invisible?

      Just to get the idea?

      Thanks,
      T.S.B

      CJtheTigerC 1 Reply Last reply Reply Quote 0
      • CJtheTigerC
        CJtheTiger @ThomasB
        last edited by CJtheTiger

        Hi @ThomasB,

        ~~these generators are (probably) plugins of type ObjectData. These plugins implement the GetVirtualObjects method which returns what will be drawn on the screen, and only this will be drawn with complete disregard of the children. They do use their children as inputs to generate the result which you then see but the children themselves are not returned by GetVirtualObjects.

        See also the documentation on ObjectData.~~

        Seems I was wrong about this, sorry. Maybe this plays together with TouchDependenceList but I'm not sure so I'll just keep my mouth shut now.

        Cheers,
        Daniel

        ThomasBT 1 Reply Last reply Reply Quote 0
        • ThomasBT
          ThomasB @CJtheTiger
          last edited by ThomasB

          @CJtheTiger
          thanks
          But that doesn't seem to work because if, for example, I create an object plug-in that returns a cube in the GetVirtualObjects() method and I assign 2 objects to this plug-in in the Object Manager, then I still see the child objects in the editor window.

          Do I have to set a parameter or a flag somewhere to specify the ObjectPlugin somehow?

          Thanks,
          T.S.B

          1 Reply Last reply Reply Quote 0
          • M
            m_adam
            last edited by ferdinand

            Hi there is 2 options, the first one is to pass the flag OBJECT_INPUT when used with OBJECT_GENERATOR this will force the generator to touch the children object.

            The second option, is to manually touch the object either by calling BaseObject.Touch or via a DependencyList as explained in this C++ manual (all methods exist in Python)

            Touching an object means destructing its cache (so if there is no cache, there is nothing to show...), it also define BIT_CONTROLOBJECT on the child object and finally it reset it's dirty state.

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

            ThomasBT 1 Reply Last reply Reply Quote 1
            • ThomasBT
              ThomasB @m_adam
              last edited by

              @m_adam
              Thank you very much Maxime.
              But there is one more thing I would like to know.
              Why don't the highlighted links work? I am always referred to this site.

              not found.png

              Thanks,
              T.S.B

              ferdinandF 1 Reply Last reply Reply Quote 0
              • ferdinandF
                ferdinand @ThomasB
                last edited by

                Hey @ThomasB,

                That has nothing to do with the highlighting but with the fact that Maxime used incorrect links. developers.maxon.net/docs/ links will only work from outside of the forum. Inside the forum you currently have to use dvelopers.maxon.net/assets/docs/ as otherwise nodebb is trying to take over the routing. I am working on fixing that issue.

                I have fixed both links of Maxime.

                Cheers,
                Ferdinand

                MAXON SDK Specialist
                developers.maxon.net

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