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

    H2 tell if a child was added or removed

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 474 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 25/09/2017 at 14:08, xxxxxxxx wrote:

      I have an Object plugin with of course GetVirtualObjects().

      The question, how do I get to know that a child was inserted or removed.
      For example, should I check GetDirty() or do I get a message or do I just count the children each time?

      -Pim

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

        On 26/09/2017 at 03:25, xxxxxxxx wrote:

        Hi Pim, thanks for writing us.

        With reference to your request, beside inviting you to have a look at the Generating section in the BaseObject Manual, consider that  BaseObject::GetAndCheckHierarchyClone() already check if any of the children has been added or removed. At the same time you can use the C4DAtom::GetHDirty([URL-REMOVED]HDIRTYFLAGS_OBJECT_HIERARCHY) [URL-REMOVED]to check the current dirty status (concerning any change occurred to the hierarchy) and comparing it with a value (previously stored) you can get advised if anything in the hierarchy has changed.

        Best, Riccardo


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

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

          On 26/09/2017 at 04:32, xxxxxxxx wrote:

          Thanks.

          I am correct to assume that GetHDirty is implemented in R18 and later?
          I am working in R16 or R17. Not everybody uses the latest version.

          Also, I just want to check whether the hierarchy has changed, no need to clone.

          -Pim

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