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:
authorAntonio Vazquez <blendergit@gmail.com>2019-06-07 17:07:32 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-06-07 17:08:04 +0300
commitfd556023cbadba1d6a8fb15f324257b728b5322b (patch)
tree32921ef07dd6dcbfbd3fd1bc713f072bd03b7bc4 /source/blender/editors/gpencil/gpencil_utils.c
parentbf417d640b2fd19417ebdc8343adfec1a4813df7 (diff)
Cleanup: Reformat GPencil multiedit frame selection
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_utils.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 93a80f0fcf8..065c133bf97 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -1421,11 +1421,8 @@ void ED_gpencil_vgroup_assign(bContext *C, Object *ob, float weight)
}
CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) {
- bGPDframe *init_gpf = gpl->actframe;
+ bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
bGPDstroke *gps = NULL;
- if (is_multiedit) {
- init_gpf = gpl->frames.first;
- }
for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) {
if ((gpf == gpl->actframe) || ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit))) {
@@ -1478,11 +1475,8 @@ void ED_gpencil_vgroup_remove(bContext *C, Object *ob)
}
CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) {
- bGPDframe *init_gpf = gpl->actframe;
+ bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
bGPDstroke *gps = NULL;
- if (is_multiedit) {
- init_gpf = gpl->frames.first;
- }
for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) {
if ((gpf == gpl->actframe) || ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit))) {
@@ -1534,11 +1528,8 @@ void ED_gpencil_vgroup_select(bContext *C, Object *ob)
}
CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) {
- bGPDframe *init_gpf = gpl->actframe;
+ bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
bGPDstroke *gps = NULL;
- if (is_multiedit) {
- init_gpf = gpl->frames.first;
- }
for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) {
if ((gpf == gpl->actframe) || ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit))) {
@@ -1588,11 +1579,8 @@ void ED_gpencil_vgroup_deselect(bContext *C, Object *ob)
}
CTX_DATA_BEGIN (C, bGPDlayer *, gpl, editable_gpencil_layers) {
- bGPDframe *init_gpf = gpl->actframe;
+ bGPDframe *init_gpf = (is_multiedit) ? gpl->frames.first : gpl->actframe;
bGPDstroke *gps = NULL;
- if (is_multiedit) {
- init_gpf = gpl->frames.first;
- }
for (bGPDframe *gpf = init_gpf; gpf; gpf = gpf->next) {
if ((gpf == gpl->actframe) || ((gpf->flag & GP_FRAME_SELECT) && (is_multiedit))) {