diff options
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 12 |
3 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index b0eb8d20554..c1adbafe413 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -4649,8 +4649,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv else pa_health = -1.0; - r_tilt = 2.0f * (PSYS_FRAND(a + 21) - 0.5f); - r_length = PSYS_FRAND(a + 22); + r_tilt = 2.0f * (psys_frand(psys, a + 21) - 0.5f); + r_length = psys_frand(psys, a + 22); if (part->draw_col > PART_DRAW_COL_MAT) { switch (part->draw_col) { @@ -4677,8 +4677,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv pa_health = -1.0; - r_tilt = 2.0f * (PSYS_FRAND(a + 21) - 0.5f); - r_length = PSYS_FRAND(a + 22); + r_tilt = 2.0f * (psys_frand(psys, a + 21) - 0.5f); + r_length = psys_frand(psys, a + 22); } drawn = 0; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 18f3d150eb2..ad54e8a5eff 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -3262,9 +3262,11 @@ static void view3d_main_area_draw_objects(const bContext *C, ARegion *ar, const glEnable(GL_MULTISAMPLE_ARB); } - - /* needs to be done always, gridview is adjusted in drawgrid() now */ + /* needs to be done always, gridview is adjusted in drawgrid() now, but only for ortho views. */ rv3d->gridview = v3d->grid; + if (scene->unit.system) { + rv3d->gridview /= scene->unit.scale_length; + } if ((rv3d->view == RV3D_VIEW_USER) || (rv3d->persp != RV3D_ORTHO)) { if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 47f30e3e279..1c355889398 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -568,8 +568,10 @@ static void do_lasso_select_curve(ViewContext *vc, const int mcords[][2], short view3d_userdata_lassoselect_init(&data, vc, &rect, mcords, moves, select); - if (extend == false && select) - ED_curve_deselect_all(vc->obedit->data); + if (extend == false && select) { + Curve *curve = (Curve *) vc->obedit->data; + ED_curve_deselect_all(curve->editnurb); + } ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */ nurbs_foreachScreenVert(vc, do_lasso_select_curve__doSelect, &data, V3D_PROJ_TEST_CLIP_DEFAULT); @@ -1735,8 +1737,10 @@ static int do_nurbs_box_select(ViewContext *vc, rcti *rect, bool select, bool ex view3d_userdata_boxselect_init(&data, vc, rect, select); - if (extend == false && select) - ED_curve_deselect_all(vc->obedit->data); + if (extend == false && select) { + Curve *curve = (Curve *) vc->obedit->data; + ED_curve_deselect_all(curve->editnurb); + } ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */ nurbs_foreachScreenVert(vc, do_nurbs_box_select__doSelect, &data, V3D_PROJ_TEST_CLIP_DEFAULT); |