Jump to content

Welcome to INSYDIUM ONLINE

The place to talk about X-Particles and Cycles 4D

Sign in to follow this  
Lothar

Scripting help needed

Recommended Posts

As there are no connectors for XPdynamics, I´m trying to get some kind of handles to them at least.

What I see will work is fixing some frozen particles to a spline - but succeeded in a special case only.

This scene is working as particle index on a latitude circle of a sphere will be in sequence , so it is possible to get the necessary index sequence for a spline, 0 to X  by some subtraction value from  the particle index that is starting from a certain index and goes up in sequence. But what to do if index of particles will jump between values which will be the case e.g on a latitude circle .

What I can get is group´s particle index and count, that´s not a problem, but I can´t use normal expresso iteration on the spline, expresso will not allow that and nodes will turn yellow.

So I guess I will need a python node with 2 index outputs, one for the set particle and one for the spline that syncs outputs. I can imagine input index from particle iteration for the python node, so it gets let´s say  numbers of 24, 45, 67, 99 and will care that 24 goes to index 0 on the spline, 45 to index 1, 67 to index 3 and so forth ...

But no idea how to archive that or if this is impossible as  these outputs can´t be synced at all.

 

 

 

 

frozen expresso.c4d

Share this post


Link to post
Share on other sites

just to show where I´m stuck. The file shows, python node would work and be accepted, but I can´t generate the output desired.

But instead of the formula indout = ind -482 indout must get 0 to 47 like ind has 482 to 529 without a simple subtraction but must get its 0-x values from count of incoming ind values somehow...

If I read in xparticle indices of particles concerned and try to get them into a list , all values are stored on first index of list, no idea how to count them from there and finally convert them to an index sequence, 0 to last particle involved ...

frozen expresso2.c4d

Share this post


Link to post
Share on other sites
Posted (edited)

solved that now, at least partly as only a single selection is allowed. But it works now moving a xpdynamic object by means of a belt if you don´t do too fast movements, always remember keep energy low ...

Way to do this is use more python than expresso 🙂

 

 

dynbelttest.c4d

 

 

edit  - an now I have just found that pin to spline is possible as well and does the very same, so no need at all for a script 🙄

Edited by Lothar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×