Edit Poly Vertex animation by script

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 03 March 2013   #1
Thumbs up Edit Poly Vertex animation by script

Hello,

I try to realise a baking script to save bones animation of a mesh in an Edit Poly Modifier.
The script creates a copy of the bones animated object and animate the copy by following the vertex position of the bones animated object frame by frame.
My script works well with Editable Poly and the Polyop tool.
But i need to do the same thing with the Edit Poly modifier.

So Create an object and animate it in his Editable Poly Base object. Select it.
So my Edit Poly Mod script do this
Code:
vCopyObj = Copy $ convertToMesh vCopyObj convertTo vCopyObj PolyMeshObject addmodifier vCopyObj (Edit_Poly()) vCopyObj.modifiers["Edit Poly"].animationMode = 1 -- set Edit Poly to animate (0 : Model / 1 : Animate) vObjNumVert = polyOp.getNumVerts $ animate on For i = 1 to 10 do -- the start and end frame ( sliderTime = i - 1 -- move the slider of the timeline to the current frame For v=1 to vObjNumVert do -- Loop in vertex index ( vCopyObj.modifiers[1].setVert #{v} (polyOp.getVert $ v) -- I get the vertex position in a reference object by using polyop and set it to the target vertex. )--end for )--end for animate off sliderTime = 0


When i execute the script above the Copied object didn't get keys like if it doesn't move.
I try to use PolyOp with the Edit Poly modifier but the script animate the baseobject. I want to avoid that.

So do you have a way to animate and set an Edit Poly's vertex position in a script ?

Thank for your help.

Last edited by BebeteLANUITE : 03 March 2013 at 02:10 AM.
 
Old 03 March 2013   #2
It seems to me that the Point cache modifier is what you are looking for.
 
Old 03 March 2013   #3
Hello feranti,

I try the point cache and it work very well. I never use it before.
It's more easy to use than the Edit Poly. The fact you can store the animation in an external file
is just very useful.
So i need to change my script interface and add some ways to choose the name and address of the xml file. It's not a big challenge.

Thank you a lot for your reply.

(Un pti coucou de Belgique :-) )
 
Old 03 March 2013   #4
You're welcome !
 
Old 03 March 2013   #5
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 01:13 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.