Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/render_result.c
| Show First 20 Lines • Show All 1,541 Lines • ▼ Show 20 Lines | void render_result_rect_get_pixels(RenderResult *rr, | ||||
| int rectx, | int rectx, | ||||
| int recty, | int recty, | ||||
| const ColorManagedViewSettings *view_settings, | const ColorManagedViewSettings *view_settings, | ||||
| const ColorManagedDisplaySettings *display_settings, | const ColorManagedDisplaySettings *display_settings, | ||||
| const int view_id) | const int view_id) | ||||
| { | { | ||||
| RenderView *rv = RE_RenderViewGetById(rr, view_id); | RenderView *rv = RE_RenderViewGetById(rr, view_id); | ||||
| if (rv->rect32) { | if (rv != NULL && rv->rect32) { | ||||
| memcpy(rect, rv->rect32, sizeof(int) * rr->rectx * rr->recty); | memcpy(rect, rv->rect32, sizeof(int) * rr->rectx * rr->recty); | ||||
| } | } | ||||
| else if (rv->rectf) { | else if (rv != NULL && rv->rectf) { | ||||
| IMB_display_buffer_transform_apply((unsigned char *)rect, | IMB_display_buffer_transform_apply((unsigned char *)rect, | ||||
| rv->rectf, | rv->rectf, | ||||
| rr->rectx, | rr->rectx, | ||||
| rr->recty, | rr->recty, | ||||
| 4, | 4, | ||||
| view_settings, | view_settings, | ||||
| display_settings, | display_settings, | ||||
| true); | true); | ||||
| ▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines | |||||