Fix lamps drawing only partially in OpenGL render.
It should draw lamps entirely, this happened due to hack to hide object centers.
This commit is contained in:
parent
0f91f56ce3
commit
39ad2cd8f8
Notes:
blender-bot
2023-02-14 11:14:29 +01:00
Referenced by issue #38516, Changing the color twice in a script color picker causes a crash
|
@ -90,8 +90,6 @@ typedef struct OGLRender {
|
|||
ScrArea *prevsa;
|
||||
ARegion *prevar;
|
||||
|
||||
short obcenter_dia_back; /* temp overwrite */
|
||||
|
||||
bool is_sequencer;
|
||||
SpaceSeq *sseq;
|
||||
|
||||
|
@ -402,9 +400,6 @@ static bool screen_opengl_render_init(bContext *C, wmOperator *op)
|
|||
}
|
||||
|
||||
|
||||
oglrender->obcenter_dia_back = U.obcenter_dia;
|
||||
U.obcenter_dia = 0;
|
||||
|
||||
oglrender->prevsa = prevsa;
|
||||
oglrender->prevar = prevar;
|
||||
|
||||
|
@ -468,8 +463,6 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender)
|
|||
|
||||
WM_event_add_notifier(C, NC_SCENE | ND_RENDER_RESULT, oglrender->scene);
|
||||
|
||||
U.obcenter_dia = oglrender->obcenter_dia_back;
|
||||
|
||||
GPU_offscreen_free(oglrender->ofs);
|
||||
|
||||
oglrender->scene->customdata_mask_modal = 0;
|
||||
|
|
|
@ -7336,7 +7336,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
|
|||
}
|
||||
else if ((dflag & DRAW_CONSTCOLOR) == 0) {
|
||||
/* we don't draw centers for duplicators and sets */
|
||||
if (U.obcenter_dia > 0) {
|
||||
if (U.obcenter_dia > 0 && !(G.f & G_RENDER_OGL)) {
|
||||
/* check > 0 otherwise grease pencil can draw into the circle select which is annoying. */
|
||||
drawcentercircle(v3d, rv3d, ob->obmat[3], do_draw_center, ob->id.lib || ob->id.us > 1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue