Dialog Disables Cinema until is closed
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/03/2010 at 01:25, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 11.5
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;---------
Its posible to create a dialog (in coffee is posible?) that can stay like any other cinema window so we can keep using cinema having that window floating there ? ... all dialogs i saw in scripts examples they disable all until u close the dialog, so u can't keep using cinema while the dialog is opened -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/03/2010 at 06:20, xxxxxxxx wrote:
Yes, this is possible. Non-modal dialogs are created with the GeDialog class.
Here is an example of a simple test dialog plugin.
// be sure to use a unique ID obtained from www.plugincafe.com var PLUGINID = 1000158; // be sure to use a unique ID obtained from www.plugincafe.com enum { GADGET_BUTTON = 5000, _dummy } // definition of my dialog class class MyDialog : GeDialog { public: MyDialog(); CreateLayout(); Command(id,msg); } MyDialog::MyDialog() { super(PLUGINID); } MyDialog::CreateLayout() { SetTitle("My Dialog"); AddGroupBeginV(0,BFH_SCALEFIT,1,"",0); { AddGroupBorderSpace(4,4,4,4); AddStaticText(0,BFH_FIT,0,0,"just some random text",0); AddButton(GADGET_BUTTON,BFH_FIT,0,0,"click me"); } AddGroupEnd(); return TRUE; } MyDialog::Command(id,msg) { switch (id) { case GADGET_BUTTON: //button clicked, do something break; } } class MyMenuPlugin : MenuPlugin { public: MyMenuPlugin(); GetID(); GetName(); GetHelp(); Execute(doc); RestoreLayout(secret); } MyMenuPlugin::MyMenuPlugin() { super(); } MyMenuPlugin::GetID() { return PLUGINID; } MyMenuPlugin::GetName() { return "Modal Dialog"; } MyMenuPlugin::GetHelp() { return "Demonstrates a modal dialog"; } var d; MyMenuPlugin::Execute(doc) { d->Open(TRUE,-1,-1); } MyMenuPlugin::RestoreLayout(secret) { if (!d) d = new(MyDialog); d->RestoreLayout(secret); } main() { d = new(MyDialog); Register(MyMenuPlugin); }
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/03/2010 at 07:08, xxxxxxxx wrote:
I love you. Just one last question about it:
How can i test this? I know it works making a .cof... but what if i want to test it inside script manager? instead of making a "plugin". So i can change parameter and test them without having to close and open cinema again each time (!?) -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 17/03/2010 at 07:41, xxxxxxxx wrote:
It's not possible from within a script. You have to create a plugin.
cheers,
Matthias