Commit: 4474b7c9399c56c756c9db1c3ce66144ff1905d0
Author: Falk David
Date:   Fri Aug 21 14:26:48 2020 +0200
Branches: soc-2020-greasepencil-curve
https://developer.blender.org/rB4474b7c9399c56c756c9db1c3ce66144ff1905d0

GPencil: Remove unessesary curve edit mode test

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

M       source/blender/editors/gpencil/gpencil_data.c

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

diff --git a/source/blender/editors/gpencil/gpencil_data.c 
b/source/blender/editors/gpencil/gpencil_data.c
index 6b2f547b6a6..c8721a49055 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -3485,7 +3485,6 @@ static int gpencil_set_active_material_exec(bContext *C, 
wmOperator *op)
 {
   Object *ob = CTX_data_active_object(C);
   bGPdata *gpd = ED_gpencil_data_get_active(C);
-  const bool is_curve_edit = (bool)GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd);
 
   /* Sanity checks. */
   if (gpd == NULL) {
@@ -3494,21 +3493,16 @@ static int gpencil_set_active_material_exec(bContext 
*C, wmOperator *op)
   }
 
   bool changed = false;
-  if (is_curve_edit) {
-    /* TODO: set curve stroke material */
-  }
-  else {
-    /* Loop all selected strokes. */
-    GP_EDITABLE_STROKES_BEGIN (gpstroke_iter, C, gpl, gps) {
-      if (gps->flag & GP_STROKE_SELECT) {
-        /* Change Active material. */
-        ob->actcol = gps->mat_nr + 1;
-        changed = true;
-        break;
-      }
+  /* Loop all selected strokes. */
+  GP_EDITABLE_STROKES_BEGIN (gpstroke_iter, C, gpl, gps) {
+    if (gps->flag & GP_STROKE_SELECT) {
+      /* Change Active material. */
+      ob->actcol = gps->mat_nr + 1;
+      changed = true;
+      break;
     }
-    GP_EDITABLE_STROKES_END(gpstroke_iter);
   }
+  GP_EDITABLE_STROKES_END(gpstroke_iter);
 
   /* notifiers */
   if (changed) {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to