[Bf-blender-cvs] [1bdd255793d] temp-lineart-contained: LineArt: Baking buttons rename.

YimingWu noreply at git.blender.org
Fri Mar 12 05:53:13 CET 2021


Commit: 1bdd255793d816a3ccbc7c13a796e6cdfdc536aa
Author: YimingWu
Date:   Fri Mar 12 12:52:29 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rB1bdd255793d816a3ccbc7c13a796e6cdfdc536aa

LineArt: Baking buttons rename.

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

M	source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M	source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h
M	source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index 9dab0717ddc..70f3cc8c537 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -392,14 +392,13 @@ static void baking_panel_draw(const bContext *UNUSED(C), Panel *panel)
 
   uiLayoutSetPropSep(layout, true);
 
-  // TODO come up with better names for these buttons!
-  uiItemO(layout, IFACE_("Bake Current Object"), ICON_NONE, "OBJECT_OT_lineart_bake_strokes");
-  uiItemO(layout,
-          IFACE_("Bake All Line Art Objects"),
-          ICON_NONE,
-          "OBJECT_OT_lineart_bake_strokes_all_targets");
-  uiItemO(layout, IFACE_("Clear Current Object"), ICON_NONE, "OBJECT_OT_lineart_clear_strokes");
-  uiItemO(layout, IFACE_("Clear All Objects"), ICON_NONE, "OBJECT_OT_lineart_clear_strokes_all");
+  uiLayout *column = uiLayoutColumn(layout, false);
+  uiItemO(column, NULL, ICON_NONE, "OBJECT_OT_lineart_bake_strokes");
+  uiItemO(column, NULL, ICON_NONE, "OBJECT_OT_lineart_bake_strokes_all");
+
+  column = uiLayoutColumn(layout, false);
+  uiItemO(column, NULL, ICON_NONE, "OBJECT_OT_lineart_clear");
+  uiItemO(column, NULL, ICON_NONE, "OBJECT_OT_lineart_clear_all");
 }
 
 static void panelRegister(ARegionType *region_type)
diff --git a/source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h
index 363cb82c298..67b2bbfdc36 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h
+++ b/source/blender/gpencil_modifiers/intern/lineart/ED_lineart.h
@@ -551,8 +551,8 @@ struct wmOperatorType;
 
 /* Operator types */
 void OBJECT_OT_lineart_bake_strokes(struct wmOperatorType *ot);
-void OBJECT_OT_lineart_bake_strokes_all_targets(struct wmOperatorType *ot);
-void OBJECT_OT_lineart_clear_strokes(struct wmOperatorType *ot);
-void OBJECT_OT_lineart_clear_strokes_all_targets(struct wmOperatorType *ot);
+void OBJECT_OT_lineart_bake_strokes_all(struct wmOperatorType *ot);
+void OBJECT_OT_lineart_clear(struct wmOperatorType *ot);
+void OBJECT_OT_lineart_clear_all(struct wmOperatorType *ot);
 
 void ED_operatortypes_lineart(void);
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
index 3fcbc235984..fbfefa85eba 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c
@@ -297,13 +297,13 @@ static int lineart_gpencil_bake_common(bContext *C,
   }
 }
 
-static int lineart_gpencil_bake_strokes_all_targets_invoke(bContext *C,
-                                                           wmOperator *op,
-                                                           const wmEvent *UNUSED(event))
+static int lineart_gpencil_bake_strokes_all_invoke(bContext *C,
+                                                   wmOperator *op,
+                                                   const wmEvent *UNUSED(event))
 {
   return lineart_gpencil_bake_common(C, op, true, true);
 }
-static int lineart_gpencil_bake_strokes_all_targets_exec(bContext *C, wmOperator *op)
+static int lineart_gpencil_bake_strokes_all_exec(bContext *C, wmOperator *op)
 {
   return lineart_gpencil_bake_common(C, op, true, false);
 }
@@ -359,7 +359,7 @@ static int lineart_gpencil_clear_strokes_exec(bContext *C, wmOperator *op)
   WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_EDITED, ob);
   return OPERATOR_FINISHED;
 }
-static int lineart_gpencil_clear_strokes_all_targets_exec(bContext *C, wmOperator *op)
+static int lineart_gpencil_clear_strokes_all_exec(bContext *C, wmOperator *op)
 {
   CTX_DATA_BEGIN (C, Object *, ob, visible_objects) {
     if (ob->type != OB_GPENCIL) {
@@ -390,8 +390,8 @@ static int lineart_gpencil_clear_strokes_all_targets_exec(bContext *C, wmOperato
 /* Bake all line art modifiers on the current object. */
 void OBJECT_OT_lineart_bake_strokes(wmOperatorType *ot)
 {
-  ot->name = "Bake Line Art Strokes";
-  ot->description = "Bake Line Art all line art modifier on this object";
+  ot->name = "Bake Line Art";
+  ot->description = "Bake Line Art for current GPencil object";
   ot->idname = "OBJECT_OT_lineart_bake_strokes";
 
   ot->invoke = lineart_gpencil_bake_strokes_invoke;
@@ -400,41 +400,41 @@ void OBJECT_OT_lineart_bake_strokes(wmOperatorType *ot)
 }
 
 /* Bake all lineart objects in the scene. */
-void OBJECT_OT_lineart_bake_strokes_all_targets(wmOperatorType *ot)
+void OBJECT_OT_lineart_bake_strokes_all(wmOperatorType *ot)
 {
-  ot->name = "Bake Line Art For All Targets";
-  ot->description = "Bake all Line Art targets in the scene";
-  ot->idname = "OBJECT_OT_lineart_bake_strokes_all_targets";
+  ot->name = "Bake Line Art (All)";
+  ot->description = "Bake all GPencil objects who has at least one Line Art modifier";
+  ot->idname = "OBJECT_OT_lineart_bake_strokes_all";
 
-  ot->invoke = lineart_gpencil_bake_strokes_all_targets_invoke;
-  ot->exec = lineart_gpencil_bake_strokes_all_targets_exec;
+  ot->invoke = lineart_gpencil_bake_strokes_all_invoke;
+  ot->exec = lineart_gpencil_bake_strokes_all_exec;
   ot->modal = lineart_gpencil_bake_strokes_commom_modal;
 }
 
 /* clear all line art modifiers on the current object. */
-void OBJECT_OT_lineart_clear_strokes(wmOperatorType *ot)
+void OBJECT_OT_lineart_clear(wmOperatorType *ot)
 {
-  ot->name = "Clear Line Art Strokes";
-  ot->description = "Clear Line Art grease pencil strokes for this target";
-  ot->idname = "OBJECT_OT_lineart_clear_strokes";
+  ot->name = "Clear Baked Line Art";
+  ot->description = "Clear all strokes in current GPencil obejct.";
+  ot->idname = "OBJECT_OT_lineart_clear";
 
   ot->exec = lineart_gpencil_clear_strokes_exec;
 }
 
 /* clear all lineart objects in the scene. */
-void OBJECT_OT_lineart_clear_strokes_all_targets(wmOperatorType *ot)
+void OBJECT_OT_lineart_clear_all(wmOperatorType *ot)
 {
-  ot->name = "Clear All Line Art Strokes";
-  ot->description = "Clear all Line Art targets in the scene";
-  ot->idname = "OBJECT_OT_lineart_clear_strokes_all";
+  ot->name = "Clear Baked Line Art (All)";
+  ot->description = "Clear all strokes in all GPencil obejcts who has a Line Art modifier";
+  ot->idname = "OBJECT_OT_lineart_clear_all";
 
-  ot->exec = lineart_gpencil_clear_strokes_all_targets_exec;
+  ot->exec = lineart_gpencil_clear_strokes_all_exec;
 }
 
 void ED_operatortypes_lineart(void)
 {
   WM_operatortype_append(OBJECT_OT_lineart_bake_strokes);
-  WM_operatortype_append(OBJECT_OT_lineart_bake_strokes_all_targets);
-  WM_operatortype_append(OBJECT_OT_lineart_clear_strokes);
-  WM_operatortype_append(OBJECT_OT_lineart_clear_strokes_all_targets);
+  WM_operatortype_append(OBJECT_OT_lineart_bake_strokes_all);
+  WM_operatortype_append(OBJECT_OT_lineart_clear);
+  WM_operatortype_append(OBJECT_OT_lineart_clear_all);
 }



More information about the Bf-blender-cvs mailing list