Hi there,
I want to code something super simple to iterate through all my cameras and just render one frame of each view with the OpenGL render node and save it out as an image.
I create an OpenGL node and set all the parameters accordingly. Everything works quite fine, but for some reason does the Output Image field not pick up the file path, even though it knows where it should save it… (confusing right??)
Basically when I set the string and run eval() on the parameter, it gives me the right location, but it still uses the last value that was hand set before. Since I create the node on the fly, that happens to render to MPlay rather than an image file. But if if cut and past the value I've set with python, it works as well.
Here is the example code that reproduces this problem:
aCam = hou.node('/obj').createNode(“cam”)
aGLnode = hou.node('/out').createNode(“opengl”, node_name='opengl_snapshots')
aGLnode.parm('camera').set(str(aCam.path()))
aGLnode.parm('picture').set(hou.expandString('$HIP/snapshots/'+ str(aCam) + ‘.$F.exr’))
aGLnode.render()
What am I missing? Is there a certain command that gets executed when you manually enter the file path, that I need to invoke as well?
Thanks a lot!
–Markus
Issues setting output file path on OpenGL node with python
2434 0 1- BaiLong
- Member
- 10 posts
- Joined: Dec. 2006
- Offline
-
- Quick Links