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:
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c65
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c15
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c90
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c54
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c14
6 files changed, 154 insertions, 86 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 20d5e8ee69c..5d442aff84d 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -741,7 +741,7 @@ static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
BKE_bproperty_set_valstr(prop, string);
characters = strlen(string);
- if (!BKE_image_get_ibuf(mtpoly->tpage, NULL))
+ if (!BKE_image_has_ibuf(mtpoly->tpage, NULL))
characters = 0;
if (!mf_smooth) {
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 8cb4d1ff308..7cd432db661 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -462,7 +462,7 @@ void drawaxes(float size, char drawtype)
static void draw_empty_image(Object *ob, const short dflag, const unsigned char ob_wire_col[4])
{
Image *ima = (Image *)ob->data;
- ImBuf *ibuf = ima ? BKE_image_get_ibuf(ima, NULL) : NULL;
+ ImBuf *ibuf = ima ? BKE_image_acquire_ibuf(ima, NULL, NULL) : NULL;
float scale, ofs_x, ofs_y, sca_x, sca_y;
int ima_x, ima_y;
@@ -547,6 +547,8 @@ static void draw_empty_image(Object *ob, const short dflag, const unsigned char
/* Reset GL settings */
gpuMatrixMode(GL_MODELVIEW);
gpuPopMatrix();
+
+ BKE_image_release_ibuf(ima, ibuf, NULL);
}
/* circle for object centers, special_color is for library or ob users */
@@ -3551,9 +3553,12 @@ static int drawCurveDerivedMesh(Scene *scene, View3D *v3d, RegionView3D *rv3d, B
return 0;
}
-/* returns 1 when nothing was drawn */
-static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
- const short dt, const short dflag, const unsigned char ob_wire_col[4])
+/**
+ * Only called by #drawDispList
+ * \return 1 when nothing was drawn
+ */
+static int drawDispList_nobackface(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
+ const short dt, const short dflag, const unsigned char ob_wire_col[4])
{
Object *ob = base->object;
ListBase *lb = NULL;
@@ -3561,20 +3566,9 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
Curve *cu;
const short render_only = (v3d->flag2 & V3D_RENDER_OVERRIDE);
const short solid = (dt > OB_WIRE);
- int retval = 0;
-
- /* backface culling */
- if (v3d->flag2 & V3D_BACKFACE_CULLING) {
- /* not all displists use same in/out normal direction convention */
- glEnable(GL_CULL_FACE);
- glCullFace((ob->type == OB_MBALL) ? GL_BACK : GL_FRONT);
- }
if (drawCurveDerivedMesh(scene, v3d, rv3d, base, dt) == 0) {
- if (v3d->flag2 & V3D_BACKFACE_CULLING)
- glDisable(GL_CULL_FACE);
-
- return 0;
+ return FALSE;
}
switch (ob->type) {
@@ -3586,7 +3580,9 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
if (solid) {
dl = lb->first;
- if (dl == NULL) return 1;
+ if (dl == NULL) {
+ return TRUE;
+ }
if (dl->nors == NULL) BKE_displist_normals_add(lb);
index3_nors_incr = 0;
@@ -3620,9 +3616,11 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
}
else {
if (!render_only || (render_only && BKE_displist_has_faces(lb))) {
+ int retval;
draw_index_wire = 0;
retval = drawDispListwire(lb);
draw_index_wire = 1;
+ return retval;
}
}
break;
@@ -3632,7 +3630,9 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
if (solid) {
dl = lb->first;
- if (dl == NULL) return 1;
+ if (dl == NULL) {
+ return TRUE;
+ }
if (dl->nors == NULL) BKE_displist_normals_add(lb);
@@ -3648,7 +3648,7 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
}
}
else {
- retval = drawDispListwire(lb);
+ return drawDispListwire(lb);
}
break;
case OB_MBALL:
@@ -3656,7 +3656,9 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
if (BKE_mball_is_basis(ob)) {
lb = &ob->disp;
if (lb->first == NULL) BKE_displist_make_mball(scene, ob);
- if (lb->first == NULL) return 1;
+ if (lb->first == NULL) {
+ return TRUE;
+ }
if (solid) {
@@ -3673,14 +3675,31 @@ static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *bas
}
else {
/* MetaBalls use DL_INDEX4 type of DispList */
- retval = drawDispListwire(lb);
+ return drawDispListwire(lb);
}
}
break;
}
-
- if (v3d->flag2 & V3D_BACKFACE_CULLING)
+
+ return FALSE;
+}
+static int drawDispList(Scene *scene, View3D *v3d, RegionView3D *rv3d, Base *base,
+ const short dt, const short dflag, const unsigned char ob_wire_col[4])
+{
+ int retval;
+
+ /* backface culling */
+ if (v3d->flag2 & V3D_BACKFACE_CULLING) {
+ /* not all displists use same in/out normal direction convention */
+ glEnable(GL_CULL_FACE);
+ glCullFace((base->object->type == OB_MBALL) ? GL_BACK : GL_FRONT);
+ }
+
+ retval = drawDispList_nobackface(scene, v3d, rv3d, base, dt, dflag, ob_wire_col);
+
+ if (v3d->flag2 & V3D_BACKFACE_CULLING) {
glDisable(GL_CULL_FACE);
+ }
return retval;
}
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 88b100c6c13..26eebd16fba 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -946,7 +946,7 @@ static void view3d_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
ED_region_tag_redraw(ar);
break;
case NC_GPENCIL:
- if (wmn->data == ND_DATA)
+ if (wmn->data == ND_DATA || wmn->action == NA_EDITED)
ED_region_tag_redraw(ar);
break;
}
@@ -1120,16 +1120,21 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
return 1;
}
else if (CTX_data_equals(member, "active_base")) {
- if (scene->basact && (scene->basact->lay & lay))
- if ((scene->basact->object->restrictflag & OB_RESTRICT_VIEW) == 0)
+ if (scene->basact && (scene->basact->lay & lay)) {
+ Object *ob = scene->basact->object;
+ /* if hidden but in edit mode, we still display, can happen with animation */
+ if ((ob->restrictflag & OB_RESTRICT_VIEW) == 0 || (ob->mode & OB_MODE_EDIT))
CTX_data_pointer_set(result, &scene->id, &RNA_ObjectBase, scene->basact);
+ }
return 1;
}
else if (CTX_data_equals(member, "active_object")) {
- if (scene->basact && (scene->basact->lay & lay))
- if ((scene->basact->object->restrictflag & OB_RESTRICT_VIEW) == 0)
+ if (scene->basact && (scene->basact->lay & lay)) {
+ Object *ob = scene->basact->object;
+ if ((ob->restrictflag & OB_RESTRICT_VIEW) == 0 || (ob->mode & OB_MODE_EDIT))
CTX_data_id_pointer_set(result, &scene->basact->object->id);
+ }
return 1;
}
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 2c85dc62edb..10480a3872a 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -97,6 +97,16 @@
#include "view3d_intern.h" /* own include */
+/* handy utility for drawing shapes in the viewport for arbitrary code.
+ * could add lines and points too */
+// #define DEBUG_DRAW
+#ifdef DEBUG_DRAW
+static void bl_debug_draw(void);
+/* add these locally when using these functions for testing */
+extern void bl_debug_draw_quad_clear(void);
+extern void bl_debug_draw_quad_add(const float v0[3], const float v1[3], const float v2[3], const float v3[3]);
+extern void bl_debug_draw_edge_add(const float v0[3], const float v1[3]);
+#endif
static void star_stuff_init_func(void)
{
@@ -1271,7 +1281,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
hmargin = 0.035f * (x2 - x1);
vmargin = 0.035f * (y2 - y1);
- uiDrawBox(GL_LINE_LOOP, x1 + hmargin, y1+vmargin, x2 - hmargin, y2 - vmargin, 2.0f);
+ uiDrawBox(GL_LINE_LOOP, x1 + hmargin, y1 + vmargin, x2 - hmargin, y2 - vmargin, 2.0f);
}
if (ca && (ca->flag & CAM_SHOWSENSOR)) {
/* determine sensor fit, and get sensor x/y, for auto fit we
@@ -1464,8 +1474,8 @@ ImBuf *view3d_read_backbuf(ViewContext *vc, short xmin, short ymin, short xmax,
ibuf = IMB_allocImBuf((xmaxc - xminc + 1), (ymaxc - yminc + 1), 32, IB_rect);
- view3d_validate_backbuf(vc);
-
+ view3d_validate_backbuf(vc);
+
glReadPixels(vc->ar->winrct.xmin + xminc,
vc->ar->winrct.ymin + yminc,
(xmaxc - xminc + 1),
@@ -1613,7 +1623,8 @@ static void view3d_draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d,
ibuf = NULL; /* frame is out of range, dont show */
}
else {
- ibuf = BKE_image_get_ibuf(ima, &bgpic->iuser);
+ ibuf = BKE_image_acquire_ibuf(ima, &bgpic->iuser, NULL);
+ freeibuf = ibuf;
}
image_aspect[0] = ima->aspx;
@@ -3036,9 +3047,10 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
v3d->zbuf = FALSE;
/* enables anti-aliasing for 3D view drawing */
- if (U.ogl_multisamples)
- if (!(U.gameflags & USER_DISABLE_AA))
- glEnable(GL_MULTISAMPLE_ARB);
+ if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) {
+ // if (!(U.gameflags & USER_DISABLE_AA))
+ glEnable(GL_MULTISAMPLE_ARB);
+ }
/* needs to be done always, gridview is adjusted in drawgrid() now */
@@ -3153,9 +3165,10 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const
BIF_draw_manipulator(C);
/* Disable back anti-aliasing */
- if (U.ogl_multisamples)
- if (!(U.gameflags & USER_DISABLE_AA))
- glDisable(GL_MULTISAMPLE_ARB);
+ if (U.ogl_multisamples != USER_MULTISAMPLE_NONE) {
+ // if (!(U.gameflags & USER_DISABLE_AA))
+ glDisable(GL_MULTISAMPLE_ARB);
+ }
if (v3d->zbuf) {
@@ -3257,6 +3270,9 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
/* draw viewport using opengl */
if (v3d->drawtype != OB_RENDER || !view3d_main_area_do_render_draw(C) || draw_border) {
view3d_main_area_draw_objects(C, ar, &grid_unit);
+#ifdef DEBUG_DRAW
+ bl_debug_draw();
+#endif
ED_region_pixelspace(ar);
}
@@ -3269,3 +3285,57 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
v3d->flag |= V3D_INVALID_BACKBUF;
}
+#ifdef DEBUG_DRAW
+/* debug drawing */
+#define _DEBUG_DRAW_QUAD_TOT 1024
+static float _bl_debug_draw_quads[_DEBUG_DRAW_QUAD_TOT][4][3];
+static int _bl_debug_draw_quads_tot = 0;
+
+void bl_debug_draw_quad_clear(void)
+{
+ _bl_debug_draw_quads_tot = 0;
+}
+void bl_debug_draw_quad_add(const float v0[3], const float v1[3], const float v2[3], const float v3[3])
+{
+ if (_bl_debug_draw_quads_tot >= _DEBUG_DRAW_QUAD_TOT) {
+ printf("%s: max quad count hit %d!", __func__, _bl_debug_draw_quads_tot);
+ }
+ else {
+ float *pt = &_bl_debug_draw_quads[_bl_debug_draw_quads_tot][0][0];
+ copy_v3_v3(pt, v0); pt += 3;
+ copy_v3_v3(pt, v1); pt += 3;
+ copy_v3_v3(pt, v2); pt += 3;
+ copy_v3_v3(pt, v3); pt += 3;
+ _bl_debug_draw_quads_tot++;
+ }
+}
+void bl_debug_draw_edge_add(const float v0[3], const float v1[3])
+{
+ if (_bl_debug_draw_quads_tot >= _DEBUG_DRAW_QUAD_TOT) {
+ printf("%s: max edge count hit %d!", __func__, _bl_debug_draw_quads_tot);
+ }
+ else {
+ float *pt = &_bl_debug_draw_quads[_bl_debug_draw_quads_tot][0][0];
+ copy_v3_v3(pt, v0); pt += 3;
+ copy_v3_v3(pt, v1); pt += 3;
+ copy_v3_v3(pt, v0); pt += 3;
+ copy_v3_v3(pt, v1); pt += 3;
+ _bl_debug_draw_quads_tot++;
+ }
+}
+static void bl_debug_draw(void)
+{
+ if (_bl_debug_draw_quads_tot) {
+ int i;
+ cpack(0x00FF0000);
+ glBegin(GL_LINE_LOOP);
+ for (i = 0; i < _bl_debug_draw_quads_tot; i ++) {
+ glVertex3fv(_bl_debug_draw_quads[i][0]);
+ glVertex3fv(_bl_debug_draw_quads[i][1]);
+ glVertex3fv(_bl_debug_draw_quads[i][2]);
+ glVertex3fv(_bl_debug_draw_quads[i][3]);
+ }
+ glEnd();
+ }
+}
+#endif
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index d8fcc7e12e7..79bf003a563 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -310,21 +310,14 @@ static char *view3d_modeselect_pup(Scene *scene)
return (string);
}
-
static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event)
{
wmWindow *win = CTX_wm_window(C);
- ToolSettings *ts = CTX_data_tool_settings(C);
ScrArea *sa = CTX_wm_area(C);
View3D *v3d = sa->spacedata.first;
- Object *obedit = CTX_data_edit_object(C);
- BMEditMesh *em = NULL;
- int ctrl = win->eventstate->ctrl, shift = win->eventstate->shift;
+ const int ctrl = win->eventstate->ctrl, shift = win->eventstate->shift;
PointerRNA props_ptr;
-
- if (obedit && obedit->type == OB_MESH) {
- em = BMEdit_FromObject(obedit);
- }
+
/* watch it: if sa->win does not exist, check that when calling direct drawing routines */
switch (event) {
@@ -336,42 +329,17 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event)
break;
case B_SEL_VERT:
- if (em) {
- if (shift == 0 || em->selectmode == 0)
- em->selectmode = SCE_SELECT_VERTEX;
- ts->selectmode = em->selectmode;
- EDBM_selectmode_set(em);
- WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ if (EDBM_selectmode_toggle(C, SCE_SELECT_VERTEX, -1, shift, ctrl)) {
ED_undo_push(C, "Selectmode Set: Vertex");
}
break;
case B_SEL_EDGE:
- if (em) {
- if (shift == 0 || em->selectmode == 0) {
- if ((em->selectmode ^ SCE_SELECT_EDGE) == SCE_SELECT_VERTEX) {
- if (ctrl) EDBM_selectmode_convert(em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE);
- }
- em->selectmode = SCE_SELECT_EDGE;
- }
- ts->selectmode = em->selectmode;
- EDBM_selectmode_set(em);
- WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ if (EDBM_selectmode_toggle(C, SCE_SELECT_EDGE, -1, shift, ctrl)) {
ED_undo_push(C, "Selectmode Set: Edge");
}
break;
case B_SEL_FACE:
- if (em) {
- if (shift == 0 || em->selectmode == 0) {
- if (((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) ||
- ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE))
- {
- if (ctrl) EDBM_selectmode_convert(em, (ts->selectmode ^ SCE_SELECT_FACE), SCE_SELECT_FACE);
- }
- em->selectmode = SCE_SELECT_FACE;
- }
- ts->selectmode = em->selectmode;
- EDBM_selectmode_set(em);
- WM_event_add_notifier(C, NC_GEOM | ND_SELECT, obedit->data);
+ if (EDBM_selectmode_toggle(C, SCE_SELECT_FACE, -1, shift, ctrl)) {
ED_undo_push(C, "Selectmode Set: Face");
}
break;
@@ -430,9 +398,15 @@ void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C)
row = uiLayoutRow(layout, TRUE);
block = uiLayoutGetBlock(row);
- uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL, 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Vertex select - Shift-Click for multiple modes");
- uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL, 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Edge select - Shift-Click for multiple modes");
- uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL, 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0, "Face select - Shift-Click for multiple modes");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_VERTEX, B_SEL_VERT, ICON_VERTEXSEL,
+ 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0,
+ "Vertex select - Shift-Click for multiple modes");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_EDGE, B_SEL_EDGE, ICON_EDGESEL,
+ 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0,
+ "Edge select - Shift-Click for multiple modes, Ctrl-Click expands selection");
+ uiDefIconButBitS(block, TOG, SCE_SELECT_FACE, B_SEL_FACE, ICON_FACESEL,
+ 0, 0, UI_UNIT_X, UI_UNIT_Y, &em->selectmode, 1.0, 0.0, 0, 0,
+ "Face select - Shift-Click for multiple modes, Ctrl-Click expands selection");
}
}
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index a9dcbdc1687..1a4d345705b 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1066,11 +1066,11 @@ static EnumPropertyItem *object_select_menu_enum_itemf(bContext *C, PointerRNA *
static int object_select_menu_exec(bContext *C, wmOperator *op)
{
int name_index = RNA_enum_get(op->ptr, "name");
- short extend = RNA_boolean_get(op->ptr, "extend");
+ short toggle = RNA_boolean_get(op->ptr, "toggle");
short changed = 0;
const char *name = object_mouse_select_menu_data[name_index].idname;
- if (!extend) {
+ if (!toggle) {
CTX_DATA_BEGIN (C, Base *, base, selectable_bases)
{
if (base->flag & SELECT) {
@@ -1127,7 +1127,7 @@ void VIEW3D_OT_select_menu(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_HIDDEN);
ot->prop = prop;
- RNA_def_boolean(ot->srna, "extend", 0, "Extend", "Extend selection instead of deselecting everything first");
+ RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "Toggle selection instead of deselecting everything first");
}
static void deselectall_except(Scene *scene, Base *b) /* deselect all except b */
@@ -1143,7 +1143,7 @@ static void deselectall_except(Scene *scene, Base *b) /* deselect all except b
}
}
-static Base *object_mouse_select_menu(bContext *C, ViewContext *vc, unsigned int *buffer, int hits, const int mval[2], short extend)
+static Base *object_mouse_select_menu(bContext *C, ViewContext *vc, unsigned int *buffer, int hits, const int mval[2], short toggle)
{
short baseCount = 0;
short ok;
@@ -1209,7 +1209,7 @@ static Base *object_mouse_select_menu(bContext *C, ViewContext *vc, unsigned int
PointerRNA ptr;
WM_operator_properties_create(&ptr, "VIEW3D_OT_select_menu");
- RNA_boolean_set(&ptr, "extend", extend);
+ RNA_boolean_set(&ptr, "toggle", toggle);
WM_operator_name_call(C, "VIEW3D_OT_select_menu", WM_OP_INVOKE_DEFAULT, &ptr);
WM_operator_properties_free(&ptr);
}
@@ -1442,7 +1442,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short dese
/* note; shift+alt goes to group-flush-selecting */
if (enumerate) {
- basact = object_mouse_select_menu(C, &vc, NULL, 0, mval, extend);
+ basact = object_mouse_select_menu(C, &vc, NULL, 0, mval, toggle);
}
else {
base = startbase;
@@ -1482,7 +1482,7 @@ static int mouse_select(bContext *C, const int mval[2], short extend, short dese
/* note; shift+alt goes to group-flush-selecting */
if (has_bones == 0 && enumerate) {
- basact = object_mouse_select_menu(C, &vc, buffer, hits, mval, extend);
+ basact = object_mouse_select_menu(C, &vc, buffer, hits, mval, toggle);
}
else {
basact = mouse_select_eval_buffer(&vc, buffer, hits, mval, startbase, has_bones);