GetCustomVector in script operator
#1
Question 
So here's my setup:

I have two tyflows. The first places some particles and sets a customvector ("map_pos") with the particles position values.
The second flow uses a birth flow to copy the first flow's particles, including the custom vector channels. This is working so far.
Now I want to modify the second particles position using a script operator. I need the "map_pos" values inside this operator, but trying to read them using
Code:
Point3 map_pos = GetCustomVector(sInx, "map_pos");
results in the following error:
Quote:Error: CS0103
Der Name 'GetCustomVectorByID' ist im aktuellen Kontext nicht vorhanden

which translates to "The name 'GetCustomVectorByID' does not exist in the current context".

What could I be missing at this point?
  Reply
#2
All particle-access functions are members of the 'tf' class. So

Code:
Point3 map_pos = GetCustomVector(sInx, "map_pos");

Needs to be:

Code:
Point3 map_pos = tf.GetCustomVector(sInx, "map_pos");
  Reply
#3
thank you! I should have looked at the API doc more carefully...
  Reply


Forum Jump: