Help with optimizing code



  • 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?



  • 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


Log in to reply