LibOverride: Consider animated/driven properties as part of the 'system override' ones in the Outliner.
Conceptually animated/driven properties are not controlled by the liboverride system anymore, even though they may generate override operations. So consider them as part of the 'system overrides' category, and hide them by default in the Outliner.
This commit is contained in:
@@ -71,18 +71,29 @@ void TreeElementOverridesBase::expand(SpaceOutliner &space_outliner) const
|
||||
const bool is_rna_path_valid = BKE_lib_override_rna_property_find(
|
||||
&idpoin, override_prop, &override_rna_ptr, &override_rna_prop, &rnaprop_index);
|
||||
|
||||
if (is_rna_path_valid && !show_system_overrides &&
|
||||
ELEM(override_prop->rna_prop_type, PROP_POINTER, PROP_COLLECTION) &&
|
||||
RNA_struct_is_ID(RNA_property_pointer_type(&override_rna_ptr, override_rna_prop))) {
|
||||
/* Check for conditions where the liboverride property should be considered as a system
|
||||
* override, if needed. */
|
||||
if (is_rna_path_valid && !show_system_overrides) {
|
||||
bool do_continue = true;
|
||||
for (auto *override_prop_op :
|
||||
ListBaseWrapper<IDOverrideLibraryPropertyOperation>(override_prop->operations)) {
|
||||
if ((override_prop_op->flag & IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE) == 0) {
|
||||
do_continue = false;
|
||||
break;
|
||||
|
||||
/* Matching ID pointers are considered as system overrides. */
|
||||
if (ELEM(override_prop->rna_prop_type, PROP_POINTER, PROP_COLLECTION) &&
|
||||
RNA_struct_is_ID(RNA_property_pointer_type(&override_rna_ptr, override_rna_prop))) {
|
||||
for (auto *override_prop_op :
|
||||
ListBaseWrapper<IDOverrideLibraryPropertyOperation>(override_prop->operations)) {
|
||||
if ((override_prop_op->flag & IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE) == 0) {
|
||||
do_continue = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Animated/driven properties are considered as system overrides. */
|
||||
if (!BKE_lib_override_library_property_is_animated(
|
||||
&id, override_prop, override_rna_prop, rnaprop_index)) {
|
||||
do_continue = false;
|
||||
}
|
||||
|
||||
if (do_continue) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user