Hi,

Really basic replacement VBscript in case anyone else is looking for something 
similar at some point... like what I was.

A.


'----------------------------------------------------------------------------------------------------------------------
' Very basic clip replacement script.
' Turn on "Auto Transition" option to automaticaly link the clips when added to 
the Animaton tracks.
' 1. Select clip in Animation Mixer
' 2. Select source Action
' 3. Run script

logmessage "START ****************************************************"
logmessage "CLIP REPLACE"

set oMixerAnimClipColl = CreateObject( "XSI.Collection" )
oMixerAnimClipColl.AddItems Selection(0)

set oActionColl = CreateObject( "XSI.Collection" )
oActionColl.AddItems Selection(1)

scaMixerAnimClipOffset=GetValue (oMixerAnimClipColl(0)& 
".actionclip.timectrl.startoffset")
logmessage scaMixerAnimClipOffset

set oAnimTrack=oMixerAnimClipColl(0).Parent

set oActionSourceModel=oActionColl(0).model

DeleteObj oMixerAnimClipColl(0)

AddClip oActionSourceModel, oActionColl(0), , oAnimTrack, scaMixerAnimClipOffset
logmessage "END ****************************************************"

'----------------------------------------------------------------------------------------------------------------------


 








________________________________
 From: Simon Anderson <[email protected]>
To: Adam Seeley <[email protected]>; [email protected] 
Sent: Wednesday, 25 July 2012, 0:50
Subject: Re: Replacing clips in the Animation Mixer
 

Yeah theres a way, but it has to be scripted, I have writen something like that 
on one of my last productions, but you have to be weary of some things that can 
creep in like multiple constraints and equations getting double constrained, as 
well as if you have values on parameters adn then you have them locked you end 
up with locked values.

eg. if you had an fcurve on a parameter and now thats locked, when you update 
the clip the parameter will now have a locked FCurve.




On Tue, Jul 24, 2012 at 10:09 PM, Adam Seeley <[email protected]> wrote:

Hi,
>
>Is there a way to replace a clip in the Animation Mixer with another?
>
>I've had a quick look around but the only info I've got so far is a "no" from 
>a previous post.
>
>http://www.si-community.com/community/viewtopic.php?f=9&t=855
>
>Here's hoping,
>
>Adam.
>


-- 
-------------------
Simon Ben Anderson
blog: http://vinyldevelopment.wordpress.com/

Reply via email to