I can draw in panel an rgb controller , but not know how to update the rgb node inside material, i can get the name in update function , but not undertand the right way to assign parameter to node rgb, my property are register in Propertygroup:
def update_huesat(self,context):
ob = bpy.context.active_object
nodes = ob.active_material.node_tree.nodes
set = ob.active_material.slot_setting
for n in nodes:
if n.name == 'My node RGB name':
###how to ?? = set.rgb_controller
class MySet(bpy.types.PropertyGroup):
rgb_controller: FloatVectorProperty(name="Diffuse color",subtype='COLOR',default=(1.0, 1.0, 1.0),min=0.0, max=1.0,description="color picker",update = myupdatefunction)
i Can get the node but not undertand to assign that controller.
in the register function i register that with :
Material.slot_setting = bpy.props.PointerProperty(type=MySet)
This allows me to have a custom property on the material slots