[Bf-blender-cvs] [d8991b23e3a] greasepencil-object: Enable point selection in sculpt mode

Antonio Vazquez noreply at git.blender.org
Fri Jun 23 16:39:28 CEST 2017


Commit: d8991b23e3ab5c3db2ca5d1ae647d272b4c6b7d1
Author: Antonio Vazquez
Date:   Fri Jun 23 16:39:15 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBd8991b23e3ab5c3db2ca5d1ae647d272b4c6b7d1

Enable point selection in sculpt mode

To use selection mask during sculpt need to use point selection operators.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 0536fe340c1..f03946501cb 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -95,8 +95,8 @@ static int gpencil_select_all_exec(bContext *C, wmOperator *op)
 		return OPERATOR_CANCELLED;
 	}
 	
-	/* if not edit mode, the event is catched but not processed */
-	if ((gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -219,8 +219,8 @@ static int gpencil_select_linked_exec(bContext *C, wmOperator *op)
 		return OPERATOR_CANCELLED;
 	}
 
-	/* if not edit mode, the event is catched but not processed */
-	if ((gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -362,8 +362,8 @@ static int gpencil_select_grouped_exec(bContext *C, wmOperator *op)
 {
 	eGP_SelectGrouped mode = RNA_enum_get(op->ptr, "type");
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
-	/* if not edit mode, the event is catched but not processed */
-	if ((!gpd) || (gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -416,8 +416,8 @@ void GPENCIL_OT_select_grouped(wmOperatorType *ot)
 static int gpencil_select_first_exec(bContext *C, wmOperator *op)
 {
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
-	/* if not edit mode, the event is catched but not processed */
-	if ((!gpd) || (gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -482,8 +482,8 @@ void GPENCIL_OT_select_first(wmOperatorType *ot)
 static int gpencil_select_last_exec(bContext *C, wmOperator *op)
 {
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
-	/* if not edit mode, the event is catched but not processed */
-	if ((!gpd) || (gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -548,8 +548,8 @@ void GPENCIL_OT_select_last(wmOperatorType *ot)
 static int gpencil_select_more_exec(bContext *C, wmOperator *UNUSED(op))
 {
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
-	/* if not edit mode, the event is catched but not processed */
-	if ((!gpd) || (gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -624,8 +624,8 @@ void GPENCIL_OT_select_more(wmOperatorType *ot)
 static int gpencil_select_less_exec(bContext *C, wmOperator *UNUSED(op))
 {
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
-	/* if not edit mode, the event is catched but not processed */
-	if ((!gpd) || (gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -793,8 +793,8 @@ static bool gp_stroke_do_circle_sel(
 static int gpencil_circle_select_exec(bContext *C, wmOperator *op)
 {
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
-	/* if not edit mode, the event is catched but not processed */
-	if ((!gpd) || (gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -876,8 +876,8 @@ void GPENCIL_OT_select_circle(wmOperatorType *ot)
 static int gpencil_border_select_exec(bContext *C, wmOperator *op)
 {
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
-	/* if not edit mode, the event is catched but not processed */
-	if ((!gpd) || (gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}
 
@@ -991,8 +991,8 @@ void GPENCIL_OT_select_border(wmOperatorType *ot)
 static int gpencil_lasso_select_exec(bContext *C, wmOperator *op)
 {
 	bGPdata *gpd = ED_gpencil_data_get_active(C);
-	/* if not edit mode, the event is catched but not processed */
-	if ((!gpd) || (gpd->flag & GP_DATA_STROKE_EDITMODE) == 0) {
+	/* if not edit/sculpt mode, the event is catched but not processed */
+	if ((gpd->flag & (GP_DATA_STROKE_EDITMODE | GP_DATA_STROKE_SCULPTMODE)) == 0) {
 		return OPERATOR_CANCELLED;
 	}




More information about the Bf-blender-cvs mailing list