RE: Bad Operator Update

Date : Wed, 13 Sep 2006 07:20:21 -0400
To : <XSI(at)Softimage.COM>
From : "Helge Mathee" <Helge_Mathee(at)Softimage.COM>
Subject : RE: Bad Operator Update
No I don't.

When you create a scripted op on let's say the kinematics.local of an
objects,
the scop contains two ports. One called something like Inlocal and one
called Out.

To make sure the evaluation is done correctly, you'll have to use the
transform coming from the input port, not the one from the output port,
as you are WRITING to the outputport, and READING from the input one.

example:

var xf = Inlocal.value.transform;
var pos = XSIMath.CreateVector3();
pos.Set(10,0,0);
xf.SetTranslation(pos);
Out.value.transform = xf;

cheers! 

-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On Behalf
Of Daniele Niero
Sent: Wednesday, September 13, 2006 5:33 AM
To: XSI(at)Softimage.COM
Subject: Re: Bad Operator Update

Hi Andy, 

Are you suggesting me to create and use a different Transformation
object, manipulate it and then put it in the
output.kineamtics.global.transform?
Did I understand? 

Hi Mathee, 

Are you saying the same thing Andy is saying? If not I don't get it.
I cannot use as output the final channel, for example
obj.kinematics.global.posx, because this means I have to use 6 output
instead 1 as so have 6 update instead 1.
What I'm missing? 

Thanks a lot to both of you guys
Daniele 

Helge Mathee writes: 

> the reason is that you use the output as an input.
> you need to make two ports, one input and one output port, then get 
> the data from the input, modify it in the operator code and output it 
> to the, well, output port.
> 
> hope this helps
> 
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM] On 
> Behalf Of Andy Nicholas
> Sent: Tuesday, September 12, 2006 10:58 AM
> To: XSI(at)Softimage.COM
> Subject: Re: Bad Operator Update
> 
> Hi Dan,
> 
> You could try this to see if it makes a difference: 
> 
> var xform = XSIMath.CreateTransform(); xform.SetTranslation(pos); 
> out.value.transform = xform;
> 
>  
> 
> 
>> Hi there. 
>>
>> I have an huge problem with a scripted self installing operators 
>> wrote
> 
>> in JScript. What the operator does is not important. the Output is 
>> the
> 
>> Global kineamtics of an objects. the last few lines look like this
> pseudo code:
>>
>> // output is obj.kinematics.global
>> outTrans = output.Transform
>> outTransform.SetTranslation = Vector3 output.Transform = outTransform
>>
>> The operators seems wor5ks fine in most of the cases, but somtimes it

>> has a bad update and the object is transformed not corecctly but with

>> a kinda of delay. This happens when the object are a constrainer or a

>> deformer for an envelope.
>>
>> I tried to change the code in something similar to this:
>> output.Posx = Vector3.x
>> output.Posy = Vector3.y
>> output.Posz = Vector3.z
>>
>> This works better, but sometimes I still have problem. For semplicity

>> I talked just about position but I have Rotation as well. I can't 
>> belive I have to pass as input 6 channel instead of the 
>> Kinematics.Global node for avoid a bad update.
>>
>> Anybody knows a workaround for this problem? Somebodies know if it's 
>> possible force XSI to update an operator correctly. Always Evaluate 
>> is
> 
>> set to true. 
>>
>> Cheers,
>> Daniele
>>
>>
>> ---
>> 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
> 
> ---
> 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

---
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.