THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/03/2012 at 17:28, xxxxxxxx wrote:
I'm trying to storage the position of all particles of a group when were born.
Here's my code:
tp = doc.GetParticleSystem()
TpGroupA = op[c4d.ID_USERDATA,1]
cntGroupA = TpGroupA.NumParticles()
PPGroupA = TpGroupA.GetParticles()
PPGroupStart = c4d.Vector
PPGroupStartPos = 
for i in xrange (cntGroupA) :
PPGroupStart = tp.Position(PPGroupA _)
tp.SetPData(i,0,PPGroupStart) # I have created a Channels (vector) where storage the position
But it works only when I play the scene from the first frame... If I jump from a frame to another the Channel value became "None"
What's wrong in this code?
There's another way retrive the born position of particle?
On 06/03/2012 at 17:35, xxxxxxxx wrote:
not sure hat is going wrong, but the setup looks quite compilacted. why don't you use just a python node with a TpParticle input port and plug a PPass node into it ? the *code *would be :
mycache = 
def main() :
if tp.IsBorn(pid) :
tp.SetPData(pid, 0, tp.Position(pid))
can't see a reason to do the iteration stuff yourself (ps : tp as the documents master particle system is predefined and pid is the name of my TpParticle input port)
On 09/03/2012 at 05:44, xxxxxxxx wrote:
Hi Little Devil,
thank you so much for you reply. I'm a little bit confused, I think that I don't understand very well what do you suggest.
I attach my c4d scene, so you can see what I really want to do:
Another thing, in a older your post I read that if I want to generate all particles at frame 0 I have to cache first my particle. Can you write me a little example of this code?
On 09/03/2012 at 13:37, xxxxxxxx wrote:
i think i am getting something wrong, it is very simple, i have attached an example.
to your second question : can't see a reason for this, please explain what you want to achieve. basicly it would be the same. check if it is frame 0, check if particle id is related to a born particle and then do something with this id.
On 13/03/2012 at 06:02, xxxxxxxx wrote:
Hi Little Devil,
sorry for the late responce... Thank you so much for you reply, now I have understand.
For the second question, never mind... I was confused