Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_data_bone.py
| Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | |||||
| class BONE_PT_curved(BoneButtonsPanel, Panel): | class BONE_PT_curved(BoneButtonsPanel, Panel): | ||||
| bl_label = "Bendy Bones" | bl_label = "Bendy Bones" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| ob = context.object | ob = context.object | ||||
| bone = context.bone | bone = context.bone | ||||
| # arm = context.armature | arm = context.armature | ||||
| pchan = None | |||||
| bone_list = "bones" | bone_list = "bones" | ||||
| if ob and bone: | if ob and bone: | ||||
| pchan = ob.pose.bones[bone.name] | bbone = ob.pose.bones[bone.name] | ||||
| bbone = pchan | |||||
| elif bone is None: | elif bone is None: | ||||
| bone = context.edit_bone | bone = context.edit_bone | ||||
| bbone = bone | bbone = bone | ||||
| bone_list = "edit_bones" | bone_list = "edit_bones" | ||||
| else: | else: | ||||
| bbone = bone | bbone = bone | ||||
| layout = self.layout | layout = self.layout | ||||
| Show All 25 Lines | def draw(self, context): | ||||
| col.prop(bbone, "bbone_easein", text="Ease In") | col.prop(bbone, "bbone_easein", text="Ease In") | ||||
| col.prop(bbone, "bbone_easeout", text="Out") | col.prop(bbone, "bbone_easeout", text="Out") | ||||
| col = topcol.column(align=True) | col = topcol.column(align=True) | ||||
| col.prop(bone, "bbone_handle_type_start", text="Start Handle") | col.prop(bone, "bbone_handle_type_start", text="Start Handle") | ||||
| col = col.column(align=True) | col = col.column(align=True) | ||||
| col.active = (bone.bbone_handle_type_start != "AUTO") | col.active = (bone.bbone_handle_type_start != "AUTO") | ||||
| col.prop_search(bone, "bbone_custom_handle_start", ob.data, bone_list, text="Custom") | col.prop_search(bone, "bbone_custom_handle_start", arm, bone_list, text="Custom") | ||||
| col = topcol.column(align=True) | col = topcol.column(align=True) | ||||
| col.prop(bone, "bbone_handle_type_end", text="End Handle") | col.prop(bone, "bbone_handle_type_end", text="End Handle") | ||||
| col = col.column(align=True) | col = col.column(align=True) | ||||
| col.active = (bone.bbone_handle_type_end != "AUTO") | col.active = (bone.bbone_handle_type_end != "AUTO") | ||||
| col.prop_search(bone, "bbone_custom_handle_end", ob.data, bone_list, text="Custom") | col.prop_search(bone, "bbone_custom_handle_end", arm, bone_list, text="Custom") | ||||
| class BONE_PT_relations(BoneButtonsPanel, Panel): | class BONE_PT_relations(BoneButtonsPanel, Panel): | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| bl_label = "Relations" | bl_label = "Relations" | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ▲ Show 20 Lines • Show All 236 Lines • Show Last 20 Lines | |||||