Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_conversions.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 6,437 Lines • ▼ Show 20 Lines | |||||
| static void trans_object_base_deps_flag_prepare(ViewLayer *view_layer) | static void trans_object_base_deps_flag_prepare(ViewLayer *view_layer) | ||||
| { | { | ||||
| for (Base *base = view_layer->object_bases.first; base; base = base->next) { | for (Base *base = view_layer->object_bases.first; base; base = base->next) { | ||||
| base->object->id.tag &= ~LIB_TAG_DOIT; | base->object->id.tag &= ~LIB_TAG_DOIT; | ||||
| } | } | ||||
| } | } | ||||
| static void set_trans_object_base_deps_flag_cb(ID *id, void *UNUSED(user_data)) | static void set_trans_object_base_deps_flag_cb(ID *id, | ||||
| eDepsObjectComponentType component, | |||||
| void *UNUSED(user_data)) | |||||
| { | { | ||||
| /* Here we only handle object IDs. */ | /* Here we only handle object IDs. */ | ||||
| if (GS(id->name) != ID_OB) { | if (GS(id->name) != ID_OB) { | ||||
| return; | return; | ||||
| } | } | ||||
| if (component != DEG_OB_COMP_TRANSFORM) { | |||||
| return; | |||||
| } | |||||
| id->tag |= LIB_TAG_DOIT; | id->tag |= LIB_TAG_DOIT; | ||||
| } | } | ||||
| static void flush_trans_object_base_deps_flag(Depsgraph *depsgraph, Object *object) | static void flush_trans_object_base_deps_flag(Depsgraph *depsgraph, Object *object) | ||||
| { | { | ||||
| object->id.tag |= LIB_TAG_DOIT; | object->id.tag |= LIB_TAG_DOIT; | ||||
| DEG_foreach_dependent_ID(depsgraph, &object->id, set_trans_object_base_deps_flag_cb, NULL); | DEG_foreach_dependent_ID_component( | ||||
| depsgraph, &object->id, DEG_OB_COMP_TRANSFORM, set_trans_object_base_deps_flag_cb, NULL); | |||||
| } | } | ||||
| static void trans_object_base_deps_flag_finish(ViewLayer *view_layer) | static void trans_object_base_deps_flag_finish(ViewLayer *view_layer) | ||||
| { | { | ||||
| for (Base *base = view_layer->object_bases.first; base; base = base->next) { | for (Base *base = view_layer->object_bases.first; base; base = base->next) { | ||||
| if (base->object->id.tag & LIB_TAG_DOIT) { | if (base->object->id.tag & LIB_TAG_DOIT) { | ||||
| base->flag_legacy |= BA_SNAP_FIX_DEPS_FIASCO; | base->flag_legacy |= BA_SNAP_FIX_DEPS_FIASCO; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 3,232 Lines • Show Last 20 Lines | |||||