Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/object/object_bake_api.c
| Show First 20 Lines • Show All 1,664 Lines • ▼ Show 20 Lines | static void bake_init_api_data(wmOperator *op, bContext *C, BakeAPIRender *bkr) | ||||
| bkr->render = RE_NewSceneRender(bkr->scene); | bkr->render = RE_NewSceneRender(bkr->scene); | ||||
| /* XXX hack to force saving to always be internal. Whether (and how) to support | /* XXX hack to force saving to always be internal. Whether (and how) to support | ||||
| * external saving will be addressed later */ | * external saving will be addressed later */ | ||||
| if (bkr->save_mode == R_BAKE_SAVE_EXTERNAL) { | if (bkr->save_mode == R_BAKE_SAVE_EXTERNAL) { | ||||
| bkr->save_mode = R_BAKE_SAVE_INTERNAL; | bkr->save_mode = R_BAKE_SAVE_INTERNAL; | ||||
| } | } | ||||
| if (((bkr->pass_type == SCE_PASS_NORMAL) && (bkr->normal_space == R_BAKE_SPACE_TANGENT)) || | |||||
| bkr->pass_type == SCE_PASS_UV) { | |||||
| bkr->margin_type = R_BAKE_EXTEND; | |||||
| } | |||||
| } | } | ||||
| static int bake_exec(bContext *C, wmOperator *op) | static int bake_exec(bContext *C, wmOperator *op) | ||||
| { | { | ||||
| Render *re; | Render *re; | ||||
| int result = OPERATOR_CANCELLED; | int result = OPERATOR_CANCELLED; | ||||
| BakeAPIRender bkr = {NULL}; | BakeAPIRender bkr = {NULL}; | ||||
| Scene *scene = CTX_data_scene(C); | Scene *scene = CTX_data_scene(C); | ||||
| ▲ Show 20 Lines • Show All 433 Lines • Show Last 20 Lines | |||||