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

    catch the moment when the user converts an object

    SDK Help
    0
    8
    1.1k
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 12/06/2010 at 17:47, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   r11 
      Platform:      
      Language(s) :

      ---------
      Hi there,

      is it possible to catch the moment when a user tries to convert my plugin object and perform one last action?? i guess there is , but i have no clue where to look for..

      cheers,
      ello

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 13/06/2010 at 08:23, xxxxxxxx wrote:

        Howdy,

        The only thing I can think to do would be a work around hack.

        If you create a message plugin and poll for EVMSG_CHANGE you could detect if your plugin object has been converted, then make a call to BaseDocument::DoUndo(), then perform your action without adding an undo for the action, then finally make a call to BaseDocument::DoRedo().

        If you keep a running list of your plugin objects as they're created, you can check to see if it's still in the document. If the object in the list is not in the document then it's probably on the undo stack. Then after calling the DoUndo() command you can check to see which objects in the list are now in the document that weren't in the document before. To keep track of what's going on, you'll probably have to set some flags in the object's container.

        You'd have to work out all the details, though as it's just an idea which I've never tried, yet.

        Adios,
        Cactus Dan

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 13/06/2010 at 14:24, xxxxxxxx wrote:

          wow, that sounds quite complex. what i want to achive is that if the user converts my plugin object i want to group the dependent objects, rename them, or even delete them.. my betatesters asked if that is possibe. i'll see if i can put your suggestion into code 🙂

          cheers,
          ello

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 13/06/2010 at 15:01, xxxxxxxx wrote:

            Howdy,

            An easier thing to do would be to add to your plugin its own Make Editable command that will do exactly what you want.

            Adios,
            Cactus Dan

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 13/06/2010 at 15:08, xxxxxxxx wrote:

              Hi Dan,

              this sounds logical.. like adding a button "convert" and there i can do whatever is needed??

              thanks and cheers,
              Ello

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 13/06/2010 at 15:17, xxxxxxxx wrote:

                Howdy,

                Well, you could also just make a CommandData plugin and simply add it to your plugin project.

                Adios,
                Cactus Dan

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

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 13/06/2010 at 15:19, xxxxxxxx wrote:

                  thanks for your input. I'll check it out...

                  cheers,
                  Ello

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

                    THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                    On 14/06/2010 at 01:51, xxxxxxxx wrote:

                    As Dan mentioned there is no direct way to check if an object has been made editable.

                    cheers,
                    Matthias

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