Revision: 25518 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25518 Author: campbellbarton Date: 2009-12-22 12:13:17 +0100 (Tue, 22 Dec 2009)
Log Message: ----------- missed some renames last commit, removed old paint buttons Modified Paths: -------------- trunk/blender/source/blender/blenkernel/BKE_customdata.h trunk/blender/source/blender/blenkernel/intern/customdata.c trunk/blender/source/blender/editors/mesh/mesh_data.c trunk/blender/source/blender/editors/sculpt_paint/paint_image.c trunk/blender/source/blender/editors/space_image/image_buttons.c trunk/blender/source/blender/makesdna/DNA_scene_types.h trunk/blender/source/blender/makesrna/intern/rna_mesh.c trunk/blender/source/blender/makesrna/intern/rna_sculpt_paint.c Modified: trunk/blender/source/blender/blenkernel/BKE_customdata.h =================================================================== --- trunk/blender/source/blender/blenkernel/BKE_customdata.h 2009-12-22 10:48:13 UTC (rev 25517) +++ trunk/blender/source/blender/blenkernel/BKE_customdata.h 2009-12-22 11:13:17 UTC (rev 25518) @@ -231,7 +231,7 @@ void CustomData_set_layer_active(struct CustomData *data, int type, int n); void CustomData_set_layer_render(struct CustomData *data, int type, int n); void CustomData_set_layer_clone(struct CustomData *data, int type, int n); -void CustomData_set_layer_mask(struct CustomData *data, int type, int n); +void CustomData_set_layer_stencil(struct CustomData *data, int type, int n); /* same as above but works with an index from CustomData_get_layer_index */ void CustomData_set_layer_active_index(struct CustomData *data, int type, int n); Modified: trunk/blender/source/blender/blenkernel/intern/customdata.c =================================================================== --- trunk/blender/source/blender/blenkernel/intern/customdata.c 2009-12-22 10:48:13 UTC (rev 25517) +++ trunk/blender/source/blender/blenkernel/intern/customdata.c 2009-12-22 11:13:17 UTC (rev 25518) @@ -1088,7 +1088,7 @@ data->layers[i].active_clone = n; } -void CustomData_set_layer_mask(CustomData *data, int type, int n) +void CustomData_set_layer_stencil(CustomData *data, int type, int n) { int i; Modified: trunk/blender/source/blender/editors/mesh/mesh_data.c =================================================================== --- trunk/blender/source/blender/editors/mesh/mesh_data.c 2009-12-22 10:48:13 UTC (rev 25517) +++ trunk/blender/source/blender/editors/mesh/mesh_data.c 2009-12-22 11:13:17 UTC (rev 25518) @@ -72,10 +72,10 @@ { Mesh *me = ob->data; CustomData *data= (me->edit_mesh)? &me->edit_mesh->fdata: &me->fdata; - void *actlayerdata, *rndlayerdata, *clonelayerdata, *masklayerdata, *layerdata=layer->data; + void *actlayerdata, *rndlayerdata, *clonelayerdata, *stencillayerdata, *layerdata=layer->data; int type= layer->type; int index= CustomData_get_layer_index(data, type); - int i, actindex, rndindex, cloneindex, maskindex; + int i, actindex, rndindex, cloneindex, stencilindex; /* ok, deleting a non-active layer needs to preserve the active layer indices. to do this, we store a pointer to the .data member of both layer and the active layer, @@ -87,7 +87,7 @@ actlayerdata = data->layers[CustomData_get_active_layer_index(data, type)].data; rndlayerdata = data->layers[CustomData_get_render_layer_index(data, type)].data; clonelayerdata = data->layers[CustomData_get_clone_layer_index(data, type)].data; - masklayerdata = data->layers[CustomData_get_stencil_layer_index(data, type)].data; + stencillayerdata = data->layers[CustomData_get_stencil_layer_index(data, type)].data; CustomData_set_layer_active(data, type, layer - &data->layers[index]); if(me->edit_mesh) { @@ -144,18 +144,18 @@ CustomData_set_layer_clone(data, type, cloneindex); } - if (masklayerdata != layerdata) { + if (stencillayerdata != layerdata) { /* find index */ - maskindex = CustomData_get_layer_index(data, type); - for (i=maskindex; i<data->totlayer; i++) { - if (data->layers[i].data == masklayerdata) { - maskindex = i - maskindex; + stencilindex = CustomData_get_layer_index(data, type); + for (i=stencilindex; i<data->totlayer; i++) { + if (data->layers[i].data == stencillayerdata) { + stencilindex = i - stencilindex; break; } } /* set index */ - CustomData_set_layer_mask(data, type, maskindex); + CustomData_set_layer_stencil(data, type, stencilindex); } } Modified: trunk/blender/source/blender/editors/sculpt_paint/paint_image.c =================================================================== --- trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2009-12-22 10:48:13 UTC (rev 25517) +++ trunk/blender/source/blender/editors/sculpt_paint/paint_image.c 2009-12-22 11:13:17 UTC (rev 25518) @@ -228,7 +228,7 @@ MFace *dm_mface; MTFace *dm_mtface; MTFace *dm_mtface_clone; /* other UV layer, use for cloning between layers */ - MTFace *dm_mtface_mask; + MTFace *dm_mtface_stencil; /* projection painting only */ MemArena *arena_mt[BLENDER_MAX_THREADS];/* for multithreading, the first item is sometimes used for non threaded cases too */ @@ -257,8 +257,8 @@ /* options for projection painting */ int do_layer_clone; - int do_layer_mask; - int do_layer_mask_inv; + int do_layer_stencil; + int do_layer_stencil_inv; short do_occlude; /* Use raytraced occlusion? - ortherwise will paint right through to the back*/ short do_backfacecull; /* ignore faces with normals pointing away, skips a lot of raycasts if your normals are correctly flipped */ @@ -1265,10 +1265,10 @@ float mask; /* Image Mask */ - if (ps->do_layer_mask) { + if (ps->do_layer_stencil) { /* another UV layers image is masking this one's */ ImBuf *ibuf_other; - const MTFace *tf_other = ps->dm_mtface_mask + face_index; + const MTFace *tf_other = ps->dm_mtface_stencil + face_index; if (tf_other->tpage && (ibuf_other = BKE_image_get_ibuf(tf_other->tpage, NULL))) { /* BKE_image_get_ibuf - TODO - this may be slow */ @@ -1284,7 +1284,7 @@ mask = ((rgba_ub[0]+rgba_ub[1]+rgba_ub[2])/(256*3.0f)) * (rgba_ub[3]/256.0f); } - if (!ps->do_layer_mask_inv) /* matching the gimps layer mask black/white rules, white==full opacity */ + if (!ps->do_layer_stencil_inv) /* matching the gimps layer mask black/white rules, white==full opacity */ mask = (1.0f - mask); if (mask == 0.0f) { @@ -2863,15 +2863,15 @@ } } - if (ps->do_layer_mask) { + if (ps->do_layer_stencil) { //int layer_num = CustomData_get_stencil_layer(&ps->dm->faceData, CD_MTFACE); int layer_num = CustomData_get_stencil_layer(&((Mesh *)ps->ob->data)->fdata, CD_MTFACE); if (layer_num != -1) - ps->dm_mtface_mask = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num); + ps->dm_mtface_stencil = CustomData_get_layer_n(&ps->dm->faceData, CD_MTFACE, layer_num); - if (ps->dm_mtface_mask==NULL || ps->dm_mtface_mask==ps->dm_mtface) { - ps->do_layer_mask = 0; - ps->dm_mtface_mask = NULL; + if (ps->dm_mtface_stencil==NULL || ps->dm_mtface_stencil==ps->dm_mtface) { + ps->do_layer_stencil = 0; + ps->dm_mtface_stencil = NULL; } } @@ -4438,8 +4438,8 @@ if (pop->ps.tool == PAINT_TOOL_CLONE) pop->ps.do_layer_clone = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_CLONE); - pop->ps.do_layer_mask = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_MASK) ? 1 : 0; - pop->ps.do_layer_mask_inv = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_MASK_INV) ? 1 : 0; + pop->ps.do_layer_stencil = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_STENCIL) ? 1 : 0; + pop->ps.do_layer_stencil_inv = (settings->imapaint.flag & IMAGEPAINT_PROJECT_LAYER_STENCIL_INV) ? 1 : 0; #ifndef PROJ_DEBUG_NOSEAMBLEED Modified: trunk/blender/source/blender/editors/space_image/image_buttons.c =================================================================== --- trunk/blender/source/blender/editors/space_image/image_buttons.c 2009-12-22 10:48:13 UTC (rev 25517) +++ trunk/blender/source/blender/editors/space_image/image_buttons.c 2009-12-22 11:13:17 UTC (rev 25518) @@ -363,133 +363,6 @@ } } -#if 0 -static void image_panel_view_properties(const bContext *C, Panel *pa) -{ -} -#endif - -void brush_buttons(const bContext *C, uiBlock *block, short fromsima, - int evt_nop, int evt_change, - int evt_browse, int evt_local, - int evt_del, int evt_keepdata, - int evt_texbrowse, int evt_texdel) -{ -// SpaceImage *sima= CTX_wm_space_image(C); - ToolSettings *settings= CTX_data_tool_settings(C); - Brush *brush= paint_brush(&settings->imapaint.paint); - ID *id; - int yco, xco, butw, but_idx; -// short *menupoin = &(sima->menunr); // XXX : &(G.buts->menunr); - short do_project = settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE ? 0:1; - - yco= 160; - - butw = fromsima ? 80 : 106; - - uiBlockBeginAlign(block); - but_idx = 0; - uiDefButS(block, ROW, evt_change, "Draw", butw*(but_idx++),yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_DRAW, 0, 0, "Draw brush"); - if (fromsima || do_project==0) - uiDefButS(block, ROW, evt_change, "Soften", butw*(but_idx++), yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_SOFTEN, 0, 0, "Soften brush"); - uiDefButS(block, ROW, evt_change, "Smear", butw*(but_idx++), yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_SMEAR, 0, 0, "Smear brush"); - if (fromsima || do_project) - uiDefButS(block, ROW, evt_change, "Clone", butw*(but_idx++), yco,butw,19, &settings->imapaint.tool, 7.0, PAINT_TOOL_CLONE, 0, 0, "Clone brush, use RMB to drag source image"); - - uiBlockEndAlign(block); - yco -= 30; - - id= (ID*)brush; - xco= 200; // std_libbuttons(block, 0, yco, 0, NULL, evt_browse, ID_BR, 0, id, NULL, menupoin, 0, evt_local, evt_del, 0, evt_keepdata); - - if(brush && !brush->id.lib) { - - butw= 320-(xco+10); - - uiDefButS(block, MENU, evt_nop, "Mix %x0|Add %x1|Subtract %x2|Multiply %x3|Lighten %x4|Darken %x5|Erase Alpha %x6|Add Alpha %x7", xco+10,yco,butw,19, &brush->blend, 0, 0, 0, 0, "Blending method for applying brushes"); - - uiBlockBeginAlign(block); - uiDefButBitS(block, TOG|BIT, BRUSH_AIRBRUSH, evt_change, "Airbrush", xco+10,yco-25,butw/2,19, &brush->flag, 0, 0, 0, 0, "Keep applying paint effect while holding mouse (spray)"); - uiDefButF(block, NUM, evt_nop, "", xco+10 + butw/2,yco-25,butw/2,19, &brush->rate, 0.01, 1.0, 0, 0, "Number of paints per second for Airbrush"); - uiBlockEndAlign(block); - - if (fromsima) { - uiDefButBitS(block, TOG|BIT, BRUSH_TORUS, evt_change, "Wrap", xco+10,yco-45,butw,19, &brush->flag, 0, 0, 0, 0, "Enables torus wrapping"); - yco -= 25; - } - else { - yco -= 25; - uiBlockBeginAlign(block); - uiDefButBitS(block, TOGN|BIT, IMAGEPAINT_PROJECT_DISABLE, B_REDR, "Project Paint", xco+10,yco-25,butw,19, &settings->imapaint.flag, 0, 0, 0, 0, "Use projection painting for improved consistency in the brush strokes"); - - if ((settings->imapaint.flag & IMAGEPAINT_PROJECT_DISABLE)==0) { - /* Projection Painting */ - @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs