* Fix for r50782, new "Geometry Data" Panel was missing in Cycles.
[blender.git] / intern / cycles / blender / addon / ui.py
index bf44a558b1ab5f2ebc8b77bf86d1c88d806900a1..4d44dc84fdfd6a8be1bdabc2105f54ba0b65886f 100644 (file)
@@ -53,19 +53,20 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
 
         scene = context.scene
         cscene = scene.cycles
+        device_type = context.user_preferences.system.compute_device_type
 
         split = layout.split()
 
         col = split.column()
         sub = col.column()
-        sub.active = cscene.device == 'CPU'
+        sub.enabled = (device_type == 'NONE' or cscene.device == 'CPU')
         sub.prop(cscene, "progressive")
 
         sub = col.column(align=True)
         sub.prop(cscene, "seed")
         sub.prop(cscene, "sample_clamp")
 
-        if cscene.progressive or cscene.device != 'CPU':
+        if cscene.progressive or (device_type != 'NONE' and cscene.device == 'GPU'):
             col = split.column()
             col.label(text="Samples:")
             sub = col.column(align=True)
@@ -215,7 +216,7 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
 
         sub = col.column(align=True)
         sub.label(text="Viewport:")
-        sub.prop(cscene, "resolution_divider")
+        sub.prop(cscene, "preview_start_resolution")
 
 
 class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
@@ -512,6 +513,7 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
         lamp = context.lamp
         clamp = lamp.cycles
         cscene = context.scene.cycles
+        device_type = context.user_preferences.system.compute_device_type
 
         layout.prop(lamp, "type", expand=True)
 
@@ -530,7 +532,7 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
                 sub.prop(lamp, "size", text="Size X")
                 sub.prop(lamp, "size_y", text="Size Y")
 
-        if not cscene.progressive and cscene.device == 'CPU':
+        if not cscene.progressive and (device_type == 'NONE' or cscene.device == 'CPU'):
             col.prop(clamp, "samples")
 
         col = split.column()
@@ -655,6 +657,7 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
         world = context.world
         cworld = world.cycles
         cscene = context.scene.cycles
+        device_type = context.user_preferences.system.compute_device_type
 
         col = layout.column()
 
@@ -662,7 +665,7 @@ class CyclesWorld_PT_settings(CyclesButtonsPanel, Panel):
         sub = col.row(align=True)
         sub.active = cworld.sample_as_light
         sub.prop(cworld, "sample_map_resolution")
-        if not cscene.progressive and cscene.device == 'CPU':
+        if not cscene.progressive and (device_type == 'NONE' or cscene.device == 'CPU'):
             sub.prop(cworld, "samples")
 
 
@@ -975,6 +978,7 @@ def get_panels():
         bpy.types.DATA_PT_camera,
         bpy.types.DATA_PT_camera_display,
         bpy.types.DATA_PT_lens,
+        bpy.types.DATA_PT_customdata,
         bpy.types.DATA_PT_custom_props_mesh,
         bpy.types.DATA_PT_custom_props_camera,
         bpy.types.DATA_PT_custom_props_lamp,