Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2012-01-22 21:54:23 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-01-22 21:54:23 +0400
commit1a93d8834319b890ff0cbc70231b14635603ae95 (patch)
tree87ee1ecd503872e91116566db9df4730b3ebccbe /source/blender/editors/space_view3d/drawmesh.c
parentdf51fd74cf826c42a90212082abb27e99484257a (diff)
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.
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 5f521cc3dd1..62c12500aa8 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -713,7 +713,7 @@ void draw_mesh_textured_old(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
}
else {
if(GPU_buffer_legacy(dm)) {
- if (draw_flags & DRAW_DYNAMIC_PAINT_PREVIEW)
+ if (draw_flags & DRAW_MODIFIERS_PREVIEW)
dm->drawFacesTex(dm, draw_mcol__set_draw_legacy, NULL, NULL);
else
dm->drawFacesTex(dm, draw_tface__set_draw_legacy, NULL, NULL);
@@ -849,7 +849,7 @@ static int tex_mat_set_face_editmesh_cb(void *UNUSED(userData), int index)
void draw_mesh_textured(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob, DerivedMesh *dm, int draw_flags)
{
- if((!scene_use_new_shading_nodes(scene)) || (draw_flags & DRAW_DYNAMIC_PAINT_PREVIEW)) {
+ if((!scene_use_new_shading_nodes(scene)) || (draw_flags & DRAW_MODIFIERS_PREVIEW)) {
draw_mesh_textured_old(scene, v3d, rv3d, ob, dm, draw_flags);
return;
}