Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_edit.c
| Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_modifier.h" | #include "BKE_modifier.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| #include "BKE_particle.h" | #include "BKE_particle.h" | ||||
| #include "BKE_pointcache.h" | #include "BKE_pointcache.h" | ||||
| #include "BKE_softbody.h" | #include "BKE_softbody.h" | ||||
| #include "BKE_editmesh.h" | #include "BKE_editmesh.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_scene.h" | |||||
| #include "BKE_workspace.h" | #include "BKE_workspace.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "DEG_depsgraph_build.h" | #include "DEG_depsgraph_build.h" | ||||
| #include "ED_armature.h" | #include "ED_armature.h" | ||||
| #include "ED_curve.h" | #include "ED_curve.h" | ||||
| #include "ED_mesh.h" | #include "ED_mesh.h" | ||||
| ▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | static int object_hide_view_clear_exec(bContext *C, wmOperator *op) | ||||
| bool changed = false; | bool changed = false; | ||||
| 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->flag & BASE_HIDDEN) { | if (base->flag & BASE_HIDDEN) { | ||||
| base->flag &= ~BASE_HIDDEN; | base->flag &= ~BASE_HIDDEN; | ||||
| changed = true; | changed = true; | ||||
| if (select) { | if (select) { | ||||
| ED_object_base_select(base, BA_SELECT); | /* We cannot call `ED_object_base_select` because | ||||
| * base is not selectable while it is hidden. */ | |||||
| base->flag |= BASE_SELECTED; | |||||
| BKE_scene_object_base_flag_sync_from_base(base); | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if (!changed) { | if (!changed) { | ||||
| return OPERATOR_CANCELLED; | return OPERATOR_CANCELLED; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,564 Lines • Show Last 20 Lines | |||||