Commit Graph

655 Commits

Author SHA1 Message Date
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
9d69115e92 fix for uninitialized memory use drawing 'nan' vertex groups, noticed while looking into [#29521] 2011-12-07 07:13:33 +00:00
4b0b3f578c alternative fix for [#29338], now dont duplicate the vertex layer when calculating normals, instead only calculate face normals. 2011-12-07 01:12:53 +00:00
26db98293f Quiet annoying warning:
Warning! Tesselation uvs or vcol data got out of sync, "had to reset!

This would happen on every editmode edit with UV's and wasn't too reassuring that blender was handling uvs/vcols correctly.

From looking into the problem I found that creating the undo mesh would act as if it was tessellating the existing mesh each time and complain that the data was out of sync, when infact the mesh was just created and being filled in.

Also, allocating uv and vcol customdata arrats for tessfaces isn't needed for undo mesh, so save some memory and dont allocate these in the first place.
2011-12-06 09:28:25 +00:00
f1989793e7 fix [#29338] Viewport does not update when sculpting without a multires modifer
when no modifiers are applied, dont re-tessellate,

for future referece - this bug was caused because can_pbvh_draw() checks if (cddm->mvert == me->mvert)
re-tesselating the faces copies the vertex array so it was returning false.
2011-12-05 01:58:24 +00:00
f07df7287e manual sync with trunk - pulling in changes where the issues are not bmesh spesific
- some merges added lines in multiple times
- removed some NULL checks that were only in bmesh
- enable cycles by default (was disabled because it used not to work)
- make formatting match
2011-12-04 23:13:28 +00:00
243131edc0 fix for derived mesh buffer overrun caused by using an incorrect loop length.
editmode extruding would crash instantly when dupli-faces were enabled.
2011-12-03 02:11:38 +00:00
0cff8e6c9c move editmesh derived mesh functions into their own file to match bmesh, without this all merges in this area have to be done manually. 2011-12-02 03:16:06 +00:00
15ad39e684 svn merge ^/trunk/blender -r42303:42329 2011-12-02 01:01:07 +00:00
f6f7e270e3 Slight refactor of VBO code to deal with multiple textures.
Added compareDrawSettings callback to driver mesh's callbacks which are
drawing textured faces (mapped and not mapped). This new callback checks
if two faces are drawing with the same settings (testures, shading etc)
and if they not, flush of faces happens into ogl using glDrawArrays and
next face would be drawn with it's own settings.

Currently implemented compareDrawSettings is used to resolve issue from
bug report only, probably there are extra places where this callback is
needed, but haven't seen configuration where current logic will fail,
so it should be ok.

Also reordered arguments passing to drawMappedFaces DM's callbacks,
so now all drawing callback are accepting list of callbacks and then
userData, instead of using mixed order of callbacks and userData which
was a bit confusing to work with.

This commit fixes:
- #26410: VBO & multitexture doesnt work
- #29464: VBO enabled causes UV coruption
2011-12-01 12:12:39 +00:00
bc9b593909 More DM func renames, fixing some build breaks, renaming more stuff, also seems like it might be fixing the recent CDDM_copy corruption/leak bug 2011-11-30 18:03:56 +00:00
eb46f6bf0d More DM func renames, this one includes renames of the function pointer members of the DerivedMesh struct 2011-11-29 13:01:51 +00:00
4e86b48cbd Rename DM *_face_* funcs to be either *_tessface_* or *_poly_* to avoid confusion
This is the first step in a few changes to cleanup confusing/missing DM funcs
2011-11-29 05:09:54 +00:00
3b5bcab09c svn merge ^/trunk/blender -r42139:42172 2011-11-26 16:29:14 +00:00
af7288c407 minor edit - weight_to_rgb() and ramp_blend() now take a float vector rather than 3 float pointers.
also make particle draw use a float vec.
2011-11-26 03:13:54 +00:00
f1996b5601 fix in DM_to_mesh() for bmesh - would crash rendering NGons with cycles 2011-11-25 22:32:58 +00:00
4801ecae71 replace unhelpfully named eck! and eek! error prints, also some minor changes to math library use. 2011-11-24 23:09:55 +00:00
f28fd56f8f svn merge ^/trunk/blender -r42095:42116 2011-11-24 05:33:22 +00:00
c62d33c540 patch: [#29382] Arbitrary Length Array Function Additions and Modifications
from Andrew Hale (trumanblending), with some edits to use these in mathutils.Vector added.

Added Functions:
- dot_vn_vn - Dot product of two arrays
- normalize_vn_vn - Normalize an array and store the result in a second array
- normalize_vn - Normalize an array inplace

Renamed Functions:
Some functions have been renamed to make them consistent with the naming conventions used by fixed length array functions.
- fill_vni to fill_vn_i
- fill_vn to fill_vn_fl
2011-11-24 04:12:16 +00:00
8a8566c894 Fix [#29256] Import images as planes add on doesn't work correctly in bmesh 2011-11-17 18:48:49 +00:00
9087cb91d4 quiet compiler warnings for BLI_array defines, split BLI_array_append into BLI_array_append / BLI_array_append_r, the latter returning the new array location. 2011-11-16 17:09:41 +00:00
2266c7fc1c Add CD_POLYINDEX layer to reduce need for retesselations 2011-11-13 15:13:59 +00:00
92d35b74e7 svn merge -r41722:41723 ^/trunk/blender 2011-11-11 06:25:45 +00:00
1b4a54ad73 Merge with trunk r41701 2011-11-09 15:46:53 +00:00
28ee0f9218 Texturing: texture and 3d view draw type changes, these should only have any
effect for a render engine using new shading nodes. In short:

* No longer uses images assigned to faces in the uv layer, rather the active
  image texture node is what is edited/painted/drawn.
* Textured draw type now shows the active image texture node, with solid
  lighting.
* Material draw mode shows GLSL shader of a simplified material node tree,
  using solid lighting.
* Textures for modifiers, brushes, etc, are now available from a dropdown in
  the texture tab in the properties editor. These do not use new shading nodes
  yet.

http://wiki.blender.org/index.php/Dev:2.6/Source/Render/TextureWorkflow
2011-11-08 13:07:16 +00:00
aea95c7860 bmesh: fixed merge issues with navmesh (though I've not tested if it works yet).
also fixed a small crasher in bridge.
2011-11-08 00:20:50 +00:00
edec46b0a6 Merge with trunk r41625 2011-11-07 16:36:49 +00:00
d424e1454b Fix [#29191] Crash when switching to mask mode for texture paint 2011-11-07 15:03:53 +00:00