Cycles / Sky Texture:
authorThomas Dinges <blender@dingto.org>
Wed, 28 Aug 2013 14:11:28 +0000 (14:11 +0000)
committerThomas Dinges <blender@dingto.org>
Wed, 28 Aug 2013 14:11:28 +0000 (14:11 +0000)
* Added a new sky model by Hosek and Wilkie: "An Analytic Model for Full Spectral Sky-Dome Radiance" http://cgg.mff.cuni.cz/projects/SkylightModelling/

Example render:
http://archive.dingto.org/2013/blender/code/new_sky_model.png
Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Textures#Sky_Texture

Details:
* User can choose between the older Preetham and the new Hosek / Wilkie model via a dropdown. For older files, backwards compatibility is preserved. When we add a new Sky texture, it defaults to the new model though.
* For the new model, you can specify the ground albedo (see documentation for details).
* Turbidity now has a UI soft range between 1 and 10, higher values (up to 30) are still possible, but can result in weird colors or black.
* Removed the limitation of 1 sky texture per SVM stack. (Patch by Lukas Tönne, thanks!)

Thanks to Brecht for code review and some help!

This is part of my GSoC 2013 project, SVN merge of r59214, r59220, r59251 and r59601.

726 files changed:
CMakeLists.txt
GNUmakefile
build_files/build_environment/install_deps.sh
build_files/cmake/Modules/FindPythonLibsUnix.cmake
build_files/cmake/macros.cmake
extern/recastnavigation/recast-capi.cpp
extern/recastnavigation/recast-capi.h
intern/CMakeLists.txt
intern/atomic/atomic_ops.h [new file with mode: 0644]
intern/cycles/CMakeLists.txt
intern/cycles/app/CMakeLists.txt
intern/cycles/app/cycles_server.cpp
intern/cycles/app/cycles_standalone.cpp [moved from intern/cycles/app/cycles_test.cpp with 91% similarity]
intern/cycles/app/cycles_xml.cpp
intern/cycles/app/cycles_xml.h
intern/cycles/app/io_export_cycles_xml.py
intern/cycles/blender/CCL_api.h
intern/cycles/blender/addon/__init__.py
intern/cycles/blender/addon/engine.py
intern/cycles/blender/addon/osl.py
intern/cycles/blender/addon/presets.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_camera.cpp
intern/cycles/blender/blender_curves.cpp
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_object.cpp
intern/cycles/blender/blender_particles.cpp
intern/cycles/blender/blender_python.cpp
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_session.h
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/blender/blender_util.h
intern/cycles/bvh/bvh.cpp
intern/cycles/cmake/external_libs.cmake
intern/cycles/device/device.cpp
intern/cycles/device/device.h
intern/cycles/device/device_cpu.cpp
intern/cycles/device/device_cuda.cpp
intern/cycles/device/device_intern.h
intern/cycles/device/device_memory.h
intern/cycles/device/device_multi.cpp
intern/cycles/device/device_network.cpp
intern/cycles/device/device_network.h
intern/cycles/device/device_opencl.cpp
intern/cycles/device/device_task.cpp
intern/cycles/device/device_task.h
intern/cycles/doc/license/Blender.txt [deleted file]
intern/cycles/doc/license/CMakeLists.txt
intern/cycles/doc/license/GPL.txt [deleted file]
intern/cycles/doc/license/readme.txt
intern/cycles/kernel/CMakeLists.txt
intern/cycles/kernel/closure/bsdf.h
intern/cycles/kernel/closure/bsdf_microfacet.h
intern/cycles/kernel/closure/bsdf_oren_nayar.h
intern/cycles/kernel/closure/bssrdf.h
intern/cycles/kernel/closure/volume.h
intern/cycles/kernel/kernel.cl
intern/cycles/kernel/kernel.cpp
intern/cycles/kernel/kernel.cu
intern/cycles/kernel/kernel.h
intern/cycles/kernel/kernel_accumulate.h
intern/cycles/kernel/kernel_bvh.h
intern/cycles/kernel/kernel_bvh_subsurface.h [new file with mode: 0644]
intern/cycles/kernel/kernel_bvh_traversal.h
intern/cycles/kernel/kernel_camera.h
intern/cycles/kernel/kernel_compat_cpu.h
intern/cycles/kernel/kernel_compat_cuda.h
intern/cycles/kernel/kernel_compat_opencl.h
intern/cycles/kernel/kernel_curve.h
intern/cycles/kernel/kernel_differential.h
intern/cycles/kernel/kernel_displace.h
intern/cycles/kernel/kernel_emission.h
intern/cycles/kernel/kernel_film.h
intern/cycles/kernel/kernel_globals.h
intern/cycles/kernel/kernel_jitter.h
intern/cycles/kernel/kernel_light.h
intern/cycles/kernel/kernel_math.h
intern/cycles/kernel/kernel_montecarlo.h
intern/cycles/kernel/kernel_object.h
intern/cycles/kernel/kernel_passes.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_primitive.h
intern/cycles/kernel/kernel_random.h
intern/cycles/kernel/kernel_shader.h
intern/cycles/kernel/kernel_sse2.cpp
intern/cycles/kernel/kernel_sse3.cpp
intern/cycles/kernel/kernel_subsurface.h
intern/cycles/kernel/kernel_textures.h
intern/cycles/kernel/kernel_triangle.h
intern/cycles/kernel/kernel_types.h
intern/cycles/kernel/osl/osl_bssrdf.cpp
intern/cycles/kernel/osl/osl_bssrdf.h
intern/cycles/kernel/osl/osl_closures.cpp
intern/cycles/kernel/osl/osl_closures.h
intern/cycles/kernel/osl/osl_globals.h
intern/cycles/kernel/osl/osl_services.cpp
intern/cycles/kernel/osl/osl_services.h
intern/cycles/kernel/osl/osl_shader.cpp
intern/cycles/kernel/osl/osl_shader.h
intern/cycles/kernel/shaders/node_add_closure.osl
intern/cycles/kernel/shaders/node_ambient_occlusion.osl
intern/cycles/kernel/shaders/node_attribute.osl
intern/cycles/kernel/shaders/node_background.osl
intern/cycles/kernel/shaders/node_blackbody.osl
intern/cycles/kernel/shaders/node_brick_texture.osl
intern/cycles/kernel/shaders/node_brightness.osl
intern/cycles/kernel/shaders/node_bump.osl
intern/cycles/kernel/shaders/node_camera.osl
intern/cycles/kernel/shaders/node_checker_texture.osl
intern/cycles/kernel/shaders/node_color.h
intern/cycles/kernel/shaders/node_combine_hsv.osl
intern/cycles/kernel/shaders/node_combine_rgb.osl
intern/cycles/kernel/shaders/node_convert_from_color.osl
intern/cycles/kernel/shaders/node_convert_from_float.osl
intern/cycles/kernel/shaders/node_convert_from_int.osl
intern/cycles/kernel/shaders/node_convert_from_normal.osl
intern/cycles/kernel/shaders/node_convert_from_point.osl
intern/cycles/kernel/shaders/node_convert_from_string.osl
intern/cycles/kernel/shaders/node_convert_from_vector.osl
intern/cycles/kernel/shaders/node_diffuse_bsdf.osl
intern/cycles/kernel/shaders/node_emission.osl
intern/cycles/kernel/shaders/node_environment_texture.osl
intern/cycles/kernel/shaders/node_fresnel.h
intern/cycles/kernel/shaders/node_fresnel.osl
intern/cycles/kernel/shaders/node_gamma.osl
intern/cycles/kernel/shaders/node_geometry.osl
intern/cycles/kernel/shaders/node_glass_bsdf.osl
intern/cycles/kernel/shaders/node_glossy_bsdf.osl
intern/cycles/kernel/shaders/node_gradient_texture.osl
intern/cycles/kernel/shaders/node_hair_info.osl
intern/cycles/kernel/shaders/node_holdout.osl
intern/cycles/kernel/shaders/node_hsv.osl
intern/cycles/kernel/shaders/node_image_texture.osl
intern/cycles/kernel/shaders/node_invert.osl
intern/cycles/kernel/shaders/node_layer_weight.osl
intern/cycles/kernel/shaders/node_light_falloff.osl
intern/cycles/kernel/shaders/node_light_path.osl
intern/cycles/kernel/shaders/node_magic_texture.osl
intern/cycles/kernel/shaders/node_mapping.osl
intern/cycles/kernel/shaders/node_math.osl
intern/cycles/kernel/shaders/node_mix.osl
intern/cycles/kernel/shaders/node_mix_closure.osl
intern/cycles/kernel/shaders/node_musgrave_texture.osl
intern/cycles/kernel/shaders/node_noise_texture.osl
intern/cycles/kernel/shaders/node_normal.osl
intern/cycles/kernel/shaders/node_normal_map.osl
intern/cycles/kernel/shaders/node_object_info.osl
intern/cycles/kernel/shaders/node_output_displacement.osl
intern/cycles/kernel/shaders/node_output_surface.osl
intern/cycles/kernel/shaders/node_output_volume.osl
intern/cycles/kernel/shaders/node_particle_info.osl
intern/cycles/kernel/shaders/node_refraction_bsdf.osl
intern/cycles/kernel/shaders/node_rgb_curves.osl
intern/cycles/kernel/shaders/node_rgb_ramp.osl
intern/cycles/kernel/shaders/node_separate_hsv.osl
intern/cycles/kernel/shaders/node_separate_rgb.osl
intern/cycles/kernel/shaders/node_set_normal.osl
intern/cycles/kernel/shaders/node_sky_texture.osl
intern/cycles/kernel/shaders/node_subsurface_scattering.osl
intern/cycles/kernel/shaders/node_tangent.osl
intern/cycles/kernel/shaders/node_texture.h
intern/cycles/kernel/shaders/node_texture_coordinate.osl
intern/cycles/kernel/shaders/node_toon_bsdf.osl
intern/cycles/kernel/shaders/node_translucent_bsdf.osl
intern/cycles/kernel/shaders/node_transparent_bsdf.osl
intern/cycles/kernel/shaders/node_value.osl
intern/cycles/kernel/shaders/node_vector_curves.osl
intern/cycles/kernel/shaders/node_vector_math.osl
intern/cycles/kernel/shaders/node_vector_transform.osl
intern/cycles/kernel/shaders/node_velvet_bsdf.osl
intern/cycles/kernel/shaders/node_voronoi_texture.osl
intern/cycles/kernel/shaders/node_ward_bsdf.osl
intern/cycles/kernel/shaders/node_wave_texture.osl
intern/cycles/kernel/shaders/node_wavelength.osl
intern/cycles/kernel/shaders/node_wireframe.osl
intern/cycles/kernel/shaders/oslutil.h
intern/cycles/kernel/shaders/stdosl.h
intern/cycles/kernel/svm/svm.h
intern/cycles/kernel/svm/svm_attribute.h
intern/cycles/kernel/svm/svm_brick.h
intern/cycles/kernel/svm/svm_brightness.h
intern/cycles/kernel/svm/svm_camera.h
intern/cycles/kernel/svm/svm_checker.h
intern/cycles/kernel/svm/svm_closure.h
intern/cycles/kernel/svm/svm_convert.h
intern/cycles/kernel/svm/svm_displace.h
intern/cycles/kernel/svm/svm_fresnel.h
intern/cycles/kernel/svm/svm_gamma.h
intern/cycles/kernel/svm/svm_geometry.h
intern/cycles/kernel/svm/svm_gradient.h
intern/cycles/kernel/svm/svm_hsv.h
intern/cycles/kernel/svm/svm_image.h
intern/cycles/kernel/svm/svm_invert.h
intern/cycles/kernel/svm/svm_light_path.h
intern/cycles/kernel/svm/svm_magic.h
intern/cycles/kernel/svm/svm_mapping.h
intern/cycles/kernel/svm/svm_math.h
intern/cycles/kernel/svm/svm_mix.h
intern/cycles/kernel/svm/svm_musgrave.h
intern/cycles/kernel/svm/svm_noisetex.h
intern/cycles/kernel/svm/svm_normal.h
intern/cycles/kernel/svm/svm_ramp.h
intern/cycles/kernel/svm/svm_sepcomb_hsv.h
intern/cycles/kernel/svm/svm_sepcomb_rgb.h
intern/cycles/kernel/svm/svm_sky.h
intern/cycles/kernel/svm/svm_tex_coord.h
intern/cycles/kernel/svm/svm_texture.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/kernel/svm/svm_value.h
intern/cycles/kernel/svm/svm_vector_transform.h
intern/cycles/kernel/svm/svm_voronoi.h
intern/cycles/kernel/svm/svm_wave.h
intern/cycles/render/attribute.cpp
intern/cycles/render/attribute.h
intern/cycles/render/background.cpp
intern/cycles/render/background.h
intern/cycles/render/blackbody.h
intern/cycles/render/bssrdf.cpp
intern/cycles/render/bssrdf.h
intern/cycles/render/buffers.cpp
intern/cycles/render/buffers.h
intern/cycles/render/camera.cpp
intern/cycles/render/camera.h
intern/cycles/render/curves.cpp
intern/cycles/render/curves.h
intern/cycles/render/film.cpp
intern/cycles/render/film.h
intern/cycles/render/graph.cpp
intern/cycles/render/graph.h
intern/cycles/render/image.cpp
intern/cycles/render/image.h
intern/cycles/render/integrator.cpp
intern/cycles/render/integrator.h
intern/cycles/render/light.cpp
intern/cycles/render/light.h
intern/cycles/render/mesh.cpp
intern/cycles/render/mesh.h
intern/cycles/render/mesh_displace.cpp
intern/cycles/render/nodes.cpp
intern/cycles/render/nodes.h
intern/cycles/render/object.cpp
intern/cycles/render/object.h
intern/cycles/render/osl.cpp
intern/cycles/render/osl.h
intern/cycles/render/particles.cpp
intern/cycles/render/particles.h
intern/cycles/render/scene.cpp
intern/cycles/render/scene.h
intern/cycles/render/session.cpp
intern/cycles/render/session.h
intern/cycles/render/shader.cpp
intern/cycles/render/shader.h
intern/cycles/render/sky_model.cpp
intern/cycles/render/sobol.h
intern/cycles/render/svm.cpp
intern/cycles/render/svm.h
intern/cycles/render/tables.cpp
intern/cycles/render/tables.h
intern/cycles/render/tile.cpp
intern/cycles/render/tile.h
intern/cycles/subd/subd_build.h
intern/cycles/subd/subd_dice.cpp
intern/cycles/subd/subd_dice.h
intern/cycles/subd/subd_patch.cpp
intern/cycles/subd/subd_patch.h
intern/cycles/subd/subd_split.cpp
intern/cycles/subd/subd_split.h
intern/cycles/subd/subd_stencil.cpp
intern/cycles/util/CMakeLists.txt
intern/cycles/util/util_algorithm.h
intern/cycles/util/util_args.h
intern/cycles/util/util_boundbox.h
intern/cycles/util/util_cache.cpp
intern/cycles/util/util_cache.h
intern/cycles/util/util_color.h
intern/cycles/util/util_cuda.cpp
intern/cycles/util/util_cuda.h
intern/cycles/util/util_debug.h
intern/cycles/util/util_dynlib.cpp
intern/cycles/util/util_dynlib.h
intern/cycles/util/util_foreach.h
intern/cycles/util/util_function.h
intern/cycles/util/util_hash.h
intern/cycles/util/util_image.h
intern/cycles/util/util_list.h
intern/cycles/util/util_map.h
intern/cycles/util/util_math.h
intern/cycles/util/util_opengl.h
intern/cycles/util/util_param.h
intern/cycles/util/util_path.cpp
intern/cycles/util/util_path.h
intern/cycles/util/util_progress.h
intern/cycles/util/util_set.h
intern/cycles/util/util_stats.h
intern/cycles/util/util_string.cpp
intern/cycles/util/util_string.h
intern/cycles/util/util_system.cpp
intern/cycles/util/util_system.h
intern/cycles/util/util_task.cpp
intern/cycles/util/util_task.h
intern/cycles/util/util_thread.h
intern/cycles/util/util_time.cpp
intern/cycles/util/util_time.h
intern/cycles/util/util_transform.cpp
intern/cycles/util/util_transform.h
intern/cycles/util/util_types.h
intern/cycles/util/util_vector.h
intern/cycles/util/util_view.cpp
intern/cycles/util/util_view.h
intern/cycles/util/util_xml.h
intern/ghost/intern/GHOST_SystemPathsX11.cpp
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/guardedalloc/CMakeLists.txt
intern/guardedalloc/SConscript
intern/guardedalloc/intern/mallocn.c
intern/opencolorio/ocio_impl.cc
release/datafiles/blender_icons.sh
release/datafiles/blender_icons.svg
release/datafiles/blender_icons16.png
release/datafiles/blender_icons32.png
release/datafiles/prvicons.png
release/datafiles/prvicons.sh
release/datafiles/prvicons.svg
release/datafiles/splash.png
release/datafiles/startup.blend
release/scripts/freestyle/style_modules/parameter_editor.py
release/scripts/modules/addon_utils.py
release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
release/scripts/modules/bl_i18n_utils/settings.py
release/scripts/modules/bl_i18n_utils/utils.py
release/scripts/modules/bpy_extras/io_utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/rna_info.py
release/scripts/presets/cycles/sampling/final.py
release/scripts/presets/cycles/sampling/preview.py
release/scripts/startup/bl_operators/__init__.py
release/scripts/startup/bl_operators/add_mesh_torus.py
release/scripts/startup/bl_operators/mask.py [new file with mode: 0644]
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/__init__.py
release/scripts/startup/bl_ui/properties_constraint.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_bone.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_freestyle.py
release/scripts/startup/bl_ui/properties_mask_common.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_common.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_outliner.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_text.py
release/scripts/startup/bl_ui/space_time.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/templates_py/script_stub.py
source/blender/blenfont/intern/blf_font.c
source/blender/blenfont/intern/blf_glyph.c
source/blender/blenkernel/BKE_anim.h
source/blender/blenkernel/BKE_armature.h
source/blender/blenkernel/BKE_cloth.h
source/blender/blenkernel/BKE_curve.h
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_key.h
source/blender/blenkernel/BKE_lattice.h
source/blender/blenkernel/BKE_mball.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_pbvh.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_treehash.h [new file with mode: 0644]
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/camera.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/editmesh.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/mask_rasterize.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/modifiers_bmesh.c
source/blender/blenkernel/intern/navmesh_conversion.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/object_deform.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pbvh.c
source/blender/blenkernel/intern/pbvh_bmesh.c
source/blender/blenkernel/intern/pbvh_intern.h
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/property.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/screen.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/treehash.c [new file with mode: 0644]
source/blender/blenlib/BLI_callbacks.h
source/blender/blenlib/BLI_edgehash.h
source/blender/blenlib/BLI_fileops.h
source/blender/blenlib/BLI_fnmatch.h
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_linklist.h
source/blender/blenlib/BLI_linklist_stack.h [new file with mode: 0644]
source/blender/blenlib/BLI_listbase.h
source/blender/blenlib/BLI_math_geom.h
source/blender/blenlib/BLI_math_interp.h
source/blender/blenlib/BLI_math_rotation.h
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/BLI_memarena.h
source/blender/blenlib/BLI_mempool.h
source/blender/blenlib/BLI_scanfill.h
source/blender/blenlib/BLI_sort.h [new file with mode: 0644]
source/blender/blenlib/BLI_threads.h
source/blender/blenlib/BLI_utildefines.h
source/blender/blenlib/BLI_winstuff.h
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/PIL_time.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/BLI_linklist.c
source/blender/blenlib/intern/BLI_memarena.c
source/blender/blenlib/intern/BLI_mempool.c
source/blender/blenlib/intern/edgehash.c
source/blender/blenlib/intern/fileops.c
source/blender/blenlib/intern/listbase.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/math_geom_inline.c
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/math_vector_inline.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/smallhash.c
source/blender/blenlib/intern/sort.c [new file with mode: 0644]
source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/threads.c
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/undofile.c
source/blender/blenloader/intern/versioning_legacy.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/CMakeLists.txt
source/blender/bmesh/bmesh.h
source/blender/bmesh/bmesh_class.h
source/blender/bmesh/bmesh_tools.h [moved from intern/cycles/util/util_memarena.cpp with 50% similarity]
source/blender/bmesh/intern/bmesh_construct.c
source/blender/bmesh/intern/bmesh_construct.h
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_core.h
source/blender/bmesh/intern/bmesh_edgeloop.c
source/blender/bmesh/intern/bmesh_edgeloop.h
source/blender/bmesh/intern/bmesh_log.c
source/blender/bmesh/intern/bmesh_log.h
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/bmesh/intern/bmesh_mesh_conv.c
source/blender/bmesh/intern/bmesh_mods.c
source/blender/bmesh/intern/bmesh_opdefines.c
source/blender/bmesh/intern/bmesh_operator_api_inline.h
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/intern/bmesh_operators_private.h
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/intern/bmesh_queries.c
source/blender/bmesh/intern/bmesh_queries.h
source/blender/bmesh/intern/bmesh_walkers.c
source/blender/bmesh/intern/bmesh_walkers.h
source/blender/bmesh/intern/bmesh_walkers_impl.c
source/blender/bmesh/operators/bmo_beautify.c
source/blender/bmesh/operators/bmo_bevel.c
source/blender/bmesh/operators/bmo_bisect_plane.c [new file with mode: 0644]
source/blender/bmesh/operators/bmo_bridge.c
source/blender/bmesh/operators/bmo_connect.c
source/blender/bmesh/operators/bmo_connect_nonplanar.c
source/blender/bmesh/operators/bmo_create.c
source/blender/bmesh/operators/bmo_dissolve.c
source/blender/bmesh/operators/bmo_dupe.c
source/blender/bmesh/operators/bmo_edgenet.c
source/blender/bmesh/operators/bmo_extrude.c
source/blender/bmesh/operators/bmo_fill_attribute.c [new file with mode: 0644]
source/blender/bmesh/operators/bmo_fill_edgeloop.c
source/blender/bmesh/operators/bmo_fill_grid.c
source/blender/bmesh/operators/bmo_fill_holes.c
source/blender/bmesh/operators/bmo_hull.c
source/blender/bmesh/operators/bmo_inset.c
source/blender/bmesh/operators/bmo_normals.c
source/blender/bmesh/operators/bmo_poke.c
source/blender/bmesh/operators/bmo_primitive.c
source/blender/bmesh/operators/bmo_removedoubles.c
source/blender/bmesh/operators/bmo_split_edges.c
source/blender/bmesh/operators/bmo_subdivide_edgering.c
source/blender/bmesh/operators/bmo_symmetrize.c
source/blender/bmesh/operators/bmo_triangulate.c
source/blender/bmesh/operators/bmo_unsubdivide.c
source/blender/bmesh/operators/bmo_utils.c
source/blender/bmesh/operators/bmo_wireframe.c
source/blender/bmesh/tools/bmesh_bevel.c
source/blender/bmesh/tools/bmesh_bisect_plane.c [new file with mode: 0644]
source/blender/bmesh/tools/bmesh_bisect_plane.h [new file with mode: 0644]
source/blender/bmesh/tools/bmesh_decimate_dissolve.c
source/blender/bmesh/tools/bmesh_decimate_unsubdivide.c
source/blender/bmesh/tools/bmesh_edgenet.c [new file with mode: 0644]
source/blender/bmesh/tools/bmesh_edgenet.h [moved from intern/cycles/util/util_memarena.h with 59% similarity]
source/blender/bmesh/tools/bmesh_edgesplit.c
source/blender/collada/collada.cpp
source/blender/collada/collada_utils.cpp
source/blender/compositor/intern/COM_MemoryBuffer.cpp
source/blender/compositor/intern/COM_WorkScheduler.cpp
source/blender/compositor/operations/COM_MapUVOperation.cpp
source/blender/compositor/operations/COM_PlaneTrackMaskOperation.cpp
source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp
source/blender/compositor/operations/COM_ReadBufferOperation.cpp
source/blender/compositor/operations/COM_ReadBufferOperation.h
source/blender/compositor/operations/COM_WriteBufferOperation.cpp
source/blender/compositor/operations/COM_WriteBufferOperation.h
source/blender/editors/animation/anim_filter.c
source/blender/editors/armature/armature_skinning.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/editcurve.c
source/blender/editors/datafiles/CMakeLists.txt
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_mask.h
source/blender/editors/include/ED_uvedit.h
source/blender/editors/include/UI_icons.h
source/blender/editors/include/UI_interface.h
source/blender/editors/include/UI_view2d.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/view2d.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/io/io_collada.c
source/blender/editors/mask/mask_add.c
source/blender/editors/mask/mask_edit.c
source/blender/editors/mask/mask_intern.h
source/blender/editors/mask/mask_ops.c
source/blender/editors/mask/mask_relationships.c
source/blender/editors/mesh/editmesh_inset.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_path.c
source/blender/editors/mesh/editmesh_rip.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_navmesh.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/render/render_internal.c
source/blender/editors/sculpt_paint/paint_hide.c
source/blender/editors/sculpt_paint/paint_image_proj.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/space_buttons/buttons_texture.c
source/blender/editors/space_clip/clip_draw.c
source/blender/editors/space_clip/clip_intern.h
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/space_clip.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_outliner/outliner_tree.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_iterators.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/crazyspace.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/freestyle/intern/application/Controller.cpp
source/blender/freestyle/intern/application/Controller.h
source/blender/freestyle/intern/geometry/BBox.h
source/blender/freestyle/intern/stroke/StrokeShader.h
source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
source/blender/gpu/GPU_buffers.h
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/shaders/gpu_shader_material.glsl
source/blender/imbuf/intern/IMB_colormanagement_intern.h
source/blender/imbuf/intern/imageprocess.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_curve_types.h
source/blender/makesdna/DNA_key_types.h
source/blender/makesdna/DNA_lattice_types.h
source/blender/makesdna/DNA_meta_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_particle_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_screen_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/intern/CMakeLists.txt
source/blender/makesdna/intern/SConscript
source/blender/makesdna/intern/dna_genfile.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_tracking.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_boolean_util.c
source/blender/modifiers/intern/MOD_boolean_util.h
source/blender/modifiers/intern/MOD_decimate.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_particleinstance.c
source/blender/modifiers/intern/MOD_skin.c
source/blender/modifiers/intern/MOD_triangulate.c
source/blender/nodes/NOD_static_types.h
source/blender/nodes/shader/nodes/node_shader_subsurface_scattering.c
source/blender/nodes/shader/nodes/node_shader_tex_sky.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/bmesh/bmesh_py_types_customdata.c
source/blender/python/intern/bpy_app_handlers.c
source/blender/python/intern/bpy_rna.c
source/blender/python/mathutils/mathutils_Vector.c
source/blender/python/mathutils/mathutils_geometry.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/rayshade.c
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_cursors.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/Converter/BL_ShapeDeformer.cpp
source/gameengine/GameLogic/SCA_IScene.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/BL_ActionManager.h
source/gameengine/Ketsji/BL_BlenderShader.cpp
source/gameengine/Ketsji/BL_BlenderShader.h
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/Ketsji/KX_Light.h
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_RaySensor.h
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Rasterizer/RAS_BucketManager.cpp
source/gameengine/Rasterizer/RAS_MeshObject.cpp
source/gameengine/Rasterizer/RAS_MeshObject.h

index 6efef21afc11f36d01b5820a476e5b5a02d70709..a8df83015847236e7fd8ed8846a6ce95aff74726 100644 (file)
@@ -261,7 +261,7 @@ mark_as_advanced(PYTHON_NUMPY_PATH)
 
 # Cycles
 option(WITH_CYCLES                                     "Enable cycles Render Engine" ON)
-option(WITH_CYCLES_TEST                                "Build cycles test application" OFF)
+option(WITH_CYCLES_STANDALONE          "Build cycles standalone application" OFF)
 option(WITH_CYCLES_OSL                         "Build Cycles with OSL support" OFF)
 option(WITH_CYCLES_CUDA_BINARIES       "Build cycles CUDA binaries" OFF)
 set(CYCLES_CUDA_BINARIES_ARCH sm_20 sm_21 sm_30 sm_35 CACHE STRING "CUDA architectures to build binaries for")
@@ -373,7 +373,7 @@ endif()
 #-----------------------------------------------------------------------------
 # Check for conflicting/unsupported configurations
 
-if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_TEST)
+if(NOT WITH_BLENDER AND NOT WITH_PLAYER AND NOT WITH_CYCLES_STANDALONE)
        message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER must be enabled, nothing to do!")
 endif()
 
@@ -771,14 +771,14 @@ if(UNIX AND NOT APPLE)
                endif()
 
                if(LLVM_DIRECTORY)
-                       FIND_PROGRAM(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
+                       find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
                        if(NOT LLVM_CONFIG)
-                               FIND_PROGRAM(LLVM_CONFIG llvm-config HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
+                               find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_DIRECTORY}/bin NO_CMAKE_PATH)
                        endif()
                else()
-                       FIND_PROGRAM(LLVM_CONFIG llvm-config-${LLVM_VERSION})
+                       find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
                        if(NOT LLVM_CONFIG)
-                               FIND_PROGRAM(LLVM_CONFIG llvm-config)
+                               find_program(LLVM_CONFIG llvm-config)
                        endif()
                endif()
                execute_process(COMMAND ${LLVM_CONFIG} --version
@@ -2145,6 +2145,23 @@ endif()
 set(CMAKE_C_FLAGS "${C_WARNINGS} ${CMAKE_C_FLAGS} ${PLATFORM_CFLAGS}")
 set(CMAKE_CXX_FLAGS "${CXX_WARNINGS} ${CMAKE_CXX_FLAGS} ${PLATFORM_CFLAGS}")
 
+# defined above, platform spesific but shared names
+mark_as_advanced(
+       CYCLES_OSL
+       OSL_LIB_EXEC
+       OSL_COMPILER
+       OSL_LIB_COMP
+       OSL_LIB_QUERY
+       OSL_INCLUDES
+)
+
+mark_as_advanced(
+       LLVM_CONFIG
+       LLVM_DIRECTORY
+       LLVM_LIBRARY
+       LLVM_VERSION
+)
+
 #-------------------------------------------------------------------------------
 # Global Defines
 
index 0d97d8e7b077835f6d936acbd53e120055235a29..d5570a8e170e82ef788d14f623b4d0b2b2068ae8 100644 (file)
@@ -184,6 +184,7 @@ help:
        @echo "  * check_spelling_py    - check for spelling errors (Python only)"
        @echo ""
        @echo "Utilities (not associated with building blender)"
+       @echo "  * icons    - updates PNG icons from SVG files."
        @echo "  * tbz      - create a compressed svn export 'blender_archive.tar.bz2'"
        @echo ""
        @echo "Documentation Targets (not associated with building blender)"
@@ -322,6 +323,10 @@ tbz:
        rm -rf blender_archive/
        @echo "blender_archive.tar.bz2 written"
 
+icons:
+       $(BLENDER_DIR)/release/datafiles/blender_icons.sh
+       $(BLENDER_DIR)/release/datafiles/prvicons.sh
+
 
 # -----------------------------------------------------------------------------
 # Documentation
index ae16b4efaac67157a81c4e91adb744f2a8f4fc64..529812ea4154f01323d0ada30c0e1cfd1761d770 100755 (executable)
@@ -212,6 +212,7 @@ ILMBASE_SOURCE="http://download.savannah.nongnu.org/releases/openexr/ilmbase-$IL
 OPENEXR_FORCE_REBUILD=false
 OPENEXR_SKIP=false
 _with_built_openexr=false
+_need_openexr_ldconfig=false
 
 OIIO_VERSION="1.1.10"
 OIIO_SOURCE="https://github.com/OpenImageIO/oiio/archive/Release-$OIIO_VERSION.tar.gz"
@@ -230,6 +231,7 @@ LLVM_SKIP=false
 
 # OSL needs to be compiled for now!
 OSL_VERSION="1.3.2"
+OSL_VERSION_MIN=$OSL_VERSION
 OSL_SOURCE="https://github.com/imageworks/OpenShadingLanguage/archive/Release-$OSL_VERSION.tar.gz"
 OSL_FORCE_REBUILD=false
 OSL_SKIP=false
@@ -2776,7 +2778,7 @@ install_ARCH() {
       if [ $? -eq 0 ]; then
         install_packages_ARCH llvm clang
         have_llvm=true
-        LLVM_VERSION=`check_package_version_ge_ARCH llvm`
+        LLVM_VERSION=`check_package_version_ge_ARCH llvm $LLVM_VERSION_MIN`
         LLVM_VERSION_FOUND=$LLVM_VERSION
         clean_LLVM
       else
index 82f74373b8bc37886aa8444cc42f078f0c5122ec..30019eb0b703117132834ccfd65e8883632ef0e1 100644 (file)
@@ -199,4 +199,5 @@ MARK_AS_ADVANCED(
   PYTHON_INCLUDE_DIR
   PYTHON_INCLUDE_CONFIG_DIR
   PYTHON_LIBRARY
+  PYTHON_LIBPATH
 )
index 854609f1665a06345fa52c163a3d2127bfd87569..ace1ed912be77eae76dc54f6bba35b53111e0f07 100644 (file)
@@ -799,4 +799,45 @@ macro(data_to_c_simple
        unset(_file_from)
        unset(_file_to)
        unset(_file_to_path)
+
+endmacro()
+
+# XXX Not used for now...
+macro(svg_to_png
+      file_from
+      file_to
+      dpi
+      list_to_add)
+
+       # remove ../'s
+       get_filename_component(_file_from ${CMAKE_CURRENT_SOURCE_DIR}/${file_from} REALPATH)
+       get_filename_component(_file_to   ${CMAKE_CURRENT_SOURCE_DIR}/${file_to}   REALPATH)
+
+       list(APPEND ${list_to_add} ${_file_to})
+
+       find_program(INKSCAPE_EXE inkscape)
+       mark_as_advanced(INKSCAPE_EXE)
+
+       if(INKSCAPE_EXE)
+               if(APPLE)
+                       # in OS X app bundle, the binary is a shim that doesn't take any
+                       # command line arguments, replace it with the actual binary
+                       string(REPLACE "MacOS/Inkscape" "Resources/bin/inkscape" INKSCAPE_REAL_EXE ${INKSCAPE_EXE})
+                       if(EXISTS "${INKSCAPE_REAL_EXE}")
+                               set(INKSCAPE_EXE ${INKSCAPE_REAL_EXE})
+                       endif()
+               endif()
+
+               add_custom_command(
+                       OUTPUT  ${_file_to}
+                       COMMAND ${INKSCAPE_EXE} ${_file_from} --export-dpi=${dpi}  --without-gui --export-png=${_file_to}
+                       DEPENDS ${_file_from} ${INKSCAPE_EXE}
+               )
+       else()
+               message(WARNING "Inkscape not found, could not re-generate ${_file_to} from ${_file_from}!")
+       endif()
+
+       unset(_file_from)
+       unset(_file_to)
+
 endmacro()
index 1c11d87f6399af1d92034a4394112fea14f960ca..38c14118156bf551962e56e67acb4d0a1e00171a 100644 (file)
@@ -270,129 +270,3 @@ unsigned int *recast_polyMeshDetailGetMeshes(struct recast_polyMeshDetail *mesh,
        return dmesh->meshes;
 }
 
-//  qsort based on FreeBSD source (libkern\qsort.c)
-typedef int    cmp_t(void *, const void *, const void *);
-static inline char     *med3(char *, char *, char *, cmp_t *, void *);
-static inline void      swapfunc(char *, char *, int, int);
-
-#define min(a, b)      (a) < (b) ? a : b
-#define swapcode(TYPE, parmi, parmj, n)                \
-{                                                                                      \
-       long i = (n) / sizeof(TYPE);                    \
-       TYPE *pi = (TYPE *) (parmi);                    \
-       TYPE *pj = (TYPE *) (parmj);                    \
-       do {                                                                    \
-               TYPE    t = *pi;                                        \
-               *pi++ = *pj;                                            \
-               *pj++ = t;                                                      \
-       } while (--i > 0);                                              \
-}
-#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
-       es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
-
-static inline void swapfunc(char* a, char* b, int n, int swaptype)
-{
-       if(swaptype <= 1)
-               swapcode(long, a, b, n)
-       else
-       swapcode(char, a, b, n)
-}
-
-#define swap(a, b)                                     \
-       if (swaptype == 0) {                    \
-               long t = *(long *)(a);          \
-               *(long *)(a) = *(long *)(b);\
-               *(long *)(b) = t;                       \
-       } else                                                  \
-               swapfunc(a, b, es, swaptype)
-
-#define vecswap(a, b, n)       if ((n) > 0) swapfunc(a, b, n, swaptype)
-#define        CMP(t, x, y) (cmp((t), (x), (y)))
-
-static inline char *med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk)
-{
-       return CMP(thunk, a, b) < 0 ?
-               (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
-               :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
-}
-
-void recast_qsort(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
-{
-       char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
-       int d, r, swaptype, swap_cnt;
-
-loop:  
-       SWAPINIT(a, es);
-       swap_cnt = 0;
-       if (n < 7) {
-               for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
-                       for (pl = pm; 
-                               pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
-                               pl -= es)
-                               swap(pl, pl - es);
-               return;
-       }
-       pm = (char *)a + (n / 2) * es;
-       if (n > 7) {
-               pl = (char *)a;
-               pn = (char *)a + (n - 1) * es;
-               if (n > 40) {
-                       d = (n / 8) * es;
-                       pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
-                       pm = med3(pm - d, pm, pm + d, cmp, thunk);
-                       pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
-               }
-               pm = med3(pl, pm, pn, cmp, thunk);
-       }
-       swap((char *)a, pm);
-       pa = pb = (char *)a + es;
-
-       pc = pd = (char *)a + (n - 1) * es;
-       for (;;) {
-               while (pb <= pc && (r = CMP(thunk, pb, a)) <= 0) {
-                       if (r == 0) {
-                               swap_cnt = 1;
-                               swap(pa, pb);
-                               pa += es;
-                       }
-                       pb += es;
-               }
-               while (pb <= pc && (r = CMP(thunk, pc, a)) >= 0) {
-                       if (r == 0) {
-                               swap_cnt = 1;
-                               swap(pc, pd);
-                               pd -= es;
-                       }
-                       pc -= es;
-               }
-               if (pb > pc)
-                       break;
-               swap(pb, pc);
-               swap_cnt = 1;
-               pb += es;
-               pc -= es;
-       }
-       if (swap_cnt == 0) {  /* Switch to insertion sort */
-               for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
-                       for (pl = pm; 
-                               pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
-                               pl -= es)
-                               swap(pl, pl - es);
-               return;
-       }
-
-       pn = (char *)a + n * es;
-       r = min(pa - (char *)a, pb - pa);
-       vecswap((char *)a, pb - r, r);
-       r = min(pd - pc, pn - pd - es);
-       vecswap(pb, pn - r, r);
-       if ((r = pb - pa) > es)
-               recast_qsort(a, r / es, es, thunk, cmp);
-       if ((r = pd - pc) > es) {
-               /* Iterate rather than recurse to save stack space */
-               a = pn - r;
-               n = r / es;
-               goto loop;
-       }
-}
-
index 52a8e215ea1ca79fc059ce658367600dc9b75994..54bf84931c4249c701428368b4aa09ecbe0b5fc3 100644 (file)
@@ -127,11 +127,6 @@ unsigned char *recast_polyMeshDetailGetTris(struct recast_polyMeshDetail *mesh,
 
 unsigned int *recast_polyMeshDetailGetMeshes(struct recast_polyMeshDetail *mesh, int *nmeshes);
 
-/* utility function: quick sort reentrant */
-typedef int    recast_cmp_t(void *ctx, const void *a, const void *b);
-
-void recast_qsort(void *a, size_t n, size_t es, void *thunk, recast_cmp_t *cmp);
-
 #ifdef __cplusplus
 }
 #endif
index bb8cd7aaf70fb83aeb446c8182606374fe8f9396..364db3592c78846ace45aed08085f26576c66fc2 100644 (file)
 #
 # ***** END GPL LICENSE BLOCK *****
 
+# add_subdirectory(atomic)  # header only
 add_subdirectory(string)
 add_subdirectory(ghost)
 add_subdirectory(guardedalloc)
-add_subdirectory(moto)
 add_subdirectory(memutil)
 add_subdirectory(opencolorio)
 add_subdirectory(opennl)
@@ -61,6 +61,10 @@ if(WITH_IK_ITASC)
        add_subdirectory(itasc)
 endif()
 
+if(WITH_IK_SOLVER OR WITH_GAMEENGINE)
+       add_subdirectory(moto)
+endif()
+
 if(WITH_CYCLES)
        add_subdirectory(cycles)
 endif()
diff --git a/intern/atomic/atomic_ops.h b/intern/atomic/atomic_ops.h
new file mode 100644 (file)
index 0000000..21d686a
--- /dev/null
@@ -0,0 +1,307 @@
+/*
+ * Adopted from jemalloc with this license:
+ *
+ * Copyright (C) 2002-2013 Jason Evans <jasone@canonware.com>.
+ * All rights reserved.
+ * Copyright (C) 2007-2012 Mozilla Foundation.  All rights reserved.
+ * Copyright (C) 2009-2013 Facebook, Inc.  All rights reserved.
+
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice(s),
+ *    this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice(s),
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
+ * EVENT SHALL THE COPYRIGHT HOLDER(S) BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef __ATOMIC_OPS_H__
+#define __ATOMIC_OPS_H__
+
+#include <assert.h>
+
+#if defined (__APPLE__)
+#  include <libkern/OSAtomic.h>
+#elif defined(_MSC_VER)
+#  include <windows.h>
+#endif
+
+/* needed for int types */
+#include "../../source/blender/blenlib/BLI_sys_types.h"
+
+/* little macro so inline keyword works */
+#if defined(_MSC_VER)
+#  define ATOMIC_INLINE static __forceinline
+#else
+#  if (defined(__APPLE__) && defined(__ppc__))
+/* static inline __attribute__ here breaks osx ppc gcc42 build */
+#    define ATOMIC_INLINE static __attribute__((always_inline))
+#  else
+#    define ATOMIC_INLINE static inline __attribute__((always_inline))
+#  endif
+#endif
+
+#if defined(_M_X64) || defined(__amd64__) || defined(__x86_64__)
+#  define LG_SIZEOF_PTR 3
+#  define LG_SIZEOF_INT 2
+#else
+#  define LG_SIZEOF_PTR 2
+#  define LG_SIZEOF_INT 2
+#endif
+
+/******************************************************************************/
+/* 64-bit operations. */
+#if (LG_SIZEOF_PTR == 3 || LG_SIZEOF_INT == 3)
+#  ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+       return (__sync_add_and_fetch(p, x));
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+       return (__sync_sub_and_fetch(p, x));
+}
+#elif (defined(_MSC_VER))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+       return (InterlockedExchangeAdd64(p, x));
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+       return (InterlockedExchangeAdd64(p, -((int64_t)x)));
+}
+#elif (defined(__APPLE__))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+       return (OSAtomicAdd64((int64_t)x, (int64_t *)p));
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+       return (OSAtomicAdd64(-((int64_t)x), (int64_t *)p));
+}
+#  elif (defined(__amd64__) || defined(__x86_64__))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+       asm volatile (
+           "lock; xaddq %0, %1;"
+           : "+r" (x), "=m" (*p) /* Outputs. */
+           : "m" (*p) /* Inputs. */
+           );
+       return (x);
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+       x = (uint64_t)(-(int64_t)x);
+       asm volatile (
+           "lock; xaddq %0, %1;"
+           : "+r" (x), "=m" (*p) /* Outputs. */
+           : "m" (*p) /* Inputs. */
+           );
+       return (x);
+}
+#  elif (defined(JEMALLOC_ATOMIC9))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+       /*
+        * atomic_fetchadd_64() doesn't exist, but we only ever use this
+        * function on LP64 systems, so atomic_fetchadd_long() will do.
+        */
+       assert(sizeof(uint64_t) == sizeof(unsigned long));
+
+       return (atomic_fetchadd_long(p, (unsigned long)x) + x);
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+       assert(sizeof(uint64_t) == sizeof(unsigned long));
+
+       return (atomic_fetchadd_long(p, (unsigned long)(-(long)x)) - x);
+}
+#  elif (defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_8))
+ATOMIC_INLINE uint64_t
+atomic_add_uint64(uint64_t *p, uint64_t x)
+{
+       return (__sync_add_and_fetch(p, x));
+}
+
+ATOMIC_INLINE uint64_t
+atomic_sub_uint64(uint64_t *p, uint64_t x)
+{
+       return (__sync_sub_and_fetch(p, x));
+}
+#  else
+#    error "Missing implementation for 64-bit atomic operations"
+#  endif
+#endif
+
+/******************************************************************************/
+/* 32-bit operations. */
+#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+       return (__sync_add_and_fetch(p, x));
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+       return (__sync_sub_and_fetch(p, x));
+}
+#elif (defined(_MSC_VER))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+       return (InterlockedExchangeAdd(p, x));
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+       return (InterlockedExchangeAdd(p, -((int32_t)x)));
+}
+#elif (defined(__APPLE__))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+       return (OSAtomicAdd32((int32_t)x, (int32_t *)p));
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+       return (OSAtomicAdd32(-((int32_t)x), (int32_t *)p));
+}
+#elif (defined(__i386__) || defined(__amd64__) || defined(__x86_64__))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+       asm volatile (
+           "lock; xaddl %0, %1;"
+           : "+r" (x), "=m" (*p) /* Outputs. */
+           : "m" (*p) /* Inputs. */
+           );
+       return (x);
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+       x = (uint32_t)(-(int32_t)x);
+       asm volatile (
+           "lock; xaddl %0, %1;"
+           : "+r" (x), "=m" (*p) /* Outputs. */
+           : "m" (*p) /* Inputs. */
+           );
+       return (x);
+}
+#elif (defined(JEMALLOC_ATOMIC9))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+       return (atomic_fetchadd_32(p, x) + x);
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+       return (atomic_fetchadd_32(p, (uint32_t)(-(int32_t)x)) - x);
+}
+#elif (defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_4))
+ATOMIC_INLINE uint32_t
+atomic_add_uint32(uint32_t *p, uint32_t x)
+{
+       return (__sync_add_and_fetch(p, x));
+}
+
+ATOMIC_INLINE uint32_t
+atomic_sub_uint32(uint32_t *p, uint32_t x)
+{
+       return (__sync_sub_and_fetch(p, x));
+}
+#else
+#  error "Missing implementation for 32-bit atomic operations"
+#endif
+
+/******************************************************************************/
+/* size_t operations. */
+ATOMIC_INLINE size_t
+atomic_add_z(size_t *p, size_t x)
+{
+       assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
+
+#if (LG_SIZEOF_PTR == 3)
+       return ((size_t)atomic_add_uint64((uint64_t *)p, (uint64_t)x));
+#elif (LG_SIZEOF_PTR == 2)
+       return ((size_t)atomic_add_uint32((uint32_t *)p, (uint32_t)x));
+#endif
+}
+
+ATOMIC_INLINE size_t
+atomic_sub_z(size_t *p, size_t x)
+{
+       assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
+
+#if (LG_SIZEOF_PTR == 3)
+       return ((size_t)atomic_add_uint64((uint64_t *)p,
+           (uint64_t)-((int64_t)x)));
+#elif (LG_SIZEOF_PTR == 2)
+       return ((size_t)atomic_add_uint32((uint32_t *)p,
+           (uint32_t)-((int32_t)x)));
+#endif
+}
+
+/******************************************************************************/
+/* unsigned operations. */
+ATOMIC_INLINE unsigned
+atomic_add_u(unsigned *p, unsigned x)
+{
+       assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
+
+#if (LG_SIZEOF_INT == 3)
+       return ((unsigned)atomic_add_uint64((uint64_t *)p, (uint64_t)x));
+#elif (LG_SIZEOF_INT == 2)
+       return ((unsigned)atomic_add_uint32((uint32_t *)p, (uint32_t)x));
+#endif
+}
+
+ATOMIC_INLINE unsigned
+atomic_sub_u(unsigned *p, unsigned x)
+{
+       assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
+
+#if (LG_SIZEOF_INT == 3)
+       return ((unsigned)atomic_add_uint64((uint64_t *)p,
+           (uint64_t)-((int64_t)x)));
+#elif (LG_SIZEOF_INT == 2)
+       return ((unsigned)atomic_add_uint32((uint32_t *)p,
+           (uint32_t)-((int32_t)x)));
+#endif
+}
+
+#endif /* __ATOMIC_OPS_H__ */
index d83ff20f5386004ff3be14924e2768cb7e830aab..43829a110cf1de66fe908e655011f1d9a2fe69d3 100644 (file)
@@ -76,7 +76,7 @@ if(WITH_CYCLES_BLENDER)
        add_subdirectory(blender)
 endif()
 
-if(WITH_CYCLES_TEST OR WITH_CYCLES_NETWORK)
+if(WITH_CYCLES_STANDALONE OR WITH_CYCLES_NETWORK)
        add_subdirectory(app)
 endif()
 
index 3fb8aaf934fdecb2d0eb4a5441f65ed4b32636a7..347da075d0553877d3af53d4357f582be689982c 100644 (file)
@@ -27,7 +27,7 @@ set(LIBRARIES
 
 link_directories(${OPENIMAGEIO_LIBPATH} ${BOOST_LIBPATH})
 
-if(WITH_CYCLES_TEST)
+if(WITH_CYCLES_STANDALONE)
        list(APPEND LIBRARIES ${GLUT_LIBRARIES})
 endif()
 
@@ -38,17 +38,17 @@ endif()
 include_directories(${INC})
 include_directories(SYSTEM ${INC_SYS})
 
-if(WITH_CYCLES_TEST)
+if(WITH_CYCLES_STANDALONE)
        set(SRC
-               cycles_test.cpp
+               cycles_standalone.cpp
                cycles_xml.cpp
                cycles_xml.h
        )
-       add_executable(cycles_test ${SRC})
-       target_link_libraries(cycles_test ${LIBRARIES})
+       add_executable(cycles ${SRC})
+       target_link_libraries(cycles ${LIBRARIES})
 
        if(UNIX AND NOT APPLE)
-               set_target_properties(cycles_test PROPERTIES INSTALL_RPATH $ORIGIN/lib)
+               set_target_properties(cycles PROPERTIES INSTALL_RPATH $ORIGIN/lib)
        endif()
        unset(SRC)
 endif()
index f94a29b9451c89fa610a1fa3437431b93150d111..e80fc0cb95f8c6d904387f34489df1e9debd05d3 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include <stdio.h>
similarity index 91%
rename from intern/cycles/app/cycles_test.cpp
rename to intern/cycles/app/cycles_standalone.cpp
index 6d7c5912cb5a592fe3a1aa58f0c9ad9e62fb7760..9a193548d7aff41a95f46c036ba2cc664d1c18be 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include <stdio.h>
@@ -231,7 +229,7 @@ static void options_parse(int argc, const char **argv)
        ArgParse ap;
        bool help = false;
 
-       ap.options ("Usage: cycles_test [options] file.xml",
+       ap.options ("Usage: cycles [options] file.xml",
                "%*", files_parse, "",
                "--device %s", &devicename, ("Devices to use: " + device_names).c_str(),
                "--shadingsys %s", &ssname, "Shading system to use: svm, osl",
index 40fbb7af556452ea0af5ab1635c4069377a73a05..8c6f501249a78ab7f7512e36d90f7033aaa9206f 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include <stdio.h>
@@ -254,10 +252,14 @@ static void xml_read_film(const XMLReadState& state, pugi::xml_node node)
 static void xml_read_integrator(const XMLReadState& state, pugi::xml_node node)
 {
        Integrator *integrator = state.scene->integrator;
+       bool branched = false;
        
-       xml_read_bool(&integrator->progressive, node, "progressive");
+       xml_read_bool(&branched, node, "branched");
+
+       if(branched)
+               integrator->method == Integrator::BRANCHED_PATH;
        
-       if(!integrator->progressive) {
+       if(integrator->method == Integrator::BRANCHED_PATH) {
                xml_read_int(&integrator->diffuse_samples, node, "diffuse_samples");
                xml_read_int(&integrator->glossy_samples, node, "glossy_samples");
                xml_read_int(&integrator->transmission_samples, node, "transmission_samples");
index 90ec52922e1909f67843393aeb47791b5b23be11..1e3ed4113127c8b989e9174f6dbbe975f0f3661a 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #ifndef __CYCLES_XML__
index 3ba9e201d11c42698f0f7eaa25ae7dc6e953b91b..b48545eef320fb4f0316a24448e71bf7ef07aa53 100644 (file)
@@ -1,19 +1,17 @@
 #
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
 #
 
 # XML exporter for generating test files, not intended for end users
index b8a30b717170d9377820550fc67fa0edb3263e58..29d8ed0d98e30db14da33eb8509a85f0211bc779 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #ifndef CCL_API_H
index cefdf5042069db2fc098d33dce40ae419dc4dec7..e54db53c595c97d9b443380b617e499c6e829df5 100644 (file)
@@ -1,19 +1,17 @@
 #
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
 #
 
 # <pep8 compliant>
index 8958ca3e42e28a6b19274fab12d50aaed9a4ac88..3f15e232de774a6803b7284abe63aa422d7e6617 100644 (file)
@@ -1,19 +1,17 @@
 #
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
 #
 
 # <pep8 compliant>
index 0a67edac1e3285ae4c0c721b748f19978696f355..c5f9d93013e8bdb3c25fdf4f0cf738142d06eccb 100644 (file)
@@ -1,19 +1,17 @@
 #
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
 #
 
 # <pep8 compliant>
index d1f8e7c3a6defa190ff9979aeeb98812abbf7b5e..66ec3a3a47a8657eb0ccf7a7d4cafb53f5d3696b 100644 (file)
@@ -1,19 +1,17 @@
 #
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
 #
 
 # <pep8 compliant>
@@ -69,7 +67,7 @@ class AddPresetSampling(AddPresetBase, Operator):
         "cycles.subsurface_samples",
         "cycles.no_caustics",
         "cycles.blur_glossy",
-        "cycles.squared_samples",
+        "cycles.use_square_samples",
         "cycles.progressive"
     ]
 
index 083fa643fe77f9925ff3b7290c03af7d33f0580e..367f021ee34c5b55a64bd99675c100ec82455752 100644 (file)
@@ -1,19 +1,17 @@
 #
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
 #
 
 # <pep8 compliant>
@@ -64,40 +62,20 @@ enum_panorama_types = (
                           "Similar to most fisheye modern lens, takes sensor dimensions into consideration"),
     )
 
-enum_curve_presets = (
-    ('CUSTOM', "Custom", "Set general parameters"),
-    ('FAST_PLANES', "Fast Planes", "Use camera facing triangles (fast but memory intensive)"),
-    ('TANGENT_SHADING', "Tangent Normal", "Use planar line segments and tangent normals"),
-    ('TRUE_NORMAL', "True Normal", "Use true normals with line segments(good for thin strands)"),
-    ('ACCURATE_PRESET', "Accurate", "Use best line segment settings (suitable for glass materials)"),
-    ('SMOOTH_CURVES', "Smooth Curves", "Use smooth cardinal curves (slowest)"),
-    ('SMOOTH_RIBBONS', "Ribbons", "Use smooth cardinal curves without thickness"),
-    )
-
 enum_curve_primitives = (
     ('TRIANGLES', "Triangles", "Create triangle geometry around strands"),
     ('LINE_SEGMENTS', "Line Segments", "Use line segment primitives"),
     ('CURVE_SEGMENTS', "Curve Segments", "Use segmented cardinal curve primitives"),
-    ('CURVE_RIBBONS', "Curve Ribbons", "Use smooth cardinal curve ribbon primitives"),
     )
 
 enum_triangle_curves = (
     ('CAMERA_TRIANGLES', "Planes", "Create individual triangles forming planes that face camera"),
-    ('RIBBON_TRIANGLES', "Ribbons", "Create individual triangles forming ribbon"),
     ('TESSELLATED_TRIANGLES', "Tessellated", "Create mesh surrounding each strand"),
     )
 
-enum_line_curves = (
-    ('ACCURATE', "Accurate", "Always take into consideration strand width for intersections"),
-    ('QT_CORRECTED', "Corrected", "Ignore width for initial intersection and correct later"),
-    ('ENDCORRECTED', "Correct found", "Ignore width for all intersections and only correct closest"),
-    ('QT_UNCORRECTED', "Uncorrected", "Calculate intersections without considering width"),
-    )
-
-enum_curves_interpolation = (
-    ('LINEAR', "Linear interpolation", "Use Linear interpolation between segments"),
-    ('CARDINAL', "Cardinal interpolation", "Use cardinal interpolation between segments"),
-    ('BSPLINE', "B-spline interpolation", "Use b-spline interpolation between segments"),
+enum_curve_shape = (
+    ('RIBBONS', "Ribbons", "Ignore thickness of each strand"),
+    ('THICK', "Thick", "Use thickness of strand when rendering"),
     )
 
 enum_tile_order = (
@@ -119,6 +97,11 @@ enum_sampling_pattern = (
     ('CORRELATED_MUTI_JITTER', "Correlated Multi-Jitter", "Use Correlated Multi-Jitter random sampling pattern"),
     )
 
+enum_integrator = (
+    ('BRANCHED_PATH', "Branched Path Tracing", "Path tracing integrator that branches on the first bounce, giving more control over the number of light and material samples"),
+    ('PATH', "Path Tracing", "Pure path tracing integrator"),
+    )
+
 
 class CyclesRenderSettings(bpy.types.PropertyGroup):
     @classmethod
@@ -145,13 +128,15 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 description="Use Open Shading Language (CPU rendering only)",
                 )
 
-        cls.progressive = BoolProperty(
-                name="Progressive",
-                description="Use progressive sampling of lighting",
-                default=True,
+        cls.progressive = EnumProperty(
+                name="Integrator",
+                description="Method to sample lights and materials",
+                items=enum_integrator,
+                default='PATH',
                 )
-        cls.squared_samples = BoolProperty(
-                name="Squared Samples",
+
+        cls.use_square_samples = BoolProperty(
+                name="Square Samples",
                 description="Square sampling values for easier artist control",
                 default=False,
                 )
@@ -407,6 +392,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 description="Tile order for rendering",
                 items=enum_tile_order,
                 default='CENTER',
+                options=set(),  # Not animatable!
                 )
         cls.use_progressive_refine = BoolProperty(
                 name="Progressive Refine",
@@ -591,31 +577,6 @@ class CyclesWorldSettings(bpy.types.PropertyGroup):
         del bpy.types.World.cycles
 
 
-class CyclesObjectSettings(bpy.types.PropertyGroup):
-    @classmethod
-    def register(cls):
-        bpy.types.Object.cycles_settings = PointerProperty(
-                name="Cycles Object Settings",
-                description="Cycles object settings",
-                type=cls,
-                ) 
-        cls.use_motion = BoolProperty(
-                name="Motion Blur",
-                description="Enable or disable motion blur for this object",
-                default=True,
-                )
-        cls.motion_multiplier = FloatProperty(
-                name="Motion Multiplier",
-                description="Multiplier for Object motion blur shutter time",
-                min=0.0, soft_max=10.0, max=100.0,
-                default=1.0,
-                )
-
-
-    @classmethod
-    def unregister(cls):
-        del bpy.types.Object.cycles_settings
-
 class CyclesVisibilitySettings(bpy.types.PropertyGroup):
     @classmethod
     def register(cls):
@@ -714,105 +675,34 @@ class CyclesCurveRenderSettings(bpy.types.PropertyGroup):
                 description="Cycles hair rendering settings",
                 type=cls,
                 )
-        cls.preset = EnumProperty(
-                name="Mode",
-                description="Hair rendering mode",
-                items=enum_curve_presets,
-                default='TRUE_NORMAL',
-                )
         cls.primitive = EnumProperty(
                 name="Primitive",
                 description="Type of primitive used for hair rendering",
                 items=enum_curve_primitives,
                 default='LINE_SEGMENTS',
                 )
-        cls.triangle_method = EnumProperty(
-                name="Mesh Geometry",
-                description="Method for creating triangle geometry",
-                items=enum_triangle_curves,
-                default='CAMERA_TRIANGLES',
-                )
-        cls.line_method = EnumProperty(
-                name="Intersection Method",
-                description="Method for line segment intersection",
-                items=enum_line_curves,
-                default='ACCURATE',
-                )
-        cls.interpolation = EnumProperty(
-                name="Interpolation",
-                description="Interpolation method",
-                items=enum_curves_interpolation,
-                default='BSPLINE',
-                )
-        cls.use_backfacing = BoolProperty(
-                name="Check back-faces",
-                description="Test back-faces of strands",
-                default=False,
-                )
-        cls.use_encasing = BoolProperty(
-                name="Exclude encasing",
-                description="Ignore strands encasing a ray's initial location",
-                default=True,
-                )
-        cls.use_tangent_normal_geometry = BoolProperty(
-                name="Tangent normal geometry",
-                description="Use the tangent normal for actual normal",
-                default=False,
-                )
-        cls.use_tangent_normal = BoolProperty(
-                name="Tangent normal default",
-                description="Use the tangent normal for all normals",
-                default=False,
-                )
-        cls.use_tangent_normal_correction = BoolProperty(
-                name="Strand slope correction",
-                description="Correct the tangent normal for the strand's slope",
-                default=False,
-                )
-        cls.use_parents = BoolProperty(
-                name="Use parent strands",
-                description="Use parents with children",
-                default=False,
+        cls.shape = EnumProperty(
+                name="Shape",
+                description="Form of hair",
+                items=enum_curve_shape,
+                default='THICK',
                 )
-        cls.use_smooth = BoolProperty(
-                name="Smooth Strands",
-                description="Use vertex normals",
+        cls.cull_backfacing = BoolProperty(
+                name="Cull back-faces",
+                description="Do not test the back-face of each strand",
                 default=True,
                 )
-        cls.use_joined = BoolProperty(
-                name="Join",
-                description="Fill gaps between segments (requires more memory)",
-                default=False,
-                )
         cls.use_curves = BoolProperty(
                 name="Use Cycles Hair Rendering",
                 description="Activate Cycles hair rendering for particle system",
                 default=True,
                 )
-        cls.segments = IntProperty(
-                name="Segments",
-                description="Number of segments between path keys (note that this combines with the 'draw step' value)",
-                min=1, max=64,
-                default=1,
-                )
         cls.resolution = IntProperty(
                 name="Resolution",
                 description="Resolution of generated mesh",
                 min=3, max=64,
                 default=3,
                 )
-        cls.normalmix = FloatProperty(
-                name="Normal mix",
-                description="Scale factor for tangent normal removal (zero gives ray normal)",
-                min=0, max=2.0,
-                default=1,
-                )
-        cls.encasing_ratio = FloatProperty(
-                name="Encasing ratio",
-                description="Scale factor for encasing strand width",
-                min=0.0, max=100.0,
-                default=1.01,
-                )
         cls.minimum_width = FloatProperty(
                 name="Minimal width",
                 description="Minimal pixel width for strands (0 - deactivated)",
index 5ef718e1db4ff18a66475c11269b0c3ca723a722..10e3c8cb2ae9f4550edd532ac2f5dab994d36586 100644 (file)
@@ -1,19 +1,17 @@
 #
-# Copyright 2011, Blender Foundation.
+# Copyright 2011-2013 Blender Foundation
 #
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
 #
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
+# http://www.apache.org/licenses/LICENSE-2.0
 #
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License
 #
 
 # <pep8 compliant>
@@ -50,6 +48,49 @@ class CyclesButtonsPanel():
         return rd.engine == 'CYCLES'
 
 
+def draw_samples_info(layout, cscene):
+    integrator = cscene.progressive
+
+    # Calculate sample values
+    if integrator == 'PATH':
+        aa = cscene.samples
+        if cscene.use_square_samples:
+            aa = aa * aa
+    else:
+        aa = cscene.aa_samples
+        d = cscene.diffuse_samples
+        g = cscene.glossy_samples
+        t = cscene.transmission_samples
+        ao = cscene.ao_samples
+        ml = cscene.mesh_light_samples
+        sss = cscene.subsurface_samples
+
+        if cscene.use_square_samples:
+            aa = aa * aa
+            d = d * d
+            g = g * g
+            t = t * t
+            ao = ao * ao
+            ml = ml * ml
+            sss = sss * sss
+
+    # Draw interface
+    # Do not draw for progressive, when Square Samples are disabled
+    if (integrator == 'BRANCHED_PATH') or (cscene.use_square_samples and integrator == 'PATH'):
+        col = layout.column(align=True)
+        col.scale_y = 0.6
+        col.label("Total Samples:")
+        col.separator()
+        if integrator == 'PATH':
+            col.label("%s AA" % aa)
+        else:
+            col.label("%s AA, %s Diffuse, %s Glossy, %s Transmission" %
+                      (aa, d * aa, g * aa, t * aa))
+            col.separator()
+            col.label("%s AO, %s Mesh Light, %s Subsurface" %
+                      (ao * aa, ml * aa, sss * aa))
+
+
 class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
     bl_label = "Sampling"
     bl_options = {'DEFAULT_CLOSED'}
@@ -60,27 +101,25 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
         scene = context.scene
         cscene = scene.cycles
         device_type = context.user_preferences.system.compute_device_type
-        
+
         row = layout.row(align=True)
         row.menu("CYCLES_MT_sampling_presets", text=bpy.types.CYCLES_MT_sampling_presets.bl_label)
         row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMIN")
         row.operator("render.cycles_sampling_preset_add", text="", icon="ZOOMOUT").remove_active = True
 
         row = layout.row()
-        row.prop(cscene, "progressive")
-        
-        if not cscene.progressive:
-            row.prop(cscene, "squared_samples")
-        
+        row.prop(cscene, "progressive", text="")
+        row.prop(cscene, "use_square_samples")
+
         split = layout.split()
-        
+
         col = split.column()
         sub = col.column(align=True)
         sub.label("Settings:")
         sub.prop(cscene, "seed")
         sub.prop(cscene, "sample_clamp")
 
-        if cscene.progressive:
+        if cscene.progressive == 'PATH':
             col = split.column()
             sub = col.column(align=True)
             sub.label(text="Samples:")
@@ -110,6 +149,8 @@ class CyclesRender_PT_sampling(CyclesButtonsPanel, Panel):
                 layout.row().prop(cscene, "use_layer_samples")
                 break
 
+        draw_samples_info(layout, cscene)
+
 
 class CyclesRender_PT_light_paths(CyclesButtonsPanel, Panel):
     bl_label = "Light Paths"
@@ -211,8 +252,8 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
         col = split.column(align=True)
 
         col.label(text="Threads:")
-        col.row().prop(rd, "threads_mode", expand=True)
-        sub = col.column()
+        col.row(align=True).prop(rd, "threads_mode", expand=True)
+        sub = col.column(align=True)
         sub.enabled = rd.threads_mode == 'FIXED'
         sub.prop(rd, "threads")
 
@@ -225,7 +266,7 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
 
         sub.prop(cscene, "use_progressive_refine")
 
-        subsub = sub.column()
+        subsub = sub.column(align=True)
         subsub.enabled = not rd.use_border
         subsub.prop(rd, "use_save_buffers")
 
@@ -244,7 +285,7 @@ class CyclesRender_PT_performance(CyclesButtonsPanel, Panel):
 
         col.separator()
 
-        col.label(text="Acceleration structure:")   
+        col.label(text="Acceleration structure:")
         col.prop(cscene, "debug_use_spatial_splits")
 
 
@@ -378,7 +419,7 @@ class CyclesRender_PT_layer_passes(CyclesButtonsPanel, Panel):
         row.prop(rl, "use_pass_subsurface_direct", text="Direct", toggle=True)
         row.prop(rl, "use_pass_subsurface_indirect", text="Indirect", toggle=True)
         row.prop(rl, "use_pass_subsurface_color", text="Color", toggle=True)
-        
+
         col.separator()
         col.prop(rl, "use_pass_emit", text="Emission")
         col.prop(rl, "use_pass_environment")
@@ -553,7 +594,8 @@ class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel):
     @classmethod
     def poll(cls, context):
         ob = context.object
-        return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META', 'LAMP'}
+        return (CyclesButtonsPanel.poll(context) and
+                ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META', 'LAMP'})
 
     def draw(self, context):
         layout = self.layout
@@ -572,26 +614,6 @@ class CyclesObject_PT_ray_visibility(CyclesButtonsPanel, Panel):
             flow.prop(visibility, "shadow")
 
 
-class CyclesObject_PT_settings(CyclesButtonsPanel, Panel):
-    bl_label = "Settings"
-    bl_context = "object"
-    bl_options = {'DEFAULT_CLOSED'}
-
-    @classmethod
-    def poll(cls, context):
-        ob = context.object
-        return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META', 'LAMP'}
-
-    def draw(self, context):
-        layout = self.layout
-
-        ob = context.object
-        settings = ob.cycles_settings
-        
-        layout.prop(settings, "use_motion")
-        #layout.prop(settings, "motion_multiplier")
-
-
 class CYCLES_OT_use_shading_nodes(Operator):
     """Enable nodes on a material, world or lamp"""
     bl_idname = "cycles.use_shading_nodes"
@@ -693,7 +715,7 @@ class CyclesLamp_PT_lamp(CyclesButtonsPanel, Panel):
                 sub.prop(lamp, "size", text="Size X")
                 sub.prop(lamp, "size_y", text="Size Y")
 
-        if not cscene.progressive:
+        if cscene.progressive == 'BRANCHED_PATH':
             col.prop(clamp, "samples")
 
         col = split.column()
@@ -1172,44 +1194,17 @@ class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
 
         layout.active = ccscene.use_curves
 
-        layout.prop(ccscene, "preset", text="Mode")
-
-        if ccscene.preset == 'CUSTOM':
-            layout.prop(ccscene, "primitive", text="Primitive")
-
-            if ccscene.primitive == 'TRIANGLES':
-                layout.prop(ccscene, "triangle_method", text="Method")
-                if ccscene.triangle_method == 'TESSELLATED_TRIANGLES':
-                    layout.prop(ccscene, "resolution", text="Resolution")
-                layout.prop(ccscene, "use_smooth", text="Smooth")
-            elif ccscene.primitive == 'LINE_SEGMENTS':
-                layout.prop(ccscene, "use_backfacing", text="Check back-faces")
-
-                row = layout.row()
-                row.prop(ccscene, "use_encasing", text="Exclude encasing")
-                sub = row.row()
-                sub.active = ccscene.use_encasing
-                sub.prop(ccscene, "encasing_ratio", text="Ratio for encasing")
-
-                layout.prop(ccscene, "line_method", text="Method")
-                layout.prop(ccscene, "use_tangent_normal", text="Use tangent normal as default")
-                layout.prop(ccscene, "use_tangent_normal_geometry", text="Use tangent normal geometry")
-                layout.prop(ccscene, "use_tangent_normal_correction", text="Correct tangent normal for slope")
-                layout.prop(ccscene, "interpolation", text="Interpolation")
-
-                row = layout.row()
-                row.prop(ccscene, "segments", text="Segments")
-                row.prop(ccscene, "normalmix", text="Ray Mix")
-            elif ccscene.primitive in {'CURVE_SEGMENTS', 'CURVE_RIBBONS'}:
-                layout.prop(ccscene, "subdivisions", text="Curve subdivisions")
-                layout.prop(ccscene, "use_backfacing", text="Check back-faces")
-
-                layout.prop(ccscene, "interpolation", text="Interpolation")
-                row = layout.row()
-                row.prop(ccscene, "segments", text="Segments")
-
-            row = layout.row()
-            row.prop(ccscene, "use_parents", text="Include parents")
+        layout.prop(ccscene, "primitive", text="Primitive")
+        layout.prop(ccscene, "shape", text="Shape")
+
+        if ccscene.primitive == 'TRIANGLES':
+            if ccscene.shape == 'THICK':
+                layout.prop(ccscene, "resolution", text="Resolution")
+        elif ccscene.primitive == 'LINE_SEGMENTS':
+            layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
+        elif ccscene.primitive in {'CURVE_SEGMENTS', 'CURVE_RIBBONS'}:
+            layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
+            layout.prop(ccscene, "subdivisions", text="Curve subdivisions")
 
         row = layout.row()
         row.prop(ccscene, "minimum_width", text="Min Pixels")
index 71fba5549da6ca4f3f57f21aa16a1c9718e6cac4..4c6b42a9cbc3f4726ba8220bb939cbbd0288e5f6 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include "camera.h"
index 27c52797f5fb64caa0e65d608a2d78b4b4112f92..331f77eb4d650556935897a0cfae123094ef9396 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include "attribute.h"
@@ -37,15 +35,14 @@ void curveinterp_v3_v3v3v3v3(float3 *p, float3 *v1, float3 *v2, float3 *v3, floa
 void interp_weights(float t, float data[4], int type);
 float shaperadius(float shape, float root, float tip, float time);
 void InterpolateKeySegments(int seg, int segno, int key, int curve, float3 *keyloc, float *time, ParticleCurveData *CData, int interpolation);
-bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int uv_num);
-bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int vcol_num);
-bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background);
-void ExportCurveSegments(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments);
-void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int segments, float3 RotCam);
-void ExportCurveTriangleRibbons(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int segments);
-void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int resolution, int segments);
-void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments, int vert_offset, int resol, float3 *uvdata);
-void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments, int vert_offset, int resol, float3 *fdata);
+bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int uv_num);
+bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int vcol_num);
+bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background);
+void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData);
+void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, float3 RotCam);
+void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int resolution);
+void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata);
+void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *fdata);
 
 ParticleCurveData::ParticleCurveData()
 {
@@ -157,7 +154,7 @@ void InterpolateKeySegments(int seg, int segno, int key, int curve, float3 *keyl
                curveinterp_v3_v3v3v3v3(keyloc, &ckey_loc1, &ckey_loc2, &ckey_loc3, &ckey_loc4, t);
 }
 
-bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background)
+bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background)
 {
 
        int curvenum = 0;
@@ -188,7 +185,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
                                int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_psys.settings().draw_percentage() / 100.0f);
                                int totcurves = totchild;
                                
-                               if(use_parents || b_psys.settings().child_type() == 0)
+                               if(b_psys.settings().child_type() == 0)
                                        totcurves += totparts;
 
                                if(totcurves == 0)
@@ -208,7 +205,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
                                CData->psys_closetip.push_back(get_boolean(cpsys, "use_closetip"));
 
                                int pa_no = 0;
-                               if(!use_parents && !(b_psys.settings().child_type() == 0))
+                               if(!(b_psys.settings().child_type() == 0))
                                        pa_no = totparts;
 
                                for(; pa_no < totparts+totchild; pa_no++) {
@@ -244,7 +241,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
 
 }
 
-bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int uv_num)
+bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int uv_num)
 {
 #if 0
        int keyno = 0;
@@ -279,14 +276,14 @@ bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Parti
                                int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_psys.settings().draw_percentage() / 100.0f);
                                int totcurves = totchild;
                                
-                               if (use_parents || b_psys.settings().child_type() == 0)
+                               if (b_psys.settings().child_type() == 0)
                                        totcurves += totparts;
 
                                if (totcurves == 0)
                                        continue;
 
                                int pa_no = 0;
-                               if(!use_parents && !(b_psys.settings().child_type() == 0))
+                               if(!(b_psys.settings().child_type() == 0))
                                        pa_no = totparts;
 
                                BL::ParticleSystem::particles_iterator b_pa;
@@ -315,7 +312,7 @@ bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Parti
 
 }
 
-bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool use_parents, bool background, int vcol_num)
+bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, ParticleCurveData *CData, bool background, int vcol_num)
 {
 #if 0
        int keyno = 0;
@@ -348,14 +345,14 @@ bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
                                int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_psys.settings().draw_percentage() / 100.0f);
                                int totcurves = totchild;
                                
-                               if (use_parents || b_psys.settings().child_type() == 0)
+                               if (b_psys.settings().child_type() == 0)
                                        totcurves += totparts;
 
                                if (totcurves == 0)
                                        continue;
 
                                int pa_no = 0;
-                               if(!use_parents && !(b_psys.settings().child_type() == 0))
+                               if(!(b_psys.settings().child_type() == 0))
                                        pa_no = totparts;
 
                                BL::ParticleSystem::particles_iterator b_pa;
@@ -396,7 +393,7 @@ static void set_resolution(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, BL::S
        }
 }
 
-void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int segments, float3 RotCam)
+void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, float3 RotCam)
 {
        int vertexno = mesh->verts.size();
        int vertexindex = vertexno;
@@ -404,52 +401,44 @@ void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, int interpo
        for( int sys = 0; sys < CData->psys_firstcurve.size() ; sys++) {
                for( int curve = CData->psys_firstcurve[sys]; curve < CData->psys_firstcurve[sys] + CData->psys_curvenum[sys] ; curve++) {
 
-                       for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-
-                               int subv = 1;
-                               float3 xbasis;
-
-                               float3 v1;
-
-                               if(curvekey == CData->curve_firstkey[curve]) {
-                                       subv = 0;
-                                       v1 = CData->curvekey_co[min(curvekey+2,CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)] - CData->curvekey_co[curvekey];
-                               }
-                               else if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)
-                                       v1 = CData->curvekey_co[curvekey] - CData->curvekey_co[max(curvekey - 2, CData->curve_firstkey[curve])];
+                       float3 xbasis;
+                       float3 v1;
+                       float time = 0.0f;
+                       float3 ickey_loc = CData->curvekey_co[CData->curve_firstkey[curve]];
+                       float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.0f);
+                       v1 = CData->curvekey_co[CData->curve_firstkey[curve] + 1] - CData->curvekey_co[CData->curve_firstkey[curve]];
+                       xbasis = normalize(cross(RotCam - ickey_loc,v1));
+                       float3 ickey_loc_shfl = ickey_loc - radius * xbasis;
+                       float3 ickey_loc_shfr = ickey_loc + radius * xbasis;
+                       mesh->verts.push_back(ickey_loc_shfl);
+                       mesh->verts.push_back(ickey_loc_shfr);
+                       vertexindex += 2;
+
+                       for( int curvekey = CData->curve_firstkey[curve] + 1; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve]; curvekey++) {
+                               ickey_loc = CData->curvekey_co[curvekey];
+
+                               if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)
+                                       v1 = CData->curvekey_co[curvekey] - CData->curvekey_co[max(curvekey - 1, CData->curve_firstkey[curve])];
                                else 
                                        v1 = CData->curvekey_co[curvekey + 1] - CData->curvekey_co[curvekey - 1];
 
+                               time = CData->curvekey_time[curvekey]/CData->curve_length[curve];
+                               radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
 
-                               for (; subv <= segments; subv++) {
-
-                                       float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
-                                       float time = 0.0f;
-
-                                       if ((interpolation == CURVE_BSPLINE) && (curvekey == CData->curve_firstkey[curve]) && (subv == 0))
-                                               ickey_loc = CData->curvekey_co[curvekey];
-                                       else
-                                               InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
+                               if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)
+                                       radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.95f);
 
-                                       float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
+                               if(CData->psys_closetip[sys] && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1))
+                                       radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], 0.0f, 0.95f);
 
-                                       if((curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2) && (subv == segments))
-                                               radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.95f);
-
-                                       if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
-                                               radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], 0.0f, 0.95f);
-
-                                       xbasis = normalize(cross(RotCam - ickey_loc,v1));
-                                       float3 ickey_loc_shfl = ickey_loc - radius * xbasis;
-                                       float3 ickey_loc_shfr = ickey_loc + radius * xbasis;
-                                       mesh->verts.push_back(ickey_loc_shfl);
-                                       mesh->verts.push_back(ickey_loc_shfr);
-                                       if(subv!=0) {
-                                               mesh->add_triangle(vertexindex-2, vertexindex, vertexindex-1, CData->psys_shader[sys], use_smooth);
-                                               mesh->add_triangle(vertexindex+1, vertexindex-1, vertexindex, CData->psys_shader[sys], use_smooth);
-                                       }
-                                       vertexindex += 2;
-                               }
+                               xbasis = normalize(cross(RotCam - ickey_loc,v1));
+                               float3 ickey_loc_shfl = ickey_loc - radius * xbasis;
+                               float3 ickey_loc_shfr = ickey_loc + radius * xbasis;
+                               mesh->verts.push_back(ickey_loc_shfl);
+                               mesh->verts.push_back(ickey_loc_shfr);
+                               mesh->add_triangle(vertexindex-2, vertexindex, vertexindex-1, CData->psys_shader[sys], true);
+                               mesh->add_triangle(vertexindex+1, vertexindex-1, vertexindex, CData->psys_shader[sys], true);
+                               vertexindex += 2;
                        }
                }
        }
@@ -464,120 +453,7 @@ void ExportCurveTrianglePlanes(Mesh *mesh, ParticleCurveData *CData, int interpo
        /* texture coords still needed */
 }
 
-void ExportCurveTriangleRibbons(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int segments)
-{
-       int vertexno = mesh->verts.size();
-       int vertexindex = vertexno;
-
-       for( int sys = 0; sys < CData->psys_firstcurve.size() ; sys++) {
-               for( int curve = CData->psys_firstcurve[sys]; curve < CData->psys_firstcurve[sys] + CData->psys_curvenum[sys] ; curve++) {
-
-                       float3 firstxbasis = cross(make_float3(1.0f,0.0f,0.0f),CData->curvekey_co[CData->curve_firstkey[curve]+1] - CData->curvekey_co[CData->curve_firstkey[curve]]);
-                       if(len_squared(firstxbasis)!= 0.0f)
-                               firstxbasis = normalize(firstxbasis);
-                       else
-                               firstxbasis = normalize(cross(make_float3(0.0f,1.0f,0.0f),CData->curvekey_co[CData->curve_firstkey[curve]+1] - CData->curvekey_co[CData->curve_firstkey[curve]]));
-
-                       for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-
-                               float3 xbasis = firstxbasis;
-                               float3 v1;
-                               float3 v2;
-
-                               if(curvekey == CData->curve_firstkey[curve]) {
-                                       v1 = CData->curvekey_co[min(curvekey+2,CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)] - CData->curvekey_co[curvekey+1];
-                                       v2 = CData->curvekey_co[curvekey+1] - CData->curvekey_co[curvekey];
-                               }
-                               else if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1) {
-                                       v1 = CData->curvekey_co[curvekey] - CData->curvekey_co[curvekey-1];
-                                       v2 = CData->curvekey_co[curvekey-1] - CData->curvekey_co[max(curvekey-2,CData->curve_firstkey[curve])];
-                               }
-                               else {
-                                       v1 = CData->curvekey_co[curvekey+1] - CData->curvekey_co[curvekey];
-                                       v2 = CData->curvekey_co[curvekey] - CData->curvekey_co[curvekey-1];
-                               }
-
-                               xbasis = cross(v1,v2);
-
-                               if(len_squared(xbasis) >= 0.05f * len_squared(v1) * len_squared(v2)) {
-                                       firstxbasis = normalize(xbasis);
-                                       break;
-                               }
-                       }
-
-                       for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-
-                               int subv = 1;
-                               float3 v1;
-                               float3 v2;
-                               float3 xbasis;
-
-                               if(curvekey == CData->curve_firstkey[curve]) {
-                                       subv = 0;
-                                       v1 = CData->curvekey_co[min(curvekey+2,CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1)] - CData->curvekey_co[curvekey+1];
-                                       v2 = CData->curvekey_co[curvekey+1] - CData->curvekey_co[curvekey];
-                               }
-                               else if(curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1) {
-                                       v1 = CData->curvekey_co[curvekey] - CData->curvekey_co[curvekey-1];
-                                       v2 = CData->curvekey_co[curvekey-1] - CData->curvekey_co[max(curvekey-2,CData->curve_firstkey[curve])];
-                               }
-                               else {
-                                       v1 = CData->curvekey_co[curvekey+1] - CData->curvekey_co[curvekey];
-                                       v2 = CData->curvekey_co[curvekey] - CData->curvekey_co[curvekey-1];
-                               }
-
-                               xbasis = cross(v1,v2);
-
-                               if(len_squared(xbasis) >= 0.05f * len_squared(v1) * len_squared(v2)) {
-                                       xbasis = normalize(xbasis);
-                                       firstxbasis = xbasis;
-                               }
-                               else
-                                       xbasis = firstxbasis;
-
-                               for (; subv <= segments; subv++) {
-
-                                       float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
-                                       float time = 0.0f;
-
-                                       if ((interpolation == CURVE_BSPLINE) && (curvekey == CData->curve_firstkey[curve]) && (subv == 0))
-                                               ickey_loc = CData->curvekey_co[curvekey];
-                                       else
-                                               InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
-                                       float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
-
-                                       if((curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2) && (subv == segments))
-                                               radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.95f);
-
-                                       if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
-                                               radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], 0.0f, 0.95f);
-
-                                       float3 ickey_loc_shfl = ickey_loc - radius * xbasis;
-                                       float3 ickey_loc_shfr = ickey_loc + radius * xbasis;
-                                       mesh->verts.push_back(ickey_loc_shfl);
-                                       mesh->verts.push_back(ickey_loc_shfr);
-                                       if(subv!=0) {
-                                               mesh->add_triangle(vertexindex-2, vertexindex, vertexindex-1, CData->psys_shader[sys], use_smooth);
-                                               mesh->add_triangle(vertexindex+1, vertexindex-1, vertexindex, CData->psys_shader[sys], use_smooth);
-                                       }
-                                       vertexindex += 2;
-                               }
-                       }
-               }
-       }
-
-       mesh->reserve(mesh->verts.size(), mesh->triangles.size(), 0, 0);
-       mesh->attributes.remove(ATTR_STD_VERTEX_NORMAL);
-       mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
-       mesh->add_face_normals();
-       mesh->add_vertex_normals();
-       mesh->attributes.remove(ATTR_STD_FACE_NORMAL);
-       /* texture coords still needed */
-
-}
-
-void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int interpolation, bool use_smooth, int resolution, int segments)
+void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int resolution)
 {
        int vertexno = mesh->verts.size();
        int vertexindex = vertexno;
@@ -652,22 +528,19 @@ void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int inter
 
                                ybasis = normalize(cross(xbasis,v2));
 
-                               for (; subv <= segments; subv++) {
+                               for (; subv <= 1; subv++) {
 
                                        float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
                                        float time = 0.0f;
 
-                                       if ((interpolation == CURVE_BSPLINE) && (curvekey == CData->curve_firstkey[curve]) && (subv == 0))
-                                               ickey_loc = CData->curvekey_co[curvekey];
-                                       else
-                                               InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
+                                       InterpolateKeySegments(subv, 1, curvekey, curve, &ickey_loc, &time, CData , 1);
 
                                        float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
 
-                                       if((curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2) && (subv == segments))
+                                       if((curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2) && (subv == 1))
                                                radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], 0.95f);
 
-                                       if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
+                                       if(CData->psys_closetip[sys] && (subv == 1) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
                                                radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], 0.0f, 0.95f);
 
                                        float angle = M_2PI_F / (float)resolution;
@@ -678,11 +551,11 @@ void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int inter
 
                                        if(subv!=0) {
                                                for(int section = 0 ; section < resolution - 1; section++) {
-                                                       mesh->add_triangle(vertexindex - resolution + section, vertexindex + section, vertexindex - resolution + section + 1, CData->psys_shader[sys], use_smooth);
-                                                       mesh->add_triangle(vertexindex + section + 1, vertexindex - resolution + section + 1, vertexindex + section, CData->psys_shader[sys], use_smooth);
+                                                       mesh->add_triangle(vertexindex - resolution + section, vertexindex + section, vertexindex - resolution + section + 1, CData->psys_shader[sys], true);
+                                                       mesh->add_triangle(vertexindex + section + 1, vertexindex - resolution + section + 1, vertexindex + section, CData->psys_shader[sys], true);
                                                }
-                                               mesh->add_triangle(vertexindex-1, vertexindex + resolution - 1, vertexindex - resolution, CData->psys_shader[sys], use_smooth);
-                                               mesh->add_triangle(vertexindex, vertexindex - resolution , vertexindex + resolution - 1, CData->psys_shader[sys], use_smooth);
+                                               mesh->add_triangle(vertexindex-1, vertexindex + resolution - 1, vertexindex - resolution, CData->psys_shader[sys], true);
+                                               mesh->add_triangle(vertexindex, vertexindex - resolution , vertexindex + resolution - 1, CData->psys_shader[sys], true);
                                        }
                                        vertexindex += resolution;
                                }
@@ -700,7 +573,7 @@ void ExportCurveTriangleGeometry(Mesh *mesh, ParticleCurveData *CData, int inter
        /* texture coords still needed */
 }
 
-static void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments)
+void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CData)
 {
        int num_keys = 0;
        int num_curves = 0;
@@ -725,33 +598,19 @@ static void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CDa
 
                        size_t num_curve_keys = 0;
 
-                       for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
-
-                               int subv = 1;
-                               if(curvekey == CData->curve_firstkey[curve])
-                                       subv = 0;
-
-                               for (; subv <= segments; subv++) {
-
-                                       float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
-                                       float time = 0.0f;
-
-                                       if((interpolation == CURVE_BSPLINE) && (curvekey == CData->curve_firstkey[curve]) && (subv == 0))
-                                               ickey_loc = CData->curvekey_co[curvekey];
-                                       else
-                                               InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
-                                       float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
+                       for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve]; curvekey++) {
+                               float3 ickey_loc = CData->curvekey_co[curvekey];
+                               float time = CData->curvekey_time[curvekey]/CData->curve_length[curve];
+                               float radius = shaperadius(CData->psys_shape[sys], CData->psys_rootradius[sys], CData->psys_tipradius[sys], time);
 
-                                       if(CData->psys_closetip[sys] && (subv == segments) && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 2))
-                                               radius =0.0f;
+                               if(CData->psys_closetip[sys] && (curvekey == CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1))
+                                       radius =0.0f;
 
-                                       mesh->add_curve_key(ickey_loc, radius);
-                                       if(attr_intercept)
-                                               attr_intercept->add(time);
+                               mesh->add_curve_key(ickey_loc, radius);
+                               if(attr_intercept)
+                                       attr_intercept->add(time);
 
-                                       num_curve_keys++;
-                               }
+                               num_curve_keys++;
                        }
 
                        mesh->add_curve(num_keys, num_curve_keys, CData->psys_shader[sys]);
@@ -769,7 +628,7 @@ static void ExportCurveSegments(Scene *scene, Mesh *mesh, ParticleCurveData *CDa
        }
 }
 
-void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments, int vert_offset, int resol, float3 *uvdata)
+void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *uvdata)
 {
        if(uvdata == NULL)
                return;
@@ -784,56 +643,42 @@ void ExportCurveTriangleUV(Mesh *mesh, ParticleCurveData *CData, int interpolati
 
                        for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
 
-                               int subv = 1;
+                               time = CData->curvekey_time[curvekey]/CData->curve_length[curve];
+
+                               for(int section = 0 ; section < resol; section++) {
+                                       uvdata[vertexindex] = CData->curve_uv[curve];
+                                       uvdata[vertexindex].z = prevtime;
+                                       vertexindex++;
+                                       uvdata[vertexindex] = CData->curve_uv[curve];
+                                       uvdata[vertexindex].z = time;
+                                       vertexindex++;
+                                       uvdata[vertexindex] = CData->curve_uv[curve];
+                                       uvdata[vertexindex].z = prevtime;
+                                       vertexindex++;
+                                       uvdata[vertexindex] = CData->curve_uv[curve];
+                                       uvdata[vertexindex].z = time;
+                                       vertexindex++;
+                                       uvdata[vertexindex] = CData->curve_uv[curve];
+                                       uvdata[vertexindex].z = prevtime;
+                                       vertexindex++;
+                                       uvdata[vertexindex] = CData->curve_uv[curve];
+                                       uvdata[vertexindex].z = time;
+                                       vertexindex++;
+                               }
 
-                               if (curvekey == CData->curve_firstkey[curve])
-                                       subv = 0;
+                               prevtime = time;                        
                                
-                               for (; subv <= segments; subv++) {
-
-                                       float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
-
-                                       InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
-                                       if(subv!=0) {
-                                               for(int section = 0 ; section < resol; section++) {
-                                                       uvdata[vertexindex] = CData->curve_uv[curve];
-                                                       uvdata[vertexindex].z = prevtime;
-                                                       vertexindex++;
-                                                       uvdata[vertexindex] = CData->curve_uv[curve];
-                                                       uvdata[vertexindex].z = time;
-                                                       vertexindex++;
-                                                       uvdata[vertexindex] = CData->curve_uv[curve];
-                                                       uvdata[vertexindex].z = prevtime;
-                                                       vertexindex++;
-                                                       uvdata[vertexindex] = CData->curve_uv[curve];
-                                                       uvdata[vertexindex].z = time;
-                                                       vertexindex++;
-                                                       uvdata[vertexindex] = CData->curve_uv[curve];
-                                                       uvdata[vertexindex].z = prevtime;
-                                                       vertexindex++;
-                                                       uvdata[vertexindex] = CData->curve_uv[curve];
-                                                       uvdata[vertexindex].z = time;
-                                                       vertexindex++;
-                                               }
-                                       }
-
-                                       prevtime = time;
-                               }
                        }
                }
        }
 
 }
 
-void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int interpolation, int segments, int vert_offset, int resol, float3 *fdata)
+void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int vert_offset, int resol, float3 *fdata)
 {
        if(fdata == NULL)
                return;
 
-       float time = 0.0f;
-//     float prevtime = 0.0f; // UNUSED
-
        int vertexindex = vert_offset;
 
        for( int sys = 0; sys < CData->psys_firstcurve.size() ; sys++) {
@@ -841,35 +686,19 @@ void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int interpola
 
                        for( int curvekey = CData->curve_firstkey[curve]; curvekey < CData->curve_firstkey[curve] + CData->curve_keynum[curve] - 1; curvekey++) {
 
-                               int subv = 1;
-
-                               if (curvekey == CData->curve_firstkey[curve])
-                                       subv = 0;
-                               
-                               for (; subv <= segments; subv++) {
-
-                                       float3 ickey_loc = make_float3(0.0f,0.0f,0.0f);
-
-                                       InterpolateKeySegments(subv, segments, curvekey, curve, &ickey_loc, &time, CData , interpolation);
-
-                                       if(subv!=0) {
-                                               for(int section = 0 ; section < resol; section++) {
-                                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
-                                                       vertexindex++;
-                                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
-                                                       vertexindex++;
-                                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
-                                                       vertexindex++;
-                                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
-                                                       vertexindex++;
-                                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
-                                                       vertexindex++;
-                                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
-                                                       vertexindex++;
-                                               }
-                                       }
-
-                                       // prevtime = time;  // UNUSED
+                               for(int section = 0 ; section < resol; section++) {
+                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+                                       vertexindex++;
+                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+                                       vertexindex++;
+                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+                                       vertexindex++;
+                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+                                       vertexindex++;
+                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+                                       vertexindex++;
+                                       fdata[vertexindex] = color_srgb_to_scene_linear(CData->curve_vcol[curve]);
+                                       vertexindex++;
                                }
                        }
                }
@@ -882,8 +711,6 @@ void ExportCurveTriangleVcol(Mesh *mesh, ParticleCurveData *CData, int interpola
 void BlenderSync::sync_curve_settings()
 {
        PointerRNA csscene = RNA_pointer_get(&b_scene.ptr, "cycles_curves");
-       
-       int preset = get_enum(csscene, "preset");
 
        CurveSystemManager *curve_system_manager = scene->curve_system_manager;
        CurveSystemManager prev_curve_system_manager = *curve_system_manager;
@@ -892,86 +719,40 @@ void BlenderSync::sync_curve_settings()
        curve_system_manager->minimum_width = get_float(csscene, "minimum_width");
        curve_system_manager->maximum_width = get_float(csscene, "maximum_width");
 
-       if(preset == CURVE_CUSTOM) {
-               /*custom properties*/
-               curve_system_manager->primitive = get_enum(csscene, "primitive");
-               curve_system_manager->line_method = get_enum(csscene, "line_method");
-               curve_system_manager->interpolation = get_enum(csscene, "interpolation");
-               curve_system_manager->triangle_method = get_enum(csscene, "triangle_method");
-               curve_system_manager->resolution = get_int(csscene, "resolution");
-               curve_system_manager->segments = get_int(csscene, "segments");
-               curve_system_manager->use_smooth = get_boolean(csscene, "use_smooth");
-               curve_system_manager->subdivisions = get_int(csscene, "subdivisions");
-
-               curve_system_manager->normalmix = get_float(csscene, "normalmix");
-               curve_system_manager->encasing_ratio = get_float(csscene, "encasing_ratio");
-
-               curve_system_manager->use_parents = get_boolean(csscene, "use_parents");
-               curve_system_manager->use_encasing = get_boolean(csscene, "use_encasing");
-               curve_system_manager->use_backfacing = get_boolean(csscene, "use_backfacing");
-               curve_system_manager->use_joined = get_boolean(csscene, "use_joined");
-               curve_system_manager->use_tangent_normal = get_boolean(csscene, "use_tangent_normal");
-               curve_system_manager->use_tangent_normal_geometry = get_boolean(csscene, "use_tangent_normal_geometry");
-               curve_system_manager->use_tangent_normal_correction = get_boolean(csscene, "use_tangent_normal_correction");
+       curve_system_manager->primitive = get_enum(csscene, "primitive");
+       curve_system_manager->curve_shape = get_enum(csscene, "shape");
+       curve_system_manager->resolution = get_int(csscene, "resolution");
+       curve_system_manager->subdivisions = get_int(csscene, "subdivisions");
+       curve_system_manager->use_backfacing = !get_boolean(csscene, "cull_backfacing");
+
+       curve_system_manager->encasing_ratio = 1.01f;
+
+       if(curve_system_manager->primitive == CURVE_TRIANGLES && curve_system_manager->curve_shape == CURVE_RIBBON) {
+               /*camera facing planes*/
+               curve_system_manager->triangle_method = CURVE_CAMERA_TRIANGLES;
+               curve_system_manager->resolution = 1;
        }
-       else {
-               curve_system_manager->primitive = CURVE_LINE_SEGMENTS;
-               curve_system_manager->interpolation = CURVE_CARDINAL;
-               curve_system_manager->normalmix = 1.0f;
-               curve_system_manager->encasing_ratio = 1.01f;
-               curve_system_manager->use_parents = false;
-               curve_system_manager->segments = 1;
-               curve_system_manager->use_joined = false;
-
-               switch(preset) {
-                       case CURVE_FAST_PLANES:
-                               /*camera facing planes*/
-                               curve_system_manager->primitive = CURVE_TRIANGLES;
-                               curve_system_manager->triangle_method = CURVE_CAMERA_TRIANGLES;
-                               curve_system_manager->use_smooth = true;
-                               curve_system_manager->resolution = 1;
-                               break;
-                       case CURVE_TANGENT_SHADING:
-                               /*tangent shading*/
-                               curve_system_manager->line_method = CURVE_UNCORRECTED;
-                               curve_system_manager->use_encasing = true;
-                               curve_system_manager->use_backfacing = false;
-                               curve_system_manager->use_tangent_normal = true;
-                               curve_system_manager->use_tangent_normal_geometry = true;
-                               curve_system_manager->use_tangent_normal_correction = false;
-                               break;
-                       case CURVE_TRUE_NORMAL:
-                               /*True Normal*/
-                               curve_system_manager->line_method = CURVE_CORRECTED;
-                               curve_system_manager->use_encasing = true;
-                               curve_system_manager->use_backfacing = false;
-                               curve_system_manager->use_tangent_normal = false;
-                               curve_system_manager->use_tangent_normal_geometry = false;
-                               curve_system_manager->use_tangent_normal_correction = false;
-                               break;
-                       case CURVE_ACCURATE_PRESET:
-                               /*Accurate*/
-                               curve_system_manager->line_method = CURVE_ACCURATE;
-                               curve_system_manager->use_encasing = false;
-                               curve_system_manager->use_backfacing = true;
-                               curve_system_manager->use_tangent_normal = false;
-                               curve_system_manager->use_tangent_normal_geometry = false;
-                               curve_system_manager->use_tangent_normal_correction = false;
-                               break;
-                       case CURVE_SMOOTH_CURVES:
-                               /*Cardinal curves preset*/
-                               curve_system_manager->primitive = CURVE_SEGMENTS;
-                               curve_system_manager->use_backfacing = true;
-                               curve_system_manager->subdivisions = 4;
-                               break;
-                       case CURVE_SMOOTH_RIBBONS:
-                               /*Cardinal ribbons preset*/
-                               curve_system_manager->primitive = CURVE_RIBBONS;
-                               curve_system_manager->use_backfacing = false;
-                               curve_system_manager->subdivisions = 4;
-                               break;
-               }
-               
+       if(curve_system_manager->primitive == CURVE_TRIANGLES && curve_system_manager->curve_shape == CURVE_THICK) {
+               /*camera facing planes*/
+               curve_system_manager->triangle_method = CURVE_TESSELATED_TRIANGLES;
+       }
+       if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) {
+               /*tangent shading*/
+               curve_system_manager->line_method = CURVE_UNCORRECTED;
+               curve_system_manager->use_encasing = true;
+               curve_system_manager->use_backfacing = false;
+               curve_system_manager->use_tangent_normal = true;
+               curve_system_manager->use_tangent_normal_geometry = true;
+       }
+       if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_THICK) {
+               curve_system_manager->line_method = CURVE_ACCURATE;
+               curve_system_manager->use_encasing = false;
+               curve_system_manager->use_tangent_normal = false;
+               curve_system_manager->use_tangent_normal_geometry = false;
+       }
+       if(curve_system_manager->primitive == CURVE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) {
+               curve_system_manager->primitive = CURVE_RIBBONS;
+               curve_system_manager->use_backfacing = false;
        }
 
        if(curve_system_manager->modified_mesh(prev_curve_system_manager))
@@ -1013,13 +794,8 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
        }
 
        int primitive = scene->curve_system_manager->primitive;
-       int interpolation = scene->curve_system_manager->interpolation;
        int triangle_method = scene->curve_system_manager->triangle_method;
        int resolution = scene->curve_system_manager->resolution;
-       int segments = scene->curve_system_manager->segments;
-       bool use_smooth = scene->curve_system_manager->use_smooth;
-       bool use_parents = scene->curve_system_manager->use_parents;
-       bool export_tgs = scene->curve_system_manager->use_joined;
        size_t vert_num = mesh->verts.size();
        size_t tri_num = mesh->triangles.size();
        int used_res = 1;
@@ -1031,7 +807,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
        if(!preview)
                set_resolution(mesh, &b_mesh, &b_ob, &b_scene, true);
 
-       ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, use_parents, !preview);
+       ObtainCacheParticleData(mesh, &b_mesh, &b_ob, &CData, !preview);
 
        /* obtain camera parameters */
        BL::Object b_CamOb = b_scene.camera();
@@ -1046,30 +822,14 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
        /* add hair geometry to mesh */
        if(primitive == CURVE_TRIANGLES){
                if(triangle_method == CURVE_CAMERA_TRIANGLES)
-                       ExportCurveTrianglePlanes(mesh, &CData, interpolation, use_smooth, segments, RotCam);
-               else if(triangle_method == CURVE_RIBBON_TRIANGLES)
-                       ExportCurveTriangleRibbons(mesh, &CData, interpolation, use_smooth, segments);
+                       ExportCurveTrianglePlanes(mesh, &CData, RotCam);
                else {
-                       ExportCurveTriangleGeometry(mesh, &CData, interpolation, use_smooth, resolution, segments);
+                       ExportCurveTriangleGeometry(mesh, &CData, resolution);
                        used_res = resolution;
                }
        }
        else {
-               ExportCurveSegments(scene, mesh, &CData, interpolation, segments);
-               int ckey_num = mesh->curve_keys.size();
-
-               /*export tangents or curve data? - not functional yet*/
-               if(export_tgs && ckey_num > 1) {
-                       Attribute *attr_tangent = mesh->curve_attributes.add(ATTR_STD_CURVE_TANGENT);
-                       float3 *data_tangent = attr_tangent->data_float3();
-                       
-                       for(int ck = 0; ck < ckey_num; ck++) {
-                               float3 tg = normalize(normalize(mesh->curve_keys[min(ck + 1, ckey_num - 1)].co - mesh->curve_keys[ck].co) -
-                                       normalize(mesh->curve_keys[max(ck - 1, 0)].co - mesh->curve_keys[ck].co));
-                               
-                               data_tangent[ck] = tg;
-                       }
-               }
+               ExportCurveSegments(scene, mesh, &CData);
        }
 
 
@@ -1109,7 +869,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
                        if(!mesh->need_attribute(scene, ustring(l->name().c_str())))
                                continue;
 
-                       ObtainCacheParticleVcol(mesh, &b_mesh, &b_ob, &CData, use_parents, !preview, vcol_num);
+                       ObtainCacheParticleVcol(mesh, &b_mesh, &b_ob, &CData, !preview, vcol_num);
 
                        if(primitive == CURVE_TRIANGLES) {
 
@@ -1118,7 +878,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
 
                                float3 *fdata = attr_vcol->data_float3();
 
-                               ExportCurveTriangleVcol(mesh, &CData, interpolation, segments, tri_num * 3, used_res, fdata);
+                               ExportCurveTriangleVcol(mesh, &CData, tri_num * 3, used_res, fdata);
                        }
                        else {
                                Attribute *attr_vcol = mesh->curve_attributes.add(
@@ -1148,7 +908,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
                        if(mesh->need_attribute(scene, name) || mesh->need_attribute(scene, std)) {
                                Attribute *attr_uv;
 
-                               ObtainCacheParticleUV(mesh, &b_mesh, &b_ob, &CData, use_parents, !preview, uv_num);
+                               ObtainCacheParticleUV(mesh, &b_mesh, &b_ob, &CData, !preview, uv_num);
 
                                if(primitive == CURVE_TRIANGLES) {
                                        if(active_render)
@@ -1158,7 +918,7 @@ void BlenderSync::sync_curves(Mesh *mesh, BL::Mesh b_mesh, BL::Object b_ob, bool
 
                                        float3 *uv = attr_uv->data_float3();
 
-                                       ExportCurveTriangleUV(mesh, &CData, interpolation, segments, tri_num * 3, used_res, uv);
+                                       ExportCurveTriangleUV(mesh, &CData, tri_num * 3, used_res, uv);
                                }
                                else {
                                        if(active_render)
index 55282a1ec00b36705085d52eb7adced8d066a0dd..628f9dae695aa36c51d5269f3e15e73ebe0ee565 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
  
index 39ebb3dc1c6856d80ef04b8c59958613521d1e3d..461e897efe17e00e52044b447d92110d958b7ae8 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include "camera.h"
@@ -160,7 +158,7 @@ void BlenderSync::sync_light(BL::Object b_parent, int persistent_id[OBJECT_PERSI
        light->use_mis = get_boolean(clamp, "use_multiple_importance_sampling");
        
        int samples = get_int(clamp, "samples");
-       if(get_boolean(cscene, "squared_samples"))
+       if(get_boolean(cscene, "use_square_samples"))
                light->samples = samples * samples;
        else
                light->samples = samples;
@@ -198,7 +196,7 @@ void BlenderSync::sync_background_light()
                                light->shader = scene->default_background;
                                
                                int samples = get_int(cworld, "samples");
-                               if(get_boolean(cscene, "squared_samples"))
+                               if(get_boolean(cscene, "use_square_samples"))
                                        light->samples = samples * samples;
                                else
                                        light->samples = samples;
@@ -241,17 +239,13 @@ Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_P
                object = object_map.find(key);
 
                if(object) {
-                       PointerRNA csettings = RNA_pointer_get(&b_ob.ptr, "cycles_settings");
-
-                       object->motion_multiplier = get_float(csettings, "motion_multiplier");
-
                        if(tfm != object->tfm) {
                                if(motion == -1)
                                        object->motion.pre = tfm;
                                else
                                        object->motion.post = tfm;
-                                       
-                               object->use_motion = get_boolean(csettings, "use_motion");
+
+                               object->use_motion = true;
                        }
 
                        /* mesh deformation blur not supported yet */
@@ -302,7 +296,7 @@ Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_P
                        object->random_id = hash_int_2d(object->random_id, 0);
 
                /* visibility flags for both parent */
-               object->visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL;
+               object->visibility = object_ray_visibility(b_ob) & PATH_RAY_ALL_VISIBILITY;
                if(b_parent.ptr.data != b_ob.ptr.data) {
                        object->visibility &= object_ray_visibility(b_parent);
                        object->random_id ^= hash_int(hash_string(b_parent.name().c_str()));
@@ -310,7 +304,7 @@ Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_P
 
                /* make holdout objects on excluded layer invisible for non-camera rays */
                if(use_holdout && (layer_flag & render_layer.exclude_layer))
-                       object->visibility &= ~(PATH_RAY_ALL - PATH_RAY_CAMERA);
+                       object->visibility &= ~(PATH_RAY_ALL_VISIBILITY - PATH_RAY_CAMERA);
 
                /* camera flag is not actually used, instead is tested
                 * against render layer flags */
index 769cd9f532d3008d620ee086ca25cd237e086c54..ef832ed39c0e971392a2396f5f81f66d146fd04c 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include "mesh.h"
index 9a86cee654690e574f03fe0ca9ecb1f0c50b88bf..71c84869ff6187bb79cdaa3586eb925ebe2ca495 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include <Python.h>
index fb743acf29af3c34643b532418a5c65dfdf9af2e..939eed2c77b778f353980fced82199714bfeb44c 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include "background.h"
index 4d3caeee40f139ba0940535cd521226260462baf..86b221650846b1e3af341e494b0a9e6642a6ea67 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #ifndef __BLENDER_SESSION_H__
index a821e705d5717f0d365773806cfe14226ee89ce0..5dfbd97366a794cb1f3cef6d95a7bb1cf9acb679 100644 (file)
@@ -1,19 +1,17 @@
 /*
- * Copyright 2011, Blender Foundation.
+ * Copyright 2011-2013 Blender Foundation
  *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
  *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
  */
 
 #include "background.h"
@@ -317,7