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>2007-08-03 20:33:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-08-03 20:33:08 +0400
commitc6785e3292ff833ed91aea38ce6125efb6bd7a83 (patch)
treed164428c7158a3dbaf5200c6fd72127a74ae4b11 /release/scripts/vertexpaint_selfshadow_ao.py
parent3237a56b5d2454573dab02d8de5b99b1a848f751 (diff)
fixes from 2.4x
Diffstat (limited to 'release/scripts/vertexpaint_selfshadow_ao.py')
-rw-r--r--release/scripts/vertexpaint_selfshadow_ao.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/release/scripts/vertexpaint_selfshadow_ao.py b/release/scripts/vertexpaint_selfshadow_ao.py
index c083bc9e8b0..7a6f4f9176d 100644
--- a/release/scripts/vertexpaint_selfshadow_ao.py
+++ b/release/scripts/vertexpaint_selfshadow_ao.py
@@ -39,6 +39,7 @@ and optionaly blur the shading to remove artifacts from spesific edges.
# --------------------------------------------------------------------------
from Blender import Scene, Draw, sys, Window, Mathutils, Mesh
+import bpy
import BPyMesh
@@ -135,10 +136,10 @@ def vertexFakeAO(me, PREF_BLUR_ITERATIONS, PREF_BLUR_RADIUS, PREF_MIN_EDLEN, PRE
Window.WaitCursor(0)
def main():
- scn= Scene.GetCurrent()
- ob= scn.getActiveObject()
+ sce= bpy.data.scenes.active
+ ob= sce.objects.active
- if not ob or ob.getType() != 'Mesh':
+ if not ob or ob.type != 'Mesh':
Draw.PupMenu('Error, no active mesh object, aborting.')
return
@@ -174,8 +175,8 @@ def main():
PREF_SHADOW_ONLY= PREF_SHADOW_ONLY.val
PREF_SEL_ONLY= PREF_SEL_ONLY.val
- if not me.faceUV:
- me.faceUV= 1
+ if not me.vertexColors:
+ me.vertexColors= 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)