Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_object.py
| Show First 20 Lines • Show All 261 Lines • ▼ Show 20 Lines | |||||
| class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): | class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): | ||||
| bl_label = "Instancing" | bl_label = "Instancing" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ob = context.object | ob = context.object | ||||
| return (ob.type in {'MESH', 'EMPTY', 'POINTCLOUD'}) | # FONT objects need (vertex) instancing for the 'Object Font' feature | ||||
| return (ob.type in {'MESH', 'EMPTY', 'POINTCLOUD', 'FONT'}) | |||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| 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) | ||||
| ▲ Show 20 Lines • Show All 162 Lines • Show Last 20 Lines | |||||