[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25912] trunk/blender/release/scripts/ui/ properties_material.py: Fix for [#20272] Missing Options - Blender Game, Transparency Panel
Matt Ebb
matt at mke3.net
Tue Jan 12 03:32:27 CET 2010
Revision: 25912
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25912
Author: broken
Date: 2010-01-12 03:32:21 +0100 (Tue, 12 Jan 2010)
Log Message:
-----------
Fix for [#20272] Missing Options - Blender Game, Transparency Panel
A little bit dodgy, but at least the options are accessible for the time being.
Modified Paths:
--------------
trunk/blender/release/scripts/ui/properties_material.py
Modified: trunk/blender/release/scripts/ui/properties_material.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_material.py 2010-01-12 02:13:20 UTC (rev 25911)
+++ trunk/blender/release/scripts/ui/properties_material.py 2010-01-12 02:32:21 UTC (rev 25912)
@@ -641,7 +641,41 @@
sub.prop(rayt, "gloss_threshold", text="Threshold")
sub.prop(rayt, "gloss_samples", text="Samples")
+class MATERIAL_PT_transp_game(MaterialButtonsPanel):
+ bl_label = "Transparency"
+ bl_default_closed = True
+ COMPAT_ENGINES = {'BLENDER_GAME'}
+ def poll(self, context):
+ mat = active_node_mat(context.material)
+ engine = context.scene.render_data.engine
+ return mat and (engine in self.COMPAT_ENGINES)
+
+ def draw_header(self, context):
+ mat = active_node_mat(context.material)
+
+ self.layout.prop(mat, "transparency", text="")
+
+ def draw(self, context):
+ layout = self.layout
+
+ mat = active_node_mat(context.material)
+ rayt = mat.raytrace_transparency
+ wide_ui = context.region.width > narrowui
+
+ row = layout.row()
+ row.active = mat.transparency and (not mat.shadeless)
+ if wide_ui:
+ row.prop(mat, "transparency_method", expand=True)
+ else:
+ row.prop(mat, "transparency_method", text="")
+
+ split = layout.split()
+
+ col = split.column()
+ col.prop(mat, "alpha")
+
+
class MATERIAL_PT_halo(MaterialButtonsPanel):
bl_label = "Halo"
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -740,8 +774,8 @@
bpy.types.register(MATERIAL_PT_strand)
bpy.types.register(MATERIAL_PT_options)
bpy.types.register(MATERIAL_PT_shadow)
+bpy.types.register(MATERIAL_PT_transp_game)
-
class VolumeButtonsPanel(bpy.types.Panel):
bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW'
@@ -885,6 +919,7 @@
bpy.types.register(MATERIAL_PT_volume_shading)
bpy.types.register(MATERIAL_PT_volume_lighting)
bpy.types.register(MATERIAL_PT_volume_transp)
+
bpy.types.register(MATERIAL_PT_volume_integration)
bpy.types.register(MATERIAL_PT_custom_props)
More information about the Bf-blender-cvs
mailing list