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
    • Recent
    • Tags
    • Users
    • Login

    adding TP dataChannel

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 346 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 12/12/2010 at 09:20, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   12 
      Platform:   Windows  ;   
      Language(s) :       PYTHON  ;

      ---------
      Hello everyone,
      i would like to add new data channels to my tp particles. I'm not sure how to do it, and perhaps someone can help me.

      i add a datachannel via:

        
       tp.AddDataChannel(0,"mytestchannel")  
      

      the api says that the first int defines the type of data i save in my channel. Unfortunatly i couldn't find a description of the Datatypes available. Can someone give me a hint on it?

      i just tried to add soem integer data via:

        
      tp.SetPData(pid,0,12)  
      

      but it throws a TypeError: The data channel is not accessible:'145286240'

      i guess 0 is not for integer types 😕

      My first goal would be to store simple datatypes in my channels but i'd like to achieve even more complex datatypes (perhaps self defined classes?)

      However, i would be really glad if someone could give me a hint or perhaps points me to a direction where i can learn more about datachannels and SetPData and GetPData.

      thanks,
      alf Laune

      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 12/12/2010 at 09:59, xxxxxxxx wrote:

        Hi, to create a custom integer channel check out:

        tp.AddDataChannel(c4d.DTYPE_LONG,"mytestchannel")

        Here is a small list of types which can be used as well:

        DTYPE_COLOR,
        DTYPE_TEXTURE,
        DTYPE_LONG,
        DTYPE_REAL,
        DTYPE_TIME,
        DTYPE_VECTOR,
        DTYPE_MATRIX,
        DTYPE_STRING,
        DTYPE_FILENAME,
        DTYPE_BOOL,
        DTYPE_NORMAL

        Cheers, Sebastian

        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 12/12/2010 at 11:52, xxxxxxxx wrote:

          Hi Sebastian,
          thank you for your answer. It works very well. Is there a possibility to add more complex types? Like Arrays for example or structs?

          thanks,
          alf

          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 12/12/2010 at 13:53, xxxxxxxx wrote:

            Unfortunately thats not possible. To check out which types can be set, just open the TP Settings Dialog.

            (Simulation->Thinking Particles->Thinking Particles Settings->Tab: Channels)

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