diff options
author | Daniel Salazar <zanqdo@gmail.com> | 2010-11-30 08:35:35 +0300 |
---|---|---|
committer | Daniel Salazar <zanqdo@gmail.com> | 2010-11-30 08:35:35 +0300 |
commit | fc1a29b3a9bc9108897bded7b5b05507e3e3d5c3 (patch) | |
tree | f23115d94cdce476a2ea109d5d8b7068d5116e43 /animation_rotobezier.py | |
parent | ad83e136bf700f936c3d76d4e3f938e51fcc2cc5 (diff) |
Simplifying material check thanks to the teachings of Master Campbell
Diffstat (limited to 'animation_rotobezier.py')
-rw-r--r-- | animation_rotobezier.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/animation_rotobezier.py b/animation_rotobezier.py index 92ae49d8..c49a72eb 100644 --- a/animation_rotobezier.py +++ b/animation_rotobezier.py @@ -231,14 +231,6 @@ def MakeMatte (Type): Obj = bpy.context.active_object # Material - def CheckMat (MatName): - Result = False - Mats = bpy.data.materials - for Mat in Mats: - if Mat.name == MatName: - Result = not Result - - return Result if Type == 'White': MatName = 'RotoBezier_WhiteMatte' @@ -248,7 +240,7 @@ def MakeMatte (Type): MatName = 'RotoBezier_BlackMatte' MatCol = (0,0,0) - if CheckMat(MatName): + if bpy.data.materials.get(MatName): Mat = bpy.data.materials[MatName] if not Obj.material_slots: bpy.ops.object.material_slot_add() |