Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/addon/ui.py
| Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | |||||
| class CyclesButtonsPanel: | class CyclesButtonsPanel: | ||||
| bl_space_type = "PROPERTIES" | bl_space_type = "PROPERTIES" | ||||
| bl_region_type = "WINDOW" | bl_region_type = "WINDOW" | ||||
| bl_context = "render" | bl_context = "render" | ||||
| COMPAT_ENGINES = {'CYCLES'} | COMPAT_ENGINES = {'CYCLES'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| rd = context.scene.render | return context.engine in cls.COMPAT_ENGINES | ||||
| return rd.engine in cls.COMPAT_ENGINES | |||||
| def get_device_type(context): | def get_device_type(context): | ||||
| return context.user_preferences.addons[__package__].preferences.compute_device_type | return context.user_preferences.addons[__package__].preferences.compute_device_type | ||||
| def use_cpu(context): | def use_cpu(context): | ||||
| cscene = context.scene.cycles | cscene = context.scene.cycles | ||||
| ▲ Show 20 Lines • Show All 1,623 Lines • ▼ Show 20 Lines | def draw(self, context): | ||||
| col = split.column() | col = split.column() | ||||
| col.prop(cscene, "ao_bounces_render") | col.prop(cscene, "ao_bounces_render") | ||||
| def draw_device(self, context): | def draw_device(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| layout = self.layout | layout = self.layout | ||||
| if scene.render.engine == 'CYCLES': | if context.engine == 'CYCLES': | ||||
| from . import engine | from . import engine | ||||
| cscene = scene.cycles | cscene = scene.cycles | ||||
| layout.prop(cscene, "feature_set") | layout.prop(cscene, "feature_set") | ||||
| split = layout.split(percentage=1 / 3) | split = layout.split(percentage=1 / 3) | ||||
| split.label("Device:") | split.label("Device:") | ||||
| row = split.row() | row = split.row() | ||||
| row.active = show_device_active(context) | row.active = show_device_active(context) | ||||
| row.prop(cscene, "device", text="") | row.prop(cscene, "device", text="") | ||||
| if engine.with_osl() and use_cpu(context): | if engine.with_osl() and use_cpu(context): | ||||
| layout.prop(cscene, "shading_system") | layout.prop(cscene, "shading_system") | ||||
| def draw_pause(self, context): | def draw_pause(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| if scene.render.engine == "CYCLES": | if context.engine == "CYCLES": | ||||
| view = context.space_data | view = context.space_data | ||||
| cscene = scene.cycles | cscene = scene.cycles | ||||
| layout.prop(cscene, "preview_pause", icon="PAUSE", text="") | layout.prop(cscene, "preview_pause", icon="PAUSE", text="") | ||||
| def get_panels(): | def get_panels(): | ||||
| exclude_panels = { | exclude_panels = { | ||||
| ▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines | |||||