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

    Detecting scene changes

    SDK Help
    0
    3
    260
    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 19/11/2013 at 01:12, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R13.061 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      Hi everyone!

      I have a bunch of ObjectData plugins, and I am interested in finding a way to detect or be notified on scene changes, for validation purposes.

      Right now, the only bit of control I have over the scene structure is at the moment of object creation, by creating them with a CommandData plugin, which inserts them at the correct locations. So far so good, but once the objects are created we're pretty much out of control. Objects can be freely moved inside the tree, or even removed. This becomes an issue when it results in inconsistent layouts in the scene, which do not produce proper results, or even no results at all, and a way to check the consistency when the structure changes seems to be the right way to go.

      It seems that insertions and deletions are handled by the GeListNode class, but unfortunately the functions which handle this specific detail are not virtual ( or any other methods whatsoever ), therefore not overridable.

      So, if any of you had this problem before, and found a solution to it, I would be very greatful if you would share this precious piece of information with everyone else on this forum🙂

      Many thanks!

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

        On 19/11/2013 at 04:38, xxxxxxxx wrote:

        A SceneHook plugin (SceneHookData derivation) will get scene changes such as this through its Message() method.

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

          On 20/11/2013 at 01:27, xxxxxxxx wrote:

          Thanks, I will take a look!

          EDIT:
          I gave it a spin, and it does indeed detect scene changes, like inserting or moving objects. However, it seems that when deleting objects from the scene, no messages are sent, or maybe I'm missing something?

          Thanks!

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