RE: Scripting : Copying Animation from Referenced Models

Date : Mon, 4 Jun 2007 15:30:17 +0100
To : <XSI(at)Softimage.COM>
From : "Adam Seeley" <adam.seeley(at)clearpost.co.uk>
Subject : RE: Scripting : Copying Animation from Referenced Models
Hi,

I found a way around this without having to access fcurves or interrogate the Property too much.

Whilst you can't CopyPaste a Property from a Referenced Model (with animation or without) to another object, you can CopyPaste it on top of the same Property type.

E.g. 

If you select a Visibility Property on a Referenced Model and try to Copy it ctrl+C, XSI will complain.
If you try and drag the Referenced Visibility Property onto another Object, xsi will complain.
If you drag the Visibility Property onto an existing Visibility Property, XSI will accept it and all the animation, fcurves and Expressions, will be copied over.

Copypaste "cubegroup.visibility" ,  "Passes.pass_show_cube.cubepartition.visibility"

Adam.



> -----Original Message-----
> From: owner-xsi(at)Softimage.COM 
> [mailto:owner-xsi(at)Softimage.COM] On Behalf Of Bernard Lebel
> Sent: 30 May 2007 19:50
> To: XSI(at)Softimage.COM
> Subject: Re: Scripting : Copying Animation from Referenced Models
> 
> Sorry you're looking for actual fcurve copy?
> 
> Maybe you could try copying the fcurve directly via the 
> object model, like
> 
> oTargetParameter.addfcurve2( oSourceParameter.source.keys )
> 
> or something along these lines.
> 
> 
> Bernard
> 
> 
> 
> 
> On 5/30/07, Bernard Lebel <3dbernard(at)gmail.com> wrote:
> > I'd run through the origin parameters and copy their values on the 
> > target parameters, instead of making a direct copy of the property.
> > This should work.
> >
> >
> >
> > For Each oSourceParam in oSourceProperty.parameters
> >     oTargetProperty.parameters( oSourceParam.scriptname ).value = 
> > oSourceParam.value Next
> >
> >
> > Not sure about the exactitude of the VB syntax though.
> >
> >
> >
> > Cheers
> > Bernard
> >
> >
> >
> > On 5/30/07, Adam Seeley <adam.seeley(at)clearpost.co.uk> wrote:
> > > Hi,
> > >
> > > I have a script to copy the Visibility property with it's 
> animation from a Group to a Partition.
> > >
> > > I did this in a fairly crude but effective way. i.e. if 
> the Group has a Visibility Property, then select the 
> Property, Copy it, then select the Partition and Paste it.
> > > This effectively generates the Visibility Property and 
> Copies the Animation (fcurve/expression etc.) in one fell swoop.
> > >
> > >
> > > if localprop.type = "visibility" then
> > >         logmessage "HAS VISIBILITY"
> > >         Selectobj localprop
> > >         Copy
> > >         Selectobj oPartition
> > >         Paste
> > > Else blah blah blah.
> > >
> > > Now I need to copy the Visibility Property from a 
> Referenced Model. Copying from a ref. Model is not allowed though.
> > > I could understand not being able to Paste, but not being 
> able to Copy *from* a ref. Model is a bit mean!
> > >
> > > Does anyone have tips about how best to read the 
> Animation from a Ref. Model/Property & copy the information 
> to another place?
> > >
> > > It's not the same as a value where you can say  
> this.viewvis.value = that.viewvis.value  and I don't seem to 
> be able to Copy info from the Ref model.
> > >
> > >
> > > Many thanks,
> > >
> > > Adam.
> > >
> > >
> > > No virus found in this outgoing message.
> > > Checked by AVG Free Edition.
> > > Version: 7.5.472 / Virus Database: 269.8.3/824 - Release Date: 
> > > 29/05/2007 13:01
> > >
> > >
> > > ---
> > > Unsubscribe? Mail Majordomo(at)Softimage.COM with the 
> following text in body:
> > > unsubscribe xsi
> > >
> >
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following 
> text in body:
> unsubscribe xsi
> 
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit 
> http://www.messagelabs.com/email 
> ______________________________________________________________________
> 
> No virus found in this incoming message.
> Checked by AVG Free Edition. 
> Version: 7.5.472 / Virus Database: 269.8.3/824 - Release 
> Date: 29/05/2007 13:01
>  
> 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.472 / Virus Database: 269.8.7/829 - Release Date: 02/06/2007 17:26
 

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.