Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Keeping values from previous frame?

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 555 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post