I just tried to control a ColorRamp inside a node group.
For this I made the input value for the ColorRamp go into one output of the nodegroup.
Then I added the ColorRamp outside of the nodegroup, plugged the output of the node group into the input of the ColorRamp and the output of the ColorRamp into the input of the node group.
Now i plugged the input of the nodegroup into the value i want the output of the ColorRamp to go to.
This works just fine apparently but blender shows me a red line (to indicate a feedback loop i think).
Is this something I should worry about?
Is it bad practice?
Is there a better solution?
Thanks for your answers!
Hey, Iāve been looking for a solution to control a color ramp from outside a node group for a while. I never tried this because obviously it doesnāt work. But it works. Cool.
Perhaps file a bug report because of the red line.
Controlling a ColorRamp means changing the function (which color outputs for a value x); not just to change x with that function (thatās using the function).
This implies that you need to access to the rampās control points, which nodes alone wonāt let you.
Iāll leave that for the end.
You created a paradox. Function A and B are āa color for a xā, and since the output is connected to the input for both functions, this became an Egg-Chicken problem. The value x for each function depends on the result of the other, which depends on the result of itself.
It works, because the āred linkā is not even being calculated (as if itās not even there).
Which comes to the root of the problem. A nodegroup is a tree, and a nodegroup_node is a node that reads the tree, and creates the interface (based on the stuff connected to the GroupInput and GroupOutput nodes). The current nodegroup_node doesnāt have any implementation for drawing referenced interfaces, except the socketās for the group_IO nodes.
So the only way to do it is with python, and create your own ānodegroup_nodeā with your own drawing call.
I posted some examples with exactly this as an example here, in the file āTesting_nodes.pyā.
In that particular situation (nodegroup outputs have independent inputs), the tree walker from the engine might figure that the process tree is actually valid, but the node editor is configured to alert looping connections between nodes; it doesnāt check too deeply by unwrapping of the nodetree into a callable function.