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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-10-31 19:12:59 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-10-31 20:04:01 +0300
commit748b89f12462c13025e0f9c61cc6f38e22cd53f2 (patch)
tree7ad4d89b12e21278a85f6b3fea074909b172eb8e /release/scripts/startup/bl_ui/properties_data_bone.py
parent9fbba61f4b4b95b7f4d9e8c45b3db57dc97fe15d (diff)
Allow changing B-Bone custom handle references from Pose Mode.
@jpbouza was rather upset these were made read-only, and unlike parents, it's not that hard to allow changing these Bone fields: all is needed is to carefully refresh the matching fields in the relevant bPoseChannel objects and properly tag update. Reviewers: brecht Differential Revision: https://developer.blender.org/D3870
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_bone.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_bone.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_bone.py b/release/scripts/startup/bl_ui/properties_data_bone.py
index 60464ca48cb..4fafadc0559 100644
--- a/release/scripts/startup/bl_ui/properties_data_bone.py
+++ b/release/scripts/startup/bl_ui/properties_data_bone.py
@@ -130,7 +130,7 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
bone = context.bone
# arm = context.armature
pchan = None
- edit = False
+ bone_list = "bones"
if ob and bone:
pchan = ob.pose.bones[bone.name]
@@ -138,7 +138,7 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
elif bone is None:
bone = context.edit_bone
bbone = bone
- edit = True
+ bone_list = "edit_bones"
else:
bbone = bone
@@ -176,22 +176,14 @@ class BONE_PT_curved(BoneButtonsPanel, Panel):
col = col.column(align=True)
col.active = (bone.bbone_handle_type_start != "AUTO")
- if edit:
- col.prop_search(bone, "bbone_custom_handle_start", ob.data, "edit_bones", text="Custom")
- else:
- # read-only
- col.prop(bbone, "bbone_custom_handle_start", text="Custom")
+ col.prop_search(bone, "bbone_custom_handle_start", ob.data, bone_list, text="Custom")
col = topcol.column(align=True)
col.prop(bone, "bbone_handle_type_end", text="End Handle")
col = col.column(align=True)
col.active = (bone.bbone_handle_type_end != "AUTO")
- if edit:
- col.prop_search(bone, "bbone_custom_handle_end", ob.data, "edit_bones", text="Custom")
- else:
- # read-only
- col.prop(bbone, "bbone_custom_handle_end", text="Custom")
+ col.prop_search(bone, "bbone_custom_handle_end", ob.data, bone_list, text="Custom")
class BONE_PT_relations(BoneButtonsPanel, Panel):