Thanks for the scripting nodes, they are very cool.


inputWasChanged
to check which input linker changed. Time events are only triggered by the user or a script moving the timeline. You can query the current time directly from every node or graph (e.g. node.time
). Have a look at the script I posted on Friday for the details.Can you post a little example script so I can have a look?grimm wrote:Thanks Thomas that is perfect. Your script is giving me a lot of ideas, very cool.
I'm having a problem with the values that the .time function returns, it doesn't appear to be the same as the timeline scrubber. Look like it's off by one. If I'm on frame 0 it reports 0, which is good. If I move the scrubber to frame 1 it reports zero again. Move the scrubber to frame 2 and it reports the time for frame one, etc.
Then if I move the scrubber back to zero from frame 2 it first reports the time for frame 2 instead of 1. Then when the scrubber reaches zero it reports the time for frame 1. Looks like it's reporting the time it came from instead of the time it is currently on?
Thanks,
Jason
You should usegrimm wrote:Thanks Thomas that is perfect. Your script is giving me a lot of ideas, very cool.
I'm having a problem with the values that the .time function returns, it doesn't appear to be the same as the timeline scrubber. Look like it's off by one. If I'm on frame 0 it reports 0, which is good. If I move the scrubber to frame 1 it reports zero again. Move the scrubber to frame 2 and it reports the time for frame one, etc.
Then if I move the scrubber back to zero from frame 2 it first reports the time for frame 2 instead of 1. Then when the scrubber reaches zero it reports the time for frame 1. Looks like it's reporting the time it came from instead of the time it is currently on?
Thanks,
Jason
graph.time
instead of rootGraph.time
, The time in the document is updated bottom-up. This means that the scripted graph is updated first and then the root graph. The callbacks are done as soon as the scripted graph is updated but at that point the root graph isn't updated yet and hence has still the old time stamp.I haven't tested this but the turntable animation takes a copy of the full scene but your graph script still grabs the original root graph on initialization. So I think you're always querying the time of the original unmodified project.grimm wrote:Hey Thomas,
Sorry looks like more issues, maybe? When I render my animation through the turntable script the script node is getting ignored. Also when I stop the render and exit the script it put Octane in a very strange state. If I try and load another ocs file it locks up Octane so tight I have to kill it with the -9 option.
onInit
function.Thanks Thomas, that makes sense, unfortunately I'm still getting the lag after I changed the code to use graph instead of the root graph. Here is an updated test script:stratified wrote: You should usegraph.time
instead ofrootGraph.time
, The time in the document is updated bottom-up. This means that the scripted graph is updated first and then the root graph. The callbacks are done as soon as the scripted graph is updated but at that point the root graph isn't updated yet and hence has still the old time stamp.
Ah, that makes sense too.stratified wrote: I haven't tested this but the turntable animation takes a copy of the full scene but your graph script still grabs the original root graph on initialization. So I think you're always querying the time of the original unmodified project.
I removed all of the references to the root graph in onInit but it's still locking Octane up.stratified wrote: The crash is a bug in Octane you uncovered. It happens when you tried to access the root graph of the project while the project is still loading. You can work around this by refraining from doing anything with the root node graph in theonInit
function.
Code: Select all
****Event Started****
Scrubber Time - 0.03999999910593
I think this is frame # 0
octane.project.getSceneGraph()
will always return the root graph of the original project. You can get around this by getting the parent graph of the scripted graph which is always the correct one.