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
    • Recent
    • Tags
    • Users
    • Register
    • Login

    Help with optimizing code

    Scheduled Pinned Locked Moved SDK Help
    2 Posts 0 Posters 330 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

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

      On 02/01/2006 at 04:46, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9,5 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,

      I need a bit of help on how I can optimize a part of my plugin.

      I have a treeview that contains information about the objects in the scene.
      To keep everything in sync I need to execute some validation code, for example, if user deletes an object in the Object Manager, I have to step through the objects in the treeview and make sure I don't have no dead end treeview items.

      The only way I know how to check if an object has been deleted is by checking the GeDialog::CoreMessage method and looking out for a EVMSG_CHANGE id.
      Unfortunetely this event gets called for lots of different reasons within C4D (i.e. user selects object)

      I have a feature of the plugin that, if I select a treeview item, the plugin will select the objects in the Object Manager.

      The 'problem' is a series of actions that executes after.

      1. I select an item in the treeview
      2. Plugin checks what objects this item is pointing to and selects the objects in the Object Manager
      3. This is turns calls the EVMSG_CHANGE event in CoreMessage()
      4. Which then calls my validation code as mentioned above.

      I dont need that step 4 to be executed because I know for a fact all the data in the treeview is already validated at that specific point.
      EVMSG_CHANGE is too global, if I could get the specific changes it would be much easier to fix.

      Any suggestions?

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

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

        On 02/01/2006 at 04:51, xxxxxxxx wrote:

        I just noticed a method in the SDK called

        SpecialEventAdd()

        IT looks like I can use this

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