Merge remote-tracking branch 'origin/master' into blender2.8
This commit is contained in:
@@ -53,8 +53,6 @@
|
||||
#include "ED_screen.h"
|
||||
#include "ED_view3d.h"
|
||||
|
||||
#include "GPU_select.h"
|
||||
|
||||
#include "armature_intern.h"
|
||||
|
||||
/* utility macros for storing a temp int in the bone (selection flag) */
|
||||
@@ -343,7 +341,7 @@ static EditBone *get_nearest_editbonepoint(
|
||||
int hits = 0;
|
||||
|
||||
/* we _must_ end cache before return, use 'goto cache_end' */
|
||||
GPU_select_cache_begin();
|
||||
view3d_opengl_select_cache_begin();
|
||||
|
||||
BLI_rcti_init_pt_radius(&rect, mval, 12);
|
||||
hits12 = view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect, select_mode);
|
||||
@@ -368,7 +366,7 @@ static EditBone *get_nearest_editbonepoint(
|
||||
}
|
||||
|
||||
cache_end:
|
||||
GPU_select_cache_end();
|
||||
view3d_opengl_select_cache_end();
|
||||
|
||||
/* See if there are any selected bones in this group */
|
||||
if (hits > 0) {
|
||||
|
||||
@@ -308,18 +308,21 @@ bool ED_view3d_autodist_depth_seg(struct ARegion *ar, const int mval_sta[2], con
|
||||
#define MAXPICKELEMS 2500
|
||||
#define MAXPICKBUF (4 * MAXPICKELEMS)
|
||||
|
||||
enum {
|
||||
typedef enum {
|
||||
/* all elements in the region, ignore depth */
|
||||
VIEW3D_SELECT_ALL = 0,
|
||||
/* pick also depth sorts (only for small regions!) */
|
||||
VIEW3D_SELECT_PICK_ALL = 1,
|
||||
/* sorts and only returns visible objects (only for small regions!) */
|
||||
VIEW3D_SELECT_PICK_NEAREST = 2,
|
||||
};
|
||||
} eV3DSelectMode;
|
||||
|
||||
void view3d_opengl_select_cache_begin(void);
|
||||
void view3d_opengl_select_cache_end(void);
|
||||
|
||||
int view3d_opengl_select(
|
||||
struct ViewContext *vc, unsigned int *buffer, unsigned int bufsize, const struct rcti *input,
|
||||
int select_mode);
|
||||
eV3DSelectMode select_mode);
|
||||
|
||||
/* view3d_select.c */
|
||||
float ED_view3d_select_dist_px(void);
|
||||
|
||||
@@ -925,6 +925,7 @@ static void draw_textscroll(const SpaceText *st, rcti *scroll, rcti *back)
|
||||
|
||||
/*********************** draw documentation *******************************/
|
||||
|
||||
#if 0
|
||||
static void draw_documentation(const SpaceText *st, ARegion *ar)
|
||||
{
|
||||
TextDrawContext tdc = {0};
|
||||
@@ -1013,6 +1014,7 @@ static void draw_documentation(const SpaceText *st, ARegion *ar)
|
||||
draw_documentation(st, ar);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*********************** draw suggestion list *******************************/
|
||||
|
||||
@@ -1486,7 +1488,7 @@ void draw_text_main(SpaceText *st, ARegion *ar)
|
||||
/* draw other stuff */
|
||||
draw_brackets(st, &tdc, ar);
|
||||
draw_textscroll(st, &scroll, &back);
|
||||
draw_documentation(st, ar);
|
||||
/* draw_documentation(st, ar); - No longer supported */
|
||||
draw_suggestion_list(st, &tdc, ar);
|
||||
|
||||
text_font_end(&tdc);
|
||||
|
||||
@@ -98,8 +98,6 @@
|
||||
|
||||
#include "GPU_draw.h"
|
||||
|
||||
#include "GPU_select.h"
|
||||
|
||||
#include "view3d_intern.h" /* own include */
|
||||
|
||||
// #include "PIL_time_utildefines.h"
|
||||
@@ -1216,7 +1214,7 @@ static int mixed_bones_object_selectbuffer(
|
||||
int hits = 0;
|
||||
|
||||
/* we _must_ end cache before return, use 'goto finally' */
|
||||
GPU_select_cache_begin();
|
||||
view3d_opengl_select_cache_begin();
|
||||
|
||||
BLI_rcti_init_pt_radius(&rect, mval, 14);
|
||||
hits15 = view3d_opengl_select(vc, buffer, MAXPICKBUF, &rect, select_mode);
|
||||
@@ -1260,7 +1258,7 @@ static int mixed_bones_object_selectbuffer(
|
||||
}
|
||||
|
||||
finally:
|
||||
GPU_select_cache_end();
|
||||
view3d_opengl_select_cache_end();
|
||||
|
||||
return hits;
|
||||
}
|
||||
|
||||
@@ -1157,6 +1157,21 @@ static void view3d_select_loop(ViewContext *vc, Scene *scene, SceneLayer *sl, Vi
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Optionally cache data for multiple calls to #view3d_opengl_select
|
||||
*
|
||||
* just avoid GPU_select headers outside this file
|
||||
*/
|
||||
void view3d_opengl_select_cache_begin(void)
|
||||
{
|
||||
GPU_select_cache_begin();
|
||||
}
|
||||
|
||||
void view3d_opengl_select_cache_end(void)
|
||||
{
|
||||
GPU_select_cache_end();
|
||||
}
|
||||
|
||||
/**
|
||||
* \warning be sure to account for a negative return value
|
||||
* This is an error, "Too many objects in select buffer"
|
||||
@@ -1166,7 +1181,7 @@ static void view3d_select_loop(ViewContext *vc, Scene *scene, SceneLayer *sl, Vi
|
||||
*/
|
||||
int view3d_opengl_select(
|
||||
ViewContext *vc, unsigned int *buffer, unsigned int bufsize, const rcti *input,
|
||||
int select_mode)
|
||||
eV3DSelectMode select_mode)
|
||||
{
|
||||
Scene *scene = vc->scene;
|
||||
SceneLayer *sl = vc->sl;
|
||||
|
||||
Reference in New Issue
Block a user