dupliverts with offset

I Saw something here at elysiun a couple of days ago that sounded interesting, so I dusted off my python and gave it a shot. Someone wanted to animate a bunch of dupliverted objects with an offset. As it is now all the copies animate in sync which is not great for animating live things.

What I came up with seems to work, but with some caveats. It only copies Absolute vertex keys (The test scene I made used AVK animation) , also it doesn’t copy the keys exactly right. It also assumes that the Speed ipo has only two points. It only works with meshes, hasn’t been throughly tested etc. Also there seems to be a small problem with Blender, the animation of each member of the flock is played incorrectly until you look at its vertex ipo, or close and re-open the file. I would like to hear if anyone else has a similar problem…

This script is really just a proof of concept, I threw it together in a few hours this weekend to see if I could do it. If someone else was willing to take it to the next level they are welcome to.

Demo blend:
http://Kitsu.petesdomain.com/files/dupli-offset.blend

Main script:
http://Kitsu.petesdomain.com/files/flock.py

Support script:
http://Kitsu.petesdomain.com/files/update.py

Both scripts have to be in the same dir but you only need to load the main script.

i was the guy interested (among others)… doesn’t work for some reason under osx, i’ll try it later on XP… but nice from you spending time on that :slight_smile:

best regards

marin

.
Odd, did you use it on the provided blend, or on one of your choosing? It would need to be altered for any other blend. Also it will only work with Blender 2.34. Frankly at this point this script is very limited, probably only useful to scripters…

There are still a few things I would like to try to do to make it more useful/versitile, but I don’t know how successful I will be…

PS: This kind of script would be very cool if it could be used on a particle system hint hint…

yes i did. works on XP, though.

nice - looks like what i meant. what would you say, can it be done with RVK’s, too? or armatures? for armture deformed objects in conjunction with particle emitters i could imagine that the linked copies of the meshes plus armatures are created, while each armature’s action is duplicated and slightly offset… just a thought.

would appreciate any further efforts, but can’t help much with programming - i’m busy working and try to develop an automated armature setup script… this is heavy enough, as i didn’t do much before in that field.

greets

marin

I was wrong… It seems NMesh.NMesh.GetRawFromObject() is more powerful then I thought. The script works with any kind of mesh deformation. That means it can be used on AVK, RVK, armature, or even Lattice deforms. The limit is it onlycreates AVKs on the flock members.

II finaly took a peek into the draw module, and I found some neat things. The script has been updated to accept user input, so now it should work for any cyclic animation. Just tell it how long one cycle is, then the interval between key frames.

I’ll probably try replacing the flock animation with RVKs this week. I might try to make it work with actions, but first I would need to learn to use actions…

wow good news :slight_smile:

i could provide you some example files (for the armature thingy)

marin

Thanks, but I already have a few character rigged and ready to go. I just need to take some time to RTFM (Read The Fantastic Manual).

i had a gui-less script which read from targets and applied avk’s to cloned array of objects. why don’t you use sys.sep instead of \ ?

Good point, I origionaly used sys.sep, but then I hard-coded the path to the script during testing. Later when I made the dir variable I forgot to switch it back… I’ll change it right now.