added python api stuff to deal with Color and UV/Image layers.
me.activeUvLayer - int
me.activeColorLayer - int
me.totUvLayers - int
me.totColorLayers - int
me.addUvLayer()
me.addColorLayer()
me.removeUvLayer()
me.removeColorLayer()
Variable names may need changing.
The epydocs are now updated to have idproperties;
all the modules that have bindings for ID properties
now has docs for them. E.g Materials have a .properties
members, Image, Texture, Scene, Object, NMEsh, and Mesh.
I realized that .properties was already taken in
Objects, so I renamed it to .idproperties. There was
also a nasty little problem with an example inside
Object.getType; the entire example was being pasted inside
the return field. I fixed it by just moving the return
definition to after the example, like it should be.
Added Mesh .key .removeAllKeys() and .insertKey() for MDD support (was using NMesh just for keys before)
Since this is aparently an experemental feature in NMesh we may want to change this.
exactly the same as mesh_create_derived_render(ob) except it uses the view modifier settings.
Added an optional arg to getFromObject to 'render' so you can choose to get the mesh displayed in the 3d view or generate one with render settings.
Solved bug 4612 getFromObject now works with soft body meshes (error was caused by getting the derived mesh from a copy of the object)
removed workaround for softbody bug in object_apply_def.py
New keyword parameters for Mesh.faces.extend() method:
* ignoreDups: turns off checks for duplicate faces in the input list and
existing mesh faces. Intended for constructing new meshes where the
faces are known to be unique.
* indexList: makes the method return a list of new faces indices, which
can be used to index new faces to add other attributes like color. If
duplicate faces are removed, None is placed in their list slot.
fixed some other UI logic in the python menu script
Added an option to use a vertex group for a reduction weight map to force reducing some areas more then others.
Mesh epydocs activeGroups can be None as well as string.
A problem with the current flag seting in Mesh is that Mesh needs to know of all possible flags or setting a flag can raise an error from the faces own unrecognezed flag.
also stopped the active face flag raising an error so pythoners can do face1.flag |= face2.flag without checking for active face flags. if the flag is a part of the arg its removed quietly.
Checked Mesh flags, face modes and edge flags, should all be ok now.
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.
Make me.faces.sel and me.edges.sel behave like EM_select_face() and
EM_select_edge() in source/blender/src/editmesh_lib.c.
Script users should note that if they change ANY of the selection states
(vertex, edge, face) and then call a mesh "tool" method (like me.remDoubles)
that the selection states of the mesh MAY change, since these tools use the
edit mode (which updates select states).
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
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
- Set local sticky in the uv editor as default.
- Don't do live unwrap on fully selected charts or charts with no pins
selected.
- Fixed bug with live unwrap not respecting transform cancel in some cases.
- "View Home" didn't work without an image.
- Move UV Calculation settings (cube size, cylinder radius, ..) into the scene
toolsettings, instead of global variables
- Remove the name LSCM from the UI (and python docs on seams), and replace it
with 'Unwrap', with upcoming ABF this didn't make sense anymore.
- Move the Old/New LSCM switch into the UV Calculation panel. New LSCM is the
default now. Also renamed LSCM there to "Conformal".
- Made some room in the UV Calculation panel by removing the buttons to execute
the UV calculation, only leaving the settings.
Fill Holes:
- LSCM now has an option to fill holes in the chart before unwrapping. This on
by default, and enables two things:
- Prevent internal overlaps (e.g. eyes, mouth) for LSCM unwrapping.
- Allow the internal boundaries to move freely during stretch minimize.
- The possibility to switch it off is there because it is not always possible
to define which the outer boundary is. For example with an open cylinder
where there are two identical holes.
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
- update for the old mathutils rewrite
- update for some other methods ive added
- added explaination of wrapped data
- added a .css file for epydoc gives nice blender/python colors :?
-- 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)
- 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