Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_object.py
| Context not available. | |||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| ob = context.object | ob = context.object | ||||
| obj_type = ob.type | |||||
| supports_dimensions = (obj_type in {'MESH', 'CURVE', 'SURFACE', 'META', 'FONT', 'ARMATURE', 'LATTICE'}) | |||||
| col = layout.column() | col = layout.column() | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| Context not available. | |||||
| row.use_property_decorate = False | row.use_property_decorate = False | ||||
| row.prop(ob, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED') | row.prop(ob, "lock_rotation", text="", emboss=False, icon='DECORATE_UNLOCKED') | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| row.prop(ob, "rotation_mode", text="Mode") | row.prop(ob, "rotation_mode", text=" ") | ||||
| row.label(text="", icon='BLANK1') | row.label(text="", icon='BLANK1') | ||||
| col = layout.column() | col = layout.column() | ||||
| row = col.row(align=True) | row = col.row(align=True) | ||||
| row.prop(ob, "scale") | if ob.scale_mode == 'DIMENSIONS' and supports_dimensions: | ||||
| row.prop(ob, "dimensions") | |||||
| else: | |||||
| row.prop(ob, "scale") | |||||
| row.use_property_decorate = False | row.use_property_decorate = False | ||||
| row.prop(ob, "lock_scale", text="", emboss=False, icon='DECORATE_UNLOCKED') | row.prop(ob, "lock_scale", text="", emboss=False, icon='DECORATE_UNLOCKED') | ||||
| if supports_dimensions: | |||||
| row = layout.row(align=True) | |||||
| row.prop(ob, "scale_mode", text=" ") | |||||
| row.label(text="", icon='BLANK1') | |||||
| class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel): | class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel): | ||||
| bl_label = "Delta Transform" | bl_label = "Delta Transform" | ||||
| Context not available. | |||||