[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49567] branches/ge_harmony/release/ scripts/startup/bl_ui/properties_material.py: Updating properties_material. py to remove the update button for shaders (it' s original function is now automatic, and it does not reload the shader source as people expect).
Daniel Stokes
kupomail at gmail.com
Sun Aug 5 00:33:44 CEST 2012
Revision: 49567
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49567
Author: kupoman
Date: 2012-08-04 22:33:43 +0000 (Sat, 04 Aug 2012)
Log Message:
-----------
Updating properties_material.py to remove the update button for shaders (it's original function is now automatic, and it does not reload the shader source as people expect). Also now making "reserved" uniforms (e.g. bgl_RenderedTexture) inactive in the material ui.
Modified Paths:
--------------
branches/ge_harmony/release/scripts/startup/bl_ui/properties_material.py
Modified: branches/ge_harmony/release/scripts/startup/bl_ui/properties_material.py
===================================================================
--- branches/ge_harmony/release/scripts/startup/bl_ui/properties_material.py 2012-08-04 22:18:56 UTC (rev 49566)
+++ branches/ge_harmony/release/scripts/startup/bl_ui/properties_material.py 2012-08-04 22:33:43 UTC (rev 49567)
@@ -639,8 +639,6 @@
shader = mat.active_shader
if shader:
- col.operator("material.force_update", text="Reload Shader")
-
row = col.row()
row.prop(shader, "type", expand=True)
@@ -656,15 +654,25 @@
col.label("Uniforms:")
for uniform in shader.uniforms:
+ col = layout.column()
if hasattr(uniform, "value"):
+ reserved = uniform.name.startswith("bgl_")
if uniform.type in ("VEC2", "VEC3", "VEC4", "IVEC2", "IVEC3", "IVEC4"):
- col.label(uniform.name + ":")
- row = col.row()
- row.prop(uniform, "value", text="")
+ if not reserved:
+ col.label(uniform.name + ":")
+ row = col.row()
+ row.prop(uniform, "value", text="")
+ else:
+ col.label(uniform.name)
else:
row = col.row()
- row.label(uniform.name + ":")
- row.prop(uniform, "value", text="")
+ if not reserved:
+ row.label(uniform.name + ":")
+ row.prop(uniform, "value", text="")
+ else:
+ row.label(uniform.name)
+
+ col.active = not reserved
class MATERIAL_PT_game_settings(MaterialButtonsPanel, Panel):
bl_label = "Game Settings"
More information about the Bf-blender-cvs
mailing list