You can't. To provide values you need nodes. That's their whole purpose.phdubrov wrote:How to manipulate static pins attributes inside nodes?
For example how to set camera aperture inside render target without creating camera node?
Nodes and Nodegraphs in Lua.
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
So if i need create compact preset with not default camera and kernel i create nodegraph with render target out and mesh input and make inside rendertarget, camera and kernel nodes with my defaults? It works but there is no more compact way to make it?
- stratified
- Posts: 945
- Joined: Wed Aug 15, 2012 6:32 am
- Location: Auckland, New Zealand
You could create your setup once and then save it as an OCS file.
Hope this helps...
cheers,
Thomas
Code: Select all
-- create your setup in a graph
...
-- save your graph out as an OCS file
xml = myGraph:writeOCs()
file = io.open("/path/to/file.ocs", "w")
file:write(xml)
file:close()
-- in another script you could load your setup again in the root graph
xml = file:read("*a")
octane.project.readOcs(xml, myGraph)
cheers,
Thomas
I think here is something not clear enough yet: When you create a new node, it will be configured, i.e. for most pins an internal default node is created. You then only have to modify those things you need to modify and leave the rest alone. So if you create a new render target node, it already has an internal camera node, kernel node etc. Only the P_MESH will stay empty.phdubrov wrote:So if i need create compact preset with not default camera and kernel i create nodegraph with render target out and mesh input and make inside rendertarget, camera and kernel nodes with my defaults? It works but there is no more compact way to make it?
As an alternative you can set up whatever you want interactively in Octane Standalone and save it as .ocs file. Then load it into some temporary root node graph, like Thomas described and then copy the content of the root node graph into the root node graph of the current project. This way you won't loose the content of your current project, but merge the .ocs file into it.
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
I tried set camera attributes via rendertarget node not internal camera node. My bad. Didn't get internal nodes concept.
working code
working code
Code: Select all
frontCamera = frontRT:getOwnedItem(octane.P_CAMERA)
frontCamera:setPinValue(octane.P_APERTURE, 0, true)
Don't know how your code above can work, but you would actually write:phdubrov wrote:I tried set camera attributes via rendertarget node not internal camera node. My bad. Didn't get internal nodes concept.
working codeCode: Select all
frontCamera = frontRT:getOwnedItem(octane.P_CAMERA) frontCamera:setPinValue(octane.P_APERTURE, 0, true)
Code: Select all
frontCamera = frontRT:getConnectedNode(octane.P_CAMERA)
frontCamera:setPinValue(octane.P_APERTURE, 0, true)
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
I was wrong, your code should work as long as the pin has an internal node.phdubrov wrote:Why it shouldn't work? But your code is better, thanks.
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
Quick question, although this may have been answered elsewhere.
Since saving shaders is currently disabled, can we create a script to export shaders nodes to ocm files that we can load and use later.
It would make life easier not to recreate the settings every time I use these characters. I know mine isn't as complicated as others but every bit help.
Since saving shaders is currently disabled, can we create a script to export shaders nodes to ocm files that we can load and use later.
It would make life easier not to recreate the settings every time I use these characters. I know mine isn't as complicated as others but every bit help.
Win 11 64GB | NVIDIA RTX3060 12GB
- stratified
- Posts: 945
- Joined: Wed Aug 15, 2012 6:32 am
- Location: Auckland, New Zealand
Hi,Tugpsx wrote:Quick question, although this may have been answered elsewhere.
Since saving shaders is currently disabled, can we create a script to export shaders nodes to ocm files that we can load and use later.
It would make life easier not to recreate the settings every time I use these characters. I know mine isn't as complicated as others but every bit help.
I don't think it's worth to create the script because we shall re-enable material macros in one of the next releases... . You could save your materials with Octane 1.20 for now, the macros are compatible with this version.
cheers,
Thomas