Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/bake.cpp
| Show First 20 Lines • Show All 91 Lines • ▼ Show 20 Lines | void BakeManager::set(Scene *scene, | ||||
| const std::string &object_name_, | const std::string &object_name_, | ||||
| ShaderEvalType type_, | ShaderEvalType type_, | ||||
| int pass_filter_) | int pass_filter_) | ||||
| { | { | ||||
| object_name = object_name_; | object_name = object_name_; | ||||
| type = type_; | type = type_; | ||||
| pass_filter = shader_type_to_pass_filter(type_, pass_filter_); | pass_filter = shader_type_to_pass_filter(type_, pass_filter_); | ||||
| Pass::add(PASS_BAKE_PRIMITIVE, scene->film->passes); | Pass::add(PASS_BAKE_PRIMITIVE, scene->passes); | ||||
| Pass::add(PASS_BAKE_DIFFERENTIAL, scene->film->passes); | Pass::add(PASS_BAKE_DIFFERENTIAL, scene->passes); | ||||
| if (type == SHADER_EVAL_UV) { | if (type == SHADER_EVAL_UV) { | ||||
| /* force UV to be available */ | /* force UV to be available */ | ||||
| Pass::add(PASS_UV, scene->film->passes); | Pass::add(PASS_UV, scene->passes); | ||||
| } | } | ||||
| /* force use_light_pass to be true if we bake more than just colors */ | /* force use_light_pass to be true if we bake more than just colors */ | ||||
| if (pass_filter & ~BAKE_FILTER_COLOR) { | if (pass_filter & ~BAKE_FILTER_COLOR) { | ||||
| Pass::add(PASS_LIGHT, scene->film->passes); | Pass::add(PASS_LIGHT, scene->passes); | ||||
| } | } | ||||
| /* create device and update scene */ | /* create device and update scene */ | ||||
| scene->film->tag_update(scene); | scene->film->tag_update(scene); | ||||
| scene->integrator->tag_update(scene); | scene->integrator->tag_update(scene); | ||||
| need_update = true; | need_update = true; | ||||
| } | } | ||||
| Show All 36 Lines | |||||