adding TP dataChannel
-
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 -
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_NORMALCheers, Sebastian
-
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 -
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)