Keeping values from previous frame?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2007 at 01:26, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.111
Platform: Windows ;
Language(s) : C++ ;---------
Hi again,I need to keep some results in my expression tag for use in the next frame. Is there any way to store values and make them available when the expression is called again in the next frame?
I thought about hidden data in the plugin tag description, but I think there must be a more elegant way.
Thanks for help!
Best regards,
Jack -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2007 at 01:54, xxxxxxxx wrote:
You can store values in the node's BaseContainer or create a new member variable in the node's class.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2007 at 01:56, xxxxxxxx wrote:
OK, sounds easy.
So I just have to define another parameter ID in my .h file, and use it like I am writing values into a control in the user interface? I just don't put this parameter in the .res file?
Sorry, stupid question. Still learning C++
Greetings,
Jack -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2007 at 08:20, xxxxxxxx wrote:
As Matthias noted, you can go two ways here:
1. Retain the data as a Resource Description in the node's BaseContainer. This would require adding IDs in the .h file and adding them as resources in the .res file (to define the description data type - as in, BOOL, LONG, REAL, etc.).
2. Store the data in class members.
If the data is only temporary, the second approach is probably a better idea as resources in the BaseContainer are saved with the document when the plugin tag is on an object - and you shouldn't waste resource IDs on temporary storage. They should be used for permanent data that must persist between sessions (saving and later loading the document).
Class members are just variables in the class:
class MyPluginClass : public TagData
{
private:
// Five Real result values
Real results[5];
};Or however you need to delineate the results.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2007 at 08:30, xxxxxxxx wrote:
Ah, OK, now I understood.
My data is only temporary, so I will use the 2nd approach.Thank you all for your help
Starting with C++ and the SDK is made easy with this forum.Greetings,
Jack -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/08/2007 at 12:01, xxxxxxxx wrote:
Works perfectly
Regards,
Jack