DummyCam v1.3
This location is for Registered Users Only.
Perhaps you need to login or register.
13.1, 12.2, 12.1, 12.0, 11.3, 11.2, 11.1, 11.0, 10 or later
Linux, Mac, Windows
DummyCam v1.3 |
DummyCam is a Camera that apart from the matrices also grabs all the 'Projection' values from the upstream camera that it's connected to. Has a 'Defaults' tab with the knob values to use if not there's no Camera connected. It can also be used inside of groups, as many levels deep as you want. All using live and super fast TCL. |
DummyCam is mainly meant for making gizmos that require a Camera input, as there is currently no other way to look for the Projection values upstream, and it is usually solved with ugly callbacks, with a Python button, or looking for the topnode, which only works as long as you don't plug an axis to the top camera, etc. Simply put it inside the Group, plugged to the cam Input node, and voilà.
Special thanks to Ernest Dios, we decyphered the undocumented parts of the code together.
v1.2-1.3 Updates (5 May 2021)
- Fixed to also work with Nuke13's new Camera3 node.
v1.1 Updates/fixes (5 April 2020)
- Now grabs the correct frame from the camera even when there are FrameHolds. Thanks Erwan Leroy for the idea.
- All default values and knob types updated to be the same as the normal Camera.
Comments
Am I getting this right, you return the original camera node itself with the multiline TCL code?
There seems to be an issue in Nuke 14.0v2. It is only very inconsistently able to pick up the transform and projection with both the Classic and Beta Camera. Swapping the input around sometimes fixes it but not always.
I create a new camera in Nuke, and adjust some of the settings away from defaults. Then I add the DummyCam, connected to the new camera.
The DummyCam is created, but it isn't getting the information from the connected camera.
Its not putting the default camera information into the dummy cam Projection knobs either...
I can see the OnCreate Python firing.
But I guess since the rest of code in the the_cam and the_frame Python Custom knobs is TCL, then it won't show up mirrored in the editor.
Although I would expect it to be plastered in there, just to show that the knob had fired.
----
Now, this is weird. I was looking at the gizmo code, and on an impulse, I copied and pasted it into my Nuke script. And lo and behold, the DummyCam that was created works as expected.
It picks up the values of the camera its attached to, and it switches to the internal default values when its disconnected.
I am using the Nuke Survival tool kit because it packages all these tools together. (I updated the internal DummyCam gizmo to v1.3 because NST currently has v1.2 in it.)
Now, where I'm working does all sorts of things with Nuke and cameras. BUT, I'm not sure that its intercepting a create node command that is accessing a gizmo...
Is that possible? ie that when the gizmo fires to create the Camera node for the DummyCam, can that get intercepted?
I... think it must be. Because the DummyCam has an extra tab in it that is a custom tab for us.
Or at least default settings are being created.
Does this sound plausible? And assuming so, can I see the stack of dependencies that Nuke is opening somewhere, so I can track down whats going on?
RSS feed for comments to this post