can I create (relative) vertex key IPOs in python API ?

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

celeriac
Posts: 72
Joined: Fri Feb 21, 2003 11:31 pm
Contact:

can I create (relative) vertex key IPOs in python API ?

Postby celeriac » Sun May 18, 2003 2:38 pm

well can I ? It appears that only simple translation, rotation, scaling type IPOs can be created with the python api. Is there a work-around, short of splitting the mesh into pieces and animating each polygon individually ?

z3r0_d
Posts: 1522
Joined: Wed Oct 16, 2002 2:38 am
Contact:

Postby z3r0_d » Sun May 18, 2003 7:56 pm

you can change the mesh, but you can't mess with vertex keys

look at the Mesh or NMesh modules for info on the former
(I've only used NMesh, don't know about Mesh)

you may want to go with a scriptlink, and a check in your code for what frame it is...

celeriac
Posts: 72
Joined: Fri Feb 21, 2003 11:31 pm
Contact:

Postby celeriac » Sun May 18, 2003 8:10 pm

yeh, i've used (n)mesh to change my mesh's vertices, now I want to insert vertex keys programmatically because the mesh I have generated needs to be linked to information in my own objects for the animation to proceed. So far I have struck a compromise: the code updates the mesh, changes the current, start and end frames and then I click 'anim' myself on a frame-by-frame basis.
What I really want is to have my code insert vertex keys as the mesh is animated by the code, then I have a proper blender animation to play with, as it is I can't even find a way to click the 'render' or 'anim' buttons programmatically.

celeriac
Posts: 72
Joined: Fri Feb 21, 2003 11:31 pm
Contact:

Postby celeriac » Sun May 18, 2003 8:14 pm

...I should add that I did find someone's code on the elysiun forums which was able to modify existing vertex keys but not add new ones. So I tried that, adding some blank vertex keys to my generated mesh while the script was running, then having the script attempt to modify them by altering the mesh. The problem is that as soon as .update() is invoked it seems that existing vertex keys as removed.


Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest