forked from bartvdbraak/blender
Code cleanup: remove unused callback for depth drawing
This commit is contained in:
parent
374527ab03
commit
cabeb39005
@ -2236,7 +2236,7 @@ float view3d_depth_near(ViewDepths *d)
|
||||
return far == far_real ? FLT_MAX : far;
|
||||
}
|
||||
|
||||
void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d)
|
||||
void ED_view3d_draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d)
|
||||
{
|
||||
short zbuf = v3d->zbuf;
|
||||
RegionView3D *rv3d = ar->regiondata;
|
||||
@ -2263,7 +2263,7 @@ void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d)
|
||||
|
||||
}
|
||||
|
||||
void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), bool alphaoverride)
|
||||
void ED_view3d_draw_depth(Scene *scene, ARegion *ar, View3D *v3d, bool alphaoverride)
|
||||
{
|
||||
RegionView3D *rv3d = ar->regiondata;
|
||||
Base *base;
|
||||
@ -2304,11 +2304,9 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
|
||||
Scene *sce_iter;
|
||||
for (SETLOOPER(scene->set, sce_iter, base)) {
|
||||
if (v3d->lay & base->lay) {
|
||||
if (func == NULL || func(base)) {
|
||||
draw_object(scene, ar, v3d, base, 0);
|
||||
if (base->object->transflag & OB_DUPLI) {
|
||||
draw_dupli_objects_color(scene, ar, v3d, base, dflag_depth, TH_UNDEFINED);
|
||||
}
|
||||
draw_object(scene, ar, v3d, base, 0);
|
||||
if (base->object->transflag & OB_DUPLI) {
|
||||
draw_dupli_objects_color(scene, ar, v3d, base, dflag_depth, TH_UNDEFINED);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2316,13 +2314,11 @@ void draw_depth(Scene *scene, ARegion *ar, View3D *v3d, int (*func)(void *), boo
|
||||
|
||||
for (base = scene->base.first; base; base = base->next) {
|
||||
if (v3d->lay & base->lay) {
|
||||
if (func == NULL || func(base)) {
|
||||
/* dupli drawing */
|
||||
if (base->object->transflag & OB_DUPLI) {
|
||||
draw_dupli_objects_color(scene, ar, v3d, base, dflag_depth, TH_UNDEFINED);
|
||||
}
|
||||
draw_object(scene, ar, v3d, base, dflag_depth);
|
||||
/* dupli drawing */
|
||||
if (base->object->transflag & OB_DUPLI) {
|
||||
draw_dupli_objects_color(scene, ar, v3d, base, dflag_depth, TH_UNDEFINED);
|
||||
}
|
||||
draw_object(scene, ar, v3d, base, dflag_depth);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3276,7 +3276,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
|
||||
|
||||
/* Get Z Depths, needed for perspective, nice for ortho */
|
||||
bgl_get_mats(&mats);
|
||||
draw_depth(scene, ar, v3d, NULL, true);
|
||||
ED_view3d_draw_depth(scene, ar, v3d, true);
|
||||
|
||||
{
|
||||
/* avoid allocating the whole depth buffer */
|
||||
@ -4511,7 +4511,7 @@ bool ED_view3d_autodist(Scene *scene, ARegion *ar, View3D *v3d,
|
||||
|
||||
/* Get Z Depths, needed for perspective, nice for ortho */
|
||||
bgl_get_mats(&mats);
|
||||
draw_depth(scene, ar, v3d, NULL, alphaoverride);
|
||||
ED_view3d_draw_depth(scene, ar, v3d, alphaoverride);
|
||||
|
||||
depth_close = view_autodist_depth_margin(ar, mval, 4);
|
||||
|
||||
@ -4543,10 +4543,10 @@ void ED_view3d_autodist_init(Scene *scene, ARegion *ar, View3D *v3d, int mode)
|
||||
/* Get Z Depths, needed for perspective, nice for ortho */
|
||||
switch (mode) {
|
||||
case 0:
|
||||
draw_depth(scene, ar, v3d, NULL, true);
|
||||
ED_view3d_draw_depth(scene, ar, v3d, true);
|
||||
break;
|
||||
case 1:
|
||||
draw_depth_gpencil(scene, ar, v3d);
|
||||
ED_view3d_draw_depth_gpencil(scene, ar, v3d);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -177,8 +177,8 @@ void draw_mesh_paint(View3D *v3d, RegionView3D *rv3d,
|
||||
|
||||
/* view3d_draw.c */
|
||||
void view3d_main_area_draw(const struct bContext *C, struct ARegion *ar);
|
||||
void draw_depth(Scene *scene, struct ARegion *ar, View3D *v3d, int (*func)(void *), bool alphaoverride);
|
||||
void draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d);
|
||||
void ED_view3d_draw_depth(Scene *scene, struct ARegion *ar, View3D *v3d, bool alphaoverride);
|
||||
void ED_view3d_draw_depth_gpencil(Scene *scene, ARegion *ar, View3D *v3d);
|
||||
void ED_view3d_after_add(ListBase *lb, Base *base, const short dflag);
|
||||
|
||||
void circf(float x, float y, float rad);
|
||||
|
Loading…
Reference in New Issue
Block a user