Python: Trigger property update in foreach_get/set
Calling `foreach_get/set` on a collection property did not trigger a property update. In the attribute API, this lead to missing updates after e.g. setting the values of an attribute. This adds a call to `RNA_property_update` for the getter/setter bpy rna function and adds a property update callback to all the different attribute collection properties. Pull Request: https://projects.blender.org/blender/blender/pulls/125518
This commit is contained in:
@@ -5742,6 +5742,9 @@ static PyObject *foreach_getset(BPy_PropertyRNA *self, PyObject *args, int set)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (set) {
|
||||
RNA_property_update(BPY_context_get(), &self->ptr, self->prop);
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user