diff options
author | Jason Hays <jason_hays22@mymail.eku.edu> | 2011-09-18 21:10:28 +0400 |
---|---|---|
committer | Jason Hays <jason_hays22@mymail.eku.edu> | 2011-09-18 21:10:28 +0400 |
commit | 73863a1da5436ec5f63566e40ffa07ecbb903c69 (patch) | |
tree | da4e95ba22f325d17402625070afcf617210b079 /source/blender/editors/space_view3d | |
parent | e234cb463689a19436f9d5fa25111433b1d531d5 (diff) |
Split do_weight_paint_vertex() to isolate the simple case.
Added a tool-tip to the "fix deforms" op.
Removed code markers:
"Radish"
Diffstat (limited to 'source/blender/editors/space_view3d')
4 files changed, 22 insertions, 22 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 44adca688cc..a0269d5e0df 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -86,7 +86,7 @@ #include "BIF_gl.h" #include "BIF_glutil.h" -#include "GPU_buffers.h"/* Radish */ +#include "GPU_buffers.h" #include "GPU_draw.h" #include "GPU_extensions.h" @@ -1741,7 +1741,7 @@ void mesh_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, EditVe dm->release(dm); } -/* Radish */ + static void mesh_obmode_foreachScreenVert__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s)) { struct { void (*func)(void *userData, MVert *mv, int x, int y, int index); void *userData; ViewContext vc; int clipVerts; } *data = userData; @@ -1762,7 +1762,7 @@ static void mesh_obmode_foreachScreenVert__mapFunc(void *userData, int index, fl data->func(data->userData, mv, s[0], s[1], index); } } -/* Radish */ + void mesh_obmode_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, MVert *mv, int x, int y, int index), void *userData, int clipVerts) { struct { void (*func)(void *userData, MVert *mv, int x, int y, int index); void *userData; ViewContext vc; int clipVerts; } data; @@ -1781,7 +1781,7 @@ void mesh_obmode_foreachScreenVert(ViewContext *vc, void (*func)(void *userData, dm->release(dm); } -/* Radish draw callback */ +/* draw callback */ static void drawSelectedVertices__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s) { MVert *mv = userData; @@ -1800,7 +1800,7 @@ static void drawSelectedVertices__mapFunc(void *userData, int index, float *co, glVertex3fv(co); } } -/* Radish */ + static void drawSelectedVertices(DerivedMesh *dm, Mesh *me) { glBegin(GL_POINTS); dm->foreachMappedVert(dm, drawSelectedVertices__mapFunc, me->mvert); @@ -2990,7 +2990,7 @@ static void draw_mesh_fancy(Scene *scene, ARegion *ar, View3D *v3d, RegionView3D bglPolygonOffset(rv3d->dist, 0.0); } } - /* Radish */ + if(paint_vertsel_test(ob)) { glColor3f(0.0f, 0.0f, 0.0f); @@ -6590,7 +6590,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) } /* ***************** BACKBUF SEL (BBS) ********* */ -/* Radish */ + static void bbs_obmode_mesh_verts__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s)) { struct {void* offset; MVert *mvert;} *data = userData; @@ -6602,7 +6602,7 @@ static void bbs_obmode_mesh_verts__mapFunc(void *userData, int index, float *co, bglVertex3fv(co); } } -/* Radish */ + static void bbs_obmode_mesh_verts(Object *ob, DerivedMesh *dm, int offset) { struct {void* offset; struct MVert *mvert;} data; @@ -6714,7 +6714,7 @@ static int bbs_mesh_solid_hide__setDrawOpts(void *userData, int index, int *UNUS return 0; } } -/* Radish */ + // must have called WM_set_framebuffer_index_color beforehand static int bbs_mesh_solid_hide2__setDrawOpts(void *userData, int index, int *UNUSED(drawSmooth_r)) { diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 3399ab4e260..c46b6b6d70b 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -371,7 +371,7 @@ static void view3d_main_area_init(wmWindowManager *wm, ARegion *ar) keymap= WM_keymap_find(wm->defaultconf, "Face Mask", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); - /* Radish */ + keymap= WM_keymap_find(wm->defaultconf, "Weight Paint Vertex Selection", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 6429730c429..1b6bd7ed0e7 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -503,7 +503,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C) if(ob->mode & (OB_MODE_TEXTURE_PAINT|OB_MODE_VERTEX_PAINT)) { uiItemR(layout, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); } else { - /* Radish */ + row= uiLayoutRow(layout, 1); uiItemR(row, &meshptr, "use_paint_mask", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); uiItemR(row, &meshptr, "use_paint_mask_vertex", UI_ITEM_R_ICON_ONLY, "", ICON_NONE); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index e9719e8e868..77823c2d163 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -54,7 +54,7 @@ #include "BLI_linklist.h" #include "BLI_utildefines.h" -/* Radish--vertex box select */ +/* vertex box select */ #include "IMB_imbuf_types.h" #include "IMB_imbuf.h" #include "BKE_global.h" @@ -203,7 +203,7 @@ static void EM_backbuf_checkAndSelectFaces(EditMesh *em, int select) } } -/* Radish */ + /* object mode, EM_ prefix is confusing here, rename? */ static void EM_backbuf_checkAndSelectVerts_obmode(Mesh *me, int select) { @@ -254,7 +254,7 @@ static int view3d_selectable_data(bContext *C) if (ob->mode & OB_MODE_SCULPT) { return 0; } - if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT) && !paint_facesel_test(ob) && !paint_vertsel_test(ob)) {//Radish + if (ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_WEIGHT_PAINT|OB_MODE_TEXTURE_PAINT) && !paint_facesel_test(ob) && !paint_vertsel_test(ob)) { return 0; } } @@ -749,7 +749,7 @@ static void do_lasso_select_meta(ViewContext *vc, int mcords[][2], short moves, } } } -/* Radish */ + int do_paintvert_box_select(ViewContext *vc, rcti *rect, int select, int extend) { Mesh *me; @@ -809,7 +809,7 @@ int do_paintvert_box_select(ViewContext *vc, rcti *rect, int select, int extend) return OPERATOR_FINISHED; } -/* Radish */ + static void do_lasso_select_paintvert(ViewContext *vc, int mcords[][2], short moves, short extend, short select) { Object *ob= vc->obact; @@ -1943,7 +1943,7 @@ void VIEW3D_OT_select_border(wmOperatorType *ot) /* rna */ WM_operator_properties_gesture_border(ot, TRUE); } -/* Radish */ + /* much like facesel_face_pick()*/ /* returns 0 if not found, otherwise 1 */ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], unsigned int *index, short rect) @@ -1973,7 +1973,7 @@ static int vertsel_vert_pick(struct bContext *C, Mesh *me, const int mval[2], un return 1; } -/* Radish */ + /* mouse selection in weight paint */ /* gets called via generic mouse select operator */ int mouse_wp_select(bContext *C, const int mval[2], short extend, Object *obact, Mesh* me) @@ -2039,7 +2039,7 @@ static int view3d_select_invoke(bContext *C, wmOperator *op, wmEvent *event) return PE_mouse_particles(C, event->mval, extend); else if(obact && paint_facesel_test(obact)) retval = paintface_mouse_select(C, obact, event->mval, extend); - /* Radish */ + else if (paint_vertsel_test(obact)) { retval = mouse_wp_select(C, event->mval, extend, obact, obact->data); } else { @@ -2168,7 +2168,7 @@ static void paint_facesel_circle_select(ViewContext *vc, int select, const int m } } -/* Radish */ + static void paint_vertsel_circle_select(ViewContext *vc, int select, const int mval[2], float rad) { Object *ob= vc->obact; @@ -2440,7 +2440,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) int select; select= (gesture_mode==GESTURE_MODAL_SELECT); - /* Radish */ + if( CTX_data_edit_object(C) || paint_facesel_test(obact) || paint_vertsel_test(obact) || (obact && (obact->mode & (OB_MODE_PARTICLE_EDIT|OB_MODE_POSE))) ) { @@ -2460,7 +2460,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op) else if(paint_facesel_test(obact)) { paint_facesel_circle_select(&vc, select, mval, (float)radius); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data); - }/* Radish */ + } else if(paint_vertsel_test(obact)) { paint_vertsel_circle_select(&vc, select, mval, (float)radius); WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obact->data); |