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:
authorAndrew Wiggin <ender79bl@gmail.com>2011-11-17 09:03:07 +0400
committerAndrew Wiggin <ender79bl@gmail.com>2011-11-17 09:03:07 +0400
commit1038c76c551be5f8d4b083f05fd2ed06f16c767a (patch)
treee73aca7bfd4b5508d1eb62f34acb939daf1b48f3 /release/scripts/modules/bpy_types.py
parent3ed866d2fc69e7c398e4b5f9bc9e2c06758d06cf (diff)
Add access to UVs from python, patch python unwrap scripts to work wtih ngons
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index bb1e9988ec2..eeb8f375c3d 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -442,6 +442,20 @@ class MeshFace(StructRNA):
ord_ind(verts[3], verts[0]),
)
+class MeshPolygon(StructRNA):
+ __slots__ = ()
+
+ @property
+ def edge_keys(self):
+ verts = self.vertices[:]
+ vlen = len(self.vertices)
+ return [ord_ind(verts[i], verts[(i+1) % vlen]) for i in range(vlen)]
+
+ @property
+ def loops(self):
+ start = self.loop_start
+ end = start + self.loop_total
+ return range(start, end)
class Text(bpy_types.ID):
__slots__ = ()