Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_select.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index d962dcdfa10..c4fd34212c3 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -826,7 +826,7 @@ static bool gpencil_select_same_material(bContext *C)
bGPdata *gpd = ED_gpencil_data_get_active(C);
const bool is_curve_edit = (bool)GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd);
/* First, build set containing all the colors of selected strokes */
- GSet *selected_colors = BLI_gset_str_new("GP Selected Colors");
+ GSet *selected_colors = BLI_gset_int_new("GP Selected Colors");
bool changed = false;
@@ -835,7 +835,7 @@ static bool gpencil_select_same_material(bContext *C)
/* add instead of insert here, otherwise the uniqueness check gets skipped,
* and we get many duplicate entries...
*/
- BLI_gset_add(selected_colors, &gps->mat_nr);
+ BLI_gset_add(selected_colors, POINTER_FROM_INT(gps->mat_nr));
}
}
CTX_DATA_END;
@@ -843,7 +843,8 @@ static bool gpencil_select_same_material(bContext *C)
/* Second, select any visible stroke that uses these colors */
if (is_curve_edit) {
CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) {
- if (gps->editcurve != NULL && BLI_gset_haskey(selected_colors, &gps->mat_nr)) {
+ if (gps->editcurve != NULL &&
+ BLI_gset_haskey(selected_colors, POINTER_FROM_INT(gps->mat_nr))) {
bGPDcurve *gpc = gps->editcurve;
for (int i = 0; i < gpc->tot_curve_points; i++) {
bGPDcurve_point *gpc_pt = &gpc->curve_points[i];
@@ -861,7 +862,7 @@ static bool gpencil_select_same_material(bContext *C)
}
else {
CTX_DATA_BEGIN (C, bGPDstroke *, gps, editable_gpencil_strokes) {
- if (BLI_gset_haskey(selected_colors, &gps->mat_nr)) {
+ if (BLI_gset_haskey(selected_colors, POINTER_FROM_INT(gps->mat_nr))) {
/* select this stroke */
bGPDspoint *pt;
int i;