diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:18:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-06 11:18:52 +0300 |
commit | de777ad9e69320500bf05d97a7d6d60ba4fd0a93 (patch) | |
tree | a1141843a3e1df137bbc6490641bedf12a12a8fa /intern/cycles/blender | |
parent | 6d38d824377c55aaaed7e8283e81a7128bf6f728 (diff) | |
parent | 1daa20ad9f6f0c433a4e0a97a74e5beb9ea4e2c7 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'intern/cycles/blender')
-rw-r--r-- | intern/cycles/blender/blender_camera.cpp | 5 | ||||
-rw-r--r-- | intern/cycles/blender/blender_object.cpp | 11 | ||||
-rw-r--r-- | intern/cycles/blender/blender_object_cull.cpp | 1 | ||||
-rw-r--r-- | intern/cycles/blender/blender_particles.cpp | 2 | ||||
-rw-r--r-- | intern/cycles/blender/blender_python.cpp | 4 | ||||
-rw-r--r-- | intern/cycles/blender/blender_shader.cpp | 11 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 13 | ||||
-rw-r--r-- | intern/cycles/blender/blender_sync.h | 1 |
8 files changed, 21 insertions, 27 deletions
diff --git a/intern/cycles/blender/blender_camera.cpp b/intern/cycles/blender/blender_camera.cpp index c5df5842bad..228f0645f94 100644 --- a/intern/cycles/blender/blender_camera.cpp +++ b/intern/cycles/blender/blender_camera.cpp @@ -124,7 +124,7 @@ static float blender_camera_focal_distance(BL::RenderEngine& b_engine, if(!b_dof_object) return b_camera.dof_distance(); - + /* for dof object, return distance along camera Z direction */ BL::Array<float, 16> b_ob_matrix; b_engine.camera_model_matrix(b_ob, bcam->use_spherical_stereo, b_ob_matrix); @@ -726,7 +726,7 @@ static void blender_camera_view_subset(BL::RenderEngine& b_engine, blender_camera_viewplane(&cam_bcam, cam_bcam.full_width, cam_bcam.full_height, &cam, &cam_aspect, &sensor_size); - + /* return */ *view_box = view * (1.0f/view_aspect); *cam_box = cam * (1.0f/cam_aspect); @@ -895,4 +895,3 @@ BufferParams BlenderSync::get_buffer_params(BL::RenderSettings& b_render, } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp index 6d6b367209d..70d6092622a 100644 --- a/intern/cycles/blender/blender_object.cpp +++ b/intern/cycles/blender/blender_object.cpp @@ -126,7 +126,7 @@ void BlenderSync::sync_light(BL::Object& b_parent, *use_portal = true; return; } - + BL::Lamp b_lamp(b_ob.data()); /* type */ @@ -200,7 +200,7 @@ void BlenderSync::sync_light(BL::Object& b_parent, PointerRNA clamp = RNA_pointer_get(&b_lamp.ptr, "cycles"); light->cast_shadow = get_boolean(clamp, "cast_shadow"); light->use_mis = get_boolean(clamp, "use_multiple_importance_sampling"); - + int samples = get_int(clamp, "samples"); if(get_boolean(cscene, "use_square_samples")) light->samples = samples * samples; @@ -394,7 +394,7 @@ Object *BlenderSync::sync_object(BL::Depsgraph& b_depsgraph, if(object_map.sync(&object, b_ob, b_parent, key)) object_updated = true; - + /* mesh sync */ object->mesh = sync_mesh(b_depsgraph, b_ob, b_ob_instance, object_updated, hide_tris); @@ -543,7 +543,7 @@ static bool object_render_hide(BL::Object& b_ob, } parent = parent.parent(); } - + hide_triangles = hide_emitter; if(show_emitter) { @@ -563,7 +563,7 @@ void BlenderSync::sync_objects(BL::Depsgraph& b_depsgraph, float motion_time) { /* layer data */ bool motion = motion_time != 0.0f; - + if(!motion) { /* prepare for sync */ light_map.pre_sync(); @@ -729,4 +729,3 @@ void BlenderSync::sync_motion(BL::RenderSettings& b_render, } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_object_cull.cpp b/intern/cycles/blender/blender_object_cull.cpp index bdf7dc469b2..680d9d7b1ff 100644 --- a/intern/cycles/blender/blender_object_cull.cpp +++ b/intern/cycles/blender/blender_object_cull.cpp @@ -146,4 +146,3 @@ bool BlenderObjectCulling::test_distance(Scene *scene, float3 bb[8]) } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_particles.cpp b/intern/cycles/blender/blender_particles.cpp index bb8e2e1398e..a733a499826 100644 --- a/intern/cycles/blender/blender_particles.cpp +++ b/intern/cycles/blender/blender_particles.cpp @@ -68,7 +68,7 @@ bool BlenderSync::sync_dupli_particle(BL::Object& b_ob, /* add particle */ BL::Particle b_pa = b_psys.particles[persistent_id[0]]; Particle pa; - + pa.index = persistent_id[0]; pa.age = b_scene.frame_current() - b_pa.birth_time(); pa.lifetime = b_pa.lifetime(); diff --git a/intern/cycles/blender/blender_python.cpp b/intern/cycles/blender/blender_python.cpp index 84b90cb53de..4c199f4838f 100644 --- a/intern/cycles/blender/blender_python.cpp +++ b/intern/cycles/blender/blender_python.cpp @@ -326,7 +326,7 @@ static PyObject *draw_func(PyObject * /*self*/, PyObject *args) if(!PyArg_ParseTuple(args, "OOOO", &pysession, &pygraph, &pyv3d, &pyrv3d)) return NULL; - + BlenderSession *session = (BlenderSession*)PyLong_AsVoidPtr(pysession); if(PyLong_AsVoidPtr(pyrv3d)) { @@ -594,7 +594,7 @@ static PyObject *osl_compile_func(PyObject * /*self*/, PyObject *args) if(!PyArg_ParseTuple(args, "ss", &inputfile, &outputfile)) return NULL; - + /* return */ if(!OSLShaderManager::osl_compile(inputfile, outputfile)) Py_RETURN_FALSE; diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp index ed92cb71f04..e2463200001 100644 --- a/intern/cycles/blender/blender_shader.cpp +++ b/intern/cycles/blender/blender_shader.cpp @@ -154,7 +154,7 @@ static SocketType::Type convert_socket_type(BL::NodeSocket& b_socket) return SocketType::STRING; case BL::NodeSocket::type_SHADER: return SocketType::CLOSURE; - + default: return SocketType::UNDEFINED; } @@ -436,7 +436,7 @@ static ShaderNode *add_node(Scene *scene, else if(b_node.is_a(&RNA_ShaderNodeBsdfGlossy)) { BL::ShaderNodeBsdfGlossy b_glossy_node(b_node); GlossyBsdfNode *glossy = new GlossyBsdfNode(); - + switch(b_glossy_node.distribution()) { case BL::ShaderNodeBsdfGlossy::distribution_SHARP: glossy->distribution = CLOSURE_BSDF_REFLECTION_ID; @@ -940,7 +940,7 @@ static ShaderInput *node_find_input_by_name(ShaderNode *node, BL::NodeSocket& b_socket) { string name = b_socket.name(); - + if(node_use_modified_socket_name(node)) { BL::Node::inputs_iterator b_input; bool found = false; @@ -1043,7 +1043,7 @@ static void add_nodes(Scene *scene, } } else if(b_node->is_a(&RNA_ShaderNodeGroup) || b_node->is_a(&RNA_NodeCustomGroup)) { - + BL::ShaderNodeTree b_group_ntree(PointerRNA_NULL); if(b_node->is_a(&RNA_ShaderNodeGroup)) b_group_ntree = BL::ShaderNodeTree(((BL::NodeGroup)(*b_node)).node_tree()); @@ -1085,7 +1085,7 @@ static void add_nodes(Scene *scene, output_map[b_output->ptr.data] = proxy->outputs[0]; } - + if(b_group_ntree) { add_nodes(scene, b_engine, @@ -1467,4 +1467,3 @@ void BlenderSync::sync_shaders(BL::Depsgraph& b_depsgraph) } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index b449302241d..f9e04bdef7c 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -292,7 +292,7 @@ void BlenderSync::sync_integrator() integrator->mesh_light_samples = mesh_light_samples * mesh_light_samples; integrator->subsurface_samples = subsurface_samples * subsurface_samples; integrator->volume_samples = volume_samples * volume_samples; - } + } else { integrator->diffuse_samples = diffuse_samples; integrator->glossy_samples = glossy_samples; @@ -327,7 +327,7 @@ void BlenderSync::sync_film() Film *film = scene->film; Film prevfilm = *film; - + film->exposure = get_float(cscene, "film_exposure"); film->filter_type = (FilterType)get_enum(cscene, "pixel_filter_type", @@ -580,7 +580,7 @@ SceneParams BlenderSync::get_scene_params(BL::Scene& b_scene, params.shadingsystem = SHADINGSYSTEM_SVM; else if(shadingsystem == 1) params.shadingsystem = SHADINGSYSTEM_OSL; - + if(background || DebugFlags().viewport_static_bvh) params.bvh_type = SceneParams::BVH_STATIC; else @@ -645,7 +645,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, /* device type */ vector<DeviceInfo>& devices = Device::available_devices(); - + /* device default CPU */ foreach(DeviceInfo& device, devices) { if(device.type == DEVICE_CPU) { @@ -720,7 +720,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, int aa_samples = get_int(cscene, "aa_samples"); int preview_samples = get_int(cscene, "preview_samples"); int preview_aa_samples = get_int(cscene, "preview_aa_samples"); - + if(get_boolean(cscene, "use_square_samples")) { aa_samples = aa_samples * aa_samples; preview_aa_samples = preview_aa_samples * preview_aa_samples; @@ -817,7 +817,7 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, params.shadingsystem = SHADINGSYSTEM_SVM; else if(shadingsystem == 1) params.shadingsystem = SHADINGSYSTEM_OSL; - + /* color managagement */ params.display_buffer_linear = GLEW_ARB_half_float_pixel && b_engine.support_display_space_shader(b_scene); @@ -833,4 +833,3 @@ SessionParams BlenderSync::get_session_params(BL::RenderEngine& b_engine, } CCL_NAMESPACE_END - diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h index 77ee590335c..1dce7ec99ef 100644 --- a/intern/cycles/blender/blender_sync.h +++ b/intern/cycles/blender/blender_sync.h @@ -218,4 +218,3 @@ private: CCL_NAMESPACE_END #endif /* __BLENDER_SYNC_H__ */ - |