[Bf-blender-cvs] [3e87c039ba1] blender2.8: UI: tweak for Cycles panels.

Brecht Van Lommel noreply at git.blender.org
Wed Jun 6 11:24:12 CEST 2018


Commit: 3e87c039ba1a76d614c5a934717b386fac2058d6
Author: Brecht Van Lommel
Date:   Tue Jun 5 13:34:32 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB3e87c039ba1a76d614c5a934717b386fac2058d6

UI: tweak for Cycles panels.

===================================================================

M	intern/cycles/blender/addon/ui.py

===================================================================

diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 5c68115cd86..721b395e596 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1480,26 +1480,6 @@ class CYCLES_MATERIAL_PT_settings_surface(CyclesButtonsPanel, Panel):
         col = layout.column()
         col.prop(cmat, "sample_as_light", text="Multiple Importance")
         col.prop(cmat, "use_transparent_shadow")
-
-
-class CYCLES_MATERIAL_PT_settings_geometry(CyclesButtonsPanel, Panel):
-    bl_label = "Geometry"
-    bl_parent_id = "CYCLES_MATERIAL_PT_settings"
-    bl_context = "material"
-
-    @classmethod
-    def poll(cls, context):
-        return context.material and CyclesButtonsPanel.poll(context)
-
-    def draw(self, context):
-        layout = self.layout
-        layout.use_property_split = True
-
-        mat = context.material
-        cmat = mat.cycles
-
-        col = layout.column()
-
         col.prop(cmat, "displacement_method", text="Displacement Method")
 
 
@@ -1674,29 +1654,7 @@ class CYCLES_SCENE_PT_simplify(CyclesButtonsPanel, Panel):
         self.layout.prop(rd, "use_simplify", text="")
 
     def draw(self, context):
-        layout = self.layout
-        layout.use_property_split = True
-
-        scene = context.scene
-        rd = scene.render
-        cscene = scene.cycles
-
-        layout.active = rd.use_simplify
-
-        col = layout.column()
-        col.prop(cscene, "use_camera_cull")
-        sub = col.column()
-        sub.active = cscene.use_camera_cull
-        sub.prop(cscene, "camera_cull_margin")
-
-        layout.separator()
-
-        col = layout.column()
-
-        col.prop(cscene, "use_distance_cull")
-        sub = col.column()
-        sub.active = cscene.use_distance_cull
-        sub.prop(cscene, "distance_cull_margin", text="Distance")
+        pass
 
 
 class CYCLES_SCENE_PT_simplify_viewport(CyclesButtonsPanel, Panel):
@@ -1746,6 +1704,36 @@ class CYCLES_SCENE_PT_simplify_render(CyclesButtonsPanel, Panel):
         col.prop(cscene, "ao_bounces_render", text="AO Bounces")
 
 
+class CYCLES_SCENE_PT_simplify_culling(CyclesButtonsPanel, Panel):
+    bl_label = "Culling"
+    bl_context = "scene"
+    bl_parent_id = "CYCLES_SCENE_PT_simplify"
+    bl_options = {'DEFAULT_CLOSED'}
+    COMPAT_ENGINES = {'CYCLES'}
+
+    def draw(self, context):
+        layout = self.layout
+        layout.use_property_split = True
+
+        scene = context.scene
+        rd = scene.render
+        cscene = scene.cycles
+
+        layout.active = rd.use_simplify
+
+        col = layout.column()
+        col.prop(cscene, "use_camera_cull")
+        sub = col.column()
+        sub.active = cscene.use_camera_cull
+        sub.prop(cscene, "camera_cull_margin")
+
+        col = layout.column()
+        col.prop(cscene, "use_distance_cull")
+        sub = col.column()
+        sub.active = cscene.use_distance_cull
+        sub.prop(cscene, "distance_cull_margin", text="Distance")
+
+
 def draw_device(self, context):
     scene = context.scene
     layout = self.layout
@@ -1847,13 +1835,13 @@ classes = (
     CYCLES_MATERIAL_PT_displacement,
     CYCLES_MATERIAL_PT_settings,
     CYCLES_MATERIAL_PT_settings_surface,
-    CYCLES_MATERIAL_PT_settings_geometry,
     CYCLES_MATERIAL_PT_settings_volume,
     CYCLES_RENDER_PT_bake,
     CYCLES_RENDER_PT_debug,
     CYCLES_SCENE_PT_simplify,
     CYCLES_SCENE_PT_simplify_viewport,
     CYCLES_SCENE_PT_simplify_render,
+    CYCLES_SCENE_PT_simplify_culling,
 )



More information about the Bf-blender-cvs mailing list