Revision: 49039
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49039
Author: kupoman
Date: 2012-07-18 17:33:40 +0000 (Wed, 18 Jul 2012)
Log Message:
-----------
Now the uniform label in the custom shader UI only appears when there are
uniforms to edit. Also removing a debug print in the custom shader UI script.
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-07-18 17:33:27 UTC (rev 49038)
+++ branches/ge_harmony/release/scripts/startup/bl_ui/properties_material.py
2012-07-18 17:33:40 UTC (rev 49039)
@@ -651,11 +651,11 @@
col.prop(shader, "source_text", text="")
elif shader.shader_location == "EXTERNAL":
col.prop(shader, "source_path", text="")
-
- col.label("Uniforms:")
-
+
+ if shader.uniforms:
+ col.label("Uniforms:")
+
for uniform in shader.uniforms:
- print(uniform, uniform.type, uniform.value)
if hasattr(uniform, "value"):
if uniform.type in ("VEC2", "VEC3", "VEC4", "IVEC2",
"IVEC3", "IVEC4"):
col.label(uniform.name + ":")
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs