  | | | Scripted op refresh | Scripted op refresh 2004-05-06 - By Graham D Clark
Back Dan, If your source is fcurves you won't have the 1 frame off sync issue, plus with fcurves you can eval(time), for forcing an update of my my scop I usually set key on custom parameter variable that is part of the scop and then updatecontext that param within the scop. If you must use an expression source for scops in the future I'm sorry I don't know a way to get around the 1 frame off issue with scops referencing sources other than fcurves, perhaps except by plotting the expressioned object, or compensating with an offset in space or time or using a dummy lead object as reference. Graham PS you shouldn't get much "personally I'd script it better". writing scops is not easy. -- ---- ---- ---- ---- ---- -- http://www.grahamdclark.com <http://www.grahamdclark.com/> 2nd hand TD
-- --Original Message-- -- From: owner-xsi@(protected) [mailto:owner-xsi@(protected)] On Behalf Of Dan Hope Sent: May 6, 2004 12:02 PM To: XSI@(protected) Subject: Scripted op refresh
I've got a really annoying problem that I can't sort out.... I've set up a scripted op on the "scaling along curve" parameter of a cylinder deformed along a curve...it goes something like this: getcurvelength "crvlist", MyLength Out.Value = MyLength/10 I then have a variable with an expression "Fc" set to force an update of the script at every frame. My problem is that it appears to evaluate the expression when exiting the frame, meaning that the length of the cylinder is always one frame behind the curve. How do I get them to be in sync? Bearing in mind this is my first scripted op, please, be gentle....none of this "personally I'd script it better" please....you know who you are ;o) Ta Dan
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1170" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><SPAN class=611192414-06052004><FONT face=Arial color=#0000ff size=2>Dan,</FONT></SPAN></DIV> <DIV><SPAN class=611192414-06052004><FONT face=Arial color=#0000ff size=2>If your source is fcurves you won't have the 1 frame off sync issue, plus with fcurves you can eval(time), for forcing an update of my my scop I usually set key on custom parameter variable that is part of the scop and then updatecontext that param within the scop.</FONT></SPAN></DIV> <DIV><SPAN class=611192414-06052004><FONT face=Arial color=#0000ff size=2>If you must use an expression source for scops in the future I'm sorry I don't know a way to get around the 1 frame off issue with scops referencing sources other than fcurves, perhaps except by plotting the expressioned object, or compensating with an offset in space or time or using a dummy lead object as reference.</FONT></SPAN></DIV> <DIV><SPAN class=611192414-06052004></SPAN><SPAN class=611192414-06052004><FONT face=Arial color=#0000ff size=2>Graham</FONT></SPAN></DIV> <DIV><SPAN class=611192414-06052004><FONT face=Arial color=#0000ff size=2>PS you shouldn't get much<FONT color=#000000> "personally I'd script it better"</FONT><FONT color=#0000ff>. writing scops is not easy.</FONT></FONT></SPAN></DIV> <DIV><FONT face="Times New Roman">-- ---- ---- ---- ---- ---- --</FONT> <BR><FONT face="Times New Roman"><A href="http://www.grahamdclark.com/">http://www.grahamdclark.com</A></FONT> <BR><FONT face="Times New Roman">2nd hand TD</FONT> </DIV> <BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px"> <DIV></DIV> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma size=2>-- --Original Message-- --<BR><B>From:</B> owner-xsi@(protected) [mailto:owner-xsi@(protected)] <B>On Behalf Of </B>Dan Hope<BR><B>Sent:</B> May 6, 2004 12:02 PM<BR><B>To:</B> XSI@(protected)<BR><B>Subject:</B> Scripted op refresh<BR><BR></FONT></DIV> <DIV><FONT face=Arial size=2>I've got a really annoying problem that I can't sort out....</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I've set up a scripted op on the "scaling along curve" parameter of a cylinder deformed along a curve...it goes something like this:</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Courier size=2>getcurvelength "crvlist", MyLength</FONT></DIV> <DIV><FONT size=2><FONT face=Courier>Out.Value = MyLength/10</FONT></FONT></DIV> <DIV><FONT face=Courier size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>I then have a variable with an expression "Fc" set to force an update of the script at every frame.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>My problem is that it appears to evaluate the expression when exiting the frame, meaning that the length of the cylinder is always one frame behind the curve. How do I get them to be in sync?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Bearing in mind this is my first scripted op, please, be gentle....none of this "personally I'd script it better" please....you know who you are ;o)</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Ta</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Dan</FONT></DIV><BR>__ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ __ ____ ____ ____ __<BR>This email has been scanned by the MessageLabs Email Security System.<BR>For more information please visit http://www.messagelabs.com/email <BR>__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __<BR ></BLOCKQUOTE></BODY></HTML>
|
|
 |