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

    Class Lib, or whatever could I use....

    SDK Help
    0
    4
    315
    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
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 08/06/2004 at 02:56, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.207 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      I dont know if I can use Cinema Class or function libs for what I want to do.
      At the moment I have a class which parses a very large file, allocs a big list with the informations in the file, and provides a function to get access to the data. This is used by one of my shaders. The problem is, that for each shader the list has to be initialized, which takes time and memory. It would be good if I could do that initialization only once, and get access to it from my shaders.
      Any idea how something like this could be done in cinema?

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 08/06/2004 at 04:19, xxxxxxxx wrote:

        Is there one list per C4D session, one list per document or something else? If it's the first then you could just load it in a global variable at the same time as your plugin and access it from all instances. If it's the latter, I'd still try to store the data globally, basically as a cache. I guess the details also depend on if the data ever needs to be reloaded.

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 08/06/2004 at 04:28, xxxxxxxx wrote:

          I need one per session, the data has never to be reloaded. I will try to add it as a global variable to my plugin.
          Would it also be possible to put that global variable in a function lib, with one function to initialize the list which i directly load after registering the lib, and one function to get access to the data? Maybe I will need the information not only in one plugin...

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 08/06/2004 at 04:33, xxxxxxxx wrote:

            Yes, a library would be a possible solution. Please see the library tutorial in the SDK docs. ("Creating a function library")

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