Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_data_bone.py
| # SPDX-License-Identifier: GPL-2.0-or-later | # SPDX-License-Identifier: GPL-2.0-or-later | ||||
| import bpy | import bpy | ||||
| from bpy.types import Panel | from bpy.types import Panel | ||||
| from rna_prop_ui import PropertyPanel | from rna_prop_ui import PropertyPanel | ||||
| from bpy.app.translations import contexts as i18n_contexts | |||||
| class BoneButtonsPanel: | class BoneButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "bone" | bl_context = "bone" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col = topcol.column(align=True) | col = topcol.column(align=True) | ||||
| col.prop(bbone, "bbone_scalein", text="Scale In") | col.prop(bbone, "bbone_scalein", text="Scale In") | ||||
| col = topcol.column(align=True) | col = topcol.column(align=True) | ||||
| col.prop(bbone, "bbone_scaleout", text="Scale Out") | col.prop(bbone, "bbone_scaleout", text="Scale Out") | ||||
| col = topcol.column(align=True) | col = topcol.column(align=True) | ||||
| col.prop(bbone, "bbone_easein", text="Ease In") | col.prop(bbone, "bbone_easein", text="Ease In", text_ctxt=i18n_contexts.id_armature) | ||||
| col.prop(bbone, "bbone_easeout", text="Out") | col.prop(bbone, "bbone_easeout", text="Out", text_ctxt=i18n_contexts.id_armature) | ||||
| col.prop(bone, "use_scale_easing") | col.prop(bone, "use_scale_easing") | ||||
| 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") | ||||
| col2 = col.column(align=True) | col2 = col.column(align=True) | ||||
| col2.active = (bone.bbone_handle_type_start != 'AUTO') | col2.active = (bone.bbone_handle_type_start != 'AUTO') | ||||
| col2.prop_search(bone, "bbone_custom_handle_start", arm, bone_list, text="Custom") | col2.prop_search(bone, "bbone_custom_handle_start", arm, bone_list, text="Custom") | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.use_property_split = False | row.use_property_split = False | ||||
| split = row.split(factor=0.4) | split = row.split(factor=0.4) | ||||
| split.alignment = 'RIGHT' | split.alignment = 'RIGHT' | ||||
| split.label(text="Scale") | split.label(text="Scale") | ||||
| split2 = split.split(factor=0.7) | split2 = split.split(factor=0.7) | ||||
| row2 = split2.row(align=True) | row2 = split2.row(align=True) | ||||
| row2.prop(bone, "bbone_handle_use_scale_start", index=0, text="X", toggle=True) | row2.prop(bone, "bbone_handle_use_scale_start", index=0, text="X", toggle=True) | ||||
| row2.prop(bone, "bbone_handle_use_scale_start", index=1, text="Y", toggle=True) | row2.prop(bone, "bbone_handle_use_scale_start", index=1, text="Y", toggle=True) | ||||
| row2.prop(bone, "bbone_handle_use_scale_start", index=2, text="Z", toggle=True) | row2.prop(bone, "bbone_handle_use_scale_start", index=2, text="Z", toggle=True) | ||||
| split2.prop(bone, "bbone_handle_use_ease_start", text="Ease", toggle=True) | split2.prop(bone, "bbone_handle_use_ease_start", text="Ease", text_ctxt=i18n_contexts.id_armature, toggle=True) | ||||
| row.label(icon='BLANK1') | row.label(icon='BLANK1') | ||||
| 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") | ||||
| col2 = col.column(align=True) | col2 = col.column(align=True) | ||||
| col2.active = (bone.bbone_handle_type_end != 'AUTO') | col2.active = (bone.bbone_handle_type_end != 'AUTO') | ||||
| col2.prop_search(bone, "bbone_custom_handle_end", arm, bone_list, text="Custom") | col2.prop_search(bone, "bbone_custom_handle_end", arm, bone_list, text="Custom") | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.use_property_split = False | row.use_property_split = False | ||||
| split = row.split(factor=0.4) | split = row.split(factor=0.4) | ||||
| split.alignment = 'RIGHT' | split.alignment = 'RIGHT' | ||||
| split.label(text="Scale") | split.label(text="Scale") | ||||
| split2 = split.split(factor=0.7) | split2 = split.split(factor=0.7) | ||||
| row2 = split2.row(align=True) | row2 = split2.row(align=True) | ||||
| row2.prop(bone, "bbone_handle_use_scale_end", index=0, text="X", toggle=True) | row2.prop(bone, "bbone_handle_use_scale_end", index=0, text="X", toggle=True) | ||||
| row2.prop(bone, "bbone_handle_use_scale_end", index=1, text="Y", toggle=True) | row2.prop(bone, "bbone_handle_use_scale_end", index=1, text="Y", toggle=True) | ||||
| row2.prop(bone, "bbone_handle_use_scale_end", index=2, text="Z", toggle=True) | row2.prop(bone, "bbone_handle_use_scale_end", index=2, text="Z", toggle=True) | ||||
| split2.prop(bone, "bbone_handle_use_ease_end", text="Ease", toggle=True) | split2.prop(bone, "bbone_handle_use_ease_end", text="Ease", text_ctxt=i18n_contexts.id_armature, toggle=True) | ||||
| row.label(icon='BLANK1') | row.label(icon='BLANK1') | ||||
| 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): | ||||
| ▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines | |||||