I am using this code, based on a previous question: https://blender.stackexchange.com/a/302335/171509
import bpy
Color_Node_UID = "Test"
obj = bpy.context.selected_objects[0]
obj[Color_Node_UID] = (1.0, 0.0, 0.0)
ui_prop = obj.id_properties_ui(Color_Node_UID)
ui_prop.update(subtype="COLOR", min=0.0, max=1.0)
Which will create the custom attribute for this specific object:
In the shader I have an attribute node, named Test:

But in the viewport it is still black
Do I open the color picker and change anything it is updating correctly:
I already had the same issue here: https://blender.stackexchange.com/a/298953/171509
The solution was to have an empty lamda in the FloatVectorProperty:
bpy.types.Object.custom_color = bpy.props.FloatVectorProperty(
name="Custom Color",
subtype='COLOR',
default=(1.0, 1.0, 1.0),
min=0.0,
max=1.0,
update=lambda self, context: None
)
But I just can't figure out how I can get the update lamda in the id_properties_ui.
ui_prop.update(subtype="COLOR", min=0.0, max=1.0, update=lambda self, context: None)
Errors with:
Python: Traceback (most recent call last):
File "\Text", line 9, in <module>
TypeError: 'update' is an invalid keyword argument for update()
Would be epic to get a hint.




` import bpy Color_Node_UID = "Test"
obj = bpy.context.selected_objects[0] obj[Color_Node_UID] = (1.0, 0.0, 0.0) ui_prop = obj.id_properties_ui(Color_Node_UID) ui_prop.update(subtype="COLOR", min=0.0, max=1.0)
obj.hide_render = obj.hide_render `
– YupDiDo Oct 17 '23 at 12:49ui_prop = ui_propwill fire theupdatecallback – Gorgious Oct 17 '23 at 13:48