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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-12-23 14:51:48 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-12-23 14:51:48 +0400
commitc4a165f168196b52ed66105bbe99fe51da8b5317 (patch)
treecfa03aff040906eafde93c5475f8d512158faa27 /release/scripts/startup/keyingsets_builtins.py
parentcb70c5ba0fee7f1313a037eda7fae82356132c10 (diff)
Adding Scale Visual keying (and de-duplicated part of the code returning visual values to key).
Diffstat (limited to 'release/scripts/startup/keyingsets_builtins.py')
-rw-r--r--release/scripts/startup/keyingsets_builtins.py98
1 files changed, 96 insertions, 2 deletions
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py
index 6ad87375738..4f06f8a7be3 100644
--- a/release/scripts/startup/keyingsets_builtins.py
+++ b/release/scripts/startup/keyingsets_builtins.py
@@ -181,7 +181,7 @@ class BUILTIN_KSI_RotScale(KeyingSetInfo):
# ------------
-# Location
+# VisualLocation
class BUILTIN_KSI_VisualLoc(KeyingSetInfo):
"""
Insert a keyframe on each of the location channels, taking into account
@@ -201,7 +201,7 @@ class BUILTIN_KSI_VisualLoc(KeyingSetInfo):
generate = keyingsets_utils.RKS_GEN_location
-# Rotation
+# VisualRotation
class BUILTIN_KSI_VisualRot(KeyingSetInfo):
"""
Insert a keyframe on each of the rotation channels, taking into account
@@ -221,6 +221,26 @@ class BUILTIN_KSI_VisualRot(KeyingSetInfo):
generate = keyingsets_utils.RKS_GEN_rotation
+# VisualScaling
+class BUILTIN_KSI_VisualScaling(KeyingSetInfo):
+ """
+ Insert a keyframe on each of the scale channels, taking into account
+ effects of constraints and relationships
+ """
+ bl_label = "Visual Scaling"
+
+ bl_options = {'INSERTKEY_VISUAL'}
+
+ # poll - use predefined callback for selected bones/objects
+ poll = keyingsets_utils.RKS_POLL_selected_items
+
+ # iterator - use callback for selected bones/objects
+ iterator = keyingsets_utils.RKS_ITER_selected_item
+
+ # generator - use callback for location
+ generate = keyingsets_utils.RKS_GEN_scaling
+
+
# VisualLocRot
class BUILTIN_KSI_VisualLocRot(KeyingSetInfo):
"""
@@ -244,6 +264,80 @@ class BUILTIN_KSI_VisualLocRot(KeyingSetInfo):
# rotation
keyingsets_utils.RKS_GEN_rotation(self, context, ks, data)
+
+# VisualLocScale
+class BUILTIN_KSI_VisualLocScale(KeyingSetInfo):
+ """
+ Insert a keyframe on each of the location and scaling channels,
+ taking into account effects of constraints and relationships
+ """
+ bl_label = "Visual LocScale"
+
+ bl_options = {'INSERTKEY_VISUAL'}
+
+ # poll - use predefined callback for selected bones/objects
+ poll = keyingsets_utils.RKS_POLL_selected_items
+
+ # iterator - use callback for selected bones/objects
+ iterator = keyingsets_utils.RKS_ITER_selected_item
+
+ # generator
+ def generate(self, context, ks, data):
+ # location
+ keyingsets_utils.RKS_GEN_location(self, context, ks, data)
+ # scaling
+ keyingsets_utils.RKS_GEN_scaling(self, context, ks, data)
+
+
+# VisualLocRotScale
+class BUILTIN_KSI_VisualLocRotScale(KeyingSetInfo):
+ """
+ Insert a keyframe on each of the location, rotation and scaling channels,
+ taking into account effects of constraints and relationships
+ """
+ bl_label = "Visual LocRotScale"
+
+ bl_options = {'INSERTKEY_VISUAL'}
+
+ # poll - use predefined callback for selected bones/objects
+ poll = keyingsets_utils.RKS_POLL_selected_items
+
+ # iterator - use callback for selected bones/objects
+ iterator = keyingsets_utils.RKS_ITER_selected_item
+
+ # generator
+ def generate(self, context, ks, data):
+ # location
+ keyingsets_utils.RKS_GEN_location(self, context, ks, data)
+ # rotation
+ keyingsets_utils.RKS_GEN_rotation(self, context, ks, data)
+ # scaling
+ keyingsets_utils.RKS_GEN_scaling(self, context, ks, data)
+
+
+# VisualRotScale
+class BUILTIN_KSI_VisualRotScale(KeyingSetInfo):
+ """
+ Insert a keyframe on each of the rotation and scaling channels,
+ taking into account effects of constraints and relationships
+ """
+ bl_label = "Visual RotScale"
+
+ bl_options = {'INSERTKEY_VISUAL'}
+
+ # poll - use predefined callback for selected bones/objects
+ poll = keyingsets_utils.RKS_POLL_selected_items
+
+ # iterator - use callback for selected bones/objects
+ iterator = keyingsets_utils.RKS_ITER_selected_item
+
+ # generator
+ def generate(self, context, ks, data):
+ # rotation
+ keyingsets_utils.RKS_GEN_rotation(self, context, ks, data)
+ # scaling
+ keyingsets_utils.RKS_GEN_scaling(self, context, ks, data)
+
# ------------