Hi all,
I have some update Problem with my scripted operator.
I have build on a custom parameter a scripted op where I change the file path of a referenced model on every frame.
I use the SetValue Approch to change the Path (jScript: SetValue("RefModel.file", "Models\\YourModel.emdl", null); )
The scripted op works when I leave the property page open of custom parameter.
But when I close the property page there is no update anymore.
And when I try to render a sequenz .... no update of the scrited operator.
Any Idea how to solve this?
update problem with scripted operator
- xsisupport
- Posts: 713
- Joined: 09 Jun 2009, 11:02
- Location: Montreal Canada
- Contact:
Re: update problem with scripted operator
You shouldn't be using commands in an operator. An operator is supposed to be updating a connected port. If you're not using an output port, then it seems to me that you're bypassing the whole evaluation mechanism of Softimage.
Re: update problem with scripted operator
I did it expected that this could be the problem...
I tried a second approach where I create an event plugin which triggers on siOnBeginFrame.
My code use the same comand to change the path .... but nothin happens!!
If I run the script solo .... it works!
But in context of the event plugin .... nothing!
Here is the code I inserted in the event plugin:
It reads three variables from a custom parameter set and set the comand to change the file path of the referenced model.
Any idea?
Thanks
Nico
I tried a second approach where I create an event plugin which triggers on siOnBeginFrame.
My code use the same comand to change the path .... but nothin happens!!
If I run the script solo .... it works!
But in context of the event plugin .... nothing!
Here is the code I inserted in the event plugin:
Code: Select all
// TODO: Put your code here.
Myload = GetValue("control.loading");
if (Myload == 1)
{
InFrame = GetValue("control.currFrame");
inMax = GetValue("control.MaxModells");
LogMessage("Hallo");
if (InFrame <= inMax)
SetValue("M1.file", "Models\\M" + InFrame + ".emdl", null);
else
SetValue("M1.file", "Models\\M" + InMax + ".emdl", null);
}
It reads three variables from a custom parameter set and set the comand to change the file path of the referenced model.
Any idea?
Thanks
Nico
Re: update problem with scripted operator
Hi,
are you sure that's the event you want to use? siOnBeginFrame is fired when a frame begins to render. Maybe you should try siOnTimeChange which fires whenever the timeline changes?
are you sure that's the event you want to use? siOnBeginFrame is fired when a frame begins to render. Maybe you should try siOnTimeChange which fires whenever the timeline changes?
Who is online
Users browsing this forum: No registered users and 61 guests