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
    • Login

    Changing hierarchy draw order / priority

    Cinema 4D SDK
    c++ r20
    2
    4
    742
    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.
    • rsodreR
      rsodre
      last edited by

      Hi!

      I have some custom modifiers inside a custom generator. I usually draw only a few of the modifiers to the viewport, and very often I wish I could draw some of them on top of the others (if selected, for example), but the lower objects always are drawn on top. Is there a way to change the order of drawing for an object's hierarchy?

      In thee Draw Manual, it says...

      To avoid drawing order problems the drawing operations of multiple objects or tags can be replaced by the use of the "Draw" function in a SceneHookData plugin.
      

      It sounds like what I need, how does it work? Should I remove the Draw() calls from objects and call manually from the SceneHook?

      There's nothing in the manuals or in the sdk examples about SceneHook plugins (please add something!). Of course I know the SceneHookData API reference, but there's no way to learn about it's capabilities, we have to guess and try, what's very time consuming and usually don't take us very far.

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

        Hi @rsodre,

        There is actually no proper example or manuals, but I think you can find all the information needed in the 2D viewport drawing using a SceneHook[URL-REMOVED] article.

        Further information can be found in the Draw Manual.

        If you still have a question, please let me know.
        Cheers,
        Maxime.


        [URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        rsodreR 1 Reply Last reply Reply Quote 1
        • rsodreR
          rsodre @m_adam
          last edited by

          The SceneHookData Draw() is clear now for me.

          But please, add a proper Manual page in the docs and a complete example. I spent some time trying to find out if DisplayControl would be useful for me, and still don't understand exactly what's it good for, besides painting polygons.

          And would be nice to have articles like this should referenced on the manual pages.

          Thanks!

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

            Hi @rsodre, thanks for your feedback, and glad you solved your issue.

            Regarding the DisplayControl I let you read this topic: SceneHook and DisplayControl.

            Manuals, for scenehooks is definitely something we consider.

            Cheers,
            Maxime.

            MAXON SDK Specialist

            Development Blog, MAXON Registered Developer

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