[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49039] branches/ge_harmony/release/ scripts/startup/bl_ui/properties_material.py: Now the uniform label in the custom shader UI only appears when there are uniforms to edit .
Daniel Stokes
kupomail at gmail.com
Wed Jul 18 19:33:40 CEST 2012
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 + ":")
More information about the Bf-blender-cvs
mailing list