Commit Graph

10 Commits

Author SHA1 Message Date
5dfef1ae35 Reverting to 2_2x BPY
I was careful in selectively rolling back revisions, but if you've committed changes unrelated to BPY mixed with BPY changes, I might have reverted those too, so please double check.
2007-12-17 20:21:06 +00:00
ee5dc4d0bf removed duplicate functionality, macro's and functions existed to check a PyObjects type, now only use macro's 2007-03-15 01:09:14 +00:00
0c6bb8c079 mesh.transform() was applying the inverted 4x4 matrix to the normals, without removing the translation part.
iter with a char value did not allow for -1, my bad, using short now.
2006-10-04 17:06:29 +00:00
3d3b64768d Mesh iterators (me.faces, me.edges, me.verts, face and edge iterator) store the iterator progress in the python object.
This made nested loops with the same python object mess up.
eg-
faces= me.faces
for f1 in faces:
  for f2 in faces:
    print f1.index,f2.index

This didnt work, fixed by initializing the iter value at -1, so any greater value will create a new BPyObject with its own iter value.
once iteration is finished, its set back to -1.

Also made face and edges iter value a char instead of an int to save some memory.
2006-09-22 10:08:41 +00:00
Ken Hughes
f3ae4d0f4d ===Python API===
Something to try making import/export script writers happy; Mesh.New() will
not create a new Blender mesh datablock unless the mesh is linked to an
object.
2006-05-20 16:52:11 +00:00
Ken Hughes
a9a545d784 Lots of BPy Mesh additions:
- added faces.uvSel attribute: can get/set selection status of UV vertices in
  UV Editor window
- make mesh.faceUV, mesh.vertexUV and mesh.vertexColor writable: users
  can now enable/disable UV faces, vertex colors, "sticky" vertices
- fixed bug with mesh tool methods: before it would only work if an object
  linked to the mesh was selected
- added mesh.quadToTriangle() and mesh.triangleToQuad() methods
- added selected() method to verts, edges, faces; returns list of indices
  of selected items
- mesh.getFromObject() now gets derived mesh data
- ported vertex group methods from NMesh (required change to Object.c)
- ported module dictionaries from NMesh
2005-10-27 19:37:37 +00:00
Ken Hughes
7d325f1ed4 - New additions to Mesh module
- new methods from NMesh (transform, getFromObject, findEdges)
  - new methods for deleting groups of verts, edges and faces
  - new methods for accessing mesh editing tools: fill, flipNormals,
    recalcNormals, remDoubles, smooth, subdivide, toSphere
- Added PVertType to Types module (not my favorite name; any suggestions?)
2005-10-19 21:24:18 +00:00
Ken Hughes
5380db502e - added Mesh.MVert(); can now create 'thick' vertices which don't wrap mesh
- implemented slice operations (get/set) for vertex list; allows script
  writers to manipulate lists of vertices (using 'thick' vertices)
- fixed problem in mesh.faces.extend() which allowed the creation of
  "Eeekadoodle" faces
- added mesh.update() method; (possibly) temporary fix to allow updating DAG
2005-10-11 04:09:08 +00:00
Ken Hughes
ac668ea561 Added Mesh.New() method; can now create new meshes within the module
Changed Object.link() to allow link objects with both BPython-type meshes
Changed Object.getData() to allow retrieving both types of BPython-type meshes

Added new mesh types to Types module
2005-10-04 15:17:27 +00:00
Ken Hughes
f2af563f92 Added new BPython thin mesh module 2005-10-03 19:36:15 +00:00