Your search for Eslam Ehab returned 4 results.
Search
Calling Python from an expression
You can easily call Python methods from within expressions, similar to calling Tcl expressions from Python via nuke.tcl()
To do this, you use the "python" Tcl method, for example:
[python nuke.thisNode().metadata().keys()]
While this is mostly straight-forward, there are a few things to be aware of..…
Buttons to disable / enable nodes in batch
How to use:
Copy the names of the nodes you need to disable, paste it in the "nodesToDisable" text box, separate them by comma.
Node:
set cut_paste_input [stack 0]
version 12.2 v5
push $cut_paste_input
NoOp {
name disableSlowNodes
selected true
xpos 2490
ypos 3615
addUserKnob {20 User}
addUserKnob {1 nodesToDisable}
nodesToDisable OpticalZDefocus,OpticalZDefocus1,VRayDenoiser1,VRayDenoiser2
addUserKnob {22 Enable T "n = nuke.thisNode()\['nodesToDisable'].getValue()\nn =…
Regular Expressions (re module) to Fix Broken Scripts
I will state up front I am no expert in regular expressions, but by a lot of pounding and testing, I've gotten some really useful results for painlessly helping out with broken scripts (skip tutorials and go to recipes...).
For a primer on regular expressions go here.…
Detecting if a Node's Input has an Alpha Channel
The following expressions will check if the first input of a Node has a channel beginning with an "a". Obviously not 100% foolproof, but should get you started.
TCL Expression:
[string first ".a" [channels [input this 0]]]>-1
Python Expression:
[python "len(\[n for n in nuke.channels(nuke.thisNode().input(0)) if n.find(\".a\") != -1])>0"]