Commit Graph

129 Commits

Author SHA1 Message Date
6ca7d82932 code cleanup: white space, spelling & ';;' end of lines. 2012-02-25 16:04:03 +00:00
1955407f7e code cleanyp - no functional changes. 2012-02-22 16:52:06 +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
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
8b43813b69 rename BM_ flags for BMHeader->hflag to BM_ELEM_ to be more clear that these flags apply to bmesh elements. 2012-02-12 06:24:12 +00:00
a5eb673b4d use MPoly's rather then MFaces (since these don't necessarily exist) for drawing game engine bitmap font text.
minor edits to draw_tface_mapped__set_draw() to make it more efficient.
2012-02-08 09:07:24 +00:00
76ccd3d5ed Code Cleanup:
macro for copying polygon settings
2012-02-08 09:02:10 +00:00
5c1bee7ebc fix for weight paint face selection.
since removing tesselation faces we can no longer rely on me->totface & me->mface being set. now use polygons instead.
2012-02-05 03:25:13 +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
7b2101ace9 svn merge ^/trunk/blender -r43482:43524 2012-01-19 11:31:31 +00:00
a87c5eb52c use color conversions functions in more places.
also add rgba_float_to_uchar, rgba_uchar_to_float
2012-01-19 10:04:51 +00:00
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +00:00
1ad1b93622 fix [#29794] Cannot hide faces in weight-paint mode
bug was introduced with cycles merge.
2012-01-11 07:03:47 +00:00
57ed2fd1c1 svn merge ^/trunk/blender -r42757:42759 2011-12-20 10:59:56 +00:00
2f9925f913 Get rid of hardcoded structure definition in DM drawing callbacks
Structures passing to DM callbacks as userData used to be defined in both callee
and callbacks itself which made it difficult and unsafe to add new properties
to user data.

Added typedefs for this structures and use them in callbacks and callee functions.
2011-12-20 08:47:36 +00:00
65f3b93f14 svn merge ^/trunk/blender -r42521:42550 2011-12-10 05:38:00 +00:00
9d807eb6dd Mesh drawing optimization and fixes:
- Pass MFace, MTface and OrigIndex arrays via userData to compareDrawParams callback
  rather than looking up for this layers for each face
- This allowed to avoid massing DM to compare callback which seems like a bad-level pass
- Fixed crashes on some video cards when assigning different materials to different
  faces in edit mode. Both of intel and nvidia cards in my laptop were affected by
  this error
2011-12-09 11:46:48 +00:00
15ad39e684 svn merge ^/trunk/blender -r42303:42329 2011-12-02 01:01:07 +00:00
b5332f293e Fixed issue with multiple textures and editmode when VBOs are enabled 2011-12-01 18:26:57 +00:00
c21f19374b Fixed crash caused by recent VBO's changes
Crash was caused by non-initialized original index passing to compareDrawOptions
callback. Due to in some cases it's enough to know indices of faces in final DM
(like for comparing if the same texture used for mesh drawing) assume this
callback receives index in final DM and if it's needed it will make conversion
to original index itself.

This should help reaching extra speed if textured object is affected by
bevel modifiers, i.e.
2011-12-01 18:26:48 +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
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
9781db22cb fix for error in drawing face selection overlay (was using polygon index against face array) 2011-11-23 18:53:49 +00:00
2266c7fc1c Add CD_POLYINDEX layer to reduce need for retesselations 2011-11-13 15:13:59 +00:00
eadb192986 svn merge -r41723:41751 ^/trunk/blender 2011-11-11 06:37:29 +00:00
92d35b74e7 svn merge -r41722:41723 ^/trunk/blender 2011-11-11 06:25:45 +00:00
dfc30d1229 quiet some warnings from recent merge 2011-11-10 12:28:26 +00:00
a96c3ce9e0 fix compile errors for previous merge 2011-11-10 03:40:02 +00:00
685041d53a svn merge -r41650:41655 ^/trunk/blender --- cycles merge, this wont copile, still need to manually update some funcs 2011-11-10 03:05:11 +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
46ae692710 Merge with trunk r41342 2011-10-28 17:00:53 +00:00
94f8e3198d svn merge -r41266:41287 ^/trunk/blender 2011-10-26 03:26:52 +00:00
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
70bf00a74c svn merge ^/trunk/blender -r41200:41226 . 2011-10-24 08:45:55 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
66ef02aaa3 Code refactoring: split main 3d view drawing function into object drawing and
info overlay drawing functions.
2011-10-23 13:00:41 +00:00
7eadd540d4 svn merge ^/trunk/blender -r40872:40890 2011-10-13 22:50:01 +00:00
8be3249537 Merge with trunk r40991 2011-10-13 21:43:02 +00:00
7b3ea6cc2c mesh VBO drawing code was swapping red/blue vertex colors - this is confusing because MCol.r is blue and MCol.b is red but not excuse! (and how come nobody noticed this?).
- fixed this error in 4 places.
2011-10-10 00:01:44 +00:00
aa6d7ebd14 svn merge ^/trunk/blender -r40720:40872 2011-10-09 07:31:15 +00:00
06e3cadd8f fix for weight paint with face mask enabled drawing with lights. 2011-10-06 05:01:24 +00:00
28f77d398e Missed a merge conflict. 2011-10-04 12:27:48 +00:00
e8bb972f3c Merge with trunk r40782 2011-10-04 11:42:44 +00:00
effea8c29b svn merge ^/trunk/blender -r40511:40587 2011-09-27 03:12:31 +00:00
e63c124e2b fix [#28736] FaceMask crash on Weight Paint 2011-09-24 11:24:34 +00:00
dab7dba2db svn merge ^/trunk/blender -r40498:40511 2011-09-24 11:03:52 +00:00
a189b71a28 some speedup for drawing mesh in texture mode.
- only pass if the mesh has vertex colors to drawParams() rather then the mcol its self, this saves a lookup on the color.
- drawing textures in editmode with no vertex colors would still lookup vertex colors on each face, instead cache this info for all faces.
2011-09-23 18:29:45 +00:00