Commit Graph

434 Commits

Author SHA1 Message Date
35504d627b style cleanup: also made functions static 2012-10-09 12:41:37 +00:00
cb42de588d Adding weightpaint transfer tool.
From: https://svn.blender.org/svnroot/bf-blender/branches/meshdata_transfer

Bachelor project at Narvik university collage (Norway).
By Ove M Henriksen (Cyborgmuppet)
 
Thesis will be published at Cyborgmuppets blender page.

Thanks for letting me participate!
2012-10-09 12:25:10 +00:00
ec689d650d Fix based on code review Issue 6347064 2012-10-09 11:29:29 +00:00
8730b390fb patch [#31919] limit the number of bone deform weights per vertex. Many game engines require a limit of 4.
from Kesten Broughton (kestion)


Usage: In weight paint mode, select the mesh to have its weights culled. Click on "Limit Weights" button. A sub-panel will appear "Limit Number of Vertex Weights" with a slider field "Limit" which you can set to the appropriate level. The default level is 4, and it gets executed upon pressing "Limit Weights" so you will need to do an "undo" if your max bone limit is above 4. The checkbox "All Deform Weights" will consider all vertex weights, not just bone deform weights.
2012-10-09 10:56:35 +00:00
7247af6af5 svn merge ^/trunk/blender -r48592:HEAD 2012-10-09 10:53:20 +00:00
aa2d84da37 style cleanup:
also remove some redundant conversions int -> short -> int
2012-09-09 00:00:21 +00:00
99fcec3334 fix [#29431] "Normalize All" from Weight Tools don't work correctly 2012-09-05 04:16:09 +00:00
dbdd1bb4f2 remove vertex groups from a mesh or lattice when this there are no remaining vertex groups. This was dont in edit-mode but not object-mode. 2012-09-03 00:02:13 +00:00
78c181fafc Fix part of #32376: mirror vertex groups with flip group names did not keep
the same vertex group active.
2012-08-31 13:43:56 +00:00
dd21def25d fixed [#32373] Copy Vertex Group operator copies any value as full 1.0 2012-08-21 15:57:59 +00:00
e9caa21830 fix own error in recent smoothview cleanup, also correct some cross references in bmesh docs. 2012-08-17 14:43:20 +00:00
62a73381a7 use fabsf when using floats. 2012-07-21 15:27:40 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
30085e5ea9 response to code review:
http://codereview.appspot.com/6301100/diff/1/source/blender/editors/object/object_vgroup.c
2012-07-04 16:30:12 +00:00
370901890a Its now overwriting properly by clearing weights when using replace_mode all.
Reason for not going for suggested "else" on copy in each case is that it would present a paradox. 
(it would delete weights that got created in some instances)
2012-06-19 19:15:59 +00:00
622ae0a1ca clenaup. 2012-06-19 18:26:55 +00:00
51036b3186 Fixed better check for Mface.v4 2012-06-19 16:23:52 +00:00
873b267029 cleanup for bwetter naming 2012-06-19 09:52:16 +00:00
07aaf356f7 Error reporting added.
Note that when changing to optional methods that fails, it fails silently still.
Might have to adress this.
2012-06-19 02:23:31 +00:00
32992cabe7 Bugfix to if statement always reporting true 2012-06-19 01:19:44 +00:00
fcb650a154 Fixed loop instead of one liners for interpolate over face method mode. 2012-06-19 00:35:39 +00:00
56ebb0b4a8 style cleanup fixed indents (I belive!?!) 2012-06-18 19:59:15 +00:00
3253716183 Bugfix: no longer crashes when MDefomWeight is not fond on source. 2012-06-18 19:32:45 +00:00
108d157254 Changed naming of "option" to "mode".
No longer using defvert_verify_index() but defvert_find_index().
Changing function created error wehn not found. Must be adressed.
2012-06-18 17:11:53 +00:00
bf3d0ca8da svn merge ^/trunk/blender -r47023:HEAD 2012-06-17 04:14:44 +00:00
9d32423f3e Bugfix: no longer crashes when dverts does not exist on source.
Added release for derivedmesh.
2012-06-11 22:58:49 +00:00
995b9d5e8d style cleanup fixed naming 2012-06-11 20:32:34 +00:00
340e156a2f Bugfix: No longer crashes when there is no dverts on target mesh from before. 2012-06-11 19:31:22 +00:00
5414ea4701 Fixed naming from "single vertex group" to "active vertex group" 2012-06-06 23:21:45 +00:00
2548494bc1 Removed confusing error reporting code.
The confusing part was inconsitent reporting. 
It reported un eaven indices when only one source and a fail,
but not when several sources and some success and some fail.
2012-06-05 21:10:15 +00:00
59d699805c Bugfix, no longer crashing wehn no source vertex group. 2012-06-05 20:48:01 +00:00
51cbfba306 Now the feature is more intuitive. copying from selected to active. 2012-06-04 22:17:40 +00:00
cd346252d7 After reverting to binary tree, starting search at the top
by reseting nearest is marginally faster than using previous search.
2012-06-03 21:34:17 +00:00
87c585c1ba Reverting to binary tree because related optimization with type 10 tree were bugged.
Now  feature completes in ~5 sec for a mesh with 300k vertices. but it works as intended.
2012-06-03 20:23:41 +00:00
c63dcaee07 small fix to mem release when using index method 2012-06-03 18:44:17 +00:00
512b35754e Bugfix to bug from optimizing... 2012-06-03 17:16:50 +00:00
7b29489016 BVHTree usage optimized for transferring between meshes of 300k faces.
Mesh were the shape of a human.
Optimizing for anything less would not make sense because it happens ~instant
 
moving to 10 tree from binary tree increased speed by ~30%
initiating additional searches with the first increased speed by ~99%

Now function completes in less than two seconds on my amd 2,6ghz
2012-06-03 16:44:48 +00:00
0d42015671 Fixes to bugs that appeared during restructure. 2012-05-31 19:09:23 +00:00
be4d30bf8e Bogus MEM_freeN removed and cleaned descriptions. 2012-05-27 18:05:10 +00:00
1dce081e2b small cleaning 2012-05-27 17:47:21 +00:00
ea9655ce14 Fixed iterators.
Memory bugs persist...
2012-05-27 17:34:10 +00:00
bfd894b267 added mesh_get_derived_deform(scene, ob_act, CD_MASK_BAREMESH | CD_MASK_ORIGINDEX)
but now it crashes on:
a: <unavailable synchronous data> @0x9bc692c8
math_vector_inline.c 296
2012-05-27 15:57:43 +00:00
89cc1b2e50 GUI added, but crashes becasuse: ob_act / ob_src ->DerivedDeform == 0x0 2012-05-27 14:17:01 +00:00
6c41b326fe style cleanup 2012-05-26 15:48:55 +00:00
25c7e8e128 bug fixes, review issue 6256058. 2012-05-26 15:27:21 +00:00
b4a229c43a style edits 2012-05-26 14:31:34 +00:00
49b6867e0c previous commit didnt build - add back enum and note that its a copy because of linking error 2012-05-26 00:41:11 +00:00
2c8a7ac756 svn merge ^/trunk/blender -r46930:HEAD 2012-05-25 17:52:51 +00:00
c2c2611faa Restructuring code.
All functions merged into ED_vgroup_transfer_weight() to avoid duplicate code.
2012-05-24 20:03:09 +00:00
c4c75c33d0 Changed structure of the entire feature/code.
It should now work in 24 different ways depending on options.
Its not tested in depth yet...
2012-05-23 10:21:57 +00:00