[Bf-blender-cvs] [d60a1c30956] id_override_static: Merge branch 'master' into id_override_static
Bastien Montagne
noreply at git.blender.org
Mon Nov 6 20:27:01 CET 2017
Commit: d60a1c30956ae84e0adc1ca0ceb67a504ab0be9a
Author: Bastien Montagne
Date: Mon Nov 6 20:18:58 2017 +0100
Branches: id_override_static
https://developer.blender.org/rBd60a1c30956ae84e0adc1ca0ceb67a504ab0be9a
Merge branch 'master' into id_override_static
Conflicts:
source/blender/makesrna/intern/rna_access.c
===================================================================
===================================================================
diff --cc source/blender/blenkernel/intern/library_query.c
index bec5329b0e2,f6101498aca..466df5862f7
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@@ -368,13 -368,9 +368,13 @@@ void BKE_library_foreach_ID_link(Main *
#define CALLBACK_INVOKE(check_id_super, cb_flag) \
FOREACH_CALLBACK_INVOKE(&data, check_id_super, cb_flag)
+ if (id->override != NULL) {
+ CALLBACK_INVOKE_ID(id->override->reference, IDWALK_CB_USER | IDWALK_CB_STATIC_OVERRIDE_REFERENCE);
+ }
+
for (; id != NULL; id = (flag & IDWALK_RECURSE) ? BLI_LINKSTACK_POP(data.ids_todo) : NULL) {
data.self_id = id;
- data.cb_flag = ID_IS_LINKED_DATABLOCK(id) ? IDWALK_CB_INDIRECT_USAGE : 0;
+ data.cb_flag = ID_IS_LINKED(id) ? IDWALK_CB_INDIRECT_USAGE : 0;
if (bmain != NULL && bmain->relations != NULL && (flag & IDWALK_READONLY)) {
/* Note that this is minor optimization, even in worst cases (like id being an object with lots of
diff --cc source/blender/makesrna/intern/rna_access.c
index 0cbfa71c72c,14e0f6d45aa..4146bb2aca1
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@@ -1756,8 -1755,7 +1756,8 @@@ bool RNA_property_editable(PointerRNA *
return ((flag & PROP_EDITABLE) &&
(flag & PROP_REGISTER) == 0 &&
- (!id || ((!ID_IS_LINKED_DATABLOCK(id) || (prop->flag & PROP_LIB_EXCEPTION)) &&
- (!id || !ID_IS_LINKED(id) || (prop->flag & PROP_LIB_EXCEPTION)));
++ (!id || ((!ID_IS_LINKED(id) || (prop->flag & PROP_LIB_EXCEPTION)) &&
+ (!id->override || (prop->flag & PROP_OVERRIDABLE)))));
}
/**
@@@ -1783,19 -1781,11 +1783,19 @@@ bool RNA_property_editable_info(Pointer
}
/* property from linked data-block */
- if (id && ID_IS_LINKED(id) && (prop->flag & PROP_LIB_EXCEPTION) == 0) {
- if (!(*r_info)[0]) {
- *r_info = "Can't edit this property from a linked data-block.";
+ if (id) {
- if (ID_IS_LINKED_DATABLOCK(id) && (prop->flag & PROP_LIB_EXCEPTION) == 0) {
++ if (ID_IS_LINKED(id) && (prop->flag & PROP_LIB_EXCEPTION) == 0) {
+ if (!(*r_info)[0]) {
+ *r_info = "Can't edit this property from a linked data-block.";
+ }
+ return false;
+ }
+ if (id->override != NULL && (prop->flag & PROP_OVERRIDABLE) == 0) {
+ if (!(*r_info)[0]) {
+ *r_info = "Can't edit this property from an override data-block.";
+ }
+ return false;
}
- return false;
}
return ((flag & PROP_EDITABLE) && (flag & PROP_REGISTER) == 0);
More information about the Bf-blender-cvs
mailing list