Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_object.py
| Show First 20 Lines • Show All 143 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col.prop(ob, "parent") | col.prop(ob, "parent") | ||||
| sub = col.column() | sub = col.column() | ||||
| sub.prop(ob, "parent_type") | sub.prop(ob, "parent_type") | ||||
| parent = ob.parent | parent = ob.parent | ||||
| if parent and ob.parent_type == 'BONE' and parent.type == 'ARMATURE': | if parent and ob.parent_type == 'BONE' and parent.type == 'ARMATURE': | ||||
| sub.prop_search(ob, "parent_bone", parent.data, "bones") | sub.prop_search(ob, "parent_bone", parent.data, "bones") | ||||
| sub.active = (parent is not None) | sub.active = (parent is not None) | ||||
| col = flow.column() | |||||
| col.active = (ob.parent is not None) | |||||
| col.prop(ob, "use_slow_parent") | |||||
| sub = col.column() | |||||
| sub.active = (ob.use_slow_parent) | |||||
| sub.prop(ob, "slow_parent_offset", text="Offset") | |||||
| col.separator() | col.separator() | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(ob, "track_axis", text="Tracking Axis") | col.prop(ob, "track_axis", text="Tracking Axis") | ||||
| col.prop(ob, "up_axis", text="Up Axis") | col.prop(ob, "up_axis", text="Up Axis") | ||||
| col.separator() | col.separator() | ||||
| ▲ Show 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| ob = context.object | ob = context.object | ||||
| row = layout.row() | row = layout.row() | ||||
| row.prop(ob, "instance_type", expand=True) | row.prop(ob, "instance_type", expand=True) | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) | flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) | ||||
| if ob.instance_type == 'FRAMES': | if ob.instance_type == 'VERTS': | ||||
| col = flow.column(align=True) | |||||
| col.prop(ob, "instance_frames_start", text="Start") | |||||
| col.prop(ob, "instance_frames_end", text="End") | |||||
| col = flow.column(align=True) | |||||
| col.prop(ob, "instance_frames_on", text="On") | |||||
| col.prop(ob, "instance_frames_off", text="Off") | |||||
| col = flow.column(align=True) | |||||
| col.prop(ob, "use_instance_frames_speed", text="Speed") | |||||
| elif ob.instance_type == 'VERTS': | |||||
| layout.prop(ob, "use_instance_vertices_rotation", text="Rotation") | layout.prop(ob, "use_instance_vertices_rotation", text="Rotation") | ||||
| elif ob.instance_type == 'FACES': | elif ob.instance_type == 'FACES': | ||||
| col = flow.column() | col = flow.column() | ||||
| col.prop(ob, "use_instance_faces_scale", text="Scale") | col.prop(ob, "use_instance_faces_scale", text="Scale") | ||||
| sub = col.column() | sub = col.column() | ||||
| sub.active = ob.use_instance_faces_scale | sub.active = ob.use_instance_faces_scale | ||||
| sub.prop(ob, "instance_faces_scale", text="Inherit Scale") | sub.prop(ob, "instance_faces_scale", text="Inherit Scale") | ||||
| ▲ Show 20 Lines • Show All 95 Lines • Show Last 20 Lines | |||||