Commit Graph

482 Commits

Author SHA1 Message Date
53fece44cf style cleanup for blenkernel, no functional changes. 2012-02-23 02:17:50 +00:00
d47b018f8d Fix #30270, #30265: cycles not displaying textured objects, and not rendering
text/curve objects after the bmesh merge. Also removed a debug print.
2012-02-21 14:39:59 +00:00
a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
cf0aeddfc9 marked navmesh as BMESH_TODO, mixed mface/mpoly functions were being used for navmesh too, now editing funcs use polygons only. 2012-02-13 04:52:41 +00:00
59d45d0ea6 * remove the MFace parts of join (we only need polygon data)
* other minor cleanups
2012-02-12 19:11:09 +00:00
b6dcdb065d code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA. 

* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
2012-02-12 10:51:45 +00:00
63c4c18269 dont recalc normals after applying modifiers, this is already checked in previous code. 2012-02-09 14:28:59 +00:00
191c160d50 fix [#30083] Sculpt not redrawing with plain mesh 2012-02-06 06:56:54 +00:00
543fb27fd0 support for 'origspace' data layer - used for hair on subsurf mesh.
currently only works for 3/4 sided faces.
2012-02-05 11:30:26 +00:00
1d21e2386e ensure tessface's are available while sculpting. 2012-02-05 07:12:46 +00:00
35678eaae5 simplify some of the shape key code. no functional changes. 2012-01-30 03:54:24 +00:00
035607e26c more efficient array copying for add_shapekey_layers 2012-01-30 01:18:49 +00:00
fac771beca missed these last commit 2012-01-29 22:32:00 +00:00
2ea8a3b8ca remove CDDM_copy second argument, added CDDM_copy_from_tessface instead.
this function caused too many conflicts and in most cases was zero anyway.
2012-01-29 21:59:47 +00:00
92aa15805d BMesh: Fix for previous own fix (re-enable DynamicPaint previews in Object mode).
In fact, we have to add a CD_WEIGHT_MCOL layer (if not yet present) when updating CD_WEIGHT_MLOOPCOL, else with modifiers modifying the topology (like subsurf), it will sigsev.

That step should probably be done at tesselation time, though…
2012-01-23 17:17:08 +00:00
6c9438ea8a BMesh: Fix (re-enable) DynamicPaint previews in Object mode.
Also simplifies DM_update_weight_mcol: no need to update CD_WEIGHT_MCOL here, as it is anyway recreated from CD_WEIGHT_MLOOPCOL at tesselation time. Only commented out code for now.
2012-01-23 16:32:11 +00:00
41c0f0c733 replace BLI_array_growone() with BLI_array_growitems() when the size of the increase is known ahead of time, will reduce reallocs and give some speedup. 2012-01-23 13:51:44 +00:00
6eb0ca9385 Merged with trunk (-r43609:43611): updated modifier preview.
Noted preview code for DynamicPaint is currently disabled, will see if I can re-enable it…
2012-01-22 20:05:26 +00:00
1a93d88343 Add weight preview to WeightVG modifiers, and first, simple/basic refactor of how modifiers can generate preview.
User side:
* Preview for DynamicPaint should keep the same behavior (for now). Weight preview should be somawhat quicker, though.
* Preview for WeightVG modifiers is only active in WeightPaint mode, and if the affected vgroup is the active one.
* Last active preview modifier in stack wins!

Note: that modifier preview topic is yet to be further refined, quite raw/incomplete for now.

Dev side:
* In draw code, renamed DRAW_DYNAMIC_PAINT_PREVIEW flag to DRAW_MODIFIERS_PREVIEW
* Removed use of MOD_DPAINT_PREVIEW_READY in DynamicPaint code (seems unecessary, and if it was, should be of more general scope).
* Added eModifierTypeFlag_UsesPreview to ModifierTypeFlag, for modifiers that can generate some preview data.
* Added three new modifier funcs, to handle preview modifiers in draw code / mod stack.
* For weights preview: added the generic DM_update_weight_mcol func, which can update WEIGHT_MCOL layer with either a given array of weights (currently used by DynamicPaint only), or from current active vgroup(s).

So now, draw code is fully generic (i.e. no more modifier-type checking in it). Mod stack code is generic to some extent, but will need more work.
2012-01-22 17:54:23 +00:00
4de28741c8 - disable re-tesselating derived meshes in BMEdit_RecalcTesselation() have modifier stack do this.
- made editbmesh_calc_modifiers() ensure tessfaces, this has the advantage that if the tessfaces are already created they wont get re-made as was happening before.
2012-01-20 13:53:47 +00:00
444613cdba after all modifier are applied calculate normals, then tessfaces, this works so tesselating copies normals into the the newly creates tesselated faces. 2012-01-20 13:14:14 +00:00
a928a610e7 for CDDM's dmcalcNormals now call CDDM_calc_normals(), not CDDM_calc_normals_mapping(), this means calculating normals will calculate MPoly and MVert normals but not tesselate the mesh (which is overkill for normal calculation anyway).
use CDDM_calc_normals over CDDM_calc_normals_mapping for editmode and ensure the final dm has tessfaces.
2012-01-19 23:34:53 +00:00
bc745a32d3 argument to mesh_recalcTesselation to skip copying normals from polygons. 2012-01-19 17:51:52 +00:00
7b2101ace9 svn merge ^/trunk/blender -r43482:43524 2012-01-19 11:31:31 +00:00
6afac2d345 Couple minor fixes for DM_debug_print().
Fix a gcc warning by not using the DM_debug_info string as the format
string, also free the string after printing.
2012-01-19 04:00:27 +00:00
b748d4f0cf debug function DM_debug_info / DM_debug_print, with access from python
through Object.dm_info('SOURCE/DEFORM/FINAL')

this is to help tracking down issues with modifiers where loosing data
layers between modifiers can cause bugs, also to helo with comparing
bmesh/trunk's modifier stack.
2012-01-19 00:18:25 +00:00
787ea5feb4 replace CDDM_calc_normals_mapping with CDDM_calc_normals(), this version of the function wont create tessfaces (and should speedup the modifier stack in some cases). 2012-01-18 15:47:56 +00:00
ad3e9900d6 call CDDM_from_BMEditMesh without creating tessface data for modifiers.
- in the case of deform modifiers this is very safe (assuming the mods themselves dont need tessface data), since the DM is freed right after, so this is an easy speedup.

- in the case of bevel and split edge modifiers this should still work out fine since mods that need tessface data will generate it.
2012-01-18 15:29:25 +00:00
9d782c8a1a argument for CDDM_from_BMEditMesh() so creating tessface data is optional, no functional changes since all callers use this so far. 2012-01-18 15:09:27 +00:00
9e59fed5d8 fix for error in merge, weightpaint would crash 2012-01-12 03:39:32 +00:00
b308e61312 svn merge ^/trunk/blender -r43220:43278 --accept postpone 2012-01-11 14:14:04 +00:00
ec58ff19ad have add_weight_mcol_dm() set the 4th corner of a tri faces color to 0, otherwise uninitialized memory gets copied about. 2012-01-09 10:38:22 +00:00
ded0af482b rename CDDM_calc_normals() --> CDDM_calc_normals_mapping 2012-01-06 00:12:24 +00:00
7fd67392eb added a function to ensure derived mesh has tessface's, in preparation for removal of tessface recalculation after each modifier runs. 2012-01-05 12:40:09 +00:00
a0e42dc8ab fix for crash in the modifier stack when applying a deform modifier after a constructive modifier, also sync minor edits with trunk. 2012-01-02 06:53:09 +00:00
84b58df85a svn merge ^/trunk/blender -r42742:42757 2011-12-20 08:09:46 +00:00
a7a6049978 minor edits to previous commit & set VKey to toggle vertex select in weight paint mode. 2011-12-20 02:04:35 +00:00
efb4eff353 svn merge ^/trunk/blender -r42722:42742 2011-12-20 01:33:14 +00:00
a7bae8474b calculate weight paint colors once per vertex rather then on every face corner (was doing the same deform vert lookup and color calculation multiple times per vertex),
Quick shows over 2x speedup in my tests, will give bigger speedup with more vertex groups.

If you happen to have vertices with no faces using them - vertex colors will be calculated unnecessarily, but this isnt a common use case for weight paint mode.
2011-12-19 22:55:04 +00:00
2457d4f5ab svn merge ^/trunk/blender -r42680:42722 2011-12-19 10:40:48 +00:00
b49463c439 cleanup of weight paint color setting code, no functional changes 2011-12-18 12:54:50 +00:00
862dc635ed svn merge ^/trunk/blender -r42617:42655 2011-12-15 23:59:02 +00:00
490536561d reenabled auto scale for derivative maps 2011-12-15 15:48:44 +00:00
65f3b93f14 svn merge ^/trunk/blender -r42521:42550 2011-12-10 05:38:00 +00:00
0cc887e2e9 disabling DM_calc_auto_bump_scale() until after release 2011-12-10 01:14:36 +00:00
ae17390b77 picky edits & regen man page 2011-12-10 01:07:22 +00:00
965c287630 fixes scale on derivative maps 2011-12-09 23:26:06 +00:00
f025b7b511 went over all uses of MDeformWeight.def_nr and made sure the value is clamped when used as an array index. 2011-12-09 08:20:27 +00:00
b245dfbc06 svn merge ^/trunk/blender -r42466:42495 2011-12-07 18:29:21 +00:00
3637794436 remove initilaizing weight collor with dummy value (from recent commit), harmless but not needed. 2011-12-07 18:22:16 +00:00