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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-01 15:43:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-01 15:43:34 +0300
commitd0e245647c6df67ba6d53a67cae87083757b805e (patch)
tree8decbbe3aa111cf2ea00e04701c45bee94ca06c3 /source/blender/editors
parent053c3bd48a80bc5f4b844f0739c436e82b2c7c8f (diff)
Cleanup: use unsigned types in 3D view editor
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c16
-rw-r--r--source/blender/editors/space_view3d/view3d_draw_legacy.c10
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_ruler.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_intern.h2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c42
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_walk.c2
11 files changed, 47 insertions, 47 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 7d540630f20..e6e0438164c 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -157,7 +157,7 @@ static void circball_array_fill(float verts[CIRCLE_RESOL][3], const float cent[3
mul_v3_v3fl(vx, tmat[0], rad);
mul_v3_v3fl(vy, tmat[1], rad);
- for (unsigned int a = 0; a < CIRCLE_RESOL; a++, viter += 3) {
+ for (uint a = 0; a < CIRCLE_RESOL; a++, viter += 3) {
viter[0] = cent[0] + sinval[a] * vx[0] + cosval[a] * vy[0];
viter[1] = cent[1] + sinval[a] * vx[1] + cosval[a] * vy[1];
viter[2] = cent[2] + sinval[a] * vx[2] + cosval[a] * vy[2];
@@ -178,7 +178,7 @@ void imm_drawcircball(const float cent[3], float rad, const float tmat[4][4], un
}
#ifdef VIEW3D_CAMERA_BORDER_HACK
-unsigned char view3d_camera_border_hack_col[3];
+uchar view3d_camera_border_hack_col[3];
bool view3d_camera_border_hack_test = false;
#endif
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 02e5820041f..175e0eb6c4f 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -868,7 +868,7 @@ static void view3d_panel_vgroup(const bContext *C, Panel *pa)
uiLayout *row;
uiBut *but;
bDeformGroup *dg;
- unsigned int i;
+ uint i;
int subset_count, vgroup_tot;
const bool *vgroup_validmap;
eVGroupSelect subset_type = ts->vgroupsubset;
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 9a0a804ce3f..aca2cf53aa6 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -819,7 +819,7 @@ static void draw_view_axis(RegionView3D *rv3d, const rcti *rect)
const float starty = rect->ymax - (k + UI_UNIT_Y);
float axis_pos[3][2];
- unsigned char axis_col[3][4];
+ uchar axis_col[3][4];
int axis_order[3] = {0, 1, 2};
axis_sort_v3(rv3d->viewinv[2], axis_order);
@@ -1465,7 +1465,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(
Depsgraph *depsgraph, Scene *scene,
int drawtype,
View3D *v3d, ARegion *ar, int sizex, int sizey,
- unsigned int flag, unsigned int draw_flags,
+ uint flag, uint draw_flags,
int alpha_mode, int samples, const char *viewname,
/* output vars */
GPUOffScreen *ofs, char err_out[256])
@@ -1591,7 +1591,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(
&fx_settings, ofs, viewport);
GPU_offscreen_read_pixels(ofs, GL_FLOAT, rect_temp);
- unsigned int i = sizex * sizey * 4;
+ uint i = sizex * sizey * 4;
while (i--) {
accum_buffer[i] += rect_temp[i];
}
@@ -1609,16 +1609,16 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(
if (ibuf->rect_float) {
float *rect_float = ibuf->rect_float;
- unsigned int i = sizex * sizey * 4;
+ uint i = sizex * sizey * 4;
while (i--) {
rect_float[i] = accum_buffer[i] / samples;
}
}
else {
- unsigned char *rect_ub = (unsigned char *)ibuf->rect;
- unsigned int i = sizex * sizey * 4;
+ uchar *rect_ub = (uchar *)ibuf->rect;
+ uint i = sizex * sizey * 4;
while (i--) {
- rect_ub[i] = (unsigned char)(255.0f * accum_buffer[i] / samples);
+ rect_ub[i] = (uchar)(255.0f * accum_buffer[i] / samples);
}
}
@@ -1656,7 +1656,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(
Depsgraph *depsgraph, Scene *scene,
int drawtype,
Object *camera, int width, int height,
- unsigned int flag, unsigned int draw_flags,
+ uint flag, uint draw_flags,
int alpha_mode, int samples, const char *viewname,
GPUOffScreen *ofs, char err_out[256])
{
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 09a3c9a5ed0..d7d0e4660f7 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -112,7 +112,7 @@ void ED_view3d_clipping_set(RegionView3D *rv3d)
{
#ifdef USE_CLIP_PLANES
double plane[4];
- const unsigned int tot = (rv3d->viewlock & RV3D_BOXCLIP) ? 4 : 6;
+ const uint tot = (rv3d->viewlock & RV3D_BOXCLIP) ? 4 : 6;
for (unsigned a = 0; a < tot; a++) {
copy_v4db_v4fl(plane, rv3d->clip[a]);
@@ -308,7 +308,7 @@ int ED_view3d_backbuf_sample_size_clamp(ARegion *ar, const float dist)
}
/* samples a single pixel (copied from vpaint) */
-unsigned int ED_view3d_backbuf_sample(
+uint ED_view3d_backbuf_sample(
ViewContext *vc, int x, int y)
{
if (x >= vc->ar->winx || y >= vc->ar->winy) {
@@ -317,7 +317,7 @@ unsigned int ED_view3d_backbuf_sample(
ED_view3d_backbuf_validate(vc);
- unsigned int col;
+ uint col;
view3d_opengl_read_pixels(vc->ar, x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, &col);
glReadBuffer(GL_BACK);
@@ -386,9 +386,9 @@ ImBuf *ED_view3d_backbuf_read(
}
/* smart function to sample a rect spiralling outside, nice for backbuf selection */
-unsigned int ED_view3d_backbuf_sample_rect(
+uint ED_view3d_backbuf_sample_rect(
ViewContext *vc, const int mval[2], int size,
- unsigned int min, unsigned int max, float *r_dist)
+ uint min, uint max, float *r_dist)
{
int dirvec[4][2];
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 82d7e4eac4c..fe0dfc6bc31 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -287,7 +287,7 @@ static bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3])
else if (ob_act == NULL || ob_act->mode == OB_MODE_OBJECT) {
/* object mode use boundbox centers */
Base *base_eval;
- unsigned int tot = 0;
+ uint tot = 0;
float select_center[3];
zero_v3(select_center);
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index d8996e99bb5..47961371530 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -708,7 +708,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
#ifdef NDOF_FLY_DEBUG
{
- static unsigned int iteration = 1;
+ static uint iteration = 1;
printf("fly timer %d\n", iteration++);
}
#endif
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
index 6dd144612b4..6e26f9a2c13 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
@@ -509,8 +509,8 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz)
const int arc_steps = ARC_STEPS;
const float color_act[4] = {1.0f, 1.0f, 1.0f, 1.0f};
const float color_base[4] = {0.0f, 0.0f, 0.0f, 1.0f};
- unsigned char color_text[3];
- unsigned char color_wire[3];
+ uchar color_text[3];
+ uchar color_wire[3];
float color_back[4] = {1.0f, 1.0f, 1.0f, 0.5f};
/* anti-aliased lines for more consistent appearance */
diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h
index d929ac89c4b..bb6b96b96d5 100644
--- a/source/blender/editors/space_view3d/view3d_intern.h
+++ b/source/blender/editors/space_view3d/view3d_intern.h
@@ -271,7 +271,7 @@ void VIEW3D_GT_navigate_rotate(struct wmGizmoType *gzt);
* any direction it starts to fail */
#define VIEW3D_CAMERA_BORDER_HACK
#ifdef VIEW3D_CAMERA_BORDER_HACK
-extern unsigned char view3d_camera_border_hack_col[3];
+extern uchar view3d_camera_border_hack_col[3];
extern bool view3d_camera_border_hack_test;
#endif
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index bf30f903929..e14d0a5ff3f 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -190,7 +190,7 @@ static bool edbm_backbuf_check_and_select_verts(BMEditMesh *em, const eSelectOp
{
BMVert *eve;
BMIter iter;
- unsigned int index = bm_wireoffs;
+ uint index = bm_wireoffs;
bool changed = false;
BM_ITER_MESH (eve, &iter, em->bm, BM_VERTS_OF_MESH) {
@@ -212,7 +212,7 @@ static bool edbm_backbuf_check_and_select_edges(BMEditMesh *em, const eSelectOp
{
BMEdge *eed;
BMIter iter;
- unsigned int index = bm_solidoffs;
+ uint index = bm_solidoffs;
bool changed = false;
BM_ITER_MESH (eed, &iter, em->bm, BM_EDGES_OF_MESH) {
@@ -234,7 +234,7 @@ static bool edbm_backbuf_check_and_select_faces(BMEditMesh *em, const eSelectOp
{
BMFace *efa;
BMIter iter;
- unsigned int index = 1;
+ uint index = 1;
bool changed = false;
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
@@ -256,7 +256,7 @@ static bool edbm_backbuf_check_and_select_faces(BMEditMesh *em, const eSelectOp
static bool edbm_backbuf_check_and_select_verts_obmode(Mesh *me, const eSelectOp sel_op)
{
MVert *mv = me->mvert;
- unsigned int index;
+ uint index;
bool changed = false;
if (mv) {
@@ -279,7 +279,7 @@ static bool edbm_backbuf_check_and_select_verts_obmode(Mesh *me, const eSelectOp
static bool edbm_backbuf_check_and_select_tfaces(Mesh *me, const eSelectOp sel_op)
{
MPoly *mpoly = me->mpoly;
- unsigned int index;
+ uint index;
bool changed = false;
if (mpoly) {
@@ -1222,7 +1222,7 @@ void VIEW3D_OT_select_menu(wmOperatorType *ot)
}
static Base *object_mouse_select_menu(
- bContext *C, ViewContext *vc, unsigned int *buffer, int hits,
+ bContext *C, ViewContext *vc, uint *buffer, int hits,
const int mval[2], bool toggle)
{
short baseCount = 0;
@@ -1305,7 +1305,7 @@ static Base *object_mouse_select_menu(
static bool selectbuffer_has_bones(const uint *buffer, const uint hits)
{
- unsigned int i;
+ uint i;
for (i = 0; i < hits; i++) {
if (buffer[(4 * i) + 3] & 0xFFFF0000) {
return true;
@@ -1315,22 +1315,22 @@ static bool selectbuffer_has_bones(const uint *buffer, const uint hits)
}
/* utility function for mixed_bones_object_selectbuffer */
-static int selectbuffer_ret_hits_15(unsigned int *UNUSED(buffer), const int hits15)
+static int selectbuffer_ret_hits_15(uint *UNUSED(buffer), const int hits15)
{
return hits15;
}
-static int selectbuffer_ret_hits_9(unsigned int *buffer, const int hits15, const int hits9)
+static int selectbuffer_ret_hits_9(uint *buffer, const int hits15, const int hits9)
{
const int offs = 4 * hits15;
- memcpy(buffer, buffer + offs, 4 * hits9 * sizeof(unsigned int));
+ memcpy(buffer, buffer + offs, 4 * hits9 * sizeof(uint));
return hits9;
}
-static int selectbuffer_ret_hits_5(unsigned int *buffer, const int hits15, const int hits9, const int hits5)
+static int selectbuffer_ret_hits_5(uint *buffer, const int hits15, const int hits9, const int hits5)
{
const int offs = 4 * hits15 + 4 * hits9;
- memcpy(buffer, buffer + offs, 4 * hits5 * sizeof(unsigned int));
+ memcpy(buffer, buffer + offs, 4 * hits5 * sizeof(uint));
return hits5;
}
@@ -1339,7 +1339,7 @@ static int selectbuffer_ret_hits_5(unsigned int *buffer, const int hits15, const
* Checks three selection levels and compare.
*/
static int mixed_bones_object_selectbuffer(
- ViewContext *vc, unsigned int *buffer, const int mval[2], eV3DSelectObjectFilter select_filter,
+ ViewContext *vc, uint *buffer, const int mval[2], eV3DSelectObjectFilter select_filter,
bool do_nearest)
{
rcti rect;
@@ -1399,7 +1399,7 @@ finally:
}
static int mixed_bones_object_selectbuffer_extended(
- ViewContext *vc, unsigned int *buffer, const int mval[2], eV3DSelectObjectFilter select_filter,
+ ViewContext *vc, uint *buffer, const int mval[2], eV3DSelectObjectFilter select_filter,
bool use_cycle, bool enumerate, bool *r_do_nearest)
{
static int last_mval[2] = {-100, -100};
@@ -1463,7 +1463,7 @@ static Base *mouse_select_eval_buffer(
int a;
if (do_nearest) {
- unsigned int min = 0xFFFFFFFF;
+ uint min = 0xFFFFFFFF;
int selcol = 0, notcol = 0;
@@ -1547,7 +1547,7 @@ Base *ED_view3d_give_base_under_cursor(bContext *C, const int mval[2])
{
ViewContext vc;
Base *basact = NULL;
- unsigned int buffer[MAXPICKBUF];
+ uint buffer[MAXPICKBUF];
/* setup view context for argument to callbacks */
view3d_operator_needs_opengl(C);
@@ -1690,7 +1690,7 @@ static bool ed_object_select_pick(
}
}
else {
- unsigned int buffer[MAXPICKBUF];
+ uint buffer[MAXPICKBUF];
bool do_nearest;
// TIMEIT_START(select_time);
@@ -1921,7 +1921,7 @@ static bool ed_wpaint_vertex_select_pick(
const bool use_zbuf = V3D_IS_ZBUF(v3d);
Mesh *me = obact->data; /* already checked for NULL */
- unsigned int index = 0;
+ uint index = 0;
MVert *mv;
if (ED_mesh_pick_vert(C, obact, mval, &index, ED_MESH_PICK_DEFAULT_VERT_SIZE, use_zbuf)) {
@@ -2118,7 +2118,7 @@ static int do_paintvert_box_select(
Mesh *me;
MVert *mvert;
struct ImBuf *ibuf;
- unsigned int *rt;
+ uint *rt;
int a, index;
char *selar;
const int size[2] = {
@@ -2383,7 +2383,7 @@ static int do_meta_box_select(
MetaElem *ml;
int a;
- unsigned int buffer[MAXPICKBUF];
+ uint buffer[MAXPICKBUF];
int hits;
hits = view3d_opengl_select(
@@ -2454,7 +2454,7 @@ static int do_armature_box_select(
bool changed = false;
int a;
- unsigned int buffer[MAXPICKBUF];
+ uint buffer[MAXPICKBUF];
int hits;
hits = view3d_opengl_select(
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 8ed96a18d56..292dd6bee1a 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -931,7 +931,7 @@ static bool drw_select_filter_object_mode_lock_for_weight_paint(Object *ob, void
* \note (vc->obedit == NULL) can be set to explicitly skip edit-object selection.
*/
int view3d_opengl_select(
- ViewContext *vc, unsigned int *buffer, unsigned int bufsize, const rcti *input,
+ ViewContext *vc, uint *buffer, uint bufsize, const rcti *input,
eV3DSelectMode select_mode, eV3DSelectObjectFilter select_filter)
{
struct bThemeState theme_state;
@@ -1112,12 +1112,12 @@ finally:
/** \name Local View Operators
* \{ */
-static unsigned int free_localbit(Main *bmain)
+static uint free_localbit(Main *bmain)
{
ScrArea *sa;
bScreen *sc;
- unsigned short local_view_bits = 0;
+ ushort local_view_bits = 0;
/* sometimes we loose a localview: when an area is closed */
/* check all areas: which localviews are in use? */
@@ -1159,7 +1159,7 @@ static bool view3d_localview_init(
Base *base;
float min[3], max[3], box[3];
float size = 0.0f;
- unsigned int local_view_bit;
+ uint local_view_bit;
bool ok = false;
if (v3d->localvd) {
diff --git a/source/blender/editors/space_view3d/view3d_walk.c b/source/blender/editors/space_view3d/view3d_walk.c
index fe0396cb26b..0caaf6eb113 100644
--- a/source/blender/editors/space_view3d/view3d_walk.c
+++ b/source/blender/editors/space_view3d/view3d_walk.c
@@ -949,7 +949,7 @@ static int walkApply(bContext *C, wmOperator *op, WalkInfo *walk)
#ifdef NDOF_WALK_DEBUG
{
- static unsigned int iteration = 1;
+ static uint iteration = 1;
printf("walk timer %d\n", iteration++);
}
#endif