Age | Commit message (Collapse) | Author |
|
|
|
use different types for bm.verts.layers, bm.faces.layers, otherwise the layers look to have customdata type that isnt compatible, UV's on edges for eg.
|
|
char for type & subtype args.
|
|
old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol.
Loading old files works, saving legacy format works too.
What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge.
(it wont crash but the blue and red will be swapped on vertex color layers).
|
|
access to MLoopCol as mathutils.Color type
|
|
everywhere.
|
|
added per loop UV layer access
|
|
split up BMElemSeq into BMVertSeq, BMEdgeSeq, BMFaceSeq and BMLoopSeq
Was becoming cumbersome since each needed their own new() function, and other methods only worked for some of these types.
Added BMesh.loops - since you cant iterate over loops this is for customdata access only.
|
|
|
|
initial support for editing bmesh customdata per vert/edge/face/loop
shapes, crease, bevel weights working, missing UVs and Vertex Colors still.
|
|
Wrap customdata, so far you can access the data layers in a pythonic way but not manipulate the customdata yet.
provides dictionary like access to customdata layers, eg:
texpoly = bm.faces.tex["UVMap"]
print(bm.verts.shape.keys()) # un-intended pun, keys() works on all layers.
print("MyInt" in bm.edges.int) # __contains__
layer = bm.faces.get("CheckForLayer")
|
|
|
|
changes.
|
|
|
|
Vector.angle_signed(other)
for 2D vectors to get the clockwise angle between them.
in BLI math its called - angle_signed_v2v2()
shorthand for...
atan2f((v1[1] * v2[0]) - (v1[0] * v2[1]), dot_v2v2(v1, v2))
also corrects compile error in last commit.
|
|
eg:
bm.select_history = vert, face, edge
bm.select_history.add(edge)
|
|
warn when addons are not found when running cmake.
|
|
|
|
BMesh.select_history.remove/clear/validate functions.
|
|
the problem was numeric precision when in ortho mode the start/end points for the view vector would be 2000 apart which caused trouble for the intersection test.
|
|
BMEditMesh already stores an object pointer.
also fix for own mistake with mesh conversion refactor, shape key index was off by 1 when switching editmode.
|
|
from Jason van Gumster (thefallenweeble)
adds render_complete and render_cancel callbacks to bpy.app.handlers
|
|
- BMesh.is_wrapped
- BMesh.copy()
- BMesh.clear()
- BMesh.free()
- BMesh.from_object(obj, apply_modifiers=True)
- BMEdge.calc_length()
- BMLoop.calc_normal()
- BMLoop.calc_tangent()
|
|
funcs to ne less confusing.
|
|
rather than functions in the module.
added example script which converts a mesh to a bmesh, edits and converts back again.
|
|
- moved mesh conversion functions into their own file.
bmesh py api:
- can now create a new empty bmesh without first creating mesh data.
- added function to copy bmesh data back to a mesh.
- bmesh.from_mesh() can now get a mesh which isnt in editmode.
|
|
links, doc correction reported by dfelinto.
|
|
|
|
also remove large, duplicate comments from sunsky.h
|
|
* C: BM_vert_separate(...)
* py: bmesh.utils.vert_separate(vert, edges)
This splits off regions around the vertex, splitting on connected edges passed in a sequence.
also made minor changes
- rename python api functions _rip to _separate
- fixed bmesh iterator being iterable its self (some parts of python expect this)
- fix memory leak in bmesh python api.
|
|
* bmesh.utils.face_vert_rip(f, v)
* bmesh.utils.loop_rip(l)
|
|
|
|
|
|
|
|
when rotating multiple edges.
Now create the rotate edge in advance and copy its customdata (before joining the faces).
This commit also fixes an annoyance where tryangulating faces could create duplicate edges.
|
|
|
|
|
|
On a user level, edge rotate now works better with multiple edges selected, it wont make zero area faces or rotate edges into existing ones.
With a single edge selected - rotate is less strict and will allow ugly resulting faces but still checks on duplicate edges.
API:
* BM_edge_rotate now takes a flag, to optionally...
** check for existing edge
** splice edge (rotate and merge)
** check for degenerate resulting faces (overlapping geometry, zero area)
** beauty - only rotate to a better fit.
... this allows it to still be used as a low level API function since all checks can be skipped.
* BM_edge_rotate() now works a bit different, it find the new edge rotation before joining the faces - exposed by BM_edge_rotate_calc().
* Added api call bmesh_radial_faceloop_find_vert() - Radial Find a Vertex Loop in Face
|
|
|
|
'bpy' module.
we cant ensure buildinfo to have utf8 encoding so access it as bytes via python - a different workaround then this patch made.
also use C style string formatting for sys_info.py
|
|
and had bad string formatting in exception.
|
|
* add BLI_rfindlink for reverse index lookup (used so bm.select_history[-1] doesn't have to loop the entire list twice).
* add bm.select_history.active so you can get the last selected item or None without having to check seq length.
|
|
|
|
|
|
|
|
if blender freed the BMesh before python was finished (on exit editmode for eg), python would attempt to access the bmesh to clear python pointers in it.
|
|
|
|
|
|
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
|
|
Thanks to Campbell for fix, adding an & to an arg.
Also needed to negate the sense of a later test.
|