Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-08-14 21:36:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-14 21:36:41 +0400
commit3220ef9d952b71c397849ea64abb882ea65b4d48 (patch)
treef5d6aba3ba667f275d53da2ada8b82080a285703 /release/scripts
parent211d30ea7f4abda6763aa6ee3eae840466eb05cc (diff)
patch [#32327] Uniform displace modifier
from Fredrik Hansson (fredrikh) With some edits for python UI. The patch makes the displace modifier treat an empty texture as white.
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 7485e532bd4..ae0c4d4161c 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -215,6 +215,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.label(text="Face Count" + ": %d" % md.face_count)
def DISPLACE(self, layout, ob, md):
+ has_texture = (md.texture is not None)
+
split = layout.split()
col = split.column()
@@ -226,12 +228,18 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.label(text="Direction:")
col.prop(md, "direction", text="")
- col.label(text="Texture Coordinates:")
- col.prop(md, "texture_coords", text="")
+ colsub = col.column()
+ colsub.active = has_texture
+ colsub.label(text="Texture Coordinates:")
+ colsub.prop(md, "texture_coords", text="")
if md.texture_coords == 'OBJECT':
- layout.prop(md, "texture_coords_object", text="Object")
+ row = layout.row()
+ row.active = has_texture
+ row.prop(md, "texture_coords_object", text="Object")
elif md.texture_coords == 'UV' and ob.type == 'MESH':
- layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
+ row = layout.row()
+ row.active = has_texture
+ row.prop_search(md, "uv_layer", ob.data, "uv_textures")
layout.separator()