Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_modes.c
| Show All 37 Lines | |||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "WM_types.h" | #include "WM_types.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "DEG_depsgraph.h" | #include "DEG_depsgraph.h" | ||||
| #include "ED_armature.h" | #include "ED_armature.h" | ||||
| #include "ED_gpencil.h" | |||||
| #include "ED_screen.h" | #include "ED_screen.h" | ||||
| #include "ED_object.h" /* own include */ | #include "ED_object.h" /* own include */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name High Level Mode Operations | /** \name High Level Mode Operations | ||||
| * | * | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 184 Lines • ▼ Show 20 Lines | |||||
| else if (ob->mode & OB_MODE_POSE) { | else if (ob->mode & OB_MODE_POSE) { | ||||
| if (ob->pose != NULL) { | if (ob->pose != NULL) { | ||||
| if (only_test) { | if (only_test) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| ED_object_posemode_exit_ex(bmain, ob); | ED_object_posemode_exit_ex(bmain, ob); | ||||
| } | } | ||||
| } | } | ||||
| else if ((ob->type == OB_GPENCIL) && ((ob->mode & OB_MODE_OBJECT) == 0)) { | |||||
| if (only_test) { | |||||
| return true; | |||||
| } | |||||
| ED_object_gpencil_exit(bmain, ob); | |||||
| } | |||||
| else { | else { | ||||
| if (only_test) { | if (only_test) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| BLI_assert((ob->mode & OB_MODE_ALL_MODE_DATA) == 0); | BLI_assert((ob->mode & OB_MODE_ALL_MODE_DATA) == 0); | ||||
| } | } | ||||
| return false; | return false; | ||||
| Show All 16 Lines | |||||