Changeset View
Changeset View
Standalone View
Standalone View
source/blender/render/intern/source/render_result.c
| Show First 20 Lines • Show All 195 Lines • ▼ Show 20 Lines | static void set_pass_full_name(char *fullname, const char *name, int channel, const char *view, const char *chan_id) | ||||
| if (channel >= 0) { | if (channel >= 0) { | ||||
| char token[3] = {'.', chan_id[channel], '\0'}; | char token[3] = {'.', chan_id[channel], '\0'}; | ||||
| strncat(fullname, token, EXR_PASS_MAXNAME); | strncat(fullname, token, EXR_PASS_MAXNAME); | ||||
| } | } | ||||
| } | } | ||||
| /********************************** New **************************************/ | /********************************** New **************************************/ | ||||
| static RenderPass *render_layer_add_pass(RenderResult *rr, RenderLayer *rl, int channels, const char *name, const char *viewname, const char *chan_id) | RenderPass *render_layer_add_pass(RenderResult *rr, RenderLayer *rl, int channels, const char *name, const char *viewname, 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 All 33 Lines | else if (STREQ(rpass->name, RE_PASSNAME_Z)) { | ||||
| rect[x] = 10e10; | rect[x] = 10e10; | ||||
| } | } | ||||
| } | } | ||||
| 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, rcti *partrct, int crop, int savebuffers, const char *layername, const char *viewname) | RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuffers, const char *layername, const char *viewname) | ||||
| { | { | ||||
| RenderResult *rr; | RenderResult *rr; | ||||
| ▲ Show 20 Lines • Show All 1,280 Lines • Show Last 20 Lines | |||||