renamed meshPrettyNormals to meshCalcNormals, and it now writes to normals rather then returning a list of vecs.
updated vertexpaint_selfshadow_ao to be a bit more efficient and make use of the above changes.
oblivious of each other, so setting/clearing the face edit mode select status
did not set/clear the corresponding vertex select statuses. This patch makes
a change of any select status recalculate the selection state of all edges an
faces. One unresolved issue is what effect this should have on the recent
edge mesh's stored selection. Currently changing the selection state will
delete store selection info, but it may be desirable to emulate the stored
selection (but I need to discuss how this should work in more depth with
Geoffrey Bantle).
As an added bonus (while I was messing with this), I added a "sel" attribute
to edges so they are the same as faces and vert.
A bug fix and an enhancement:
* fixed bug when adding or deleting faces from a mesh which has
vertexColors; mesh->mcol was not being updated
* changed edges.extend() and faces.extend() to accept integer vertex
indices in addition to MVerts; this should make scripts simpler and
in general make things run faster
Just use SHIFT-F3 and save an image.
Basically all this does is copy the zbuffer to a new Image buffer
and pass that to the save image function.
Sample output:
http://www.cs.umn.edu/~mein/blender/kungfu_zbuf255.jpg
Also thanks to Jesterking for helping me debug dumbness... ;)
and the nice screenshot.
Kent
Three more changes for the Mesh module:
(1) Bug fix for UV vertices ("sticky"). me->msticky was not being updated
when vertices were added or deleted from the mesh.
(2) Vertex, edge and face .extend() methods accept zero-length sequences
instead of throwing an exception. (Note that not giving any argument
is still an error).
(3) Edge and face .extend() methods ignore "invalid" edges or faces which
have the same vertex twice instead of throwing an exception. Cam and I
argued about this for a while... :-)
Ken
A couple of bug fixes and enhancements:
(1) Setting the UV attributes of a mesh face will create texture faces if
they are not already defined. Previously this threw an exception.
(2) Setting the image attribute of a mesh face will also set the TEX bit
of the face.mode flag
(3) When "sticky" vertices are created with mesh.vertexUV, the color is
set to white instead of black.
(4) Bugfix #3872: copying the mode attribute of one mesh to another would
sometimes result in an exception due to unexpected bits being set. I
still don't know how these other bits are being set, but this patch will
stop the complaint if they are set.
Bugfix #3660: NMesh.getVertexInfluences() was broken following the changes
to the armature system. Tron Thomas (kudos) came up with a fix that seems
to perform identically to the old method. I'm also adding it to the Mesh
module for compatibility.
Added Mesh.Modes() function, which allows scripts to get/set the selection
mode settings for meshes. This was necessary in order for the mesh tools
such as triangulate, remove doubles, etc., to work properly.
* edge and face extend() methods now add edges and faces in the order given
by their parameters. Note that if duplicate edges or faces are specified,
the order is preserved but the dups are removed, so indices won't match.
* allow extend(), findEdges() and faces.uv to accept lists or tuples
* fix bug in mesh.verts.extend() which didn't correctly check argument types
Still need to do Mball and Text.
Ken- this is fairly straight fwd but if you dont like it - its line 4867 of Mesh.c and 1 block that can be removed.
I tested for memory leaks and correct material user adjustment.
This is realy needed for using getFromObject to export to external rendering engines.
- Hope its ok.
Cam
when it duplicated mesh data.
I'm not thrilled with how I implemented this code, but currently don't
know a better way. If someone more familiar with how blender duplicates
objects and converts things to meshes wants to have a look, it would be
appreciated.
* add some protection against accessing MVerts/MEdges/MFaces which have
been deleted
* correct cut-and-paste bug in faces.delete() method
* correct some compiler warnings
-- calling mesh.getFromObject(obj) with mesh object now also
copies material properties
-- mesh.quadToTriangle() takes a parameter to duplicate both
Ctrl-TKEY and Shift-Ctrl-TKEY actions
-- assigning None to mesh.verts "clears" the memory allocated
to the mesh (equivalent of Mesh.New(), but on an existing
mesh)
-- exception handler message for mesh.faces[i].uv = [..] more
clear (uv attribute only accepts tuple, not list)
-- fixed bug for meshs with deformed verts when deleting verts
(deformed verts deleted and repacked correctly now, I think)
It was calling PyModule_AddObject() with unassigned pointer. Crashed on
exit here (python 2.3.2). Weird thing was that python 2.3.5 didnt complain
CVSr ----------------------------------------------------------------------
- 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
- 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?)
- 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
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