Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/render_result.c
| Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | if (channel >= 0) { | ||||
| ARRAY_SET_ITEMS(token, chan_id[channel], '\0'); | ARRAY_SET_ITEMS(token, chan_id[channel], '\0'); | ||||
| strings[strings_len++] = token; | strings[strings_len++] = token; | ||||
| } | } | ||||
| BLI_string_join_array_by_sep_char(fullname, EXR_PASS_MAXNAME, '.', strings, strings_len); | BLI_string_join_array_by_sep_char(fullname, EXR_PASS_MAXNAME, '.', strings, strings_len); | ||||
| } | } | ||||
| /********************************** New **************************************/ | /********************************** New **************************************/ | ||||
| static RenderPass *render_layer_add_pass(RenderResult *rr, | RenderPass *render_layer_add_pass(RenderResult *rr, | ||||
| RenderLayer *rl, | RenderLayer *rl, | ||||
| int channels, | int channels, | ||||
| const char *name, | const char *name, | ||||
| const char *viewname, | const char *viewname, | ||||
| const char *chan_id) | const char *chan_id) | ||||
| { | { | ||||
| const int view_id = BLI_findstringindex(&rr->views, viewname, offsetof(RenderView, name)); | const int view_id = BLI_findstringindex(&rr->views, viewname, offsetof(RenderView, name)); | ||||
| RenderPass *rpass = MEM_callocN(sizeof(RenderPass), name); | RenderPass *rpass = MEM_callocN(sizeof(RenderPass), name); | ||||
| size_t rectsize = ((size_t)rr->rectx) * rr->recty * channels; | size_t rectsize = ((size_t)rr->rectx) * rr->recty * channels; | ||||
| rpass->channels = channels; | rpass->channels = channels; | ||||
| rpass->rectx = rl->rectx; | rpass->rectx = rl->rectx; | ||||
| rpass->recty = rl->recty; | rpass->recty = rl->recty; | ||||
| ▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | else if (STREQ(rpass->name, RE_PASSNAME_Z)) { | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| BLI_addtail(&rl->passes, rpass); | BLI_addtail(&rl->passes, rpass); | ||||
| return rpass; | return rpass; | ||||
| } | } | ||||
| /* wrapper called from render_opengl */ | |||||
| RenderPass *gp_add_pass( | |||||
| RenderResult *rr, RenderLayer *rl, int channels, const char *name, const char *viewname) | |||||
| { | |||||
| return render_layer_add_pass(rr, rl, channels, name, viewname, "RGBA"); | |||||
| } | |||||
| /* called by main render as well for parts */ | /* called by main render as well for parts */ | ||||
| /* will read info from Render *re to define layers */ | /* will read info from Render *re to define layers */ | ||||
| /* called in threads */ | /* called in threads */ | ||||
| /* re->winx,winy is coordinate space of entire image, partrct the part within */ | /* re->winx,winy is coordinate space of entire image, partrct the part within */ | ||||
| RenderResult *render_result_new(Render *re, | RenderResult *render_result_new(Render *re, | ||||
| rcti *partrct, | rcti *partrct, | ||||
| int crop, | int crop, | ||||
| ▲ Show 20 Lines • Show All 1,414 Lines • Show Last 20 Lines | |||||