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

    Notification on object delete or rename

    SDK Help
    0
    6
    616
    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 23/05/2013 at 04:18, xxxxxxxx wrote:

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

      ---------
      Is there a way to get notified when a object(camera) is deleted or renamed?

      Ralf

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

        On 23/05/2013 at 04:54, xxxxxxxx wrote:

        from a coremessage method listen for EVMSG_CHANGE and then check the reference/pointer
        on your object if its none, its gone 🙂 if it is still a GeListNode you can check the name.

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

          On 23/05/2013 at 06:03, xxxxxxxx wrote:

          I have registered a MessageData-Plugin and get EVMSG_CHANGE in the coremessage function. I am storing a BaseObject * m_object somewhere in my plugin. How should I check my pointer m_object if it is none? I mean m_object doesn't get NULL'ed automatically when the user deletes my object.

          The EVMGS_CHANGE doesn't give me information about which object has changed or deleted, right?

          Can you help me?

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

            On 23/05/2013 at 06:23, xxxxxxxx wrote:

            Store a BaseLink to the object instead of a direct pointer. It will allow you to check if the object
            does still exist or not.

            -Nik

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

              On 23/05/2013 at 09:31, xxxxxxxx wrote:

              Ok. This works.

              But I still have to find out which one was deleted and which one was renamed all by myself instead C4D is doing this for me, right?

              I would expect that the SDK is doing this for me.

              Ralf

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

                On 23/05/2013 at 10:00, xxxxxxxx wrote:

                Well, do you want to checl for a specific object, if it was deleted or renamed, or the whole hierarchy?

                -Niklas

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