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

    Determine if a BaseObject is part of a GVO cache

    SDK Help
    0
    4
    415
    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 29/07/2013 at 22:48, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   14 
      Platform:      
      Language(s) :     C++  ;   PYTHON  ;

      ---------
      Is there some sort of flag which does indicate, that a BaseObject is part of a virtual object cache
      returned by a generator object like for example a mograph cloner ? The reason why I am asking -
      I am currently drawing some stuff into the viewport using the NBIT_SOMETHINGHIGHLIGHT bit to
      determine if the drawn content should be drawn in a highlighted manner or not. But that 
      approach does not work if the object is part of of virtual object chain. How is this done properly ?

      Happy rendering,
      Ferdinand

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

        On 30/07/2013 at 00:42, xxxxxxxx wrote:

        You can use BIT_CONTROLOBJECT to check if the object was touched by a generator. The state of the
        bit is only valid after it respective generator has been evaluated. To be safe, I'd not even rely on that but
        only check the bit when _all_ generators have been evaluated.

        Best,
        -Niklas

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

          On 30/07/2013 at 03:57, xxxxxxxx wrote:

          That bit and its document description does sound promising. I have to admit that i do not
          fully understand you further explanations about the evaluation of that bit flag.

          1. i do draw stuff in a BaseObject.Draw() method, the drawn content could be described as splines.
          2. when hovering an element i want to highlight it, which is working fine with NBIT_HIGHLIGHTBLAH
          3. the code does not work for my node sitting in a generator object.
          4. i am looking for a fast way to determine if a node is child in a GVO chain of an generator and then 
          read the highlight bit of the generator to apply it to the child (preferably not for each draw pass, but 
          only when it is necessary)

          i'll report back if i do find a solution.

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

            On 03/08/2013 at 16:02, xxxxxxxx wrote:

            Correcting myself:

            I also need to check whether an object is used by a generator or not. BIT_CONTROLOBJECT
            does not seem to be the correct way to go. _Every_ object has that bit set after evaluation,
            so that doesn't help at all unfortunately.

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