[Bf-blender-cvs] [d7d92c084f4] temp-gpencil-bezier-stroke-type: Merge branch 'master' into temp-gpencil-bezier-stroke-type
Antonio Vazquez
noreply at git.blender.org
Thu Apr 22 10:05:07 CEST 2021
Commit: d7d92c084f461bdc5399ac159ec604ce0ac6c0e1
Author: Antonio Vazquez
Date: Thu Apr 22 09:40:55 2021 +0200
Branches: temp-gpencil-bezier-stroke-type
https://developer.blender.org/rBd7d92c084f461bdc5399ac159ec604ce0ac6c0e1
Merge branch 'master' into temp-gpencil-bezier-stroke-type
Conflicts:
source/blender/editors/gpencil/gpencil_data.c
source/blender/editors/gpencil/gpencil_edit.c
===================================================================
===================================================================
diff --cc source/blender/editors/gpencil/gpencil_data.c
index 009690ef966,c93fcb9eb8c..9093c924749
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@@ -1568,41 -1570,37 +1569,40 @@@ static int gpencil_stroke_arrange_exec(
if (gpf == NULL) {
continue;
}
- bool gpf_lock = false;
/* verify if any selected stroke is in the extreme of the stack and select to move */
- for (gps = gpf->strokes.first; gps; gps = gps->next) {
+ LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
+ bool is_stroke_selected = GPENCIL_STROKE_TYPE_BEZIER(gps) ?
+ (bool)(gps->editcurve->flag & GP_CURVE_SELECT) :
+ (bool)(gps->flag & GP_STROKE_SELECT);
/* only if selected */
- if (!is_stroke_selected) {
- continue;
- }
- /* skip strokes that are invalid for current view */
- if (ED_gpencil_stroke_can_use(C, gps) == false) {
- continue;
- }
- /* check if the color is editable */
- if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
- continue;
- }
- /* some stroke is already at front*/
- if (ELEM(direction, GP_STROKE_MOVE_TOP, GP_STROKE_MOVE_UP)) {
- if (gps == gpf->strokes.last) {
- gpf_lock = true;
+ if (gps->flag & GP_STROKE_SELECT) {
+ /* skip strokes that are invalid for current view */
+ if (ED_gpencil_stroke_can_use(C, gps) == false) {
continue;
}
- }
- /* Some stroke is already at bottom. */
- if (ELEM(direction, GP_STROKE_MOVE_BOTTOM, GP_STROKE_MOVE_DOWN)) {
- if (gps == gpf->strokes.first) {
- gpf_lock = true;
+ /* check if the color is editable */
+ if (ED_gpencil_stroke_material_editable(ob, gpl, gps) == false) {
continue;
}
- }
- /* add to list (if not locked) */
- if (!gpf_lock) {
- BLI_addtail(&selected, BLI_genericNodeN(gps));
+ bool gpf_lock = false;
+ /* some stroke is already at front*/
+ if (ELEM(direction, GP_STROKE_MOVE_TOP, GP_STROKE_MOVE_UP)) {
+ if (gps == gpf->strokes.last) {
+ gpf_lock = true;
+ gps_target = gps;
+ }
+ }
+ /* Some stroke is already at bottom. */
+ if (ELEM(direction, GP_STROKE_MOVE_BOTTOM, GP_STROKE_MOVE_DOWN)) {
+ if (gps == gpf->strokes.first) {
+ gpf_lock = true;
+ gps_target = gps;
+ }
+ }
+ /* add to list (if not locked) */
+ if (!gpf_lock) {
+ BLI_addtail(&selected, BLI_genericNodeN(gps));
+ }
}
}
More information about the Bf-blender-cvs
mailing list