create fixed GeDialog
On 30/04/2018 at 10:48, xxxxxxxx wrote:
Cinema 4D Version: R19
Platform: Windows ;
Language(s) : C++ ;
I have created a GeDialog to change the configuration of my camera plugin but it is floating. I want to create a fixed GeDialog . So there is any way to create fixed GeDialog, It would be good if this works like a tag next to the camera plugin.
On 30/04/2018 at 13:56, xxxxxxxx wrote:
then why create a GeDialog, you can just create a tag plugin
On 01/05/2018 at 02:07, xxxxxxxx wrote:
So it means, I can combine command plugin and tag plugin together. Here GeDialog only used to change the properties of cameras. There is any way to make GeDialog fixed.
On 01/05/2018 at 05:26, xxxxxxxx wrote:
you don't need GeDialog at all, and you don't need command plugin also.
just create a tag plugin, it will appear with tags in the right click menu, check the SDK camera tag example.
On 01/05/2018 at 06:22, xxxxxxxx wrote:
Thanks, Mohamed, I have already created a command plugin that creates multiple cameras, here I have created GeDialog to manage the property of the camera. It is working fine but it is in floating state I want to make it fix.
On 01/05/2018 at 07:44, xxxxxxxx wrote:
When creating a GeDialog you can not control to make it floating or docked. By default a GeDialog will be a floating window. A user can dock a floating window in his/her layout, but as a plugin developer you have no control over it. You cannot create a GeDialog that is automatically docked.
When the user has docked the window and saved the layout. Next time that layout is used, the GeDialog will be docked.
What MohamedSakr tried to explain was that you could use a tag, as its description will be displayed in the Attribute Manager ... which by default is a docked window.
By using a TagData, you would then not need a GeDialog, and as such also not need a CommandData, as all is done via the tag.
Alternatively, since you mention the multiple cameras. You could create a CommandData (which you already did) to create the multiple cameras. This CommandData would then also create the different tags and assign them to your cameras. The user would then select the tag, and adjust the settings via the Attribute Manager.
However, I probably guess you would want to have a single place to adjust the settings for all cameras, right? Then using tags is still an option, but more complex as you would want to have a single "container" for the data where every tag's instance is reading from / writing to.
Alternatively, you could write a SceneHookData instead of the TagData, and use the option PLUGINFLAG_SCENEHOOK_SUPPORT_DOCUMENT_DESCRIPTION when registering. This has the same effect as using the TagData, as your description will be accessible from the Attribute Manager, but you will not have the handle the different tags in your scene.
I hope I have not overwhelmed you with information.