diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-11 15:37:45 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-02-11 15:37:45 +0300 |
commit | 3f8e26370925c94e07f0bbdd51cddad6601fa125 (patch) | |
tree | 4a26576894a2f5d65fe56c1ea6c5a024a9a62099 /intern/cycles/blender/addon/ui.py | |
parent | 9ec944bbab7a5ba75a526387f8eab52af7f6405e (diff) | |
parent | c10f5d15c25cbc5ee319835c90d5d2a4dda53497 (diff) |
Merge branch 'blender2.7'
Diffstat (limited to 'intern/cycles/blender/addon/ui.py')
-rw-r--r-- | intern/cycles/blender/addon/ui.py | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 667547633b4..d8a67c11355 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -19,12 +19,8 @@ import bpy from bpy_extras.node_utils import find_node_input from bl_operators.presets import PresetMenu -import _cycles -from bpy.types import ( - Panel, - Operator, -) +from bpy.types import Panel class CYCLES_PT_sampling_presets(PresetMenu): @@ -636,6 +632,8 @@ class CYCLES_RENDER_PT_performance_acceleration_structure(CyclesButtonsPanel, Pa bl_parent_id = "CYCLES_RENDER_PT_performance" def draw(self, context): + import _cycles + layout = self.layout layout.use_property_split = True layout.use_property_decorate = False @@ -1277,27 +1275,6 @@ class CYCLES_OBJECT_PT_cycles_settings_performance(CyclesButtonsPanel, Panel): col.prop(cob, "use_distance_cull") -class CYCLES_OT_use_shading_nodes(Operator): - """Enable nodes on a material, world or light""" - bl_idname = "cycles.use_shading_nodes" - bl_label = "Use Nodes" - - @classmethod - def poll(cls, context): - return (getattr(context, "material", False) or getattr(context, "world", False) or - getattr(context, "light", False)) - - def execute(self, context): - if context.material: - context.material.use_nodes = True - elif context.world: - context.world.use_nodes = True - elif context.light: - context.light.use_nodes = True - - return {'FINISHED'} - - def panel_node_draw(layout, id_data, output_type, input_name): if not id_data.use_nodes: layout.operator("cycles.use_shading_nodes", icon='NODETREE') @@ -2136,7 +2113,6 @@ classes = ( CYCLES_OBJECT_PT_cycles_settings, CYCLES_OBJECT_PT_cycles_settings_ray_visibility, CYCLES_OBJECT_PT_cycles_settings_performance, - CYCLES_OT_use_shading_nodes, CYCLES_LIGHT_PT_preview, CYCLES_LIGHT_PT_light, CYCLES_LIGHT_PT_nodes, |