Is there a way to set a global variable and to use it in the Node Editor?
For example: I have many materials on different objects with different colors. I setup a Groupnode which allows me to set the V of the HSV Colormodel. I use this groupnode to assigne the colors in the materials. Now my idea was to have a global variable and to connect it to the V of the Groupnode. So I would be able to darken all colors setuped wit the Groupnode in one changing (in changing the global variable). Sorry about my English :-).
You could use drivers… But drivers don’t act on elements inside Nodegroups (they act, but cycles doesn’t update nodes inside nodegroups), so you’d need to add the driver to the nodegroup interface in all your materials.
you should change the value in the particular node inside the nodegroup (as JuhaW posted), and not the nodegroup input. The Inputs/outputs default_values are for the instances of the node group; to change all nodegroups, you must perform the changes inside the nodegroup.
Also the socket to be changed should be disconnected, so that the default_value is not overwritten.
Some stuff in Cycles nodes can be accessed through data-blocks in the outliner. It’s a bit round-about and a PITA to find things (being honest - the process isn’t as easy as it should be. If it were easy the driver would just go on the node.), but it does let you apply drivers that way. You’ve really got to dig through the tree list for materials, and then scroll all the way down for cycles nodes, and the specific node property you’re trying to add a driver to. Driver isn’t applied to the node in the layout editor but to the property under the input value for the data-block. (However you can watch the node editor to see if the property changes, if it does you have the right one set.)
Still doing it that way some stuff is wonky with updating. I think it works a little better with one of the “force extra updates” options checked on under “Relations extras” for the particular object the material is applied upon.
On the tool shelf, you have a ‘Nodegroup Hue Changer’ panel, with a float prop
Changin that value, will automatically change the ‘Hue’ input of the ‘Hue Saturation Value’ node inside the nodegroup, that is shared over all materials (which are different)
For changing other value than ‘Hue’, you can change the 5th line of the script
[…]nodes[‘Hue Saturation Value’].inputs[‘Saturation’].default_value = …