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>2006-07-08 10:14:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-07-08 10:14:45 +0400
commit219a6b245c178acf16234c3870fc606f9c6bec76 (patch)
treeab9e6c66690470a6de05946fc28ab1e49882bca0 /release/scripts/vertexpaint_selfshadow_ao.py
parent73d50a828940a44c09710159a3112593aee506d3 (diff)
vertexpaint_selfshadow_ao adds face uv to the mesh if there not alredy there...
added GPL header and docstrings to other scripts removed double batch_name_edit, same file is object_batch_name_edit
Diffstat (limited to 'release/scripts/vertexpaint_selfshadow_ao.py')
-rw-r--r--release/scripts/vertexpaint_selfshadow_ao.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/release/scripts/vertexpaint_selfshadow_ao.py b/release/scripts/vertexpaint_selfshadow_ao.py
index 754b25e7eb5..182a0648a4b 100644
--- a/release/scripts/vertexpaint_selfshadow_ao.py
+++ b/release/scripts/vertexpaint_selfshadow_ao.py
@@ -11,10 +11,10 @@ __url__ = ("blender", "elysiun", "http://members.iinet.net.au/~cpbarton/ideasman
__version__ = "0.1"
__bpydoc__ = """\
-Clean Weight
+Self Shadow
-This Script is to be used only in weight paint mode,
-It removes very low weighted verts from the current group with a weight option.
+This usript uses the angles between faces to shade the mesh,
+and optionaly blur the shading to remove artifacts from spesific edges.
"""
# ***** BEGIN GPL LICENSE BLOCK *****
@@ -149,10 +149,6 @@ def main():
me= ob.getData(mesh=1)
- if not me.faceUV:
- Draw.PupMenu('Error, The active mesh does not have texface/vertex colors. aborting')
- return
-
PREF_BLUR_ITERATIONS= Draw.Create(1)
PREF_BLUR_RADIUS= Draw.Create(0.05)
PREF_MIN_EDLEN= Draw.Create(0.01)
@@ -183,6 +179,9 @@ def main():
PREF_SHADOW_ONLY= PREF_SHADOW_ONLY.val
PREF_SEL_ONLY= PREF_SEL_ONLY.val
+ if not me.faceUV:
+ me.faceUV= 1
+
#t= sys.time()
vertexFakeAO(me, PREF_BLUR_ITERATIONS, PREF_BLUR_RADIUS, PREF_MIN_EDLEN, PREF_CLAMP_CONCAVE, PREF_CLAMP_CONVEX, PREF_SHADOW_ONLY, PREF_SEL_ONLY)
#print 'done in %.6f' % (sys.time()-t)