[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50794] trunk/blender/intern/cycles/ blender/addon/ui.py: Cycles UI:

Thomas Dinges blender at dingto.org
Fri Sep 21 15:32:52 CEST 2012


Revision: 50794
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50794
Author:   dingto
Date:     2012-09-21 13:32:52 +0000 (Fri, 21 Sep 2012)
Log Message:
-----------
Cycles UI:
* Followup for r50550, added checks to the "Samples" Button in World and Lamp Context to properly show the correct options. 

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50550

Modified Paths:
--------------
    trunk/blender/intern/cycles/blender/addon/ui.py

Modified: trunk/blender/intern/cycles/blender/addon/ui.py
===================================================================
--- trunk/blender/intern/cycles/blender/addon/ui.py	2012-09-21 13:29:38 UTC (rev 50793)
+++ trunk/blender/intern/cycles/blender/addon/ui.py	2012-09-21 13:32:52 UTC (rev 50794)
@@ -513,6 +513,7 @@
         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)
 
@@ -531,7 +532,7 @@
                 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()
@@ -656,6 +657,7 @@
         world = context.world
         cworld = world.cycles
         cscene = context.scene.cycles
+        device_type = context.user_preferences.system.compute_device_type
 
         col = layout.column()
 
@@ -663,7 +665,7 @@
         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")
 
 




More information about the Bf-blender-cvs mailing list