Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_utils.c
| Show All 22 Lines | |||||
| #include "DNA_anim_types.h" | #include "DNA_anim_types.h" | ||||
| #include "DNA_armature_types.h" | #include "DNA_armature_types.h" | ||||
| #include "DNA_collection_types.h" | #include "DNA_collection_types.h" | ||||
| #include "DNA_meta_types.h" | #include "DNA_meta_types.h" | ||||
| #include "DNA_object_types.h" | #include "DNA_object_types.h" | ||||
| #include "DNA_scene_types.h" | #include "DNA_scene_types.h" | ||||
| #include "BLI_listbase.h" | |||||
| #include "BLI_math.h" | #include "BLI_math.h" | ||||
| #include "BLI_utildefines.h" | #include "BLI_utildefines.h" | ||||
| #include "BKE_action.h" | #include "BKE_action.h" | ||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| #include "BKE_lattice.h" | #include "BKE_lattice.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| ▲ Show 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | void ED_object_xform_skip_child_container_item_ensure_from_array( | ||||
| uint objects_len) | uint objects_len) | ||||
| { | { | ||||
| GSet *objects_in_transdata = BLI_gset_ptr_new_ex(__func__, objects_len); | GSet *objects_in_transdata = BLI_gset_ptr_new_ex(__func__, objects_len); | ||||
| for (uint ob_index = 0; ob_index < objects_len; ob_index++) { | for (uint ob_index = 0; ob_index < objects_len; ob_index++) { | ||||
| Object *ob = objects[ob_index]; | Object *ob = objects[ob_index]; | ||||
| BLI_gset_add(objects_in_transdata, ob); | BLI_gset_add(objects_in_transdata, ob); | ||||
| } | } | ||||
| for (Base *base = view_layer->object_bases.first; base; base = base->next) { | LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { | ||||
| Object *ob = base->object; | Object *ob = base->object; | ||||
| if (ob->parent != NULL) { | if (ob->parent != NULL) { | ||||
| if (!BLI_gset_haskey(objects_in_transdata, ob)) { | if (!BLI_gset_haskey(objects_in_transdata, ob)) { | ||||
| if (BLI_gset_haskey(objects_in_transdata, ob->parent)) { | if (BLI_gset_haskey(objects_in_transdata, ob->parent)) { | ||||
| ED_object_xform_skip_child_container_item_ensure( | ED_object_xform_skip_child_container_item_ensure( | ||||
| xcs, ob, NULL, XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM); | xcs, ob, NULL, XFORM_OB_SKIP_CHILD_PARENT_IS_XFORM); | ||||
| } | } | ||||
| } | } | ||||
| Show All 13 Lines | if (ob->parent != NULL) { | ||||
| xcs, ob, ob_parent_recurse, XFORM_OB_SKIP_CHILD_PARENT_APPLY); | xcs, ob, ob_parent_recurse, XFORM_OB_SKIP_CHILD_PARENT_APPLY); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| for (Base *base = view_layer->object_bases.first; base; base = base->next) { | LISTBASE_FOREACH (Base *, base, &view_layer->object_bases) { | ||||
| Object *ob = base->object; | Object *ob = base->object; | ||||
| if (BLI_gset_haskey(objects_in_transdata, ob)) { | if (BLI_gset_haskey(objects_in_transdata, ob)) { | ||||
| /* pass. */ | /* pass. */ | ||||
| } | } | ||||
| else if (ob->parent != NULL) { | else if (ob->parent != NULL) { | ||||
| if (BLI_gset_haskey(objects_in_transdata, ob->parent)) { | if (BLI_gset_haskey(objects_in_transdata, ob->parent)) { | ||||
| if (!BLI_gset_haskey(objects_in_transdata, ob)) { | if (!BLI_gset_haskey(objects_in_transdata, ob)) { | ||||
| ▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines | |||||