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:
authorAntony Riakiotakis <kalast@gmail.com>2015-02-24 19:19:07 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-02-24 19:19:07 +0300
commit50e9868abe11bd2ed0173b7a51cf129d77e4389e (patch)
tree318fe9a4f753569cebee011a93575b6b6ac4ebd4 /source/blender/editors/metaball
parent340b76b42c53816ddac1b4cecdff3d8d2010a9cc (diff)
Fix T43785 crash with border select.
Naming here is slightly misleading. We have: * Number of elements (objects) that can be picked * Buffer size * Number of integers in buffer. Interestingly enough, bufsize in OpenGL (as far as I could find in examples on the web) and in most of the code refers to the latter and actual buffer size is only used whenever we do allocations on the heap. Added an extra defines here to make things a bit clearer: * MAXPICKELEMS refers to the number of objects that can be picked * MAXPICKBUF refers to the number of integers in the selection buffer Also made all buffers use MAXPICKBUF where some used MAXPICKBUF * 4. That means that some parts of blender will use less space for selection now. MAXPICKBUF is set to 10000 for 2500 object selection, which can be changed at any time, but I think 10000 integers on the stack touches the borders of uglyland anyway.
Diffstat (limited to 'source/blender/editors/metaball')
-rw-r--r--source/blender/editors/metaball/mball_edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/metaball/mball_edit.c b/source/blender/editors/metaball/mball_edit.c
index 57daec49465..24cac5b9b70 100644
--- a/source/blender/editors/metaball/mball_edit.c
+++ b/source/blender/editors/metaball/mball_edit.c
@@ -583,7 +583,7 @@ bool mouse_mball(bContext *C, const int mval[2], bool extend, bool deselect, boo
MetaBall *mb = (MetaBall *)obedit->data;
MetaElem *ml, *ml_act = NULL;
int a, hits;
- unsigned int buffer[4 * MAXPICKBUF];
+ unsigned int buffer[MAXPICKBUF];
rcti rect;
view3d_set_viewcontext(C, &vc);