Plugin ID`s [SOLVED]

On 05/09/2014 at 07:15, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R14 
Platform:   Windows  ;   
Language(s) :     C++  ;   PYTHON  ;

---------
Ive just obtained unique IDs for a bunch of plugins that are all part of the same package and need a better understanding of how to organise IDs and description IDs for them:

Is it just the plugin IDs themselves that have to be unique?  I take it ill need a unique ID for any GeDialogs that are inside the plugins also?

How do people organise the Description IDs, for example buttons etc that the plugin uses in the AM.  Should these all use for example the plugin id plus some extra digits or is there no issue as the plugin will have its own basecontainer and the id`s within it are unique to that plugin?

Any help with that much appreciated.

On 06/09/2014 at 05:05, xxxxxxxx wrote:

Anyone have clarification on this for me?

On 06/09/2014 at 06:39, xxxxxxxx wrote:

For GeDialog::Open(type, pluginid, ...), you can (or should) use the Plugin ID of the CommandData
plugin that opens the dialog. This way, Cinema will know for what CommandData plugin to call
RestoreLayout() when the dialog should be re-opened with a layout.

If your dialog is modal or you do not wish the user to keep it in the layout, just pass 0 as the 
pluginid.

-Niklas

On 06/09/2014 at 11:21, xxxxxxxx wrote:

Originally posted by xxxxxxxx

How do people organise the Description IDs, for example buttons etc that the plugin uses in the AM.  Should these all use for example the plugin id plus some extra digits or is there no issue as the plugin will have its own basecontainer and the id`s within it are unique to that plugin?

Yes, each description has its own container and these IDs don't need to be unique. Think of it like an enum {} really. You can have endless amounts of enums all 0-indexed. It doesn't really matter, there is no conflict (different scope!). They are just placeholders used somewhere else. In case of descriptions, it's the per-object container, so you really don't have to worry here.

This really just gets of concern if you are merging/mixing/inheriting descriptions. For example, if you INCLUDE Obase in your .res file, you shouldn't use any of the IDs used in Obase.h because the per-object container will use all of them.

But none of these need a unique ID. Erase that thought from your brain now.. :D

HTH

On 06/09/2014 at 13:57, xxxxxxxx wrote:

Brilliant thankyou Katachi!  And thanks Niklas!