[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [23744] trunk/blender/release/scripts/ui: UI scripts:

Brecht Van Lommel brecht at blender.org
Fri Oct 9 17:25:19 CEST 2009


Revision: 23744
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23744
Author:   blendix
Date:     2009-10-09 17:25:19 +0200 (Fri, 09 Oct 2009)

Log Message:
-----------
UI scripts:
* Fix AAO showing Distance property even though it is not supported.
* Fix texture buttons not displaying texture stack from the node material.
* Small visual tweak to particle mode options.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/buttons_texture.py
    trunk/blender/release/scripts/ui/buttons_world.py
    trunk/blender/release/scripts/ui/space_view3d_toolbar.py

Modified: trunk/blender/release/scripts/ui/buttons_texture.py
===================================================================
--- trunk/blender/release/scripts/ui/buttons_texture.py	2009-10-09 15:09:21 UTC (rev 23743)
+++ trunk/blender/release/scripts/ui/buttons_texture.py	2009-10-09 15:25:19 UTC (rev 23744)
@@ -1,6 +1,16 @@
 
 import bpy
 
+def active_node_mat(mat):
+	if mat:
+		mat_node = mat.active_node_material
+		if mat_node:
+			return mat_node
+		else:
+			return mat
+
+	return None
+
 class TextureButtonsPanel(bpy.types.Panel):
 	__space_type__ = 'PROPERTIES'
 	__region_type__ = 'WINDOW'
@@ -18,7 +28,7 @@
 		
 		tex = context.texture
 		slot = context.texture_slot
-		ma = context.material
+		ma = active_node_mat(context.material)
 		la = context.lamp
 		wo = context.world
 		br = context.brush
@@ -45,7 +55,7 @@
 
 		tex = context.texture
 		
-		id = context.material
+		id = active_node_mat(context.material)
 		if not id: id =	context.lamp
 		if not id: id =	context.world
 		if not id: id =	context.brush
@@ -129,7 +139,7 @@
 	def draw(self, context):
 		layout = self.layout
 		
-		ma = context.material
+		ma = active_node_mat(context.material)
 		la = context.lamp
 		wo = context.world
 		br = context.brush
@@ -202,7 +212,7 @@
 	def draw(self, context):
 		layout = self.layout
 		
-		ma = context.material
+		ma = active_node_mat(context.material)
 		la = context.lamp
 		wo = context.world
 		br = context.brush

Modified: trunk/blender/release/scripts/ui/buttons_world.py
===================================================================
--- trunk/blender/release/scripts/ui/buttons_world.py	2009-10-09 15:09:21 UTC (rev 23743)
+++ trunk/blender/release/scripts/ui/buttons_world.py	2009-10-09 15:25:19 UTC (rev 23744)
@@ -129,7 +129,8 @@
 		
 		col = split.column()
 		col.itemL(text="Attenuation:")
-		col.itemR(ao, "distance")
+		if ao.gather_method == 'RAYTRACE':
+			col.itemR(ao, "distance")
 		col.itemR(ao, "falloff")
 		sub = col.row()
 		sub.active = ao.falloff

Modified: trunk/blender/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2009-10-09 15:09:21 UTC (rev 23743)
+++ trunk/blender/release/scripts/ui/space_view3d_toolbar.py	2009-10-09 15:25:19 UTC (rev 23744)
@@ -676,9 +676,7 @@
 		pe = context.tool_settings.particle_edit
 		ob = pe.object
 
-		row = layout.row()
-		row.itemL(text="Edit:")
-		row.itemR(pe, "type", text="")
+		layout.itemR(pe, "type", text="")
 		
 		if pe.type == 'PARTICLES':
 			if ob.particle_systems:





More information about the Bf-blender-cvs mailing list