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

    Know why GetVirtualObjects() is called [SOLVED]

    SDK Help
    0
    4
    704
    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 28/04/2017 at 04:01, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   18 
      Platform:   Windows  ; Mac  ;  
      Language(s) :     C++  ;

      ---------
      Hi everyone,

      in ObjectData::GetVirtualObjects() I can use the BUILDFLAGS from the passed HierarchyHelp object to find out if the function was called because an internal or external rendering is going on. Nice.

      But how can I find out if GetVirtualObjects() is called because the generator is being made editable (either by the user pressing "c" or a modeling command, et cetera)?

      Thanks in advance!

      Cheers,
      Frank

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

        On 28/04/2017 at 04:54, xxxxxxxx wrote:

        Is there maybe a message being sent to a generator before MCOMMMAND_MAKEEDITABLE ?
        Or anything else that tells me I'm being made editable?

        I see I'm getting MSG_EDITABLE_END, but that message comes in after  the call to GetVirtualObjects() has already occurred, so it doesn't help at all.

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

          On 02/05/2017 at 09:54, xxxxxxxx wrote:

          Hi Frank, thanks for writing us.

          Although I confirm that the private message MSG_EDITABLE_END is called after GetVirtualObjects being called, unfortunately there's no similar message sent in advance to the GVO call. 
          That said, although it could be only marginally helpful, consider that HierarchyHelp::GetBuildFlags() is still returning BUILDFLAGS_EXTERNALRENDERER when an object is made editable via SendModellingCommand().
          Coupling this information with the fact that a rendering has not been invoked could provide you with some (weak) means to get advised of a BaseObject::GetVirtualObjects() being called from a SendModellingCommand().

          Best, Riccardo

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

            On 03/05/2017 at 04:36, xxxxxxxx wrote:

            Hi Riccardo,

            thanks for the reply! Combining it with the result from CheckIsRunning() is the thing I was missing.

            Cheers,
            Frank

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