Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/ui.py
| Show First 20 Lines • Show All 1,338 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| layout.row().prop(light, "type", expand=True) | layout.row().prop(light, "type", expand=True) | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| else: | else: | ||||
| layout.use_property_split = True | layout.use_property_split = True | ||||
| layout.row().prop(light, "type") | layout.row().prop(light, "type") | ||||
| col = layout.column() | col = layout.column() | ||||
| col.prop(light, "color") | |||||
| col.prop(light, "energy") | |||||
| col.separator() | |||||
| if light.type in {'POINT', 'SUN', 'SPOT'}: | if light.type in {'POINT', 'SUN', 'SPOT'}: | ||||
| col.prop(light, "shadow_soft_size", text="Size") | col.prop(light, "shadow_soft_size", text="Size") | ||||
| elif light.type == 'AREA': | elif light.type == 'AREA': | ||||
| col.prop(light, "shape", text="Shape") | col.prop(light, "shape", text="Shape") | ||||
| sub = col.column(align=True) | sub = col.column(align=True) | ||||
| if light.shape in {'SQUARE', 'DISK'}: | if light.shape in {'SQUARE', 'DISK'}: | ||||
| sub.prop(light, "size") | sub.prop(light, "size") | ||||
| Show All 27 Lines | def poll(cls, context): | ||||
| return context.light and not (context.light.type == 'AREA' and | return context.light and not (context.light.type == 'AREA' and | ||||
| context.light.cycles.is_portal) and \ | context.light.cycles.is_portal) and \ | ||||
| CyclesButtonsPanel.poll(context) | CyclesButtonsPanel.poll(context) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| light = context.light | light = context.light | ||||
| if not panel_node_draw(layout, light, 'OUTPUT_LIGHT', 'Surface'): | panel_node_draw(layout, light, 'OUTPUT_LIGHT', 'Surface') | ||||
| layout.prop(light, "color") | |||||
| class CYCLES_LIGHT_PT_spot(CyclesButtonsPanel, Panel): | class CYCLES_LIGHT_PT_spot(CyclesButtonsPanel, Panel): | ||||
| bl_label = "Spot Shape" | bl_label = "Spot Shape" | ||||
| bl_context = "data" | bl_context = "data" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| ▲ Show 20 Lines • Show All 815 Lines • Show Last 20 Lines | |||||