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-06 18:38:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-06 18:38:47 +0400
commit2cb671591bca571a8a5988c087da2e380d395204 (patch)
treea51b2e04b5242d4af494fde31291608e5473656d /source/blender/editors/mask/mask_shapekey.c
parent0499200e39204a349fda12fdd44c409c6e4e6fc8 (diff)
mask mode
- only keyframe selected mask layers - fix for crash in deleting animated mask layers (other than the first)
Diffstat (limited to 'source/blender/editors/mask/mask_shapekey.c')
-rw-r--r--source/blender/editors/mask/mask_shapekey.c59
1 files changed, 42 insertions, 17 deletions
diff --git a/source/blender/editors/mask/mask_shapekey.c b/source/blender/editors/mask/mask_shapekey.c
index 38e8ed627f2..8da083ab400 100644
--- a/source/blender/editors/mask/mask_shapekey.c
+++ b/source/blender/editors/mask/mask_shapekey.c
@@ -141,23 +141,6 @@ void MASK_OT_shape_key_clear(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-int ED_mask_layer_shape_auto_key_all(Mask *mask, const int frame)
-{
- MaskLayer *masklay;
- int change = FALSE;
-
- for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
- MaskLayerShape *masklay_shape;
-
- masklay_shape = BKE_mask_layer_shape_varify_frame(masklay, frame);
- BKE_mask_layer_shape_from_mask(masklay, masklay_shape);
- change = TRUE;
- }
-
- return change;
-}
-
-
static int mask_shape_key_feather_reset_exec(bContext *C, wmOperator *UNUSED(op))
{
Scene *scene = CTX_data_scene(C);
@@ -249,3 +232,45 @@ void MASK_OT_shape_key_feather_reset(wmOperatorType *ot)
/* flags */
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
+
+
+/* *** Shape Key Utils *** */
+
+void ED_mask_layer_shape_auto_key(MaskLayer *masklay, const int frame)
+{
+ MaskLayerShape *masklay_shape;
+
+ masklay_shape = BKE_mask_layer_shape_varify_frame(masklay, frame);
+ BKE_mask_layer_shape_from_mask(masklay, masklay_shape);
+}
+
+int ED_mask_layer_shape_auto_key_all(Mask *mask, const int frame)
+{
+ MaskLayer *masklay;
+ int change = FALSE;
+
+ for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
+ ED_mask_layer_shape_auto_key(masklay, frame);
+ change = TRUE;
+ }
+
+ return change;
+}
+
+int ED_mask_layer_shape_auto_key_select(Mask *mask, const int frame)
+{
+ MaskLayer *masklay;
+ int change = FALSE;
+
+ for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
+
+ if (!ED_mask_layer_select_check(masklay)) {
+ continue;
+ }
+
+ ED_mask_layer_shape_auto_key(masklay, frame);
+ change = TRUE;
+ }
+
+ return change;
+}