Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/animation/anim_filter.c
| Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
| #include "MEM_guardedalloc.h" | #include "MEM_guardedalloc.h" | ||||
| #include "BLI_blenlib.h" | #include "BLI_blenlib.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BLI_alloca.h" | #include "BLI_alloca.h" | ||||
| #include "BLI_ghash.h" | #include "BLI_ghash.h" | ||||
| #include "BLI_string.h" | #include "BLI_string.h" | ||||
| #include "BKE_animsys.h" | |||||
| #include "BKE_action.h" | #include "BKE_action.h" | ||||
| #include "BKE_fcurve.h" | #include "BKE_animsys.h" | ||||
| #include "BKE_collection.h" | |||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_fcurve.h" | |||||
| #include "BKE_global.h" | #include "BKE_global.h" | ||||
| #include "BKE_group.h" | |||||
| #include "BKE_key.h" | #include "BKE_key.h" | ||||
| #include "BKE_layer.h" | #include "BKE_layer.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_material.h" | #include "BKE_material.h" | ||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_mask.h" | #include "BKE_mask.h" | ||||
| #include "BKE_sequencer.h" | #include "BKE_sequencer.h" | ||||
| ▲ Show 20 Lines • Show All 1,621 Lines • ▼ Show 20 Lines | for (base = view_layer->object_bases.first; base; base = base->next) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| /* check if object belongs to the filtering group if option to filter | /* check if object belongs to the filtering group if option to filter | ||||
| * objects by the grouped status is on | * objects by the grouped status is on | ||||
| * - used to ease the process of doing multiple-character choreographies | * - used to ease the process of doing multiple-character choreographies | ||||
| */ | */ | ||||
| if (ads->filterflag & ADS_FILTER_ONLYOBGROUP) { | if (ads->filterflag & ADS_FILTER_ONLYOBGROUP) { | ||||
| if (BKE_group_object_exists(ads->filter_grp, ob) == 0) | if (BKE_collection_has_object_recursive(ads->filter_grp, ob) == 0) | ||||
| continue; | continue; | ||||
| } | } | ||||
| /* finally, include this object's grease pencil datablock */ | /* finally, include this object's grease pencil datablock */ | ||||
| /* XXX: Should we store these under expanders per item? */ | /* XXX: Should we store these under expanders per item? */ | ||||
| items += animdata_filter_gpencil_data(anim_data, ads, ob->gpd, filter_mode); | items += animdata_filter_gpencil_data(anim_data, ads, ob->gpd, filter_mode); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,150 Lines • ▼ Show 20 Lines | if ((ads->filterflag & ADS_FILTER_ONLYSEL) && !((base->flag & BASE_SELECTED) /*|| (base == sce->basact)*/)) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* check if object belongs to the filtering group if option to filter | /* check if object belongs to the filtering group if option to filter | ||||
| * objects by the grouped status is on | * objects by the grouped status is on | ||||
| * - used to ease the process of doing multiple-character choreographies | * - used to ease the process of doing multiple-character choreographies | ||||
| */ | */ | ||||
| if (ads->filterflag & ADS_FILTER_ONLYOBGROUP) { | if (ads->filterflag & ADS_FILTER_ONLYOBGROUP) { | ||||
| if (BKE_group_object_exists(ads->filter_grp, ob) == 0) | if (BKE_collection_has_object_recursive(ads->filter_grp, ob) == 0) | ||||
| return false; | return false; | ||||
| } | } | ||||
| /* no reason to exclude this object... */ | /* no reason to exclude this object... */ | ||||
| return true; | return true; | ||||
| } | } | ||||
| /* Helper for animdata_filter_ds_sorted_bases() - Comparison callback for two Base pointers... */ | /* Helper for animdata_filter_ds_sorted_bases() - Comparison callback for two Base pointers... */ | ||||
| ▲ Show 20 Lines • Show All 382 Lines • Show Last 20 Lines | |||||