Cleanup: Remove unused functions
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 31 Jul 2019 09:46:32 +0000 (11:46 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 31 Jul 2019 09:46:45 +0000 (11:46 +0200)
source/blender/editors/include/ED_object.h
source/blender/editors/object/object_modes.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c

index 038f1bf52a6f0226fce4016cb980fdaebcb12b0a..59dc50783818e0a5342f2a69925485bc1ee2fa22 100644 (file)
@@ -166,13 +166,11 @@ void ED_object_vpaintmode_enter_ex(struct Main *bmain,
                                    struct wmWindowManager *wm,
                                    struct Scene *scene,
                                    struct Object *ob);
-void ED_object_vpaintmode_enter(struct bContext *C);
 void ED_object_wpaintmode_enter_ex(struct Main *bmain,
                                    struct Depsgraph *depsgraph,
                                    struct wmWindowManager *wm,
                                    struct Scene *scene,
                                    struct Object *ob);
-void ED_object_wpaintmode_enter(struct bContext *C);
 
 void ED_object_vpaintmode_exit_ex(struct Object *ob);
 void ED_object_vpaintmode_exit(struct bContext *C);
@@ -185,7 +183,6 @@ void ED_object_sculptmode_enter_ex(struct Main *bmain,
                                    struct Object *ob,
                                    const bool force_dyntopo,
                                    struct ReportList *reports);
-void ED_object_sculptmode_enter(struct bContext *C, struct ReportList *reports);
 void ED_object_sculptmode_exit_ex(struct Main *bmain,
                                   struct Depsgraph *depsgraph,
                                   struct Scene *scene,
@@ -271,7 +268,6 @@ bool ED_object_mode_compat_set(struct bContext *C,
                                struct ReportList *reports);
 void ED_object_mode_toggle(struct bContext *C, eObjectMode mode);
 void ED_object_mode_set(struct bContext *C, eObjectMode mode);
-void ED_object_mode_exit(struct bContext *C);
 
 bool ED_object_mode_generic_enter(struct bContext *C, eObjectMode object_mode);
 void ED_object_mode_generic_exit(struct Main *bmain,
index 0ec98e089a29b03eafaef03afd062c7f1336edbd..23d1a293850744d2d5ea0f218f65c7ed0d8806fc 100644 (file)
@@ -194,20 +194,6 @@ void ED_object_mode_set(bContext *C, eObjectMode mode)
   wm->op_undo_depth--;
 }
 
-void ED_object_mode_exit(bContext *C)
-{
-  Depsgraph *depsgraph = CTX_data_depsgraph(C);
-  struct Main *bmain = CTX_data_main(C);
-  Scene *scene = CTX_data_scene(C);
-  ViewLayer *view_layer = CTX_data_view_layer(C);
-  FOREACH_OBJECT_BEGIN (view_layer, ob) {
-    if (ob->mode & OB_MODE_ALL_MODE_DATA) {
-      ED_object_mode_generic_exit(bmain, depsgraph, scene, ob);
-    }
-  }
-  FOREACH_OBJECT_END;
-}
-
 /** \} */
 
 /* -------------------------------------------------------------------- */
index 47fa2872ff964593338558e22aff56388b4640cf..b599234907e09ff38aefdb0598e67d84b376b345 100644 (file)
@@ -1171,30 +1171,11 @@ void ED_object_vpaintmode_enter_ex(
 {
   ed_vwpaintmode_enter_generic(bmain, depsgraph, wm, scene, ob, OB_MODE_VERTEX_PAINT);
 }
-void ED_object_vpaintmode_enter(struct bContext *C)
-{
-  Main *bmain = CTX_data_main(C);
-  Depsgraph *depsgraph = CTX_data_depsgraph(C);
-  wmWindowManager *wm = CTX_wm_manager(C);
-  Scene *scene = CTX_data_scene(C);
-  Object *ob = CTX_data_active_object(C);
-  ED_object_vpaintmode_enter_ex(bmain, depsgraph, wm, scene, ob);
-}
-
 void ED_object_wpaintmode_enter_ex(
     Main *bmain, Depsgraph *depsgraph, wmWindowManager *wm, Scene *scene, Object *ob)
 {
   ed_vwpaintmode_enter_generic(bmain, depsgraph, wm, scene, ob, OB_MODE_WEIGHT_PAINT);
 }
-void ED_object_wpaintmode_enter(struct bContext *C)
-{
-  Main *bmain = CTX_data_main(C);
-  Depsgraph *depsgraph = CTX_data_depsgraph(C);
-  wmWindowManager *wm = CTX_wm_manager(C);
-  Scene *scene = CTX_data_scene(C);
-  Object *ob = CTX_data_active_object(C);
-  ED_object_wpaintmode_enter_ex(bmain, depsgraph, wm, scene, ob);
-}
 
 /** \} */
 
@@ -2705,8 +2686,9 @@ static bool vpaint_stroke_test_start(bContext *C, struct wmOperator *op, const f
   return 1;
 }
 
-static void do_vpaint_brush_calc_average_color_cb_ex(
-    void *__restrict userdata, const int n, const TaskParallelTLS *__restrict UNUSED(tls))
+static void do_vpaint_brush_calc_average_color_cb_ex(void *__restrict userdata,
+                                                     const int n,
+                                                     const TaskParallelTLS *__restrict UNUSED(tls))
 {
   SculptThreadedTaskData *data = userdata;
   SculptSession *ss = data->ob->sculpt;
index 4b35fdbd2ed46c880ceadd8707d6cad4d0a44863..b9c1c05b3288f922f3f1f19b99cab61212e2ca92 100644 (file)
@@ -6153,16 +6153,6 @@ void ED_object_sculptmode_enter_ex(Main *bmain,
   DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE);
 }
 
-void ED_object_sculptmode_enter(struct bContext *C, ReportList *reports)
-{
-  Main *bmain = CTX_data_main(C);
-  Scene *scene = CTX_data_scene(C);
-  ViewLayer *view_layer = CTX_data_view_layer(C);
-  Object *ob = OBACT(view_layer);
-  Depsgraph *depsgraph = CTX_data_depsgraph(C);
-  ED_object_sculptmode_enter_ex(bmain, depsgraph, scene, ob, false, reports);
-}
-
 void ED_object_sculptmode_exit_ex(Main *bmain, Depsgraph *depsgraph, Scene *scene, Object *ob)
 {
   const int mode_flag = OB_MODE_SCULPT;