diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-26 06:13:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-26 06:16:37 +0300 |
commit | 1de11c38d4dae96c57d5580a77631093b3e8c33a (patch) | |
tree | 2d002db659740b307ce0071aec8b5fceb829bc65 /release/scripts/startup/bl_ui/properties_data_bone.py | |
parent | 54ffc4e19dc40cdbd9d8142048ac7082e8019f59 (diff) |
Cleanup: assign rotation_mode to a variable
Don't access multiple times per draw.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_bone.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_bone.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py index 3a7f348efa5..cc70b7d810f 100644 --- a/release/scripts/startup/bl_ui/properties_data_bone.py +++ b/release/scripts/startup/bl_ui/properties_data_bone.py @@ -78,16 +78,14 @@ class BONE_PT_transform(BoneButtonsPanel, Panel): sub.prop(pchan, "lock_location", text="") col = layout.column() - if pchan.rotation_mode == 'QUATERNION': + rotation_mode = pchan.rotation_mode + if rotation_mode == 'QUATERNION': sub = col.row(align=True) sub.prop(pchan, "rotation_quaternion", text="Rotation") subsub = sub.column(align=True) subsub.prop(pchan, "lock_rotation_w", text="") subsub.prop(pchan, "lock_rotation", text="") - elif pchan.rotation_mode == 'AXIS_ANGLE': - # col.label(text="Rotation") - #col.prop(pchan, "rotation_angle", text="Angle") - #col.prop(pchan, "rotation_axis", text="Axis") + elif rotation_mode == 'AXIS_ANGLE': sub = col.row(align=True) sub.prop(pchan, "rotation_axis_angle", text="Rotation") subsub = sub.column(align=True) |