THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 16/12/2004 at 15:49, xxxxxxxx wrote:
Cinema 4D Version: 8.206
Language(s) : C.O.F.F.E.E ;
Im am currently creating a ExpressionTagPlugin in COFFEE.
I would like to have some kind of dialog with settings for my tagplugin.
To do this I have simply created a GeDialog object, and opened the dialog in TagPlugin::Edit()
My problem is that I don't know how to pass data from this dialog back to my TagPlugin. Because obviously I want my TagPlugin to read the settings in the dialog.
I did a hack and stored the settings in member variables of the dialog class, and wrote functions to return those variables. This worked just as long as the dialog wasn't closed (then my variables were reset)
I was hoping for some way to pass the BaseContainer of the TagPlugin to the Dialog. The Dialog would fill this BaseContainer, and my plugin would simply read the data from the BaseContainer.
But with my poor knowledge of COFFEE and Dialogs, I have had a bit of trouble working this out.
Any help is appreicated
On 16/12/2004 at 17:52, xxxxxxxx wrote:
Why don't you just add your settings to the Tag plugin's res file? These will appear in the A.M. just like every other object and tag. Then no hack.
On 17/12/2004 at 11:04, xxxxxxxx wrote:
It was my understanding that a COFFEE plugin cannot use the AM like a c++ can? So I havn't even tried to do it like that
On 17/12/2004 at 11:55, xxxxxxxx wrote:
You make a good point of which I wasn't very aware.
Have you considered storing the variables, instead, in your extended ExpressionTagPlugin class and storing/retrieving them from there for the Dialog? Or, in a more OOP-based form, you could make a class specifically as a go-between for both the Tag and the Dialog (with a member variable reference to it in each). You should be able to initalize the data for the Dialog in the Init() method and extract data from the dialog during the AskClose() method. Any changes would them be available for the Tag when needed.
On 17/12/2004 at 12:05, xxxxxxxx wrote:
Thats a nice idea about the class between the dialog and the plugin. I think I will have a stab at that.
Yea I did try storing the variables in the plugin class, but I didn't know *how* to get these variables in the dialog.
Currently I'm using my hack method which works, but it requires the dialog to stay open at all times. Slight limitation.
I could easily solve all my issues if I create it in C++ but the plugin works perfectly in coffee. And I don't really want to port it to C++ if I can get a coffee version out that's perfectly fine. (Although im *bound* to convert it to C++ after I finish it anyway - I always do)
Thanks for the suggestions
On 17/12/2004 at 14:11, xxxxxxxx wrote:
The feeling is mutual. COFFEE has such a great potential to avoid the Windows/MacOS problem as well as being usable in more versions without modification, but its limitations (which are mainly just having it updated to support more recent features) can really leave no alternatives but the C++ route.
Let's hope that they update it some time soon!