Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/blender/blender_sync.cpp
| Show First 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | #endif | ||||
| integrator->caustics_reflective = get_boolean(cscene, "caustics_reflective"); | integrator->caustics_reflective = get_boolean(cscene, "caustics_reflective"); | ||||
| integrator->caustics_refractive = get_boolean(cscene, "caustics_refractive"); | integrator->caustics_refractive = get_boolean(cscene, "caustics_refractive"); | ||||
| integrator->filter_glossy = get_float(cscene, "blur_glossy"); | integrator->filter_glossy = get_float(cscene, "blur_glossy"); | ||||
| integrator->seed = get_int(cscene, "seed"); | integrator->seed = get_int(cscene, "seed"); | ||||
| if(get_boolean(cscene, "use_animated_seed")) | if(get_boolean(cscene, "use_animated_seed")) | ||||
| integrator->seed = hash_int_2d(b_scene.frame_current(), get_int(cscene, "seed")); | integrator->seed = hash_int_2d(b_scene.frame_current(), get_int(cscene, "seed")); | ||||
| integrator->sampling_pattern = (SamplingPattern)get_enum(cscene, "sampling_pattern"); | integrator->sampling_pattern = (SamplingPattern)get_enum( | ||||
| cscene, | |||||
| "sampling_pattern", | |||||
| SAMPLING_NUM_PATTERNS, | |||||
| SAMPLING_PATTERN_SOBOL); | |||||
| integrator->layer_flag = render_layer.layer; | integrator->layer_flag = render_layer.layer; | ||||
| integrator->sample_clamp_direct = get_float(cscene, "sample_clamp_direct"); | integrator->sample_clamp_direct = get_float(cscene, "sample_clamp_direct"); | ||||
| integrator->sample_clamp_indirect = get_float(cscene, "sample_clamp_indirect"); | integrator->sample_clamp_indirect = get_float(cscene, "sample_clamp_indirect"); | ||||
| #ifdef __CAMERA_MOTION__ | #ifdef __CAMERA_MOTION__ | ||||
| if(!preview) { | if(!preview) { | ||||
| if(integrator->motion_blur != r.use_motion_blur()) { | if(integrator->motion_blur != r.use_motion_blur()) { | ||||
| scene->object_manager->tag_update(scene); | scene->object_manager->tag_update(scene); | ||||
| scene->camera->tag_update(); | scene->camera->tag_update(); | ||||
| } | } | ||||
| integrator->motion_blur = r.use_motion_blur(); | integrator->motion_blur = r.use_motion_blur(); | ||||
| } | } | ||||
| #endif | #endif | ||||
| integrator->method = (Integrator::Method)get_enum(cscene, "progressive"); | integrator->method = (Integrator::Method)get_enum(cscene, | ||||
| "progressive", | |||||
| Integrator::NUM_METHODS, | |||||
| Integrator::PATH); | |||||
| integrator->sample_all_lights_direct = get_boolean(cscene, "sample_all_lights_direct"); | integrator->sample_all_lights_direct = get_boolean(cscene, "sample_all_lights_direct"); | ||||
| integrator->sample_all_lights_indirect = get_boolean(cscene, "sample_all_lights_indirect"); | integrator->sample_all_lights_indirect = get_boolean(cscene, "sample_all_lights_indirect"); | ||||
| int diffuse_samples = get_int(cscene, "diffuse_samples"); | int diffuse_samples = get_int(cscene, "diffuse_samples"); | ||||
| int glossy_samples = get_int(cscene, "glossy_samples"); | int glossy_samples = get_int(cscene, "glossy_samples"); | ||||
| int transmission_samples = get_int(cscene, "transmission_samples"); | int transmission_samples = get_int(cscene, "transmission_samples"); | ||||
| int ao_samples = get_int(cscene, "ao_samples"); | int ao_samples = get_int(cscene, "ao_samples"); | ||||
| Show All 33 Lines | void BlenderSync::sync_film() | ||||
| Film *film = scene->film; | Film *film = scene->film; | ||||
| Film prevfilm = *film; | Film prevfilm = *film; | ||||
| /* Clamping */ | /* Clamping */ | ||||
| Integrator *integrator = scene->integrator; | Integrator *integrator = scene->integrator; | ||||
| film->use_sample_clamp = (integrator->sample_clamp_direct != 0.0f || integrator->sample_clamp_indirect != 0.0f); | film->use_sample_clamp = (integrator->sample_clamp_direct != 0.0f || integrator->sample_clamp_indirect != 0.0f); | ||||
| film->exposure = get_float(cscene, "film_exposure"); | film->exposure = get_float(cscene, "film_exposure"); | ||||
| film->filter_type = (FilterType)get_enum(cscene, "pixel_filter_type"); | film->filter_type = (FilterType)get_enum(cscene, | ||||
| "pixel_filter_type", | |||||
| FILTER_NUM_TYPES, | |||||
| FILTER_BLACKMAN_HARRIS); | |||||
| film->filter_width = (film->filter_type == FILTER_BOX)? 1.0f: get_float(cscene, "filter_width"); | film->filter_width = (film->filter_type == FILTER_BOX)? 1.0f: get_float(cscene, "filter_width"); | ||||
| if(b_scene.world()) { | if(b_scene.world()) { | ||||
| BL::WorldMistSettings b_mist = b_scene.world().mist_settings(); | BL::WorldMistSettings b_mist = b_scene.world().mist_settings(); | ||||
| film->mist_start = b_mist.start(); | film->mist_start = b_mist.start(); | ||||
| film->mist_depth = b_mist.depth(); | film->mist_depth = b_mist.depth(); | ||||
| ▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | SceneParams BlenderSync::get_scene_params(BL::Scene& b_scene, | ||||
| if(shadingsystem == 0) | if(shadingsystem == 0) | ||||
| params.shadingsystem = SHADINGSYSTEM_SVM; | params.shadingsystem = SHADINGSYSTEM_SVM; | ||||
| else if(shadingsystem == 1) | else if(shadingsystem == 1) | ||||
| params.shadingsystem = SHADINGSYSTEM_OSL; | params.shadingsystem = SHADINGSYSTEM_OSL; | ||||
| if(background) | if(background) | ||||
| params.bvh_type = SceneParams::BVH_STATIC; | params.bvh_type = SceneParams::BVH_STATIC; | ||||
| else | else | ||||
| params.bvh_type = (SceneParams::BVHType)get_enum(cscene, "debug_bvh_type"); | params.bvh_type = (SceneParams::BVHType)get_enum( | ||||
| cscene, | |||||
| "debug_bvh_type", | |||||
| SceneParams::BVH_NUM_TYPES, | |||||
| SceneParams::BVH_STATIC); | |||||
| params.use_bvh_spatial_split = RNA_boolean_get(&cscene, "debug_use_spatial_splits"); | params.use_bvh_spatial_split = RNA_boolean_get(&cscene, "debug_use_spatial_splits"); | ||||
| if(background && params.shadingsystem != SHADINGSYSTEM_OSL) | if(background && params.shadingsystem != SHADINGSYSTEM_OSL) | ||||
| params.persistent_data = r.use_persistent_data(); | params.persistent_data = r.use_persistent_data(); | ||||
| else | else | ||||
| params.persistent_data = false; | params.persistent_data = false; | ||||
| ▲ Show 20 Lines • Show All 179 Lines • Show Last 20 Lines | |||||