[Bf-blender-cvs] [1c624a12190] master: LibOverride: Fix 'overridable' flag desapearing when setting IDProp from py code.

Bastien Montagne noreply at git.blender.org
Wed Sep 25 14:28:14 CEST 2019


Commit: 1c624a12190cae5dcd06b67f48c1e88b7b70e600
Author: Bastien Montagne
Date:   Tue Sep 24 17:26:30 2019 +0200
Branches: master
https://developer.blender.org/rB1c624a12190cae5dcd06b67f48c1e88b7b70e600

LibOverride: Fix 'overridable' flag desapearing when setting IDProp from py code.

Do not see any reason not to copy over the flag of the old, existing
IDProp to the new one when assigning (e.g. `C.object['prop'] = 0.5`
would nuke that IDProp flag).

===================================================================

M	source/blender/python/generic/idprop_py_api.c

===================================================================

diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index d10d281c1f9..16b2f2dba6d 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -688,6 +688,7 @@ bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty *group,
       /* Preserve prev/next links!!! See T42593. */
       prop->prev = prop_exist->prev;
       prop->next = prop_exist->next;
+      prop->flag = prop_exist->flag;
 
       IDP_FreePropertyContent(prop_exist);
       *prop_exist = *prop;



More information about the Bf-blender-cvs mailing list