Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_view3d/view3d_draw.c
| Show First 20 Lines • Show All 717 Lines • ▼ Show 20 Lines | if (ca->dtx & CAM_DTX_HARMONY_TRI_A) { | ||||
| drawviewborder_triangle(shdr_pos, x1, x2, y1, y2, 1, 'A'); | drawviewborder_triangle(shdr_pos, x1, x2, y1, y2, 1, 'A'); | ||||
| } | } | ||||
| if (ca->dtx & CAM_DTX_HARMONY_TRI_B) { | if (ca->dtx & CAM_DTX_HARMONY_TRI_B) { | ||||
| drawviewborder_triangle(shdr_pos, x1, x2, y1, y2, 1, 'B'); | drawviewborder_triangle(shdr_pos, x1, x2, y1, y2, 1, 'B'); | ||||
| } | } | ||||
| if (ca->flag & CAM_SHOW_SAFE_MARGINS) { | if (ca->flag & CAM_SHOW_SAFE_MARGINS) { | ||||
| UI_draw_safe_areas( | UI_draw_safe_areas(shdr_pos, | ||||
| shdr_pos, x1, x2, y1, y2, scene->safe_areas.title, scene->safe_areas.action); | &(const rctf){ | ||||
| .xmin = x1, | |||||
| .xmax = x2, | |||||
| .ymin = y1, | |||||
| .ymax = y2, | |||||
| }, | |||||
| scene->safe_areas.title, | |||||
| scene->safe_areas.action); | |||||
| if (ca->flag & CAM_SHOW_SAFE_CENTER) { | if (ca->flag & CAM_SHOW_SAFE_CENTER) { | ||||
| UI_draw_safe_areas(shdr_pos, | UI_draw_safe_areas(shdr_pos, | ||||
| x1, | &(const rctf){ | ||||
| x2, | .xmin = x1, | ||||
| y1, | .xmax = x2, | ||||
| y2, | .ymin = y1, | ||||
| .ymax = y2, | |||||
| }, | |||||
| scene->safe_areas.title_center, | scene->safe_areas.title_center, | ||||
| scene->safe_areas.action_center); | scene->safe_areas.action_center); | ||||
| } | } | ||||
| } | } | ||||
| if (ca->flag & CAM_SHOWSENSOR) { | if (ca->flag & CAM_SHOWSENSOR) { | ||||
| /* determine sensor fit, and get sensor x/y, for auto fit we | /* determine sensor fit, and get sensor x/y, for auto fit we | ||||
| * assume and square sensor and only use sensor_x */ | * assume and square sensor and only use sensor_x */ | ||||
| ▲ Show 20 Lines • Show All 1,205 Lines • ▼ Show 20 Lines | else { | ||||
| clip_start, | clip_start, | ||||
| clipend); | clipend); | ||||
| } | } | ||||
| } | } | ||||
| /* XXX(jbakker): `do_color_management` should be controlled by the caller. Currently when doing a | /* XXX(jbakker): `do_color_management` should be controlled by the caller. Currently when doing a | ||||
| * viewport render animation and saving to an 8bit file format, color management would be applied | * viewport render animation and saving to an 8bit file format, color management would be applied | ||||
| * twice. Once here, and once when saving the saving to disk. In this case the Save As Render | * twice. Once here, and once when saving the saving to disk. In this case the Save As Render | ||||
| * option cannot be controlled either. But when doing an offscreen render you want to do the | * option cannot be controlled either. But when doing an off-screen render you want to do the | ||||
| * color management here. | * color management here. | ||||
| * | * | ||||
| * This option was added here to increase the performance when rendering for a playblast. When | * This option was added here to increase the performance for quick view-port preview renders. | ||||
| * using workbench the color differences haven't been reported as a bug. But users also use the | * When using workbench the color differences haven't been reported as a bug. But users also use | ||||
| * viewport rendering to render Eevee scenes. In the later situation the saved colors | * the viewport rendering to render Eevee scenes. In the later situation the saved colors are | ||||
| * are totally wrong. */ | * totally wrong. */ | ||||
| const bool do_color_management = (ibuf->rect_float == NULL); | const bool do_color_management = (ibuf->rect_float == NULL); | ||||
| ED_view3d_draw_offscreen(depsgraph, | ED_view3d_draw_offscreen(depsgraph, | ||||
| scene, | scene, | ||||
| drawtype, | drawtype, | ||||
| v3d, | v3d, | ||||
| region, | region, | ||||
| sizex, | sizex, | ||||
| sizey, | sizey, | ||||
| ▲ Show 20 Lines • Show All 598 Lines • Show Last 20 Lines | |||||