[Bf-blender-cvs] [a6930680471] soc-2019-npr: LANPR: Rename freestyle edge mark functions to LANPR.

YimingWu noreply at git.blender.org
Fri Jul 19 10:26:34 CEST 2019


Commit: a6930680471e5799d536abf766bba2c731cd861c
Author: YimingWu
Date:   Fri Jul 19 10:10:15 2019 +0800
Branches: soc-2019-npr
https://developer.blender.org/rBa6930680471e5799d536abf766bba2c731cd861c

LANPR: Rename freestyle edge mark functions to LANPR.

===================================================================

M	release/scripts/startup/bl_ui/space_view3d.py
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/mesh/mesh_intern.h
M	source/blender/editors/mesh/mesh_ops.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index db0a8fe4b41..f6dec93b4b1 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3477,8 +3477,8 @@ class VIEW3D_MT_edit_mesh_context_menu(Menu):
             if render.use_freestyle or context.scene.lanpr.enabled:
                 col.separator()
 
-                col.operator("mesh.mark_freestyle_edge").clear = False
-                col.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
+                col.operator("mesh.mark_lanpr_edge").clear = False
+                col.operator("mesh.mark_lanpr_edge", text="Clear Freestyle Edge").clear = True
 
             col.separator()
 
@@ -3669,8 +3669,8 @@ class VIEW3D_MT_edit_mesh_edges_data(Menu):
             layout.separator()
 
         #if with_freestyle:     we still presere freestyle mark functions.
-            layout.operator("mesh.mark_freestyle_edge").clear = False
-            layout.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
+            layout.operator("mesh.mark_lanpr_edge").clear = False
+            layout.operator("mesh.mark_lanpr_edge", text="Clear Freestyle Edge").clear = True
 
 
 class VIEW3D_MT_edit_mesh_edges(Menu):
@@ -3726,8 +3726,8 @@ class VIEW3D_MT_edit_mesh_edges(Menu):
         if with_freestyle:
             layout.separator()
 
-            layout.operator("mesh.mark_freestyle_edge").clear = False
-            layout.operator("mesh.mark_freestyle_edge", text="Clear Freestyle Edge").clear = True
+            layout.operator("mesh.mark_lanpr_edge").clear = False
+            layout.operator("mesh.mark_lanpr_edge", text="Clear Freestyle Edge").clear = True
 
 
 class VIEW3D_MT_edit_mesh_faces_data(Menu):
@@ -3751,8 +3751,8 @@ class VIEW3D_MT_edit_mesh_faces_data(Menu):
         layout.separator()
 
         if with_freestyle:
-            layout.operator("mesh.mark_freestyle_face").clear = False
-            layout.operator("mesh.mark_freestyle_face", text="Clear Freestyle Face").clear = True
+            layout.operator("mesh.mark_lanpr_face").clear = False
+            layout.operator("mesh.mark_lanpr_cface", text="Clear Freestyle Face").clear = True
 
 
 class VIEW3D_MT_edit_mesh_faces(Menu):
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index a46dbffbcdd..323b85f9003 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -7422,7 +7422,7 @@ void MESH_OT_symmetry_snap(struct wmOperatorType *ot)
 /** \name Mark Edge (Freestyle) Operator
  * \{ */
 
-static int edbm_mark_freestyle_edge_exec(bContext *C, wmOperator *op)
+static int edbm_mark_lanpr_edge_exec(bContext *C, wmOperator *op)
 {
   BMEdge *eed;
   BMIter iter;
@@ -7476,17 +7476,17 @@ static int edbm_mark_freestyle_edge_exec(bContext *C, wmOperator *op)
   return OPERATOR_FINISHED;
 }
 
-void MESH_OT_mark_freestyle_edge(wmOperatorType *ot)
+void MESH_OT_mark_lanpr_edge(wmOperatorType *ot)
 {
   PropertyRNA *prop;
 
   /* identifiers */
-  ot->name = "Mark Freestyle Edge";
-  ot->description = "(Un)mark selected edges as Freestyle feature edges";
-  ot->idname = "MESH_OT_mark_freestyle_edge";
+  ot->name = "Mark LANPR Edge";
+  ot->description = "(Un)mark selected edges as LANPR feature edges";
+  ot->idname = "MESH_OT_mark_lanpr_edge";
 
   /* api callbacks */
-  ot->exec = edbm_mark_freestyle_edge_exec;
+  ot->exec = edbm_mark_lanpr_edge_exec;
   ot->poll = ED_operator_editmesh;
 
   /* flags */
@@ -7502,7 +7502,7 @@ void MESH_OT_mark_freestyle_edge(wmOperatorType *ot)
 /** \name Mark Face (Freestyle) Operator
  * \{ */
 
-static int edbm_mark_freestyle_face_exec(bContext *C, wmOperator *op)
+static int edbm_mark_lanpr_face_exec(bContext *C, wmOperator *op)
 {
   BMFace *efa;
   BMIter iter;
@@ -7554,17 +7554,17 @@ static int edbm_mark_freestyle_face_exec(bContext *C, wmOperator *op)
   return OPERATOR_FINISHED;
 }
 
-void MESH_OT_mark_freestyle_face(wmOperatorType *ot)
+void MESH_OT_mark_lanpr_face(wmOperatorType *ot)
 {
   PropertyRNA *prop;
 
   /* identifiers */
-  ot->name = "Mark Freestyle Face";
-  ot->description = "(Un)mark selected faces for exclusion from Freestyle feature edge detection";
-  ot->idname = "MESH_OT_mark_freestyle_face";
+  ot->name = "Mark LANPR Face";
+  ot->description = "(Un)mark selected faces for exclusion from LANPR feature edge detection";
+  ot->idname = "MESH_OT_mark_lanpr_face";
 
   /* api callbacks */
-  ot->exec = edbm_mark_freestyle_face_exec;
+  ot->exec = edbm_mark_lanpr_face_exec;
   ot->poll = ED_operator_editmesh;
 
   /* flags */
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index de4b8d21549..8d585977105 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -246,10 +246,8 @@ void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot);
 
 struct wmKeyMap *point_normals_modal_keymap(wmKeyConfig *keyconf);
 
-//#ifdef WITH_FREESTYLE
-void MESH_OT_mark_freestyle_edge(struct wmOperatorType *ot);
-void MESH_OT_mark_freestyle_face(struct wmOperatorType *ot);
-//#endif
+void MESH_OT_mark_lanpr_edge(struct wmOperatorType *ot);
+void MESH_OT_mark_lanpr_face(struct wmOperatorType *ot);
 
 /* *** mesh_data.c *** */
 void MESH_OT_uv_texture_add(struct wmOperatorType *ot);
diff --git a/source/blender/editors/mesh/mesh_ops.c b/source/blender/editors/mesh/mesh_ops.c
index b1b227d5f58..c3387dcfc09 100644
--- a/source/blender/editors/mesh/mesh_ops.c
+++ b/source/blender/editors/mesh/mesh_ops.c
@@ -114,9 +114,7 @@ void ED_operatortypes_mesh(void)
   WM_operatortype_append(MESH_OT_faces_shade_smooth);
   WM_operatortype_append(MESH_OT_faces_shade_flat);
   WM_operatortype_append(MESH_OT_sort_elements);
-  //#ifdef WITH_FREESTYLE
-  WM_operatortype_append(MESH_OT_mark_freestyle_face);
-  //#endif
+  WM_operatortype_append(MESH_OT_mark_lanpr_face);
 
   WM_operatortype_append(MESH_OT_delete);
   WM_operatortype_append(MESH_OT_delete_loose);
@@ -133,9 +131,8 @@ void ED_operatortypes_mesh(void)
   WM_operatortype_append(MESH_OT_loop_multi_select);
   WM_operatortype_append(MESH_OT_mark_seam);
   WM_operatortype_append(MESH_OT_mark_sharp);
-  //#ifdef WITH_FREESTYLE
-  WM_operatortype_append(MESH_OT_mark_freestyle_edge);
-  //#endif
+  WM_operatortype_append(MESH_OT_mark_lanpr_edge);
+
   WM_operatortype_append(MESH_OT_vertices_smooth);
   WM_operatortype_append(MESH_OT_vertices_smooth_laplacian);
   WM_operatortype_append(MESH_OT_flip_normals);



More information about the Bf-blender-cvs mailing list