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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-09 02:07:57 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-09 02:07:57 +0400
commitc96c63ad3afe66e04d7a2f7c351abbc53242f03a (patch)
treeb81212c343dc7d5b4a293b29e1fb18132da4766c /source/blender/editors/mask/mask_editaction.c
parenta8e0011c96c6bbf60e79911f870b25384e06f60d (diff)
add a utility function to get an exact match for a grease pencil frame.
Diffstat (limited to 'source/blender/editors/mask/mask_editaction.c')
-rw-r--r--source/blender/editors/mask/mask_editaction.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/mask/mask_editaction.c b/source/blender/editors/mask/mask_editaction.c
index a629883a446..3836b393bf8 100644
--- a/source/blender/editors/mask/mask_editaction.c
+++ b/source/blender/editors/mask/mask_editaction.c
@@ -179,13 +179,10 @@ void ED_mask_select_frame(MaskLayer *masklay, int selx, short select_mode)
if (masklay == NULL)
return;
- /* search through frames for a match */
- for (masklay_shape = masklay->splines_shapes.first; masklay_shape; masklay_shape = masklay_shape->next) {
- /* there should only be one frame with this frame-number */
- if (masklay_shape->frame == selx) {
- masklayshape_select(masklay_shape, select_mode);
- break;
- }
+ masklay_shape = BKE_mask_layer_shape_find_frame(masklay, selx);
+
+ if (masklay_shape) {
+ masklayshape_select(masklay_shape, select_mode);
}
}