Page 2 of 2
Re: Turntable animations in Lua (part 2)
Posted: Fri Dec 20, 2013 8:56 pm
by stratified
pixelrush wrote:>You can't like stop this script and then scrub the animation....
OK but I could break the script into 2 convenient stages. Settings/Preview and then Render Animation.
After adjusting the settings the camera table is re/calculated. Then I include a 'Preview' button to render (but not save) through every 10th frame, say, and at low samples and small resolution to verify the view/path is as intended. Or, on second thought, perhaps its better to have a slider to choose which frame to preview and it rerenders with each change. I can read from the script table like that, can't I? So its a quasi scrub inside the script but showing in the Octane view... we forget about using that nice Alembic slider...
Then if all is satisfactory I push the big red
Do Miracle Now button down

to run the full and final render set.
You can tell I am not a naturally gifted coder can't you?

Yep, you could add your own time slider to scrub through. Or you could add an extra "add to scene button" which hooks up the animation with your actual project (So you can stop your script and then scrub through the timeline).
cheers,
Thomas
Re: Turntable animations in Lua (part 2)
Posted: Sat Dec 21, 2013 3:40 pm
by r-username
stratified wrote:Node & graph selection is exposed in Lua,
getSelection()
. Or I don't really understand the question

Thanks for the save previews script.
For the "show in script editor" question, one can use the script editor to define scripts then run and they populate the node editor with what was defined in the script.
I was thinking the reverse, making a node setup in the node editor, then right clicking a node or node group and having "show in script editor" that would populate the script editor with the lua script that would define what was selected.
This would be similar to the way i work when coding html (or actionscript or javascript), sometimes it's easer to to use a graphical interface other times it's easer to code in html, but I can jump back an forth between the two.
Not sure if that is any clearer, thanks again for all the scripts
cheers, s
Re: Turntable animations in Lua (part 2)
Posted: Sat Dec 21, 2013 7:06 pm
by Tugpsx
Using the graphical interface give a good frame of reference that can then be refined, so that would be a good idea to add the node to script option since we already have script to node.
Re: Turntable animations in Lua (part 2)
Posted: Sun Dec 29, 2013 1:53 am
by stratified
Just so that I understand this correctly. For example given the next selection:

- selected nodes
Right mouse on the selection and then "script" would then generate something like this in the editor:
Code: Select all
-- auto-generated code
local renderTarget = octane.lua.magic()
local geometryGroup = octane.lua.magic()
local scatter1 = octane.lua.magic()
local scatter2 = octane.lua.magic()
So basically it generates a code template from the selected nodes. I guess it's up to us to decide what the magic will be
Is this what you guys meant?
thanks,
Thomas
Re: Turntable animations in Lua (part 2)
Posted: Sun Dec 29, 2013 9:41 am
by Tugpsx
Exactly, and the fun as you stated will be to figure out what the magic will be. maybe link it to the script location from preference so that a list is generated. the problem with something like that would be reference and variables that link for example render target, ABC file etc.
Re: Turntable animations in Lua (part 2)
Posted: Tue Dec 31, 2013 12:40 am
by stratified
hi everybody,
Grimm reported a problem with the turntable script. I've attached an updated version to the original post.
When there are more scripts around, we'll make a collection of "official" scripts available in Octane itself.
cheers,
Thomas