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>2019-05-09 01:50:14 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-05-09 05:42:05 +0300
commit8af8b1862f7403a2db8c8bab5c2137c7218f2340 (patch)
tree7acd4f2952b025a10ba909e3d8f01ed54e2d8782 /release
parent8f1951f555f56c4db64905918911773ee19c2b3f (diff)
Cleanup: use __doc__ instead of bl_description
In keeping with other Python operators, also assign object a variable.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_operators/constraint.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_operators/constraint.py b/release/scripts/startup/bl_operators/constraint.py
index f0318b1d85b..811218f5e09 100644
--- a/release/scripts/startup/bl_operators/constraint.py
+++ b/release/scripts/startup/bl_operators/constraint.py
@@ -69,13 +69,13 @@ class CONSTRAINT_OT_normalize_target_weights(Operator):
return {'FINISHED'}
-
class CONSTRAINT_OT_disable_keep_transform(Operator):
+ """Set the influence of this constraint to zero while """ \
+ """trying to maintain the object's transformation. Other active """ \
+ """constraints can still influence the final transformation"""
+
bl_idname = "constraint.disable_keep_transform"
bl_label = "Disable and Keep Transform"
- bl_description = ("Set the influence of this constraint to zero while "
- "trying to maintain the object's transformation. Other active "
- "constraints can still influence the final transformation")
bl_options = {'UNDO', 'INTERNAL'}
@classmethod
@@ -95,20 +95,20 @@ class CONSTRAINT_OT_disable_keep_transform(Operator):
# Get the matrix in world space.
is_bone_constraint = context.space_data.context == 'BONE_CONSTRAINT'
+ ob = context.object
if is_bone_constraint:
- armature = context.object
bone = context.pose_bone
- mat = armature.matrix_world @ bone.matrix
+ mat = ob.matrix_world @ bone.matrix
else:
- mat = context.object.matrix_world
+ mat = ob.matrix_world
context.constraint.influence = 0.0
# Set the matrix.
if is_bone_constraint:
- bone.matrix = armature.matrix_world.inverted() @ mat
+ bone.matrix = ob.matrix_world.inverted() @ mat
else:
- context.object.matrix_world = mat
+ ob.matrix_world = mat
return {'FINISHED'}