diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve.c | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_object.h | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_add.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_navmesh.c | 4 | ||||
-rw-r--r-- | source/blender/editors/mesh/meshtools.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_add.c | 16 | ||||
-rw-r--r-- | source/blender/editors/object/object_edit.c | 10 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_tools.c | 2 |
10 files changed, 28 insertions, 28 deletions
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c index 8bd1830a289..f95fbd1eacb 100644 --- a/source/blender/editors/curve/editcurve.c +++ b/source/blender/editors/curve/editcurve.c @@ -6134,8 +6134,8 @@ int join_curve_exec(bContext *C, wmOperator *UNUSED(op)) DAG_relations_tag_update(bmain); // because we removed object(s), call before editmode! - ED_object_enter_editmode(C, EM_WAITCURSOR); - ED_object_exit_editmode(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO); + ED_object_editmode_enter(C, EM_WAITCURSOR); + ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO); WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene); @@ -6603,7 +6603,7 @@ static int curvesurf_prim_add(bContext *C, wmOperator *op, int type, int isSurf) /* userdef */ if (newob && !enter_editmode) { - ED_object_exit_editmode(C, EM_FREEDATA); + ED_object_editmode_exit(C, EM_FREEDATA); } WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit); diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h index 8a37b1bf4ad..e23465f15a8 100644 --- a/source/blender/editors/include/ED_object.h +++ b/source/blender/editors/include/ED_object.h @@ -128,8 +128,8 @@ void ED_object_toggle_modes(struct bContext *C, int mode); #define EM_WAITCURSOR 4 #define EM_DO_UNDO 8 #define EM_IGNORE_LAYER 16 -void ED_object_exit_editmode(struct bContext *C, int flag); -void ED_object_enter_editmode(struct bContext *C, int flag); +void ED_object_editmode_exit(struct bContext *C, int flag); +void ED_object_editmode_enter(struct bContext *C, int flag); bool ED_object_editmode_load(struct Object *obedit); void ED_object_location_from_view(struct bContext *C, float loc[3]); diff --git a/source/blender/editors/mesh/editmesh_add.c b/source/blender/editors/mesh/editmesh_add.c index 29a7b599983..1daf39d3319 100644 --- a/source/blender/editors/mesh/editmesh_add.c +++ b/source/blender/editors/mesh/editmesh_add.c @@ -70,7 +70,7 @@ static Object *make_prim_init(bContext *C, const char *idname, rename_id((ID *)obedit->data, idname); /* create editmode */ - ED_object_enter_editmode(C, EM_DO_UNDO | EM_IGNORE_LAYER); /* rare cases the active layer is messed up */ + ED_object_editmode_enter(C, EM_DO_UNDO | EM_IGNORE_LAYER); /* rare cases the active layer is messed up */ *state = 1; } @@ -93,7 +93,7 @@ static void make_prim_finish(bContext *C, Object *obedit, int *state, int enter_ /* userdef */ if (exit_editmode) { - ED_object_exit_editmode(C, EM_FREEDATA); /* adding EM_DO_UNDO messes up operator redo */ + ED_object_editmode_exit(C, EM_FREEDATA); /* adding EM_DO_UNDO messes up operator redo */ } WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit); } diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c index d85fc420e14..2111b6f3409 100644 --- a/source/blender/editors/mesh/mesh_navmesh.c +++ b/source/blender/editors/mesh/mesh_navmesh.c @@ -330,7 +330,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, copy_v3_v3(obedit->rot, rot); } - ED_object_enter_editmode(C, EM_DO_UNDO | EM_IGNORE_LAYER); + ED_object_editmode_enter(C, EM_DO_UNDO | EM_IGNORE_LAYER); em = BMEdit_FromObject(obedit); if (!createob) { @@ -416,7 +416,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh, WM_event_add_notifier(C, NC_GEOM | ND_DATA, obedit->data); - ED_object_exit_editmode(C, EM_FREEDATA); + ED_object_editmode_exit(C, EM_FREEDATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit); if (createob) { diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c index 89fee2cdc4f..562bc4a8e02 100644 --- a/source/blender/editors/mesh/meshtools.c +++ b/source/blender/editors/mesh/meshtools.c @@ -566,8 +566,8 @@ int join_mesh_exec(bContext *C, wmOperator *op) DAG_relations_tag_update(bmain); // removed objects, need to rebuild dag #if 0 - ED_object_enter_editmode(C, EM_WAITCURSOR); - ED_object_exit_editmode(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO); + ED_object_editmode_enter(C, EM_WAITCURSOR); + ED_object_editmode_exit(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO); #else /* toggle editmode using lower level functions so this can be called from python */ EDBM_mesh_make(scene->toolsettings, scene, ob); diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 1cc428b3deb..63582feadb7 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -372,7 +372,7 @@ Object *ED_object_add_type(bContext *C, int type, const float loc[3], const floa /* for as long scene has editmode... */ if (CTX_data_edit_object(C)) - ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); /* freedata, and undo */ + ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); /* freedata, and undo */ /* deselects all, sets scene->basact */ ob = BKE_object_add(scene, type); @@ -390,7 +390,7 @@ Object *ED_object_add_type(bContext *C, int type, const float loc[3], const floa } if (enter_editmode) - ED_object_enter_editmode(C, EM_IGNORE_LAYER); + ED_object_editmode_enter(C, EM_IGNORE_LAYER); WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene); @@ -454,11 +454,11 @@ static int effector_add_exec(bContext *C, wmOperator *op) rename_id(&ob->id, DATA_("CurveGuide")); ((Curve *)ob->data)->flag |= CU_PATH | CU_3D; - ED_object_enter_editmode(C, 0); + ED_object_editmode_enter(C, 0); ED_object_new_primitive_matrix(C, ob, loc, rot, mat, FALSE); BLI_addtail(object_editcurve_get(ob), add_nurbs_primitive(C, ob, mat, CU_NURBS | CU_PRIM_PATH, 1)); if (!enter_editmode) - ED_object_exit_editmode(C, EM_FREEDATA); + ED_object_editmode_exit(C, EM_FREEDATA); } else { ob = ED_object_add_type(C, OB_EMPTY, loc, rot, FALSE, layer); @@ -578,7 +578,7 @@ static int object_metaball_add_exec(bContext *C, wmOperator *op) /* userdef */ if (newob && !enter_editmode) { - ED_object_exit_editmode(C, EM_FREEDATA); + ED_object_editmode_exit(C, EM_FREEDATA); } WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit); @@ -661,7 +661,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) if ((obedit == NULL) || (obedit->type != OB_ARMATURE)) { obedit = ED_object_add_type(C, OB_ARMATURE, loc, rot, TRUE, layer); - ED_object_enter_editmode(C, 0); + ED_object_editmode_enter(C, 0); newob = 1; } else { @@ -678,7 +678,7 @@ static int object_armature_add_exec(bContext *C, wmOperator *op) /* userdef */ if (newob && !enter_editmode) - ED_object_exit_editmode(C, EM_FREEDATA); + ED_object_editmode_exit(C, EM_FREEDATA); WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, obedit); @@ -1707,7 +1707,7 @@ static int convert_exec(bContext *C, wmOperator *op) DAG_relations_tag_update(bmain); } -// XXX ED_object_enter_editmode(C, 0); +// XXX ED_object_editmode_enter(C, 0); // XXX exit_editmode(C, EM_FREEDATA|EM_WAITCURSOR); /* freedata, but no undo */ if (basact) { diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index b21bbdb0b92..12400209866 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -372,7 +372,7 @@ bool ED_object_editmode_load(Object *obedit) return ED_object_editmode_load_ex(obedit, false); } -void ED_object_exit_editmode(bContext *C, int flag) +void ED_object_editmode_exit(bContext *C, int flag) { /* Note! only in exceptional cases should 'EM_DO_UNDO' NOT be in the flag */ /* Note! if 'EM_FREEDATA' isn't in the flag, use ED_object_editmode_load directly */ @@ -420,7 +420,7 @@ void ED_object_exit_editmode(bContext *C, int flag) } -void ED_object_enter_editmode(bContext *C, int flag) +void ED_object_editmode_enter(bContext *C, int flag) { Scene *scene = CTX_data_scene(C); Base *base = NULL; @@ -557,9 +557,9 @@ static int editmode_toggle_exec(bContext *C, wmOperator *UNUSED(op)) ToolSettings *toolsettings = CTX_data_tool_settings(C); if (!CTX_data_edit_object(C)) - ED_object_enter_editmode(C, EM_WAITCURSOR); + ED_object_editmode_enter(C, EM_WAITCURSOR); else - ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR); /* had EM_DO_UNDO but op flag calls undo too [#24685] */ + ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR); /* had EM_DO_UNDO but op flag calls undo too [#24685] */ ED_space_image_uv_sculpt_update(CTX_wm_manager(C), toolsettings); @@ -609,7 +609,7 @@ static int posemode_exec(bContext *C, wmOperator *UNUSED(op)) if (base->object->type == OB_ARMATURE) { if (base->object == CTX_data_edit_object(C)) { - ED_object_exit_editmode(C, EM_FREEDATA | EM_DO_UNDO); + ED_object_editmode_exit(C, EM_FREEDATA | EM_DO_UNDO); ED_armature_enter_posemode(C, base); } else if (base->object->mode & OB_MODE_POSE) diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 6045bdfebfe..bf458290b09 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1458,7 +1458,7 @@ void ED_screen_set_scene(bContext *C, bScreen *screen, Scene *scene) return; if (ed_screen_used(CTX_wm_manager(C), screen)) - ED_object_exit_editmode(C, EM_FREEDATA | EM_DO_UNDO); + ED_object_editmode_exit(C, EM_FREEDATA | EM_DO_UNDO); for (sc = CTX_data_main(C)->screen.first; sc; sc = sc->id.next) { if ((U.flag & USER_SCENEGLOBAL) || sc == screen) { diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 6fcfb457615..29f1b3fb5a3 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -237,7 +237,7 @@ static int tree_element_set_active_object(bContext *C, Scene *scene, SpaceOops } if (ob != scene->obedit) - ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); + ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); return 1; } @@ -643,7 +643,7 @@ static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *UNUS if (set) { if (scene->obedit) - ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); + ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); if (ob->mode & OB_MODE_POSE) ED_armature_exit_posemode(C, base); diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c index 258f0338d1e..9b9e7bef42c 100644 --- a/source/blender/editors/space_outliner/outliner_tools.c +++ b/source/blender/editors/space_outliner/outliner_tools.c @@ -300,7 +300,7 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, if (base) { // check also library later if (scene->obedit == base->object) - ED_object_exit_editmode(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); + ED_object_editmode_exit(C, EM_FREEDATA | EM_FREEUNDO | EM_WAITCURSOR | EM_DO_UNDO); ED_base_object_free_and_unlink(CTX_data_main(C), scene, base); te->directdata = NULL; |