Commit Graph

19 Commits

Author SHA1 Message Date
Campbell Barton
9a168d8285 added list2MeshWeight and meshWeight2List - faster then the dict equivilents and better in some cases.
Speedup for bpymesh_redux (poly reducer) with reducing vertex weights. use list2MeshWeight and meshWeight2List.

renamed vertex gradient files

Removed reload()'s
- 3ds_import.py
- mesh_cleanup.py
- mesh_poly_reduce.py
- vertexpaint_selfshadow_ao.py
2006-07-07 10:46:46 +00:00
Campbell Barton
1c9a7a032b fixed a bug in poly redux's vgroup weight merging (was reducing the weight each collapse by about half)
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.
2006-07-05 20:37:07 +00:00
Campbell Barton
c4b4e2922f more updates, mostly 2.3 error checking, nice messages when pythons not installed and some nendo import optimizations.
BPyMesh will work with the exception of the redux function in py2.3
2006-07-03 20:17:40 +00:00
Campbell Barton
6c4a0d7769 added python 2.3 set importer for BPyMesh_redux
made ngon loop-reduce function faster by replacing dicts with sets
off_export has some errors, modernized the script.
added a python 2.3 reversed compat function - just uses ls[::-1]

Further 2.3 compat testing needed.
2006-07-03 01:52:14 +00:00
Campbell Barton
73e5693bea Fixed mistake in calculating the collapse position (surprising it worked as well as it did) 2006-06-04 09:35:35 +00:00
Campbell Barton
e47719d253 comments on how edge weighting for collapsing works.
uv_auto_layout_tex now uses the recently fixed saveRenderedImage - I needed to make clean and make to get it working.
2006-05-28 02:12:49 +00:00
Campbell Barton
83105911bf Use Kens hide/sel mesh props to save some python looping. 2006-05-28 01:52:16 +00:00
Campbell Barton
8baa88da9b Poly reduction fixes
Added remove doubles as a keyword option,
Fixed Triangulate (need to select the faces first)
Fixed boundry weighting (defaults reduced boundries first more then
non boundry verts!)
Made face area weighting give better results.
2006-05-27 14:27:52 +00:00
Campbell Barton
55755954ed optional reuse list for meshCalcNormals, which makes decimation abt 5% faster.
Workaround for a problem where badly predicted positions are further then half the edge length, on these cases just collapse to the weighted middle of teh edge.
Added docs for "PolyReduce" (Uses BPyMesh_Redux) and WIP Docs for AutoTex Layout.
http://mediawiki.blender.org/index.php/Manual/PartXIII/Modelling_Scripts
2006-05-20 23:24:26 +00:00
Campbell Barton
2f337b6e62 Stoped a list that didint need to be made.
~20% faster and memory saved by re-using the face and edge lists and their classes each pass rather then __init__'ing new ones.
Stupid mistake- was only collapsing edges with UV's
2006-05-18 14:13:47 +00:00
Campbell Barton
8537a4d471 Fixed some evil bugs in the poly reducer messing up UV's every now and then.
Added support for "Weighted Collapse" Before an edge could only collapse into its middle,
Now the edge collapses into a point bias'd by the 2 verts Concave/Convec "Pointyness" value as well as boundry weighting.
This works much better for boundry verts. - UV's Vcols and Weights are correctly interpolated into the new location.

Added a tool in the mesh menu for accessing the poly reduction tool.
2006-05-18 02:22:05 +00:00
Campbell Barton
51eb744807 BPyImage had a problem with a path being returned as None
BPyMesh would make NAN coords for collapsed edges.
2006-05-15 13:33:30 +00:00
Campbell Barton
90c10ab910 BPyRegistry was throwing errors with blank config files. made it check for this and be quiet.
fixed some bugs in BPyMesh_redux, tweaked to work well for test cases. much better use of error levels for edge weighting. better collapsing to the desired target. triangulates before reduction be default now.
2006-05-15 07:29:28 +00:00
Campbell Barton
265c0af49f * New faster algo for finding the new collapse location using normals rather then edge connectivity data.
* Much improved, slower edge collapse weighting method that makes this script about 2.5x slower, but brings it up to the quality of qslim (lightwave's decimator), without the manifold' errors.
Probably worth adding a UI front end to this function.
2006-05-14 18:28:27 +00:00
Campbell Barton
d790049639 fixed, bugs with selection & remove doubles. 2006-05-13 17:50:47 +00:00
Campbell Barton
b0c5df16f6 Made editmesh remove_doubles work with vertex colours,
added vertex colour support to BPyMesh_redux polygon reducing function.
2006-05-13 12:36:48 +00:00
Campbell Barton
2bcf11defb BPyMesh_redux: Fixed a rare bug in mesh redux's, collapsed location.
BPyMesh_redux:  made redux support non UV Meshes.
vertexpaint_selfshadow_ao:  turned vertex selfshadow scale into radius.
2006-05-13 05:24:58 +00:00
Campbell Barton
831a1fa91d Added MVert.hide property because hidden verts were hanging BPyMesh_Redux 2006-05-11 20:35:43 +00:00
Campbell Barton
0497ea57cb Added a polygon reduction function that can poly reduce any mesh and supports UV's as well as bone weights (Thanks to briggs).
Isnt intended to be ultra high quality, more for automatic realtime "Level of Detail" model generation.

BPyMesh.redux(ob, 0.5) # To reduce to about half the polys
2006-05-11 12:42:10 +00:00