svn merge ^/trunk/blender -r44562:HEAD
authorOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Tue, 24 Apr 2012 16:08:37 +0000 (16:08 +0000)
committerOve Murberg Henriksen <sorayasilvermoon@hotmail.com>
Tue, 24 Apr 2012 16:08:37 +0000 (16:08 +0000)
513 files changed:
CMakeLists.txt
SConstruct
build_files/cmake/macros.cmake
build_files/cmake/project_info.py
build_files/scons/config/win32-mingw-config.py
build_files/scons/config/win64-mingw-config.py [new file with mode: 0644]
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
doc/python_api/examples/bpy.types.Mesh.py [new file with mode: 0644]
doc/python_api/rst/include__bmesh.rst
doc/python_api/rst/info_gotcha.rst
doc/python_api/sphinx_doc_gen.py
extern/bullet2/patches/MinGW64-nopermissive.patch [new file with mode: 0644]
extern/bullet2/patches/mingw64_scons.patch [new file with mode: 0644]
extern/bullet2/src/BulletCollision/BroadphaseCollision/btQuantizedBvh.h
extern/bullet2/src/BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.h
extern/bullet2/src/LinearMath/btSerializer.h
extern/bullet2/src/SConscript
extern/carve/SConscript
extern/carve/bundle.sh
extern/carve/patches/mingw_w64.patch [new file with mode: 0644]
extern/libmv/SConscript
extern/libmv/bundle.sh
extern/libmv/libmv/numeric/numeric.h
extern/libmv/patches/mingw_w64_support.patch [new file with mode: 0644]
extern/libmv/third_party/glog/src/windows/port.cc
extern/libmv/third_party/glog/src/windows/port.h
intern/SConscript
intern/audaspace/SConscript
intern/audaspace/intern/AUD_Buffer.cpp
intern/audaspace/patches/mingw64-nopermissive.patch [new file with mode: 0644]
intern/boolop/SConscript
intern/cycles/SConscript
intern/cycles/app/cycles_xml.cpp
intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_camera.cpp
intern/cycles/blender/blender_mesh.cpp
intern/cycles/blender/blender_session.cpp
intern/cycles/blender/blender_shader.cpp
intern/cycles/blender/blender_sync.cpp
intern/cycles/blender/blender_sync.h
intern/cycles/kernel/kernel_bvh.h
intern/cycles/kernel/kernel_camera.h
intern/cycles/kernel/kernel_mbvh.h
intern/cycles/kernel/kernel_object.h
intern/cycles/kernel/kernel_passes.h
intern/cycles/kernel/kernel_path.h
intern/cycles/kernel/kernel_qbvh.h
intern/cycles/kernel/svm/svm_camera.h
intern/cycles/kernel/svm/svm_mapping.h
intern/cycles/kernel/svm/svm_tex_coord.h
intern/cycles/kernel/svm/svm_types.h
intern/cycles/render/background.cpp
intern/cycles/render/background.h
intern/cycles/render/buffers.cpp
intern/cycles/render/camera.cpp
intern/cycles/render/film.cpp
intern/cycles/render/light.cpp
intern/cycles/render/object.cpp
intern/cycles/render/scene.h
intern/cycles/render/shader.cpp
intern/cycles/subd/subd_dice.cpp
intern/cycles/subd/subd_split.cpp
intern/cycles/util/util_boundbox.h
intern/cycles/util/util_transform.cpp
intern/cycles/util/util_transform.h
intern/dualcon/intern/Projections.h
intern/dualcon/intern/dualcon_c_api.cpp
intern/elbeem/intern/ntl_geometrymodel.cpp
intern/elbeem/intern/ntl_world.cpp
intern/elbeem/intern/solver_relax.h
intern/elbeem/patches/mingw64_nopermissive.patch [new file with mode: 0644]
intern/ghost/SConscript
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/guardedalloc/MEM_sys_types.h
intern/opennl/CMakeLists.txt
intern/opennl/SConscript
intern/utfconv/CMakeLists.txt
intern/utfconv/SConscript
release/datafiles/ctodata.py [changed mode: 0644->0755]
release/datafiles/datatoc.py
release/freedesktop/blender.desktop
release/scripts/modules/bpy_types.py
release/scripts/presets/fluid/honey.py [new file with mode: 0644]
release/scripts/presets/fluid/oil.py [new file with mode: 0644]
release/scripts/presets/fluid/water.py [new file with mode: 0644]
release/scripts/startup/bl_operators/console.py
release/scripts/startup/bl_operators/mesh.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_operators/uvcalc_follow_active.py
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_operators/vertexpaint_dirt.py
release/scripts/startup/bl_operators/view3d.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_game.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/templates/operator_file_export.py [moved from release/scripts/templates/operator_export.py with 84% similarity]
release/scripts/templates/operator_file_import.py [new file with mode: 0644]
source/SConscript
source/blender/avi/intern/avi.c
source/blender/avi/intern/options.c
source/blender/blenfont/BLF_translation.h
source/blender/blenfont/intern/blf_font.c
source/blender/blenfont/intern/blf_translation.c
source/blender/blenkernel/BKE_armature.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_multires.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_pointcache.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_subsurf.h
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/mesh_validate.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/navmesh_conversion.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/screen.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/unit.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenkernel/intern/writeframeserver.c
source/blender/blenlib/BLI_array.h
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/BLI_pbvh.h
source/blender/blenlib/BLI_scanfill.h
source/blender/blenlib/BLI_threads.h
source/blender/blenlib/BLI_winstuff.h
source/blender/blenlib/SConscript
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/BLI_kdtree.c
source/blender/blenlib/intern/fileops.c
source/blender/blenlib/intern/fnmatch.c
source/blender/blenlib/intern/math_base_inline.c
source/blender/blenlib/intern/math_color_inline.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/math_vector.c
source/blender/blenlib/intern/math_vector_inline.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/rand.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/storage.c
source/blender/blenlib/intern/threads.c
source/blender/blenloader/BLO_sys_types.h
source/blender/blenloader/BLO_undofile.h
source/blender/blenloader/BLO_writefile.h
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/runtime.c
source/blender/blenloader/intern/undofile.c
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/SConscript
source/blender/bmesh/CMakeLists.txt
source/blender/bmesh/SConscript
source/blender/bmesh/bmesh.h
source/blender/bmesh/intern/bmesh_construct.c
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_interp.c
source/blender/bmesh/intern/bmesh_iterators.c
source/blender/bmesh/intern/bmesh_iterators.h
source/blender/bmesh/intern/bmesh_iterators_inline.h
source/blender/bmesh/intern/bmesh_marking.c
source/blender/bmesh/intern/bmesh_marking.h
source/blender/bmesh/intern/bmesh_mesh.c
source/blender/bmesh/intern/bmesh_mesh.h
source/blender/bmesh/intern/bmesh_mesh_conv.c
source/blender/bmesh/intern/bmesh_mesh_validate.c
source/blender/bmesh/intern/bmesh_mods.c
source/blender/bmesh/intern/bmesh_mods.h
source/blender/bmesh/intern/bmesh_opdefines.c
source/blender/bmesh/intern/bmesh_operator_api.h
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/intern/bmesh_operators.h
source/blender/bmesh/intern/bmesh_operators_private.h
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/bmesh/intern/bmesh_polygon.h
source/blender/bmesh/intern/bmesh_private.h
source/blender/bmesh/intern/bmesh_queries.c
source/blender/bmesh/intern/bmesh_queries.h
source/blender/bmesh/intern/bmesh_walkers_impl.c
source/blender/bmesh/operators/bmo_bevel.c
source/blender/bmesh/operators/bmo_connect.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_edgesplit.c
source/blender/bmesh/operators/bmo_extrude.c
source/blender/bmesh/operators/bmo_inset.c
source/blender/bmesh/operators/bmo_join_triangles.c
source/blender/bmesh/operators/bmo_mirror.c
source/blender/bmesh/operators/bmo_primitive.c
source/blender/bmesh/operators/bmo_removedoubles.c
source/blender/bmesh/operators/bmo_slide.c
source/blender/bmesh/operators/bmo_subdivide.c
source/blender/bmesh/operators/bmo_subdivide.h
source/blender/bmesh/operators/bmo_triangulate.c
source/blender/bmesh/operators/bmo_utils.c
source/blender/bmesh/tools/BME_bevel.c
source/blender/editors/armature/SConscript
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poselib.c
source/blender/editors/curve/editcurve.c
source/blender/editors/datafiles/startup.blend.c
source/blender/editors/include/BIF_glutil.h
source/blender/editors/include/ED_curve.h
source/blender/editors/include/ED_mesh.h
source/blender/editors/include/ED_numinput.h
source/blender/editors/include/ED_uvedit.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/mesh/SConscript
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_bvh.c
source/blender/editors/mesh/editmesh_bvh.h
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/editmesh_rip.c [new file with mode: 0644]
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_slide.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/mesh/mesh_data.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/object/SConscript
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/SConscript
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/render/SConscript
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/render/render_update.c
source/blender/editors/screen/SConscript
source/blender/editors/screen/glutil.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screendump.c
source/blender/editors/sculpt_paint/SConscript
source/blender/editors/sculpt_paint/paint_hide.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_utils.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/sound/sound_ops.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/SConscript
source/blender/editors/space_file/file_draw.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_file/fsmenu.c
source/blender/editors/space_image/SConscript
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_logic/logic_intern.h
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_logic/space_logic.c
source/blender/editors/space_node/SConscript
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_select.c
source/blender/editors/space_outliner/CMakeLists.txt
source/blender/editors/space_outliner/SConscript
source/blender/editors/space_outliner/outliner_edit.c
source/blender/editors/space_outliner/outliner_tools.c
source/blender/editors/space_sequencer/SConscript
source/blender/editors/space_sequencer/sequencer_buttons.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_intern.h
source/blender/editors/space_sequencer/sequencer_scopes.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_view3d/SConscript
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/CMakeLists.txt
source/blender/editors/util/SConscript
source/blender/editors/util/crazyspace.c
source/blender/editors/util/ed_util.c
source/blender/editors/util/undo.c
source/blender/editors/uvedit/uvedit_buttons.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_parametrizer.h
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/SConscript
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_codegen.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/gpu/intern/gpu_material.c
source/blender/ikplugin/intern/iksolver_plugin.c
source/blender/imbuf/SConscript
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/bmp.c
source/blender/imbuf/intern/indexer.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/png.c
source/blender/imbuf/intern/thumbs.c
source/blender/imbuf/intern/tiff.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/DNA_key_types.h
source/blender/makesdna/DNA_meshdata_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_object_fluidsim.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_sequence_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_windowmanager_types.h
source/blender/makesdna/intern/SConscript
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/SConscript
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_armature.c
source/blender/makesrna/intern/rna_boid.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_key.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_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_nodetree_types.h
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sequencer_api.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_tracking.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_remesh.c
source/blender/modifiers/intern/MOD_shrinkwrap.c
source/blender/modifiers/intern/MOD_weightvg_util.c
source/blender/nodes/SConscript
source/blender/nodes/composite/node_composite_tree.c
source/blender/nodes/composite/nodes/node_composite_image.c
source/blender/nodes/composite/nodes/node_composite_math.c
source/blender/nodes/intern/node_common.c
source/blender/nodes/shader/nodes/node_shader_geom.c
source/blender/python/SConscript
source/blender/python/bmesh/bmesh_py_api.c
source/blender/python/bmesh/bmesh_py_types.c
source/blender/python/bmesh/bmesh_py_types.h
source/blender/python/bmesh/bmesh_py_types_customdata.c
source/blender/python/bmesh/bmesh_py_utils.c
source/blender/python/generic/idprop_py_api.c
source/blender/python/generic/idprop_py_api.h
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_rna.c
source/blender/python/mathutils/mathutils.c
source/blender/python/mathutils/mathutils.h
source/blender/python/mathutils/mathutils_Color.c
source/blender/python/mathutils/mathutils_Euler.c
source/blender/python/mathutils/mathutils_Matrix.c
source/blender/python/mathutils/mathutils_Quaternion.c
source/blender/python/mathutils/mathutils_Vector.c
source/blender/python/mathutils/mathutils_geometry.c
source/blender/render/SConscript
source/blender/render/extern/include/RE_engine.h
source/blender/render/extern/include/RE_render_ext.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/external_engine.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/volume_precache.c
source/blender/windowmanager/SConscript
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_keymap.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_dragdrop.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_gesture.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/SConscript
source/gameengine/Expressions/KX_HashedPtr.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IPO_SGController.cpp
source/gameengine/Ketsji/KX_NavMeshObject.cpp
source/gameengine/Ketsji/KX_ObstacleSimulation.h
source/gameengine/Ketsji/KX_PhysicsEngineEnums.h
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.h
source/gameengine/Ketsji/KX_SteeringActuator.cpp
source/gameengine/Ketsji/KX_SteeringActuator.h
source/gameengine/Ketsji/SConscript
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Rasterizer/RAS_FramingManager.h
source/gameengine/SceneGraph/SG_ParentRelation.h
source/gameengine/VideoTexture/SConscript
source/tests/bl_mesh_modifiers.py

index e3ce376ff7d3f74606d50b7505cf43a7e736f72f..ad3a293b937dd491098e771aae9c2bb3019eab20 100644 (file)
@@ -153,7 +153,7 @@ if(UNIX AND NOT APPLE)
 else()
        set(PLATFORM_DEFAULT OFF)
 endif()
-option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" PLATFORM_DEFAULT)
+option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ${PLATFORM_DEFAULT})
 unset(PLATFORM_DEFAULT)
 
 
@@ -195,6 +195,8 @@ option(WITH_IMAGE_FRAMESERVER   "Enable image FrameServer Support for rendering"
 
 # Audio/Video format support
 option(WITH_CODEC_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.org)" OFF)
+unset(PLATFORM_DEFAULT)
+
 option(WITH_CODEC_SNDFILE       "Enable libsndfile Support (http://www.mega-nerd.com/libsndfile)" OFF)
 if(APPLE OR (WIN32 AND NOT UNIX))
        option(WITH_CODEC_QUICKTIME     "Enable Quicktime Support" OFF)
@@ -226,6 +228,8 @@ if(UNIX AND NOT APPLE)
        option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
 endif()
 option(WITH_PYTHON_INSTALL       "Copy system python into the blender install folder" ON)
+option(WITH_MINGW64                   "Use the 64-bit version of MinGW" OFF)
+mark_as_advanced(WITH_MINGW64)
 
 # Cycles
 option(WITH_CYCLES                                     "Enable cycles Render Engine" ON)
@@ -357,6 +361,18 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
        set(WITH_GHOST_XDND OFF)
 endif()
 
+if(MINGW)
+       if(WITH_CODEC_QUICKTIME)
+               message(FATAL_ERROR "MINGW requires WITH_CODEC_QUICKTIME to be OFF "
+                                   "because it is currently unsupported, remove this "
+                                   "line if youre a developer who wants to add support.")
+       endif()
+       
+       if((WITH_MINGW64) AND (WITH_OPENCOLLADA OR WITH_CODEC_FFMPEG))
+               message(FATAL_ERROR "MINGW64 still doesn't support: WITH_OPENCOLLADA/WITH_CODEC_FFMPEG")
+       endif()
+endif()
+
 TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
 
 
@@ -720,14 +736,24 @@ elseif(WIN32)
        # this file is included anyway when building under Windows with cl.exe
        #  include(${CMAKE_ROOT}/Modules/Platform/Windows-cl.cmake)
 
-       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
+       if(CMAKE_COMPILER_IS_GNUCC)
+               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw32)
 
-       # Setup 64bit and 64bit windows systems
-       if(CMAKE_CL_64)
-               message("64 bit compiler detected.")
-               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
-       endif()
+               # Setup 64bit and 64bit windows systems         
+               if(WITH_MINGW64)
+                       message("Set 64 bit compiler for MinGW.")
+                       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/mingw64)
+               endif()
+       else()
+               set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/windows)
 
+               # Setup 64bit and 64bit windows systems
+               if(CMAKE_CL_64)
+                       message("64 bit compiler detected.")
+                       set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
+               endif()
+       endif()
+               
        add_definitions(-DWIN32)
 
        if(WITH_INTERNATIONAL)
@@ -975,29 +1001,43 @@ elseif(WIN32)
 
                set(PLATFORM_LINKFLAGS_DEBUG "/NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libc.lib")
 
-       else()
-               # keep GCC specific stuff here
-               if(CMAKE_COMPILER_IS_GNUCC)
-                       set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
-                       set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
-
-                       add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
+       elseif(CMAKE_COMPILER_IS_GNUCC)
+       # keep GCC specific stuff here          
+               set(PLATFORM_LINKLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid -lwsock32 -lpsapi")
+               set(PLATFORM_CFLAGS "-pipe -funsigned-char -fno-strict-aliasing")
+
+               if(WITH_MINGW64)
+                       #Yes, the point for MinGW64 is moar optimization by default :)
+                       set(PLATFORM_CFLAGS "${PLATFORM_CFLAGS} -mmmx -msse -msse2")
+                       set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG")
+                       set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
+                       #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
+                       set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} -lpthread")
+                       
+                       add_definitions(-DFREE_WINDOWS64 -DMS_WIN64)
                endif()
 
+               add_definitions(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE)
+
+
                add_definitions(-DFREE_WINDOWS)
 
                if(WITH_INTERNATIONAL)
-                       set(GETTEXT ${LIBDIR}/gcc/gettext)
+                       set(GETTEXT ${LIBDIR}/gettext)
                        set(GETTEXT_INCLUDE_DIRS ${GETTEXT}/include)
                        set(GETTEXT_LIBPATH ${GETTEXT}/lib)
                        set(GETTEXT_LIBRARIES intl)
                endif()
                
-               set(PNG "${LIBDIR}/gcc/png")
+               set(PNG "${LIBDIR}/png")
                set(PNG_INCLUDE_DIR "${PNG}/include")
                set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
 
-               set(JPEG_LIBRARIES libjpeg)
+               if(WITH_MINGW64)
+                       set(JPEG_LIBRARIES jpeg)
+               else()
+                       set(JPEG_LIBRARIES libjpeg)
+               endif()
                set(PNG_LIBRARIES png)
 
                set(ZLIB ${LIBDIR}/zlib)
@@ -1005,31 +1045,34 @@ elseif(WIN32)
                set(ZLIB_LIBPATH ${ZLIB}/lib)
                set(ZLIB_LIBRARIES z)
 
-               set(PTHREADS ${LIBDIR}/pthreads)
-               set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
-               set(PTHREADS_LIBPATH ${PTHREADS}/lib)
-               set(PTHREADS_LIBRARIES pthreadGC2)
-
-               set(FREETYPE ${LIBDIR}/gcc/freetype)
+               #comes with own pthread library
+               if(NOT WITH_MINGW64)
+                       set(PTHREADS ${LIBDIR}/pthreads)
+                       set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
+                       set(PTHREADS_LIBPATH ${PTHREADS}/lib)
+                       set(PTHREADS_LIBRARIES pthreadGC2)
+               endif()
+               
+               set(FREETYPE ${LIBDIR}/freetype)
                set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
                set(FREETYPE_LIBPATH ${FREETYPE}/lib)
                set(FREETYPE_LIBRARY freetype)
 
                if(WITH_FFTW3)
-                       set(FFTW3 ${LIBDIR}/gcc/fftw3)
+                       set(FFTW3 ${LIBDIR}/fftw3)
                        set(FFTW3_LIBRARIES fftw3)
                        set(FFTW3_INCLUDE_DIRS ${FFTW3}/include)
                        set(FFTW3_LIBPATH ${FFTW3}/lib)
                endif()
 
                if(WITH_OPENCOLLADA)
-                       set(OPENCOLLADA ${LIBDIR}/gcc/opencollada)
+                       set(OPENCOLLADA ${LIBDIR}/opencollada)
                        set(OPENCOLLADA_INCLUDE_DIRS
-                               ${LIBDIR}/gcc/opencollada/include/COLLADAStreamWriter/include
-                               ${LIBDIR}/gcc/opencollada/include/COLLADABaseUtils/include
-                               ${LIBDIR}/gcc/opencollada/include/COLLADAFramework/include
-                               ${LIBDIR}/gcc/opencollada/include/COLLADASaxFrameworkLoader/include
-                               ${LIBDIR}/gcc/opencollada/include/GeneratedSaxParser/include
+                               ${LIBDIR}/opencollada/include/COLLADAStreamWriter/include
+                               ${LIBDIR}/opencollada/include/COLLADABaseUtils/include
+                               ${LIBDIR}/opencollada/include/COLLADAFramework/include
+                               ${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader/include
+                               ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
                        )
                        set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
                        set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
@@ -1044,14 +1087,14 @@ elseif(WIN32)
                endif()
 
                if(WITH_IMAGE_OPENEXR)
-                       set(OPENEXR ${LIBDIR}/gcc/openexr)
+                       set(OPENEXR ${LIBDIR}/openexr)
                        set(OPENEXR_INCLUDE_DIRS ${OPENEXR}/include/OpenEXR)
                        set(OPENEXR_LIBRARIES Half IlmImf Imath IlmThread Iex)
                        set(OPENEXR_LIBPATH ${OPENEXR}/lib)
                endif()
 
                if(WITH_IMAGE_TIFF)
-                       set(TIFF ${LIBDIR}/gcc/tiff)
+                       set(TIFF ${LIBDIR}/tiff)
                        set(TIFF_LIBRARY tiff)
                        set(TIFF_INCLUDE_DIR ${TIFF}/include)
                        set(TIFF_LIBPATH ${TIFF}/lib)
@@ -1081,19 +1124,24 @@ elseif(WIN32)
                if(WITH_BOOST)
                        set(BOOST ${LIBDIR}/boost)
                        set(BOOST_INCLUDE_DIR ${BOOST}/include)
-                       set(BOOST_POSTFIX "mgw46-mt-s-1_47")
-                       set(BOOST_DEBUG_POSTFIX "mgw46-mt-sd-1_47")
+                       if(WITH_MINGW64)
+                               set(BOOST_POSTFIX "mgw47-mt-s-1_49")
+                               set(BOOST_DEBUG_POSTFIX "mgw47-mt-sd-1_49")
+                       else()
+                               set(BOOST_POSTFIX "mgw46-mt-s-1_47")
+                               set(BOOST_DEBUG_POSTFIX "mgw46-mt-sd-1_47")
+                       endif()         
                        set(BOOST_LIBRARIES
                                optimized boost_date_time-${BOOST_POSTFIX} boost_filesystem-${BOOST_POSTFIX}
                                boost_regex-${BOOST_POSTFIX} boost_system-${BOOST_POSTFIX} boost_thread-${BOOST_POSTFIX}
                                debug boost_date_time-${BOOST_DEBUG_POSTFIX} boost_filesystem-${BOOST_DEBUG_POSTFIX}
                                boost_regex-${BOOST_DEBUG_POSTFIX} boost_system-${BOOST_DEBUG_POSTFIX} boost_thread-${BOOST_DEBUG_POSTFIX})
-                       set(BOOST_LIBPATH ${BOOST}/lib/gcc)
+                       set(BOOST_LIBPATH ${BOOST}/lib)
                        set(BOOST_DEFINITIONS "-DBOOST_ALL_NO_LIB -DBOOST_THREAD_USE_LIB ")
                endif()
                        
                if(WITH_OPENIMAGEIO)
-                       set(OPENIMAGEIO ${LIBDIR}/gcc/openimageio)
+                       set(OPENIMAGEIO ${LIBDIR}/openimageio)
                        set(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO}/include)
                        set(OPENIMAGEIO_LIBRARIES OpenImageIO)
                        set(OPENIMAGEIO_LIBPATH ${OPENIMAGEIO}/lib)
@@ -1117,7 +1165,7 @@ elseif(APPLE)
                set(WITH_LIBS10.5 ON CACHE BOOL "Use 10.5 libs" FORCE) # valid also for 10.6/10.7
        endif()
 
-       if(${XCODE_VERSION} LESS 4.3)
+       if(${XCODE_VERSION} VERSION_LESS 4.3)
                SET(CMAKE_OSX_SYSROOT /Developer/SDKs/MacOSX${OSX_SYSTEM}.sdk CACHE PATH "" FORCE ) # use guaranteed existing sdk
        else()
                # note: i don't use xcode-select path on purpose, cause also /Applications/Xcode.app would be allowed
index ff668a974836cb7168cd3a277988cdc45f743601..96d27ae76b0ceb319a6efc63c8277be767deba77 100644 (file)
@@ -170,7 +170,7 @@ if sys.platform=='win32':
     if env['CC'] in ['cl', 'cl.exe']:
         platform = 'win64-vc' if bitness == 64 else 'win32-vc'
     elif env['CC'] in ['gcc']:
-        platform = 'win32-mingw'
+        platform = 'win64-mingw' if bitness == 64 else 'win32-mingw'
 
 env.SConscriptChdir(0)
 
@@ -251,6 +251,7 @@ if 'blenderlite' in B.targets:
     target_env_defs['WITH_BF_REDCODE'] = False
     target_env_defs['WITH_BF_DDS'] = False
     target_env_defs['WITH_BF_CINEON'] = False
+    target_env_defs['WITH_BF_FRAMESERVER'] = False
     target_env_defs['WITH_BF_HDR'] = False
     target_env_defs['WITH_BF_ZLIB'] = False
     target_env_defs['WITH_BF_SDL'] = False
@@ -261,6 +262,7 @@ if 'blenderlite' in B.targets:
     target_env_defs['BF_BUILDINFO'] = False
     target_env_defs['WITH_BF_FLUID'] = False
     target_env_defs['WITH_BF_OCEANSIM'] = False
+    target_env_defs['WITH_BF_SMOKE'] = False
     target_env_defs['WITH_BF_DECIMATE'] = False
     target_env_defs['WITH_BF_BOOLEAN'] = False
     target_env_defs['WITH_BF_REMESH'] = False
@@ -780,6 +782,34 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
     windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
     allinstall += windlls
 
+if env['OURPLATFORM'] == 'win64-mingw':
+    dllsources = []
+    
+    if env['WITH_BF_PYTHON']:
+        if env['BF_DEBUG']:
+            dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
+        else:
+            dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
+
+    if env['WITH_BF_FFMPEG']:
+        dllsources += env['BF_FFMPEG_DLL'].split()
+
+    if env['WITH_BF_OPENAL']:
+        dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
+        dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
+
+    if env['WITH_BF_SNDFILE']:
+        dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
+
+    if env['WITH_BF_SDL']:
+        dllsources.append('${LCGDIR}/sdl/lib/SDL.dll')
+       
+    dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
+    dllsources.append('#source/icons/blender.exe.manifest')
+
+    windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
+    allinstall += windlls
+
 installtarget = env.Alias('install', allinstall)
 bininstalltarget = env.Alias('install-bin', blenderinstall)
 
index 406f2537dce748b622f243394cf99f24f20f35a8..eeefcf730c85812e66cbe2d58ebbe867a732f834 100644 (file)
@@ -212,11 +212,9 @@ macro(setup_liblinks
        target_link_libraries(${target}
                        ${OPENGL_gl_LIBRARY}
                        ${OPENGL_glu_LIBRARY}
-                       ${JPEG_LIBRARIES}
                        ${PNG_LIBRARIES}
                        ${ZLIB_LIBRARIES}
-                       ${FREETYPE_LIBRARY}
-                       ${PLATFORM_LINKLIBS})
+                       ${FREETYPE_LIBRARY})
 
        # since we are using the local libs for python when compiling msvc projects, we need to add _d when compiling debug versions
        if(WITH_PYTHON)  # AND NOT WITH_PYTHON_MODULE  # WIN32 needs
@@ -271,6 +269,7 @@ macro(setup_liblinks
        if(WITH_BOOST)
                target_link_libraries(${target} ${BOOST_LIBRARIES})
        endif()
+       target_link_libraries(${target} ${JPEG_LIBRARIES})
        if(WITH_IMAGE_OPENEXR)
                if(WIN32 AND NOT UNIX AND NOT CMAKE_COMPILER_IS_GNUCC)
                        file_list_suffix(OPENEXR_LIBRARIES_DEBUG "${OPENEXR_LIBRARIES}" "_d")
@@ -328,6 +327,8 @@ macro(setup_liblinks
        if(WIN32 AND NOT UNIX)
                target_link_libraries(${target} ${PTHREADS_LIBRARIES})
        endif()
+
+       target_link_libraries(${target} ${PLATFORM_LINKLIBS})
 endmacro()
 
 macro(TEST_SSE_SUPPORT
@@ -677,4 +678,4 @@ macro(set_lib_path
        endif()
 
 
-endmacro()
\ No newline at end of file
+endmacro()
index 77574f17e2e4f336fde3c262d0fcffd4a8a4ea39..3f64ac51a4d374a29a6294fd0b786e4d5469af63 100755 (executable)
@@ -231,8 +231,13 @@ def project_name_get(path, fallback="Blender", prefix="Blender_"):
         return fallback
 
     import subprocess
-    info = subprocess.Popen(["svn", "info", path],
-                            stdout=subprocess.PIPE).communicate()[0]
+    try:
+        info = subprocess.Popen(["svn", "info", path],
+                                stdout=subprocess.PIPE).communicate()[0]
+    except:
+        # possibly 'svn' isnt found/installed
+        return fallback
+
     # string version, we only want the URL
     info = info.decode(encoding="utf-8", errors="ignore")
 
index 855f643129a23ccb5163da45ae65176ff0ed125a..576415559878a83fda2837bcef0e3d0fc11680e7 100644 (file)
@@ -1,4 +1,4 @@
-LCGDIR = '#../lib/windows'
+LCGDIR = '#../lib/mingw32'
 LIBDIR = "${LCGDIR}"
 
 BF_PYTHON = LIBDIR + '/python'
@@ -48,7 +48,7 @@ BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
 
 WITH_BF_OPENEXR = True
 WITH_BF_STATICOPENEXR = False
-BF_OPENEXR = LIBDIR + '/gcc/openexr'
+BF_OPENEXR = LIBDIR + '/openexr'
 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
 BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
@@ -64,13 +64,13 @@ BF_JPEG_LIB = 'liblibjpeg'
 BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
 
 WITH_BF_PNG = True
-BF_PNG = LIBDIR + '/gcc/png'
+BF_PNG = LIBDIR + '/png'
 BF_PNG_INC = '${BF_PNG}/include'
 BF_PNG_LIB = 'png'
 BF_PNG_LIBPATH = '${BF_PNG}/lib'
 
 WITH_BF_TIFF = True
-BF_TIFF = LIBDIR + '/gcc/tiff'
+BF_TIFF = LIBDIR + '/tiff'
 BF_TIFF_INC = '${BF_TIFF}/include'
 BF_TIFF_LIB = 'tiff'
 BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
@@ -83,7 +83,7 @@ BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
 
 WITH_BF_INTERNATIONAL = True
 
-BF_GETTEXT = LIBDIR + '/gcc/gettext'
+BF_GETTEXT = LIBDIR + '/gettext'
 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
 BF_GETTEXT_LIB = 'intl'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
@@ -95,7 +95,7 @@ BF_OPENJPEG_INC = '${BF_OPENJPEG}'
 BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
 
 WITH_BF_FFTW3 = True
-BF_FFTW3 = LIBDIR + '/gcc/fftw3'
+BF_FFTW3 = LIBDIR + '/fftw3'
 BF_FFTW3_INC = '${BF_FFTW3}/include'
 BF_FFTW3_LIB = 'fftw3'
 BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
@@ -112,7 +112,7 @@ BF_BULLET_LIB = 'extern_bullet'
 BF_WINTAB = LIBDIR + '/wintab'
 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
 
-BF_FREETYPE = LIBDIR + '/gcc/freetype'
+BF_FREETYPE = LIBDIR + '/freetype'
 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
 BF_FREETYPE_LIB = 'freetype'
 BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
@@ -145,7 +145,7 @@ BF_COLLADA = '#source/blender/collada'
 BF_COLLADA_INC = '${BF_COLLADA}'
 BF_COLLADA_LIB = 'bf_collada'
 
-BF_OPENCOLLADA = LIBDIR + '/gcc/opencollada'
+BF_OPENCOLLADA = LIBDIR + '/opencollada'
 BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
 BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa'
 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
@@ -154,7 +154,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
 WITH_BF_CYCLES = True 
 
 WITH_BF_OIIO = True
-BF_OIIO = LIBDIR + '/gcc/openimageio'
+BF_OIIO = LIBDIR + '/openimageio'
 BF_OIIO_INC = BF_OIIO + '/include'
 BF_OIIO_LIB = 'OpenImageIO'
 BF_OIIO_LIBPATH = BF_OIIO + '/lib'
@@ -163,7 +163,7 @@ WITH_BF_BOOST = True
 BF_BOOST = LIBDIR + '/boost'
 BF_BOOST_INC = BF_BOOST + '/include'
 BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_47 boost_filesystem-mgw46-mt-s-1_47 boost_regex-mgw46-mt-s-1_47 boost_system-mgw46-mt-s-1_47 boost_thread-mgw46-mt-s-1_47'
-BF_BOOST_LIBPATH = BF_BOOST + '/lib/gcc'
+BF_BOOST_LIBPATH = BF_BOOST + '/lib'
 
 #Ray trace optimization
 WITH_BF_RAYOPTIMIZATION = True
diff --git a/build_files/scons/config/win64-mingw-config.py b/build_files/scons/config/win64-mingw-config.py
new file mode 100644 (file)
index 0000000..98d45ae
--- /dev/null
@@ -0,0 +1,207 @@
+LCGDIR = '#../lib/mingw64'
+LIBDIR = "${LCGDIR}"
+
+BF_PYTHON = LIBDIR + '/python'
+BF_PYTHON_VERSION = '3.2'
+WITH_BF_STATICPYTHON = False
+BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
+BF_PYTHON_BINARY = 'python'
+BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
+BF_PYTHON_DLL = 'python32'
+BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
+
+WITH_BF_OPENAL = True
+BF_OPENAL = LIBDIR + '/openal'
+BF_OPENAL_INC = '${BF_OPENAL}/include'
+BF_OPENAL_LIB = 'wrap_oal'
+BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
+
+WITH_BF_FFMPEG = False # TODO: FFmpeg gives linking errors, need to compile with MinGW-w64?
+BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
+BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
+BF_FFMPEG_INC =  LIBDIR + '/ffmpeg/include'
+BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
+
+WITH_BF_JACK = False
+BF_JACK = LIBDIR + '/jack'
+BF_JACK_INC = '${BF_JACK}/include'
+BF_JACK_LIB = 'libjack'
+BF_JACK_LIBPATH = '${BF_JACK}/lib'
+
+WITH_BF_SNDFILE = False
+BF_SNDFILE = LIBDIR + '/sndfile'
+BF_SNDFILE_INC = '${BF_SNDFILE}/include'
+BF_SNDFILE_LIB = 'libsndfile-1'
+BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
+
+WITH_BF_SDL = True
+BF_SDL = LIBDIR + '/sdl'
+BF_SDL_INC = '${BF_SDL}/include'
+BF_SDL_LIB = 'SDL'
+BF_SDL_LIBPATH = '${BF_SDL}/lib'
+
+BF_PTHREADS = '' # Part of MinGW-w64
+BF_PTHREADS_INC = ''
+BF_PTHREADS_LIB = ''
+BF_PTHREADS_LIBPATH = ''
+
+WITH_BF_OPENEXR = True
+WITH_BF_STATICOPENEXR = False
+BF_OPENEXR = LIBDIR + '/openexr'
+BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
+BF_OPENEXR_LIB = 'Half IlmImf Imath IlmThread Iex'
+BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
+
+WITH_BF_DDS = True
+
+WITH_BF_JPEG = True
+BF_JPEG = LIBDIR + '/jpeg'
+BF_JPEG_INC = '${BF_JPEG}/include'
+BF_JPEG_LIB = 'jpeg'
+BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
+
+WITH_BF_PNG = True
+BF_PNG = LIBDIR + '/png'
+BF_PNG_INC = '${BF_PNG}/include'
+BF_PNG_LIB = 'png'
+BF_PNG_LIBPATH = '${BF_PNG}/lib'
+
+WITH_BF_TIFF = True
+BF_TIFF = LIBDIR + '/tiff'
+BF_TIFF_INC = '${BF_TIFF}/include'
+BF_TIFF_LIB = 'tiff'
+BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
+
+WITH_BF_ZLIB = True
+BF_ZLIB = LIBDIR + '/zlib'
+BF_ZLIB_INC = '${BF_ZLIB}/include'
+BF_ZLIB_LIB = 'z'
+BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
+
+WITH_BF_INTERNATIONAL = True
+
+BF_GETTEXT = LIBDIR + '/gettext'
+BF_GETTEXT_INC = '${BF_GETTEXT}/include'
+BF_GETTEXT_LIB = 'intl'
+BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
+
+WITH_BF_OPENJPEG = True
+BF_OPENJPEG = '#extern/libopenjpeg'
+BF_OPENJPEG_LIB = ''
+BF_OPENJPEG_INC = '${BF_OPENJPEG}'
+BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
+
+WITH_BF_FFTW3 = True
+BF_FFTW3 = LIBDIR + '/fftw3'
+BF_FFTW3_INC = '${BF_FFTW3}/include'
+BF_FFTW3_LIB = 'fftw3'
+BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
+
+WITH_BF_GAMEENGINE = True
+WITH_BF_OCEANSIM = True
+WITH_BF_PLAYER = True
+WITH_BF_LIBMV = True
+
+WITH_BF_BULLET = True
+BF_BULLET = '#extern/bullet2/src'
+BF_BULLET_INC = '${BF_BULLET}'
+BF_BULLET_LIB = 'extern_bullet'
+
+BF_WINTAB = LIBDIR + '/wintab'
+BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
+
+# enable freetype2 support for text objects
+BF_FREETYPE = LIBDIR + '/freetype'
+BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2/'
+BF_FREETYPE_LIB = 'freetype'
+BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
+
+WITH_BF_QUICKTIME = False
+
+WITH_BF_ICONV = True
+BF_ICONV = LIBDIR + "/iconv"
+BF_ICONV_INC = '${BF_ICONV}/include'
+BF_ICONV_LIB = 'iconv'
+BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
+
+WITH_BF_REDCODE = False
+BF_REDCODE_INC = '#extern'
+
+# Mesa Libs should go here if your using them as well....
+WITH_BF_STATICOPENGL = False
+BF_OPENGL = 'C:\\MingW'
+BF_OPENGL_INC = '${BF_OPENGL}/include'
+BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
+BF_OPENGL_LIB = 'opengl32 glu32'
+BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a',
+             '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
+             '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
+
+WITH_BF_COLLADA = False # TODO: Compile Collada with MinGW-w64
+BF_COLLADA = '#source/blender/collada'
+BF_COLLADA_INC = '${BF_COLLADA}'
+BF_COLLADA_LIB = 'bf_collada'
+
+BF_OPENCOLLADA = LIBDIR + '/opencollada'
+BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
+BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa'
+BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
+
+#Cycles
+WITH_BF_CYCLES = True
+WITH_BF_CYCLES_CUDA_BINARIES = False
+BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
+BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_13', 'sm_20', 'sm_21']
+
+WITH_BF_OIIO = True
+BF_OIIO = LIBDIR + '/openimageio'
+BF_OIIO_INC = '${BF_OIIO}/include'
+BF_OIIO_LIB = 'OpenImageIO'
+BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
+
+WITH_BF_BOOST = True
+BF_BOOST = LIBDIR + '/boost'
+BF_BOOST_INC = BF_BOOST + '/include'
+BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49 boost_filesystem-mgw47-mt-s-1_49 boost_filesystem-mgw47-mt-sd-1_49 boost_regex-mgw47-mt-s-1_49 boost_regex-mgw47-mt-sd-1_49 boost_system-mgw47-mt-s-1_49 boost_system-mgw47-mt-sd-1_49 boost_thread-mgw47-mt-s-1_49 boost_thread-mgw47-mt-sd-1_49'
+BF_BOOST_LIBPATH = BF_BOOST + '/lib'
+
+#Ray trace optimization
+WITH_BF_RAYOPTIMIZATION = True
+BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2', '-ftree-vectorize']
+
+WITH_BF_OPENMP = True
+
+##
+CC = 'gcc'
+CXX = 'g++'
+
+CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
+#CXXFLAGS = [ '-fpermissive' ]
+
+CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-D_SSIZE_T_']
+REL_CFLAGS = ['-O3', '-mmmx', '-msse', '-msse2']
+REL_CXXFLAGS = ['-O3', '-mmmx', '-msse', '-msse2']
+REL_CCFLAGS = ['-DNDEBUG',  '-O3', '-mmmx', '-msse', '-msse2']
+
+C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
+
+CC_WARN = [ '-Wall' ]
+
+LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
+
+PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
+
+## DISABLED, causes linking errors!
+## for re-distrobution, so users dont need mingw installed
+# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
+
+BF_DEBUG = False
+BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
+
+BF_PROFILE_CCFLAGS = ['-pg', '-g']
+BF_PROFILE_LINKFLAGS = ['-pg']
+BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
+BF_PROFILE = False
+
+BF_BUILDDIR = '..\\build\\win64-mingw'
+BF_INSTALLDIR='..\\install\\win64-mingw'
index ec7b6a0ce4c31ccb6f9c35df117b571837be1ec1..5a066470225eadc19a66f35cfb148b31bf235446 100644 (file)
@@ -182,12 +182,12 @@ def setup_staticlibs(lenv):
     if lenv['WITH_BF_SNDFILE'] and lenv['WITH_BF_STATICSNDFILE']:
         statlibs += Split(lenv['BF_SNDFILE_LIB_STATIC'])
 
-    if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+    if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
         libincs += Split(lenv['BF_PTHREADS_LIBPATH'])
 
     if lenv['WITH_BF_COLLADA']:
         libincs += Split(lenv['BF_OPENCOLLADA_LIBPATH'])
-        if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+        if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
             libincs += Split(lenv['BF_PCRE_LIBPATH'])
             libincs += Split(lenv['BF_EXPAT_LIBPATH'])
 
@@ -206,7 +206,7 @@ def setup_staticlibs(lenv):
             statlibs += Split(lenv['BF_BOOST_LIB_STATIC'])
 
     # setting this last so any overriding of manually libs could be handled
-    if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
+    if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'):
         libincs.append('/usr/lib')
 
     if lenv['WITH_BF_JEMALLOC']:
@@ -228,7 +228,7 @@ def setup_syslibs(lenv):
     if not lenv['WITH_BF_FREETYPE_STATIC']:
         syslibs += Split(lenv['BF_FREETYPE_LIB'])
     if lenv['WITH_BF_PYTHON'] and not lenv['WITH_BF_STATICPYTHON']:
-        if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
+        if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'win64-mingw'):
             syslibs.append(lenv['BF_PYTHON_LIB']+'_d')
         else:
             syslibs.append(lenv['BF_PYTHON_LIB'])
@@ -268,7 +268,7 @@ def setup_syslibs(lenv):
         syslibs += Split(lenv['BF_SDL_LIB'])
     if not lenv['WITH_BF_STATICOPENGL']:
         syslibs += Split(lenv['BF_OPENGL_LIB'])
-    if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross', 'win64-vc'):
+    if lenv['OURPLATFORM'] in ('win32-vc', 'win32-mingw','linuxcross', 'win64-vc', 'win64-mingw'):
         syslibs += Split(lenv['BF_PTHREADS_LIB'])
     if lenv['WITH_BF_COLLADA']:
         syslibs.append(lenv['BF_PCRE_LIB'])
@@ -341,7 +341,7 @@ def creator(env):
         if env['BF_DEBUG']:
             defs.append('_DEBUG')
 
-    if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+    if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
         incs.append(env['BF_PTHREADS_INC'])
         incs.append('#/intern/utfconv')
 
@@ -731,7 +731,7 @@ class BlenderEnvironment(SConsEnvironment):
         if not self or not libname or not source:
             print bc.FAIL+'Cannot continue.  Missing argument for BlenderRes '+libname+bc.ENDC
             self.Exit()
-        if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross', 'win64-vc'):
+        if self['OURPLATFORM'] not in ('win32-vc','win32-mingw','linuxcross', 'win64-vc', 'win64-mingw'):
             print bc.FAIL+'BlenderRes is for windows only!'+bc.END
             self.Exit()
         
index bb1948b2c167d6a7a893cd769b8be28c98c67774..ca0ac2dd8da3bf39951a6d7ba35fe4609ad03985 100644 (file)
@@ -107,6 +107,7 @@ def validate_arguments(args, bc):
             'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG',  'BF_FFMPEG_INC', 'BF_FFMPEG_DLL',
             'WITH_BF_STATICFFMPEG', 'BF_FFMPEG_LIB_STATIC',
             'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB',
+            'WITH_BF_FRAMESERVER',
             'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH',
             'WITH_BF_OPENJPEG', 'BF_OPENJPEG', 'BF_OPENJPEG_INC', 'BF_OPENJPEG_LIB', 'BF_OPENJPEG_LIBPATH',
             'WITH_BF_REDCODE', 'BF_REDCODE', 'BF_REDCODE_INC', 'BF_REDCODE_LIB', 'BF_REDCODE_LIBPATH',
@@ -154,6 +155,7 @@ def validate_arguments(args, bc):
             'WITH_BF_BOOLEAN',
             'WITH_BF_REMESH',
             'WITH_BF_OCEANSIM',
+            'WITH_BF_SMOKE',
             'WITH_BF_CXX_GUARDEDALLOC',
             'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
             'BUILDBOT_BRANCH',
@@ -264,6 +266,7 @@ def read_opts(env, cfg, args):
         (BoolVariable('WITH_BF_BOOLEAN', 'Build with boolean modifier', True)),
         (BoolVariable('WITH_BF_REMESH', 'Build with remesh modifier', True)),
         (BoolVariable('WITH_BF_OCEANSIM', 'Build with ocean simulation', False)),
+        (BoolVariable('WITH_BF_SMOKE', 'Build with smoke simulation', True)),
         ('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
         (BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
         ('BF_OPENAL', 'Base path for OpenAL', ''),
@@ -311,6 +314,8 @@ def read_opts(env, cfg, args):
         (BoolVariable('WITH_BF_CINEON', 'Support CINEON and DPX image formats if true', True)),
 
         (BoolVariable('WITH_BF_HDR', 'Support HDR image formats if true', True)),
+        
+        (BoolVariable('WITH_BF_FRAMESERVER', 'Support export to a frameserver', True)),
 
         (BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
         ('BF_FFMPEG', 'FFMPEG base path', ''),
@@ -612,7 +617,7 @@ def buildslave(target=None, source=None, env=None):
     Builder for buildbot integration. Used by buildslaves of http://builder.blender.org only.
     """
 
-    if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'darwin'):
+    if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'darwin', 'win64-mingw'):
         extension = '.zip'
     else:
         extension = '.tar.bz2'
@@ -657,7 +662,7 @@ def NSIS_print(target, source, env):
 def NSIS_Installer(target=None, source=None, env=None):
     print "="*35
 
-    if env['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc'):
+    if env['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'win64-mingw'):
         print "NSIS installer is only available on Windows."
         Exit()
     if env['OURPLATFORM'] == 'win32-vc':
diff --git a/doc/python_api/examples/bpy.types.Mesh.py b/doc/python_api/examples/bpy.types.Mesh.py
new file mode 100644 (file)
index 0000000..69edf2c
--- /dev/null
@@ -0,0 +1,41 @@
+"""
+Mesh Data
++++++++++
+
+The mesh data is accessed in object mode and intended for compact storage,
+for more flexible mesh editing from python see :mod:`bmesh`.
+
+Blender stores 4 main arrays to define mesh geometry.
+
+* :class:`Mesh.vertices` (3 points in space)
+* :class:`Mesh.edges` (reference 2 vertices)
+* :class:`Mesh.loops` (reference a single vertex and edge)
+* :class:`Mesh.polygons`: (reference a range of loops)
+
+
+Each polygon reference a slice in the loop array, this way, polygons do not store vertices or corner data such as UV's directly,
+only a reference to loops that the polygon uses.
+
+:class:`Mesh.loops`, :class:`Mesh.uv_layers` :class:`Mesh.vertex_colors` are all aligned so the same polygon loop
+indicies can be used to find the UV's and vertex colors as with as the vertices.
+
+To compare mesh API options see: :ref:`NGons and Tessellation Faces <info_gotcha_mesh_faces>`
+
+
+This example script prints the vertices and UV's for each polygon, assumes the active object is a mesh with UVs.
+"""
+
+import bpy
+
+me = bpy.context.object.data
+uv_layer = me.uv.layers.active.data
+
+for poly in me.polygons:
+    print("Polygon index: %d, length: %d" % (poly.index, poly.loop_total))
+
+    # range is used here to show how the polygons reference loops,
+    # for convenience 'poly.loop_indices' can be used instead.
+    for loop_index in range(poly.loop_start, poly.loop_start + poly.loop_total):
+        print("    Vertex: %d" % me.loops[loop_index].vertex_index)
+        print("    UV: %r" % uv_layer[loop_index].uv)
+    
index 24f113e7b50e60faf7384be8d392713e3420b65d..212ab4e4708466c3092375b79ca6b00ba0061758 100644 (file)
@@ -32,12 +32,11 @@ For an overview of BMesh data types and how they reference each other see:
 
 .. warning::
 
-   TODO Items Are
+   TODO items are...
 
    * add access to BMesh **walkers**
-   * add a way to re-tessellate an editmode bmesh.
-   * add deform vert custom-data access.
-
+   * add api for calling BMesh operators (unrelated to bpy.ops)
+   * add custom-data manipulation functions add/remove/rename.
 
 Example Script
 --------------
@@ -110,8 +109,8 @@ Here are some examples ...
    shape_lay = bm.verts.layers.shape["Key.001"]
 
    for vert in bm.verts:
-               shape = vert[shape_lay]
-        print("Vert Shape: %f, %f, %f" % (shape.x, shape.y, shape.z))
+       shape = vert[shape_lay]
+       print("Vert Shape: %f, %f, %f" % (shape.x, shape.y, shape.z))
 
 
 .. code-block:: python
@@ -125,7 +124,7 @@ Here are some examples ...
 
    for vert in bm.verts:
        dvert = vert[dvert_lay]
-               
+
        if group_index in dvert:
            print("Weight %f" % dvert[group_index])
        else:
index 25ef5175976fa90c5f899bf7ad127984d92ccbc2..eb312799b41a59a85d8e495942f8b9ef97a6c1d1 100644 (file)
@@ -132,6 +132,8 @@ write useful tools in python which are also fast to execute while in edit-mode.
 For the time being this limitation just has to be worked around but we're aware its frustrating needs to be addressed.
 
 
+.. _info_gotcha_mesh_faces:
+
 NGons and Tessellation Faces
 ============================
 
index cb03907c194330d330f11563a2731c917915b320..bfef94b35d7d79df486ad0c28e32c9178ead6537 100644 (file)
@@ -131,7 +131,7 @@ def handle_args():
                         dest="sphinx_theme",
                         type=str,
                         default='default',
-                        help =
+                        help=
                         # see SPHINX_THEMES below
                         "Sphinx theme (default='default')\n"
                         "Available themes\n"
@@ -230,10 +230,10 @@ if not ARGS.partial:
 
 else:
     # can manually edit this too:
-    FILTER_BPY_OPS = ("import.scene", )  # allow
-    FILTER_BPY_TYPES = ("bpy_struct", "Operator", "ID")  # allow
+    #FILTER_BPY_OPS = ("import.scene", )  # allow
+    #FILTER_BPY_TYPES = ("bpy_struct", "Operator", "ID")  # allow
     EXCLUDE_INFO_DOCS = True
-    EXCLUDE_MODULES = (
+    EXCLUDE_MODULES = [
         "aud",
         "bge",
         "bge.constraints",
@@ -261,7 +261,7 @@ else:
         "mathutils",
         "mathutils.geometry",
         "mathutils.noise",
-    )
+        ]
 
     # ------
     # Filter
@@ -269,7 +269,18 @@ else:
     # TODO, support bpy.ops and bpy.types filtering
     import fnmatch
     m = None
-    EXCLUDE_MODULES = tuple([m for m in EXCLUDE_MODULES if not fnmatch.fnmatchcase(m, ARGS.partial)])
+    EXCLUDE_MODULES = [m for m in EXCLUDE_MODULES if not fnmatch.fnmatchcase(m, ARGS.partial)]
+
+    # special support for bpy.types.XXX
+    FILTER_BPY_OPS = tuple([m[8:] for m in ARGS.partial.split(":") if m.startswith("bpy.ops.")])
+    if FILTER_BPY_OPS:
+        EXCLUDE_MODULES.remove("bpy.ops")
+
+    FILTER_BPY_TYPES = tuple([m[10:] for m in ARGS.partial.split(":") if m.startswith("bpy.types.")])
+    if FILTER_BPY_TYPES:
+        EXCLUDE_MODULES.remove("bpy.types")
+
+    print(FILTER_BPY_TYPES)
 
     EXCLUDE_INFO_DOCS = (not fnmatch.fnmatchcase("info", ARGS.partial))
 
diff --git a/extern/bullet2/patches/MinGW64-nopermissive.patch b/extern/bullet2/patches/MinGW64-nopermissive.patch
new file mode 100644 (file)
index 0000000..915f232
--- /dev/null
@@ -0,0 +1,39 @@
+Index: LinearMath/btSerializer.h
+===================================================================
+--- LinearMath/btSerializer.h  (revision 45919)
++++ LinearMath/btSerializer.h  (working copy)
+@@ -25,8 +25,15 @@
+ #endif
+ #include <string.h>
++#if defined(_WIN64)
++#  ifdef __MINGW64__
++#    include <basetsd.h>
++#  endif
++typedef __int64 int_ptr;
++#else
++typedef long int_ptr;
++#endif
+-
+ ///only the 32bit versions for now
+ extern unsigned char sBulletDNAstr[];
+ extern int sBulletDNAlen;
+@@ -247,7 +254,7 @@
+                               cp++;
+                       }
+                       {
+-                              nr= (long)cp;
++                              nr= (int_ptr)cp;
+                       //      long mask=3;
+                               nr= ((nr+3)&~3)-nr;
+                               while (nr--)
+@@ -282,7 +289,7 @@
+                       }
+               {
+-                              nr= (long)cp;
++                              nr= (int_ptr)cp;
+                       //      long mask=3;
+                               nr= ((nr+3)&~3)-nr;
+                               while (nr--)
diff --git a/extern/bullet2/patches/mingw64_scons.patch b/extern/bullet2/patches/mingw64_scons.patch
new file mode 100644 (file)
index 0000000..e63dee3
--- /dev/null
@@ -0,0 +1,13 @@
+Index: SConscript
+===================================================================
+--- SConscript (revision 45919)
++++ SConscript (working copy)
+@@ -11,7 +11,7 @@
+     defs += ' WIN32 NDEBUG _WINDOWS'
+     #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
+     cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
+-elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
++elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross', 'win64-mingw'):
+     defs += ' NDEBUG'
+     cflags += ['-O2']
+ elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'):
index aa30d43a025381295446ca6d8e59b0bd3fa38ade..51b27afe6866612359e52c844eb036540ca26697 100644 (file)
@@ -78,8 +78,10 @@ ATTRIBUTE_ALIGNED16  (struct) btQuantizedBvhNode
        int     getTriangleIndex() const
        {
                btAssert(isLeafNode());
+               unsigned int x=0;
+               unsigned int y = (~(x&0))<<(31-MAX_NUM_PARTS_IN_BITS);
                // Get only the lower bits where the triangle index is stored
-               return (m_escapeIndexOrTriangleIndex&~((~0)<<(31-MAX_NUM_PARTS_IN_BITS)));
+               return (m_escapeIndexOrTriangleIndex&~(y));
        }
        int     getPartId() const
        {
index a6ea33717bc9288968e52909dfb492f0be904b67..f311419d4a82496e38ed466acaab420b1c8c73d6 100644 (file)
@@ -45,7 +45,9 @@ struct btTriIndex
        int     getTriangleIndex() const
        {
                // Get only the lower bits where the triangle index is stored
-               return (m_PartIdTriangleIndex&~((~0)<<(31-MAX_NUM_PARTS_IN_BITS)));
+               unsigned int x = 0;
+               unsigned int y = (~(x&0))<<(31-MAX_NUM_PARTS_IN_BITS);
+               return (m_PartIdTriangleIndex&~(y));
        }
        int     getPartId() const
        {
index 8a89374c61256144cb6fcc75d8fe3b7312dba378..a1e766c95cee82225c16164f063aad5e6dbafae6 100644 (file)
@@ -25,7 +25,14 @@ subject to the following restrictions:
 #endif
 #include <string.h>
 
-
+#if defined(_WIN64)
+#  ifdef __MINGW64__
+#    include <basetsd.h>
+#  endif
+typedef __int64 int_ptr;
+#else
+typedef long int_ptr;
+#endif
 
 ///only the 32bit versions for now
 extern unsigned char sBulletDNAstr[];
@@ -247,7 +254,7 @@ protected:
                                cp++;
                        }
                        {
-                               nr= (long)cp;
+                               nr= (int_ptr)cp;
                        //      long mask=3;
                                nr= ((nr+3)&~3)-nr;
                                while (nr--)
@@ -282,7 +289,7 @@ protected:
                        }
 
                {
-                               nr= (long)cp;
+                               nr= (int_ptr)cp;
                        //      long mask=3;
                                nr= ((nr+3)&~3)-nr;
                                while (nr--)
index fa00ad7bc2eebb307f6d3a263213b60e7b0c95db..f59bcba9fa61e4980435523eddd91f0d61004291 100644 (file)
@@ -11,7 +11,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
     defs += ' WIN32 NDEBUG _WINDOWS'
     #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
     cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
-elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross'):
+elif env['OURPLATFORM'] in ('win32-mingw', 'linuxcross', 'win64-mingw'):
     defs += ' NDEBUG'
     cflags += ['-O2']
 elif env['OURPLATFORM'] in ('linux', 'freebsd4', 'freebsd5'):
index e2f3c814e2eb741cecd04d5ac8e1a63c6db2d8b5..1ba67e51327dfcaa3771faa803273dc80abaf7c5 100644 (file)
@@ -14,7 +14,7 @@ incs = ['include']
 if env['WITH_BF_BOOST']:
     if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
         # Boost is setting as preferred collections library in the Carve code when using MSVC compiler
-        if env['OURPLATFORM'] != 'win32-mingw':
+        if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'):
             defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
 
     defs.append('CARVE_SYSTEM_BOOST')
index e68b2c7e90e4dcf92b5d1097f3f967c23b6ff6f0..881367fe6877e19cd0afcf678bcd560917c54ff5 100755 (executable)
@@ -114,7 +114,7 @@ incs = ['include']
 if env['WITH_BF_BOOST']:
     if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
         # Boost is setting as preferred collections library in the Carve code when using MSVC compiler
-        if env['OURPLATFORM'] != 'win32-mingw':
+        if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'):
             defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
 
     defs.append('CARVE_SYSTEM_BOOST')
diff --git a/extern/carve/patches/mingw_w64.patch b/extern/carve/patches/mingw_w64.patch
new file mode 100644 (file)
index 0000000..26a30be
--- /dev/null
@@ -0,0 +1,13 @@
+Index: bundle.sh
+===================================================================
+--- bundle.sh  (revision 45912)
++++ bundle.sh  (working copy)
+@@ -114,7 +114,7 @@
+ if env['WITH_BF_BOOST']:
+     if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
+         # Boost is setting as preferred collections library in the Carve code when using MSVC compiler
+-        if env['OURPLATFORM'] != 'win32-mingw':
++        if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'):
+             defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
+     defs.append('CARVE_SYSTEM_BOOST')
index fbcd92503d8dc5af7da292ffe2f60514d3ddfe7d..fbb6ee36f8559eb96c291057c725f549bcce0259 100644 (file)
@@ -34,7 +34,7 @@ incs = '. ../Eigen3'
 incs += ' ' + env['BF_PNG_INC']
 incs += ' ' + env['BF_ZLIB_INC']
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
     if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
         incs += ' ./third_party/msinttypes'
index a34e45a38b0a0dbdfd4e933c3b76e8f8ce75c6af..30d08cd680a46d0be8aed9c0493e7c6097c0cf17 100755 (executable)
@@ -248,7 +248,7 @@ incs = '. ../Eigen3'
 incs += ' ' + env['BF_PNG_INC']
 incs += ' ' + env['BF_ZLIB_INC']
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
     if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
         incs += ' ./third_party/msinttypes'
index ad707fb76f2930234291cd613d42d6ba2c06b618..d2cadf4b57936107d2a582e47714dbf23aa6bfba 100644 (file)
@@ -33,7 +33,7 @@
 #include <Eigen/QR>
 #include <Eigen/SVD>
 
-#if _WIN32 || __APPLE__ || __FreeBSD__
+#if (defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)) && !defined(__MINGW64__)
   void static sincos (double x, double *sinx, double *cosx) {
     *sinx = sin(x);
     *cosx = cos(x);
diff --git a/extern/libmv/patches/mingw_w64_support.patch b/extern/libmv/patches/mingw_w64_support.patch
new file mode 100644 (file)
index 0000000..360287e
--- /dev/null
@@ -0,0 +1,58 @@
+Index: bundle.sh
+===================================================================
+--- bundle.sh  (revision 45912)
++++ bundle.sh  (working copy)
+@@ -248,7 +248,7 @@
+ incs += ' ' + env['BF_PNG_INC']
+ incs += ' ' + env['BF_ZLIB_INC']
+-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
++if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
+     incs += ' ./third_party/glog/src/windows ./third_party/glog/src/windows/glog'
+     if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
+         incs += ' ./third_party/msinttypes'
+Index: libmv/numeric/numeric.h
+===================================================================
+--- libmv/numeric/numeric.h    (revision 45912)
++++ libmv/numeric/numeric.h    (working copy)
+@@ -33,7 +33,7 @@
+ #include <Eigen/QR>
+ #include <Eigen/SVD>
+-#if _WIN32 || __APPLE__ || __FreeBSD__
++#if (defined(_WIN32) || defined(__APPLE__) || defined(__FreeBSD__)) && !defined(__MINGW64__)
+   void static sincos (double x, double *sinx, double *cosx) {
+     *sinx = sin(x);
+     *cosx = cos(x);
+Index: third_party/glog/src/windows/port.cc
+===================================================================
+--- third_party/glog/src/windows/port.cc       (revision 45912)
++++ third_party/glog/src/windows/port.cc       (working copy)
+@@ -55,6 +55,8 @@
+   return _vsnprintf(str, size-1, format, ap);
+ }
++// MinGW64 defines
++#ifndef __MINGW64__
+ int snprintf(char *str, size_t size, const char *format, ...) {
+   va_list ap;
+   va_start(ap, format);
+@@ -62,3 +64,4 @@
+   va_end(ap);
+   return r;
+ }
++#endif
+Index: third_party/glog/src/windows/port.h
+===================================================================
+--- third_party/glog/src/windows/port.h        (revision 45912)
++++ third_party/glog/src/windows/port.h        (working copy)
+@@ -120,7 +120,9 @@
+ #define DEFAULT_TEMPLATE_ROOTDIR  ".."
+ // ----------------------------------- SYSTEM/PROCESS
++#ifndef __MINGW64__
+ typedef int pid_t;
++#endif
+ #define getpid  _getpid
+ // ----------------------------------- THREADS
index bfa6e70afbb051ee7b12aba7f3c9a029fd021e4e..58e28b026c0d482072346808f587a595dfab120e 100644 (file)
@@ -55,6 +55,8 @@ int safe_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
   return _vsnprintf(str, size-1, format, ap);
 }
 
+// MinGW64 defines
+#ifndef __MINGW64__
 int snprintf(char *str, size_t size, const char *format, ...) {
   va_list ap;
   va_start(ap, format);
@@ -62,3 +64,4 @@ int snprintf(char *str, size_t size, const char *format, ...) {
   va_end(ap);
   return r;
 }
+#endif
index abfcf65384ce05f81128d190fe413543edd3952e..72e3906f82f0a6519bf415f657a7dee969f3e6b3 100644 (file)
@@ -120,7 +120,9 @@ extern int safe_vsnprintf(char *str, size_t size,
 #define DEFAULT_TEMPLATE_ROOTDIR  ".."
 
 // ----------------------------------- SYSTEM/PROCESS
+#ifndef __MINGW64__
 typedef int pid_t;
+#endif
 #define getpid  _getpid
 
 // ----------------------------------- THREADS
index d7c3715349b2aa37780a5c120df498d0c8c0a1b9..b6305f7dbaba06a6d877f596ec450edf66a4b8a8 100644 (file)
@@ -36,5 +36,5 @@ if NEW_CSG == 'false':
 else:
     SConscript(['csg/SConscript'])
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-mingw', 'linuxcross', 'win64-vc'):
     SConscript(['utfconv/SConscript'])
index b8d5a56a6255f5c9e7e7f4176011b8cc8f33a750..50c81db46dd77f0f424ec45910d85bf487cc271f 100644 (file)
@@ -41,7 +41,7 @@ if env['WITH_BF_PYTHON']:
     incs += ' Python ' + env['BF_PYTHON_INC']
     defs.append('WITH_PYTHON')
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
 
 env.BlenderLib ('bf_intern_audaspace', sources, Split(incs), defs, libtype=['intern','player'], priority = [25,215] )
index b7157f672b4a945386052996d0f31b6f216c932c..624a4d0b2c80060ca650a19a571a3facac2e7cea 100644 (file)
 #include <cstring>
 #include <cstdlib>
 
-#define AUD_ALIGN(a) (a + 16 - ((long)a & 15))
+#if defined(_WIN64)
+#  ifdef __MINGW64__
+#    include <basetsd.h>
+#  endif
+typedef unsigned __int64 uint_ptr;
+#else
+typedef unsigned long uint_ptr;
+#endif
+
+#define AUD_ALIGN(a) (a + 16 - ((uint_ptr)a & 15))
 
 AUD_Buffer::AUD_Buffer(int size)
 {
diff --git a/intern/audaspace/patches/mingw64-nopermissive.patch b/intern/audaspace/patches/mingw64-nopermissive.patch
new file mode 100644 (file)
index 0000000..64420d2
--- /dev/null
@@ -0,0 +1,23 @@
+Index: intern/AUD_Buffer.cpp
+===================================================================
+--- intern/AUD_Buffer.cpp      (revision 45919)
++++ intern/AUD_Buffer.cpp      (working copy)
+@@ -33,8 +33,17 @@
+ #include <cstring>
+ #include <cstdlib>
+-#define AUD_ALIGN(a) (a + 16 - ((long)a & 15))
++#if defined(_WIN64)
++#  ifdef __MINGW64__
++#    include <basetsd.h>
++#  endif
++typedef unsigned __int64 uint_ptr;
++#else
++typedef unsigned long uint_ptr;
++#endif
++#define AUD_ALIGN(a) (a + 16 - ((uint_ptr)a & 15))
++
+ AUD_Buffer::AUD_Buffer(int size)
+ {
+       m_size = size;
index 1c8c912614dd6e1f2dda14d68e8a9cb639a43c72..f630d1d58e0ee71c91fd9721ad609172616ff9bb 100644 (file)
@@ -18,13 +18,13 @@ else:
     if env['WITH_BF_BOOST']:
         if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
             # Boost is setting as preferred collections library in the Carve code when using MSVC compiler
-            if env['OURPLATFORM'] != 'win32-mingw':
+            if env['OURPLATFORM'] not in ('win32-mingw', 'win64-mingw'):
                 defs.append('HAVE_BOOST_UNORDERED_COLLECTIONS')
 
         defs.append('CARVE_SYSTEM_BOOST')
         incs +=  ' ' + env['BF_BOOST_INC']
 
-if (env['OURPLATFORM'] == 'win32-mingw'):
+if (env['OURPLATFORM'] in ('win32-mingw', 'win64-mingw')):
     env.BlenderLib ('bf_intern_bop', sources, Split(incs) , [], libtype='intern', priority = 5 )
 else:
     env.BlenderLib ('bf_intern_bop', sources, Split(incs) , defs, libtype='intern', priority = 5 )
index 2ea224f052dff2089ea80572dc72c3044e597662..34c6e8df2fd2a917fbce303895a662dc213c7c63 100644 (file)
@@ -39,7 +39,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
 else:
     cxxflags.append('-ffast-math'.split())
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs.append(env['BF_PTHREADS_INC'])
 
 # optimized kernel
index b93f61b98d509e4cbd8ca2f395d651e09f75e8a1..b954ff45e2781db68001b58b351df06567e81adc 100644 (file)
@@ -724,7 +724,7 @@ static void xml_read_patch(const XMLReadState& state, pugi::xml_node node)
                        LinearQuadPatch *bpatch = new LinearQuadPatch();
 
                        for(int i = 0; i < 4; i++)
-                               P[i] = transform(&state.tfm, P[i]);
+                               P[i] = transform_point(&state.tfm, P[i]);
                        memcpy(bpatch->hull, &P[0], sizeof(bpatch->hull));
 
                        patch = bpatch;
@@ -738,7 +738,7 @@ static void xml_read_patch(const XMLReadState& state, pugi::xml_node node)
                        BicubicPatch *bpatch = new BicubicPatch();
 
                        for(int i = 0; i < 16; i++)
-                               P[i] = transform(&state.tfm, P[i]);
+                               P[i] = transform_point(&state.tfm, P[i]);
                        memcpy(bpatch->hull, &P[0], sizeof(bpatch->hull));
 
                        patch = bpatch;
@@ -777,7 +777,7 @@ static void xml_read_light(const XMLReadState& state, pugi::xml_node node)
        Light *light = new Light();
        light->shader = state.shader;
        xml_read_float3(&light->co, node, "P");
-       light->co = transform(&state.tfm, light->co);
+       light->co = transform_point(&state.tfm, light->co);
 
        state.scene->lights.push_back(light);
 }
index 47aba845ba3f8c257971facc06dac8f4f0655451..4a8b639b390ca731a8c96abf415841eff4ca732a 100644 (file)
@@ -181,6 +181,8 @@ class CyclesRender_PT_layers(CyclesButtonsPanel, Panel):
         col.label(text="Material:")
         col.prop(rl, "material_override", text="")
 
+        col.prop(rl, "use_sky", "Use Environment")
+
         col = split.column()
         col.prop(rl, "layers", text="Layer")
         col.label(text="Mask Layers:")
index def1c64c0f032735c429c3e04f42a065b30f44f2..a21b22bc35a62a6e08754ae7b3c605d24efef1a4 100644 (file)
@@ -250,7 +250,7 @@ static void blender_camera_sync(Camera *cam, BlenderCamera *bcam, int width, int
 
 /* Sync Render Camera */
 
-void BlenderSync::sync_camera(int width, int height)
+void BlenderSync::sync_camera(BL::Object b_override, int width, int height)
 {
        BlenderCamera bcam;
        blender_camera_init(&bcam);
@@ -264,6 +264,9 @@ void BlenderSync::sync_camera(int width, int height)
        /* camera object */
        BL::Object b_ob = b_scene.camera();
 
+       if(b_override)
+               b_ob = b_override;
+
        if(b_ob) {
                blender_camera_from_object(&bcam, b_ob);
                bcam.matrix = get_transform(b_ob.matrix_world());
index 7c8d36ab574e0d437a1ce72a81c1b1d5217927e2..7caa6b3d511c2e47dbfbeb7c27f160aa27b16818 100644 (file)
@@ -227,6 +227,7 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool holdout, bool object_updated)
        /* test if we can instance or if the object is modified */
        BL::ID b_ob_data = b_ob.data();
        BL::ID key = (object_is_modified(b_ob) || holdout)? b_ob: b_ob_data;
+       BL::Material material_override = render_layer.material_override;
 
        /* find shader indices */
        vector<uint> used_shaders;
@@ -246,6 +247,8 @@ Mesh *BlenderSync::sync_mesh(BL::Object b_ob, bool holdout, bool object_updated)
        if(used_shaders.size() == 0) {
                if(holdout)
                        used_shaders.push_back(scene->default_holdout);
+               else if(material_override)
+                       find_shader(material_override, used_shaders, scene->default_surface);
                else
                        used_shaders.push_back(scene->default_surface);
        }
index a5471655b5f9f53f06e0badb5039e44f29369e00..dc6c69e29042167046bb4993cc80ee65eaf8f261 100644 (file)
@@ -96,7 +96,7 @@ void BlenderSession::create_session()
        if(b_rv3d)
                sync->sync_view(b_v3d, b_rv3d, width, height);
        else
-               sync->sync_camera(width, height);
+               sync->sync_camera(b_engine.camera_override(), width, height);
 
        /* create session */
        session = new Session(session_params);
@@ -314,7 +314,7 @@ void BlenderSession::synchronize()
        if(b_rv3d)
                sync->sync_view(b_v3d, b_rv3d, width, height);
        else
-               sync->sync_camera(width, height);
+               sync->sync_camera(b_engine.camera_override(), width, height);
 
        /* unlock */
        session->scene->mutex.unlock();
index 74d412082878303826c4f00135a5cbe6c0edac93..52d97753db3962e11b98885e1703725143331b9e 100644 (file)
@@ -728,6 +728,7 @@ void BlenderSync::sync_world()
 
        PointerRNA cscene = RNA_pointer_get(&b_scene.ptr, "cycles");
        background->transparent = get_boolean(cscene, "film_transparent");
+       background->use = render_layer.use_background;
 
        if(background->modified(prevbackground))
                background->tag_update(scene);
index 066e5b776b8b2fdc9e98f13b6d40dad19f5e44e6..5a28629877441efc83fd9874ad7d7f26dd2863b5 100644 (file)
@@ -207,6 +207,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
                        render_layer.layer = render_layer.scene_layer;
                        render_layer.holdout_layer = 0;
                        render_layer.material_override = PointerRNA_NULL;
+                       render_layer.use_background = true;
                        return;
                }
        }
@@ -224,6 +225,7 @@ void BlenderSync::sync_render_layers(BL::SpaceView3D b_v3d, const char *layer)
                        render_layer.holdout_layer = get_layer(b_rlay->layers_zmask());
                        render_layer.layer |= render_layer.holdout_layer;
                        render_layer.material_override = b_rlay->material_override();
+                       render_layer.use_background = b_rlay->use_sky();
                }
 
                first_layer = false;
index bfb530c9f99156304c5a7ec9f73624dcab0261ce..d2550a1ffd7150bd77276aa320f504edccf773d9 100644 (file)
@@ -55,7 +55,7 @@ public:
        /* sync */
        bool sync_recalc();
        void sync_data(BL::SpaceView3D b_v3d, const char *layer = 0);
-       void sync_camera(int width, int height);
+       void sync_camera(BL::Object b_override, int width, int height);
        void sync_view(BL::SpaceView3D b_v3d, BL::RegionView3D b_rv3d, int width, int height);
 
        /* get parameters */
@@ -107,7 +107,8 @@ private:
        struct RenderLayerInfo {
                RenderLayerInfo()
                : scene_layer(0), layer(0), holdout_layer(0),
-                 material_override(PointerRNA_NULL)
+                 material_override(PointerRNA_NULL),
+                 use_background(true)
                {}
 
                string name;
@@ -115,6 +116,7 @@ private:
                uint layer;
                uint holdout_layer;
                BL::Material material_override;
+               bool use_background;
        } render_layer;
 };
 
index 35215fd0f9fd1de4b58cb491cd5209ddf42486bb..523ae8ae92621fb92d7167ee24418c7889e12904 100644 (file)
@@ -59,7 +59,7 @@ __device_inline void bvh_instance_push(KernelGlobals *kg, int object, const Ray
 {
        Transform tfm = object_fetch_transform(kg, object, OBJECT_INVERSE_TRANSFORM);
 
-       *P = transform(&tfm, ray->P);
+       *P = transform_point(&tfm, ray->P);
 
        float3 dir = transform_direction(&tfm, ray->D);
 
@@ -351,7 +351,7 @@ __device_inline float3 bvh_triangle_refine(KernelGlobals *kg, const Intersection
        if(isect->object != ~0) {
                Transform tfm = object_fetch_transform(kg, isect->object, OBJECT_INVERSE_TRANSFORM);
 
-               P = transform(&tfm, P);
+               P = transform_point(&tfm, P);
                D = transform_direction(&tfm, D*t);
                D = normalize_len(D, &t);
        }
@@ -367,7 +367,7 @@ __device_inline float3 bvh_triangle_refine(KernelGlobals *kg, const Intersection
 
        if(isect->object != ~0) {
                Transform tfm = object_fetch_transform(kg, isect->object, OBJECT_TRANSFORM);
-               P = transform(&tfm, P);
+               P = transform_point(&tfm, P);
        }
 
        return P;
index 0460765fe862552b91eebd4cda69e22f819d5dc9..58c482212df8142d19567b5b08c9f5d04f5c8b9e 100644 (file)
@@ -39,7 +39,7 @@ __device void camera_sample_perspective(KernelGlobals *kg, float raster_x, float
 {
        /* create ray form raster position */
        Transform rastertocamera = kernel_data.cam.rastertocamera;
-       float3 Pcamera = transform(&rastertocamera, make_float3(raster_x, raster_y, 0.0f));
+       float3 Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y, 0.0f));
 
        ray->P = make_float3(0.0f, 0.0f, 0.0f);
        ray->D = Pcamera;
@@ -63,7 +63,7 @@ __device void camera_sample_perspective(KernelGlobals *kg, float raster_x, float
        /* transform ray from camera to world */
        Transform cameratoworld = kernel_data.cam.cameratoworld;
 
-       ray->P = transform(&cameratoworld, ray->P);
+       ray->P = transform_point(&cameratoworld, ray->P);
        ray->D = transform_direction(&cameratoworld, ray->D);
        ray->D = normalize(ray->D);
 
@@ -93,7 +93,7 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa
 {
        /* create ray form raster position */
        Transform rastertocamera = kernel_data.cam.rastertocamera;
-       float3 Pcamera = transform(&rastertocamera, make_float3(raster_x, raster_y, 0.0f));
+       float3 Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y, 0.0f));
 
        ray->P = Pcamera;
        ray->D = make_float3(0.0f, 0.0f, 1.0f);
@@ -101,7 +101,7 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa
        /* transform ray from camera to world */
        Transform cameratoworld = kernel_data.cam.cameratoworld;
 
-       ray->P = transform(&cameratoworld, ray->P);
+       ray->P = transform_point(&cameratoworld, ray->P);
        ray->D = transform_direction(&cameratoworld, ray->D);
        ray->D = normalize(ray->D);
 
@@ -127,7 +127,7 @@ __device void camera_sample_orthographic(KernelGlobals *kg, float raster_x, floa
 __device void camera_sample_environment(KernelGlobals *kg, float raster_x, float raster_y, Ray *ray)
 {
        Transform rastertocamera = kernel_data.cam.rastertocamera;
-       float3 Pcamera = transform(&rastertocamera, make_float3(raster_x, raster_y, 0.0f));
+       float3 Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y, 0.0f));
 
        /* create ray form raster position */
        ray->P = make_float3(0.0, 0.0f, 0.0f);
@@ -136,7 +136,7 @@ __device void camera_sample_environment(KernelGlobals *kg, float raster_x, float
        /* transform ray from camera to world */
        Transform cameratoworld = kernel_data.cam.cameratoworld;
 
-       ray->P = transform(&cameratoworld, ray->P);
+       ray->P = transform_point(&cameratoworld, ray->P);
        ray->D = transform_direction(&cameratoworld, ray->D);
        ray->D = normalize(ray->D);
 
@@ -145,10 +145,10 @@ __device void camera_sample_environment(KernelGlobals *kg, float raster_x, float
        ray->dP.dx = make_float3(0.0f, 0.0f, 0.0f);
        ray->dP.dy = make_float3(0.0f, 0.0f, 0.0f);
 
-       Pcamera = transform(&rastertocamera, make_float3(raster_x + 1.0f, raster_y, 0.0f));
+       Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x + 1.0f, raster_y, 0.0f));
        ray->dD.dx = normalize(transform_direction(&cameratoworld, equirectangular_to_direction(Pcamera.x, Pcamera.y))) - ray->D;
 
-       Pcamera = transform(&rastertocamera, make_float3(raster_x, raster_y + 1.0f, 0.0f));
+       Pcamera = transform_perspective(&rastertocamera, make_float3(raster_x, raster_y + 1.0f, 0.0f));
        ray->dD.dy = normalize(transform_direction(&cameratoworld, equirectangular_to_direction(Pcamera.x, Pcamera.y))) - ray->D;
 #endif
 
index 3995e782abd16044b5b8b7bb85da1917d9e1a2d9..ccbd3d069b4215311b6879709076747f7f1378c1 100644 (file)
@@ -61,7 +61,7 @@ __device void mbvh_instance_push(KernelGlobals *kg, int object, MBVHRay *ray)
 {
        Transform tfm = object_fetch_transform(kg, object, OBJECT_INVERSE_TRANSFORM);
 
-       ray->P = transform(&tfm, ray->origP);
+       ray->P = transform_point(&tfm, ray->origP);
 
        float3 dir = ray->origD;
 
index 318a6fea489cdb7ff88f6b77b4b74dd1d6000829..b676f58e5d4fd74251ee4c83dc6a8818c9f70feb 100644 (file)
@@ -42,7 +42,7 @@ __device_inline Transform object_fetch_transform(KernelGlobals *kg, int object,
 __device_inline void object_position_transform(KernelGlobals *kg, int object, float3 *P)
 {
        Transform tfm = object_fetch_transform(kg, object, OBJECT_TRANSFORM);
-       *P = transform(&tfm, *P);
+       *P = transform_point(&tfm, *P);
 }
 
 __device_inline void object_normal_transform(KernelGlobals *kg, int object, float3 *N)
index d195af293b7454e97f1d537a6df19cd53e77f775..fd4ee17cdc1120e5e69aa012c43a2057c8766726 100644 (file)
@@ -53,7 +53,7 @@ __device_inline void kernel_write_data_passes(KernelGlobals *kg, __global float
                if(sample == 0) {
                        if(flag & PASS_DEPTH) {
                                Transform tfm = kernel_data.cam.worldtocamera;
-                               float depth = len(transform(&tfm, sd->P));
+                               float depth = len(transform_point(&tfm, sd->P));
 
                                kernel_write_pass_float(buffer + kernel_data.film.pass_depth, sample, depth);
                        }
index 53ce374e15072632badb4edbf995accd980d3893..ff12e85375ca6f447210dc20a21c5ad290930833 100644 (file)
@@ -147,14 +147,14 @@ __device_inline float path_state_terminate_probability(KernelGlobals *kg, PathSt
 
 __device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *ray, float3 *shadow)
 {
+       *shadow = make_float3(1.0f, 1.0f, 1.0f);
+
        if(ray->t == 0.0f)
                return false;
        
        Intersection isect;
        bool result = scene_intersect(kg, ray, PATH_RAY_SHADOW_OPAQUE, &isect);
 
-       *shadow = make_float3(1.0f, 1.0f, 1.0f);
-
 #ifdef __TRANSPARENT_SHADOWS__
        if(result && kernel_data.integrator.transparent_shadows) {
                /* transparent shadows work in such a way to try to minimize overhead
index 96e68d797ddd67b9280ad7a8f64beafde747993c..525b616921d02062a729115642f53991aadfe1c1 100644 (file)
@@ -50,7 +50,7 @@ __device_inline void qbvh_instance_push(KernelGlobals *kg, int object, const Ray
 {
        Transform tfm = object_fetch_transform(kg, object, OBJECT_INVERSE_TRANSFORM);
 
-       *P = transform(&tfm, ray->P);
+       *P = transform_point(&tfm, ray->P);
 
        float3 dir = transform_direction(&tfm, ray->D);
 
@@ -384,7 +384,7 @@ __device_inline float3 bvh_triangle_refine(KernelGlobals *kg, const Intersection
        if(isect->object != ~0) {
                Transform tfm = object_fetch_transform(kg, isect->object, OBJECT_INVERSE_TRANSFORM);
 
-               P = transform(&tfm, P);
+               P = transform_point(&tfm, P);
                D = transform_direction(&tfm, D*t);
                D = normalize_len(D, &t);
        }
@@ -400,7 +400,7 @@ __device_inline float3 bvh_triangle_refine(KernelGlobals *kg, const Intersection
 
        if(isect->object != ~0) {
                Transform tfm = object_fetch_transform(kg, isect->object, OBJECT_TRANSFORM);
-               P = transform(&tfm, P);
+               P = transform_point(&tfm, P);
        }
 
        return P;
index cf161ddcd8cf67f96b4cc2e7975ad889396749d2..f13cefb77640797aed3a7a69bbe557102451cdfe 100644 (file)
@@ -25,7 +25,7 @@ __device void svm_node_camera(KernelGlobals *kg, ShaderData *sd, float *stack, u
        float3 vector;
 
        Transform tfm = kernel_data.cam.worldtocamera;
-       vector = transform(&tfm, sd->P);
+       vector = transform_point(&tfm, sd->P);
        zdepth = vector.z;
        distance = len(vector);
 
index 7633c3e783b128d188108a8485ab9cd15b13ed03..6dc74aece085f35d970c4ab83b6844b9ee6d7c7f 100644 (file)
@@ -30,7 +30,7 @@ __device void svm_node_mapping(KernelGlobals *kg, ShaderData *sd, float *stack,
        tfm.z = read_node_float(kg, offset);
        tfm.w = read_node_float(kg, offset);
 
-       float3 r = transform(&tfm, v);
+       float3 r = transform_point(&tfm, v);
        stack_store_float3(stack, out_offset, r);
 }
 
index bcf3716ae57095250dea095383eefaa7efe86568..f494b6d66e1c9b6c6e70b2b057b651c00432fa7d 100644 (file)
@@ -34,7 +34,7 @@ __device void svm_node_tex_coord(KernelGlobals *kg, ShaderData *sd, float *stack
                case NODE_TEXCO_OBJECT: {
                        if(sd->object != ~0) {
                                Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_INVERSE_TRANSFORM);
-                               data = transform(&tfm, sd->P);
+                               data = transform_point(&tfm, sd->P);
                        }
                        else
                                data = sd->P;
@@ -44,18 +44,18 @@ __device void svm_node_tex_coord(KernelGlobals *kg, ShaderData *sd, float *stack
                        Transform tfm = kernel_data.cam.worldtocamera;
 
                        if(sd->object != ~0)
-                               data = transform(&tfm, sd->P);
+                               data = transform_point(&tfm, sd->P);
                        else
-                               data = transform(&tfm, sd->P + svm_background_offset(kg));
+                               data = transform_point(&tfm, sd->P + svm_background_offset(kg));
                        break;
                }
                case NODE_TEXCO_WINDOW: {
                        Transform tfm = kernel_data.cam.worldtondc;
 
                        if(sd->object != ~0)
-                               data = transform(&tfm, sd->P);
+                               data = transform_perspective(&tfm, sd->P);
                        else
-                               data = transform(&tfm, sd->P + svm_background_offset(kg));
+                               data = transform_perspective(&tfm, sd->P + svm_background_offset(kg));
                        break;
                }
                case NODE_TEXCO_REFLECTION: {
@@ -79,7 +79,7 @@ __device void svm_node_tex_coord_bump_dx(KernelGlobals *kg, ShaderData *sd, floa
                case NODE_TEXCO_OBJECT: {
                        if(sd->object != ~0) {
                                Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_INVERSE_TRANSFORM);
-                               data = transform(&tfm, sd->P + sd->dP.dx);
+                               data = transform_point(&tfm, sd->P + sd->dP.dx);
                        }
                        else
                                data = sd->P + sd->dP.dx;
@@ -89,18 +89,18 @@ __device void svm_node_tex_coord_bump_dx(KernelGlobals *kg, ShaderData *sd, floa
                        Transform tfm = kernel_data.cam.worldtocamera;
 
                        if(sd->object != ~0)
-                               data = transform(&tfm, sd->P + sd->dP.dx);
+                               data = transform_point(&tfm, sd->P + sd->dP.dx);
                        else
-                               data = transform(&tfm, sd->P + sd->dP.dx + svm_background_offset(kg));
+                               data = transform_point(&tfm, sd->P + sd->dP.dx + svm_background_offset(kg));
                        break;
                }
                case NODE_TEXCO_WINDOW: {
                        Transform tfm = kernel_data.cam.worldtondc;
 
                        if(sd->object != ~0)
-                               data = transform(&tfm, sd->P + sd->dP.dx);
+                               data = transform_perspective(&tfm, sd->P + sd->dP.dx);
                        else
-                               data = transform(&tfm, sd->P + sd->dP.dx + svm_background_offset(kg));
+                               data = transform_perspective(&tfm, sd->P + sd->dP.dx + svm_background_offset(kg));
                        break;
                }
                case NODE_TEXCO_REFLECTION: {
@@ -127,7 +127,7 @@ __device void svm_node_tex_coord_bump_dy(KernelGlobals *kg, ShaderData *sd, floa
                case NODE_TEXCO_OBJECT: {
                        if(sd->object != ~0) {
                                Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_INVERSE_TRANSFORM);
-                               data = transform(&tfm, sd->P + sd->dP.dy);
+                               data = transform_point(&tfm, sd->P + sd->dP.dy);
                        }
                        else
                                data = sd->P + sd->dP.dy;
@@ -137,18 +137,18 @@ __device void svm_node_tex_coord_bump_dy(KernelGlobals *kg, ShaderData *sd, floa
                        Transform tfm = kernel_data.cam.worldtocamera;
 
                        if(sd->object != ~0)
-                               data = transform(&tfm, sd->P + sd->dP.dy);
+                               data = transform_point(&tfm, sd->P + sd->dP.dy);
                        else
-                               data = transform(&tfm, sd->P + sd->dP.dy + svm_background_offset(kg));
+                               data = transform_point(&tfm, sd->P + sd->dP.dy + svm_background_offset(kg));
                        break;
                }
                case NODE_TEXCO_WINDOW: {
                        Transform tfm = kernel_data.cam.worldtondc;
 
                        if(sd->object != ~0)
-                               data = transform(&tfm, sd->P + sd->dP.dy);
+                               data = transform_perspective(&tfm, sd->P + sd->dP.dy);
                        else
-                               data = transform(&tfm, sd->P + sd->dP.dy + svm_background_offset(kg));
+                               data = transform_perspective(&tfm, sd->P + sd->dP.dy + svm_background_offset(kg));
                        break;
                }
                case NODE_TEXCO_REFLECTION: {
index 13d72307765ee2e8f07e86c9ea2563f51c5b97f4..68eb39bdd29fc38e7d6fcc6706b4cf06873ee834 100644 (file)
@@ -24,7 +24,7 @@ CCL_NAMESPACE_BEGIN
 /* Stack */
 
 /* SVM stack has a fixed size */
-#define SVM_STACK_SIZE 64
+#define SVM_STACK_SIZE 255
 /* SVM stack offsets with this value indicate that it's not on the stack */
 #define SVM_STACK_INVALID 255 
 
index 919bd83f1957f504a61668fcd213aac94eee5cbb..76d26dd34b57e60dd8b0d5b3b310aaade7bf4c13 100644 (file)
@@ -35,6 +35,8 @@ Background::Background()
        ao_factor = 0.0f;
        ao_distance = FLT_MAX;
 
+       use = true;
+
        transparent = false;
        need_update = true;
 }
@@ -57,7 +59,10 @@ void Background::device_update(Device *device, DeviceScene *dscene, Scene *scene
        kbackground->ao_distance = ao_distance;
 
        kbackground->transparent = transparent;
-       kbackground->shader = scene->shader_manager->get_shader_id(scene->default_background);
+       if(use)
+               kbackground->shader = scene->shader_manager->get_shader_id(scene->default_background);
+       else
+               kbackground->shader = scene->shader_manager->get_shader_id(scene->default_empty);
 
        need_update = false;
 }
@@ -69,6 +74,7 @@ void Background::device_free(Device *device, DeviceScene *dscene)
 bool Background::modified(const Background& background)
 {
        return !(transparent == background.transparent &&
+               use == background.use &&
                ao_factor == background.ao_factor &&
                ao_distance == background.ao_distance);
 }
index 40dacd9d6b19bfc892347f060bc24a540f25459b..3c1cd3915e5e158ddd3feb172fc3ab028365b7df 100644 (file)
@@ -32,6 +32,8 @@ public:
        float ao_factor;
        float ao_distance;
 
+       bool use;
+
        bool transparent;
        bool need_update;
 
index 62a322b3a0f5cff46c77d8a1f7ab446f99bcaaa7..bda20a8ab9d6ab3cd084c07b56ceec8794566574 100644 (file)
@@ -119,7 +119,7 @@ void RenderBuffers::reset(Device *device, BufferParams& params_)
        
        for(x=0; x<width; x++)
                for(y=0; y<height; y++)
-                       init_state[x + y*width] = hash_int_2d(x, y);
+                       init_state[x + y*width] = hash_int_2d(params.full_x+x, params.full_y+y);
 
        device->mem_alloc(rng_state, MEM_READ_WRITE);
        device->mem_copy_to(rng_state);
index 6edf9c66f1d7f37d605cbab5c17d5e5bbcedbfde..f9290dfc83544d59da2b6a451c65cd20b69b448c 100644 (file)
@@ -107,10 +107,10 @@ void Camera::update()
                dy = transform_direction(&rastertocamera, make_float3(0, 1, 0));
        }
        else if(type == CAMERA_PERSPECTIVE) {
-               dx = transform(&rastertocamera, make_float3(1, 0, 0)) -
-                    transform(&rastertocamera, make_float3(0, 0, 0));
-               dy = transform(&rastertocamera, make_float3(0, 1, 0)) -
-                    transform(&rastertocamera, make_float3(0, 0, 0));
+               dx = transform_perspective(&rastertocamera, make_float3(1, 0, 0)) -
+                    transform_perspective(&rastertocamera, make_float3(0, 0, 0));
+               dy = transform_perspective(&rastertocamera, make_float3(0, 1, 0)) -
+                    transform_perspective(&rastertocamera, make_float3(0, 0, 0));
        }
        else {
                dx = make_float3(0, 0, 0);
index ed4d0b2dcde6881a02aadfd68aa637ac64524ada..cc17f86fcb67860479cae6a55ddc498828cf88d4 100644 (file)
@@ -125,7 +125,6 @@ void Pass::add(PassType type, vector<Pass>& passes)
                        break;
                case PASS_AO:
                        pass.components = 4;
-                       pass.exposure = true;
                        break;
                case PASS_SHADOW:
                        pass.components = 4;
index bd3acb00f6d8c863b7f1eff352c89b474db7f46d..316e5cec9aa7bf9c19dea81673c2a085a54cffeb 100644 (file)
@@ -213,9 +213,9 @@ void LightManager::device_update_distribution(Device *device, DeviceScene *dscen
                                        offset++;
 
                                        Mesh::Triangle t = mesh->triangles[i];
-                                       float3 p1 = transform(&tfm, mesh->verts[t.v[0]]);
-                                       float3 p2 = transform(&tfm, mesh->verts[t.v[1]]);
-                                       float3 p3 = transform(&tfm, mesh->verts[t.v[2]]);
+                                       float3 p1 = transform_point(&tfm, mesh->verts[t.v[0]]);
+                                       float3 p2 = transform_point(&tfm, mesh->verts[t.v[1]]);
+                                       float3 p3 = transform_point(&tfm, mesh->verts[t.v[2]]);
 
                                        totarea += triangle_area(p1, p2, p3);
                                }
index f83c85c632d03d3b43f1f0c674354084a99e3ce9..5f7a5810c0982227c0db590e7c9a2a10e169e97b 100644 (file)
@@ -54,7 +54,7 @@ void Object::apply_transform()
                return;
        
        for(size_t i = 0; i < mesh->verts.size(); i++)
-               mesh->verts[i] = transform(&tfm, mesh->verts[i]);
+               mesh->verts[i] = transform_point(&tfm, mesh->verts[i]);
 
        Attribute *attr_fN = mesh->attributes.find(Attribute::STD_FACE_NORMAL);
        Attribute *attr_vN = mesh->attributes.find(Attribute::STD_VERTEX_NORMAL);
@@ -159,9 +159,9 @@ void ObjectManager::device_update_transforms(Device *device, DeviceScene *dscene
                }
                else {
                        foreach(Mesh::Triangle& t, mesh->triangles) {
-                               float3 p1 = transform(&tfm, mesh->verts[t.v[0]]);
-                               float3 p2 = transform(&tfm, mesh->verts[t.v[1]]);
-                               float3 p3 = transform(&tfm, mesh->verts[t.v[2]]);
+                               float3 p1 = transform_point(&tfm, mesh->verts[t.v[0]]);
+                               float3 p2 = transform_point(&tfm, mesh->verts[t.v[1]]);
+                               float3 p3 = transform_point(&tfm, mesh->verts[t.v[2]]);
 
                                surface_area += triangle_area(p1, p2, p3);
                        }
index 0a4f0ef5d95931f7db7a2a6a9b95bac05a22ca5c..af4301b1cd95d1fe7e9d2838373bcd4beea877f3 100644 (file)
@@ -158,6 +158,7 @@ public:
        int default_light;
        int default_background;
        int default_holdout;
+       int default_empty;
 
        /* device */
        Device *device;
index 2afa1dd5037d8958e26ea88a67fb05406b5da25c..c1f7b3518d21225129f118bfbde4945c2ed54799 100644 (file)
@@ -272,6 +272,17 @@ void ShaderManager::add_default(Scene *scene)
                scene->shaders.push_back(shader);
                scene->default_holdout = scene->shaders.size() - 1;
        }
+
+       /* default empty */
+       {
+               graph = new ShaderGraph();
+
+               shader = new Shader();
+               shader->name = "default_empty";
+               shader->graph = graph;
+               scene->shaders.push_back(shader);
+               scene->default_empty = scene->shaders.size() - 1;
+       }
 }
 
 CCL_NAMESPACE_END
index 086b7b246d3d40b36c9c14ecccc9aef0d3cf51de..6b29d1ca51a21481ed111bbba93883ecac72287a 100644 (file)
@@ -141,7 +141,7 @@ float3 QuadDice::eval_projected(SubPatch& sub, float u, float v)
 
        sub.patch->eval(&P, NULL, NULL, uv.x, uv.y);
        if(camera)
-               P = transform(&camera->worldtoraster, P);
+               P = transform_perspective(&camera->worldtoraster, P);
 
        return P;
 }
index d61a42e4dcf0600fcb048539e755f6d6430b61ac..f0b87200f08c753d2ef8c051c365ff47db1395ad 100644 (file)
@@ -57,7 +57,7 @@ float3 DiagSplit::project(Patch *patch, float2 uv)
 
        patch->eval(&P, NULL, NULL, uv.x, uv.y);
        if(camera)
-               P = transform(&camera->worldtoraster, P);
+               P = transform_perspective(&camera->worldtoraster, P);
 
        return P;
 }
index 0114a9a26a5af2f41c173b66eb98c7f2e0c9c8b4..bb1df0b220f974a43b5d69ea663f8f3c1fbfa5a2 100644 (file)
@@ -76,8 +76,8 @@ public:
        bool valid(void) const
        {
                return (min.x <= max.x) && (min.y <= max.y) && (min.z <= max.z) &&
-                      !(isnan(min.x) || isnan(min.y) || isnan(min.z)) &&
-                      !(isnan(max.x) || isnan(max.y) || isnan(max.z));
+                      (isfinite(min.x) && isfinite(min.y) && isfinite(min.z)) &&
+                      (isfinite(max.x) && isfinite(max.y) && isfinite(max.z));
        }
 
        BoundBox transformed(const Transform *tfm)
@@ -91,7 +91,7 @@ public:
                        p.y = (i & 2)? min.y: max.y;
                        p.z = (i & 4)? min.z: max.z;
 
-                       result.grow(transform(tfm, p));
+                       result.grow(transform_point(tfm, p));
                }
 
                return result;
index 8c5eac2cbb95fa0d269d08fc207bac90b6d268b6..61bc36ae88884bf93535395a1038a6e822ad3295 100644 (file)
@@ -134,8 +134,16 @@ Transform transform_inverse(const Transform& tfm)
        R.T = transform_identity();
        M.T = tfm;
 
-       if(!transform_matrix4_gj_inverse(R.M, M.M))
-               return transform_identity();
+       if(!transform_matrix4_gj_inverse(R.M, M.M)) {
+               /* matrix is degenerate (e.g. 0 scale on some axis), ideally we should
+                  never be in this situation, but try to invert it anyway with tweak */
+               M.M[0][0] += 1e-8f;
+               M.M[1][1] += 1e-8f;
+               M.M[2][2] += 1e-8f;
+
+               if(!transform_matrix4_gj_inverse(R.M, M.M))
+                       return transform_identity();
+       }
 
        return R.T;
 }
index 07db52f6392b6b5a29ec96b34b880e61de4cc851..aeaef7b0e216c72e8356b202423a2fc804a3ce70 100644 (file)
@@ -37,7 +37,7 @@ typedef struct Transform {
 #endif
 } Transform;
 
-__device_inline float3 transform(const Transform *t, const float3 a)
+__device_inline float3 transform_perspective(const Transform *t, const float3 a)
 {
        float4 b = make_float4(a.x, a.y, a.z, 1.0f);
        float3 c = make_float3(dot(t->x, b), dot(t->y, b), dot(t->z, b));
@@ -46,6 +46,14 @@ __device_inline float3 transform(const Transform *t, const float3 a)
        return (w != 0.0f)? c/w: make_float3(0.0f, 0.0f, 0.0f);
 }
 
+__device_inline float3 transform_point(const Transform *t, const float3 a)
+{
+       float4 b = make_float4(a.x, a.y, a.z, 1.0f);
+       float3 c = make_float3(dot(t->x, b), dot(t->y, b), dot(t->z, b));
+
+       return c;
+}
+
 __device_inline float3 transform_direction(const Transform *t, const float3 a)
 {
        float4 b = make_float4(a.x, a.y, a.z, 0.0f);
index a01b4dffdb0b2daffd81973381a9d789f7506bcd..18533b218ffebf487f63db388667feac4703bb13 100644 (file)
@@ -30,6 +30,7 @@
 #define GRID_DIMENSION 20
 
 #if defined(_WIN32) && !defined(__MINGW32__)
+#define isnan(n) _isnan(n)
 #define LONG __int64
 #else
 #include <stdint.h>
index d710ada48bcd29e190d1863aff0cba6b3982224c..af5ada71146f633b08be337dd96b6a3517a0c5e9 100644 (file)
 #include "octree.h"
 
 #include <cstdio>
+#include <float.h>
+
+#if defined(_WIN32) && !defined(__MINGW32__)
+#define isnan(n) _isnan(n)
+#endif
 
 void veccopy(float dst[3], const float src[3])
 {
@@ -113,6 +118,15 @@ public:
                        curface++;
                }
 
+               /* remove triangle if it contains invalid coords */
+               for(int i = 0; i < 3; i++) {
+                       const float *co = t->vt[i];
+                       if(isnan(co[0]) || isnan(co[1]) || isnan(co[2])) {
+                               delete t;
+                               return getNextTriangle();
+                       }
+               }
+
                return t;
        }
 
index c20bc34c79429f53de31cb9a45047ec6f5949f63..b518416b63972b6b9cfd7665b3269aa3f1bfaabe 100644 (file)
 #endif
 #endif // WIN32
 
-
+#if defined(_WIN64)
+#  ifdef __MINGW64__
+#    include <basetsd.h>
+#  endif
+typedef __int64 int_ptr;
+#else
+typedef long int_ptr;
+#endif
 /******************************************************************************
  * Default Constructor 
  *****************************************************************************/
@@ -164,7 +171,7 @@ int ntlGeometryObjModel::initModel(int numVertices, float *vertices, int numTria
        }
 
        //fprintf(stderr,"initModel DEBUG %d \n",channelSize);
-       debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(long)(channelVertices) ,10);
+       debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(int_ptr)(channelVertices) ,10);
        if(channelVertices && (channelSize>0)) {
                vector<ntlSetVec3f> aniverts;
                vector<ntlSetVec3f> aninorms;
@@ -174,7 +181,7 @@ int ntlGeometryObjModel::initModel(int numVertices, float *vertices, int numTria
                anitimes.clear();
                for(int frame=0; frame<channelSize; frame++) {
                        ntlSetVec3f averts; averts.mVerts.clear();
-                       ntlSetVec3f anorms; averts.mVerts.clear();
+                       ntlSetVec3f anorms; anorms.mVerts.clear();
                        int setsize = (3*numVertices+1);
 
                        ntlVec3Gfx p(0.),n(1.);
index 42ee94b2cf59d32db33af75106f9e0f09465982b..3b649c9f5b9fe265280f0ffe07a0493daf81f54a 100644 (file)
@@ -400,8 +400,8 @@ int ntlWorld::advanceSims(int framenum)
        bool done = false;
        bool allPanic = true;
 
-       // stop/quit, dont display/render
-       if(getElbeemState()==SIMWORLD_STOP) { 
+       // stop/quit (abort), dont display/render
+       if(!isSimworldOk()) { 
                return 1;
        }
 
@@ -411,6 +411,9 @@ int ntlWorld::advanceSims(int framenum)
        // time stopped? nothing else to do...
        if( (*mpSims)[mFirstSim]->getFrameTime(framenum) <= 0.0 ){ 
                done=true; allPanic=false; 
+
+               /* DG: Need to check for user cancel here (fix for [#30298]) */
+               (*mpSims)[mFirstSim]->checkCallerStatus(FLUIDSIM_CBSTATUS_STEP, 0);
        }
 
        int gstate = 0;
index f0910a6b2e3e537b8fe2af016f98cfeaa2c2111d..370d8ea182b8b128838afaaaca858371646804c1 100644 (file)
 #define  DEFAULT_STREAM  \
        m[dC] = RAC(ccel,dC); \
         \
-       if((!nbored & CFBnd)) { \
+       if(((!nbored) & CFBnd)) { \
         \
        m[dN ] = CSRC_N ; m[dS ] = CSRC_S ; \
        m[dE ] = CSRC_E ; m[dW ] = CSRC_W ; \
diff --git a/intern/elbeem/patches/mingw64_nopermissive.patch b/intern/elbeem/patches/mingw64_nopermissive.patch
new file mode 100644 (file)
index 0000000..a01e65d
--- /dev/null
@@ -0,0 +1,29 @@
+Index: intern/ntl_geometrymodel.cpp
+===================================================================
+--- intern/ntl_geometrymodel.cpp       (revision 45919)
++++ intern/ntl_geometrymodel.cpp       (working copy)
+@@ -21,7 +21,14 @@
+ #endif
+ #endif // WIN32
+-
++#if defined(_WIN64)
++#  ifdef __MINGW64__
++#    include <basetsd.h>
++#  endif
++typedef __int64 int_ptr;
++#else
++typedef long int_ptr;
++#endif
+ /******************************************************************************
+  * Default Constructor 
+  *****************************************************************************/
+@@ -164,7 +171,7 @@
+       }
+       //fprintf(stderr,"initModel DEBUG %d \n",channelSize);
+-      debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(long)(channelVertices) ,10);
++      debMsgStd("ntlGeometryObjModel::initModel",DM_MSG, "Csize:"<<channelSize<<", Cvert:"<<(int_ptr)(channelVertices) ,10);
+       if(channelVertices && (channelSize>0)) {
+               vector<ntlSetVec3f> aniverts;
+               vector<ntlSetVec3f> aninorms;
index 2265daa8fffff69ed0d3d4d1f3392808e7a56101..44882a6428648084d93581250ea6063fac1920f4 100644 (file)
@@ -49,7 +49,7 @@ elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'f
     else:
         sources.remove('intern' + os.sep + 'GHOST_DropTargetX11.cpp')
 
-elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
+elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc', 'win64-mingw'):
     for f in pf:
         try:
             sources.remove('intern' + os.sep + f + 'X11.cpp')
@@ -98,7 +98,7 @@ if env['WITH_BF_3DMOUSE']:
 else:
     sources.remove('intern' + os.sep + 'GHOST_NDOFManager.cpp')
     try:
-        if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
+        if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc', 'win64-mingw'):
             sources.remove('intern' + os.sep + 'GHOST_NDOFManagerWin32.cpp')
         elif window_system=='darwin':
             sources.remove('intern' + os.sep + 'GHOST_NDOFManagerCocoa.mm')
@@ -108,7 +108,7 @@ else:
         pass
 
 
-if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
+if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs = env['BF_WINTAB_INC'] + ' ' + incs
     incs += ' ../utfconv'
 
index e6ac48fa6c8a0ef5cebb233eec4e631736b391b0..2d8cf13ac4fd775d3681ce0693abf9ef68a0d1ee 100644 (file)
@@ -815,9 +815,10 @@ bool GHOST_SystemWin32::processNDOF(RAWINPUT const& raw)
        // send motion. Mark as 'sent' so motion will always get dispatched.
        eventSent = true;
 
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(FREE_WINDOWS64)
        // using Microsoft compiler & header files
-       // they invented the RawInput API, so this version is (probably) correct
+       // they invented the RawInput API, so this version is (probably) correct.
+       // MinGW64 also works fine with this
        BYTE const* data = raw.data.hid.bRawData;
        // struct RAWHID {
        // DWORD dwSizeHid;
index b7e17154df04f5329c50d9dcdb096f53e102d110..3d43733c569f60ebe4f68b621c23a3d280bdf8a1 100644 (file)
@@ -108,8 +108,10 @@ typedef uint64_t  u_int64_t;
 #include <inttypes.h>
 
 #elif defined(FREE_WINDOWS)
+#ifndef FREE_WINDOWS64
 /* define htoln here, there must be a syntax error in winsock2.h in MinGW */
 unsigned long __attribute__((__stdcall__)) htonl(unsigned long);
+#endif
 #include <stdint.h>
 
 #else
index 231802b31f2f1c99e5fe99156ebace091c4cad0a..322428386b1fd1960f8bc3e4d4fe5cbf61d2a379 100644 (file)
@@ -28,7 +28,7 @@ remove_strict_flags()
 
 # remove debug flag here since this is not a blender maintained library
 # and debug gives a lot of prints on UV unwrapping. developers can enable if they need to.
-remove_cc_flag("-DDEBUG")
+add_definitions(-UDEBUG)
 
 
 # quiet compiler warnings about undefined defines
index 502df1891d559640843c13e2102896b1813e39d7..711955cbfeb020498969bc0d1fa9bd9af1621cef 100644 (file)
@@ -5,7 +5,7 @@ sources = env.Glob('intern/*.c') + env.Glob('superlu/*.c')
 
 incs = 'extern superlu ../../extern/colamd/Include'
 
-if (env['OURPLATFORM'] == 'win32-mingw'):
+if (env['OURPLATFORM'] in ('win32-mingw', 'win64-mingw')):
     env.BlenderLib ('bf_intern_opennl', sources, Split(incs), [], libtype=['core','intern'], priority=[1,80] )
 else:
     env.BlenderLib ('bf_intern_opennl', sources, Split(incs), [], libtype=['core'], priority=[55] )
index 8da03427c3727f6c67821185fc7fe3e977f1a17d..118d1710e53246062412a65d4582575f8c0075cf 100644 (file)
@@ -21,7 +21,7 @@ set(INC
 )
 
 set(INC_SYS
-       ${GLEW_INCLUDE_PATH}
+
 )
 
 set(SRC
index 010fcf9aa7cd0df2a12b24b4dfa7f4ce31c359ea..19a698b6a0be7475ead6e1ce53d277b0db14b5e0 100644 (file)
@@ -9,7 +9,7 @@ defs = ''
 # This is odd but leave it for now...
 # Why have win32 check here? - this is only used for windows.
 # ... because one day we might want to use it on other platforms.
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-mingw', 'linuxcross', 'win64-vc'):
        sources += ['utf_winfunc.c']
 
 env.BlenderLib('bf_utfconv', sources, Split(incs), Split(defs), libtype=['intern','player'], priority=[0,0])
old mode 100644 (file)
new mode 100755 (executable)
index 2d2daab..a81a101
@@ -44,14 +44,22 @@ except:
 data = fpin.read().rsplit("{")[-1].split("}")[0]
 data = data.replace(",", " ")
 data = data.split()
-data = bytes([int(v) for v in data])
+data = [int(v) for v in data]
+# for some reason all data gets trailing byte
+last = data.pop()
+assert(last == 0)
+data = bytes(data)
 
 dname = filename + ".ctodata"
 
+sys.stdout.write("Making DATA file <%s>\n" % dname)
+
 try:
     fpout = open(dname, "wb")
 except:
     sys.stdout.write("Unable to open output %s\n" % dname)
     sys.exit(1)
 
-fpout.write(data)
+size = fpout.write(data)
+
+sys.stdout.write("%d\n" % size)
index 9db77544c03790a49a0367bc76dd9e9c7a84f87a..f1fce08d7dd18fabb6bde28e1e113cd6d7ebc12e 100755 (executable)
@@ -53,8 +53,8 @@ sys.stdout.write("Making C file <%s>\n" % cname)
 
 filename = filename.split("/")[-1].split("\\")[-1]
 filename = filename.replace(".", "_")
-sys.stdout.write(str(size))
-sys.stdout.write("\n")
+sys.stdout.write("%d\n" % size)
+
 try:
     fpout = open(cname, "w")
 except:
index 34b2b9bb0af03a2c38e2586945a1683eb73b3e39..1620815517ef887a65bf85c80f589b8525e0a7bf 100644 (file)
@@ -2,11 +2,12 @@
 Name=Blender
 GenericName=3D modeller
 GenericName[es]=modelador 3D
-GenericName[de]=3D Modellierer
+GenericName[de]=3D-Modellierer
 GenericName[fr]=modeleur 3D
 GenericName[ru]=Редактор 3D-моделей
 Comment=3D modeling, animation, rendering and post-production
 Comment[es]=modelado 3D, animación, renderizado y post-producción
+Comment[de]=3D-Modellierung, Animation, Rendering und Nachbearbeitung
 Exec=blender
 Icon=blender
 Terminal=false
index 131bb8ee77ea96a6188deb74e0ef860c76d672a4..91d8f1b3467fc170691a854172c3532b2543146d 100644 (file)
@@ -457,7 +457,7 @@ class MeshPolygon(StructRNA):
         return [ord_ind(verts[i], verts[(i + 1) % vlen]) for i in range(vlen)]
 
     @property
-    def loops(self):
+    def loop_indices(self):
         start = self.loop_start
         end = start + self.loop_total
         return range(start, end)
diff --git a/release/scripts/presets/fluid/honey.py b/release/scripts/presets/fluid/honey.py
new file mode 100644 (file)
index 0000000..fbeb7f2
--- /dev/null
@@ -0,0 +1,3 @@
+import bpy
+bpy.context.fluid.settings.viscosity_base = 2.0
+bpy.context.fluid.settings.viscosity_exponent = 3
diff --git a/release/scripts/presets/fluid/oil.py b/release/scripts/presets/fluid/oil.py
new file mode 100644 (file)
index 0000000..3d73de9
--- /dev/null
@@ -0,0 +1,3 @@
+import bpy
+bpy.context.fluid.settings.viscosity_base = 5.0
+bpy.context.fluid.settings.viscosity_exponent = 5
diff --git a/release/scripts/presets/fluid/water.py b/release/scripts/presets/fluid/water.py
new file mode 100644 (file)
index 0000000..0b68ad2
--- /dev/null
@@ -0,0 +1,3 @@
+import bpy
+bpy.context.fluid.settings.viscosity_base = 1.0
+bpy.context.fluid.settings.viscosity_exponent = 6
index 8afcdf5f67e9d637ce2ccfa83152146f325b8072..099cb02564d9ff73ae2c3ecce8cf488ad64dc9e8 100644 (file)
@@ -23,15 +23,19 @@ from bpy.types import Operator
 from bpy.props import StringProperty
 
 
+def _lang_module_get(sc):
+    return __import__("console_" + sc.language)
+
+
 class ConsoleExec(Operator):
-    '''Execute the current console line as a python expression'''
+    """Execute the current console line as a python expression"""
     bl_idname = "console.execute"
     bl_label = "Console Execute"
 
     def execute(self, context):
         sc = context.space_data
 
-        module = __import__("console_" + sc.language)
+        module = _lang_module_get(sc)
         execute = getattr(module, "execute", None)
 
         if execute:
@@ -50,7 +54,7 @@ class ConsoleAutocomplete(Operator):
 
     def execute(self, context):
         sc = context.space_data
-        module = __import__("console_" + sc.language)
+        module = _lang_module_get(sc)
         autocomplete = getattr(module, "autocomplete", None)
 
         if autocomplete:
@@ -62,7 +66,7 @@ class ConsoleAutocomplete(Operator):
 
 
 class ConsoleBanner(Operator):
-    '''Print a message when the terminal initializes'''
+    """Print a message when the terminal initializes"""
     bl_idname = "console.banner"
     bl_label = "Console Banner"
 
@@ -73,7 +77,7 @@ class ConsoleBanner(Operator):
         if not sc.language:
             sc.language = 'python'
 
-        module = __import__("console_" + sc.language)
+        module = _lang_module_get(sc)
         banner = getattr(module, "banner", None)
 
         if banner:
@@ -85,7 +89,7 @@ class ConsoleBanner(Operator):
 
 
 class ConsoleLanguage(Operator):
-    '''Set the current language for this console'''
+    """Set the current language for this console"""
     bl_idname = "console.language"
     bl_label = "Console Language"
 
index 2d4c703dbf23a5f5b72ec2457601b6d5460437eb..4ed43a68e4811d02b5d5e4983132d8b16cc31094 100644 (file)
@@ -79,7 +79,7 @@ class MeshMirrorUV(Operator):
         polys = mesh.polygons
         loops = mesh.loops
         verts = mesh.vertices
-        uv_loops = mesh.uv_loop_layers.active.data
+        uv_loops = mesh.uv_layers.active.data
         nbr_polys = len(polys)
 
         mirror_pm = {}
@@ -100,7 +100,7 @@ class MeshMirrorUV(Operator):
             vidxs[i] = tuple(sorted(l.vertex_index
                                     for l in loops[lstart:lend]))
             # As we have no poly.center yet...
-            pcents[i] = tuple(map(lambda x : x / p.loop_total,
+            pcents[i] = tuple(map(lambda x: x / p.loop_total,
                                   map(sum, zip(*(verts[idx].co
                                                  for idx in vidxs[i])))))
             # Preparing next step finding matching polys.
index 433c4403055b6b1574157fa72514f7050cb1446c..8268d7a9514ff55f03545cf82b9fd89debbd2926 100644 (file)
@@ -489,7 +489,7 @@ class JoinUVs(Operator):
 
             # seems to be the fastest way to create an array
             uv_array = array.array('f', [0.0] * 2) * nbr_loops
-            mesh.uv_loop_layers.active.data.foreach_get("uv", uv_array)
+            mesh.uv_layers.active.data.foreach_get("uv", uv_array)
 
             objects = context.selected_editable_objects[:]
 
@@ -516,10 +516,10 @@ class JoinUVs(Operator):
                                                ),
                                            )
                             else:
-                                uv_other = mesh_other.uv_loop_layers.active
+                                uv_other = mesh_other.uv_layers.active
                                 if not uv_other:
                                     mesh_other.uv_textures.new()
-                                    uv_other = mesh_other.uv_loop_layers.active
+                                    uv_other = mesh_other.uv_layers.active
                                     if not uv_other:
                                         self.report({'ERROR'}, "Could not add "
                                                     "a new UV map tp object "
@@ -691,3 +691,29 @@ class TransformsToDeltasAnim(Operator):
         context.scene.frame_set(context.scene.frame_current)
 
         return {'FINISHED'}
+
+
+class DupliOffsetFromCursor(Operator):
+    '''Set offset used for DupliGroup based on cursor position'''
+    bl_idname = "object.dupli_offset_from_cursor"
+    bl_label = "Set Offset From Cursor"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    group = IntProperty(
+            name="Group",
+            description="Group index to set offset for",
+            default=0,
+            )
+
+    @classmethod
+    def poll(cls, context):
+        return  context.active_object is not None
+
+    def execute(self, context):
+        scene = context.scene
+        ob = context.active_object
+        group = self.group
+
+        ob.users_group[group].dupli_offset = scene.cursor_location
+
+        return {'FINISHED'}
index da6ef7483f242c12a8d1b253d06125d20b4f805a..6297945f8bd073bdb2b28859c844e1de10607fe2 100644 (file)
@@ -295,6 +295,24 @@ class AddPresetCloth(AddPresetBase, Operator):
     preset_subdir = "cloth"
 
 
+class AddPresetFluid(AddPresetBase, Operator):
+    '''Add a Fluid Preset'''
+    bl_idname = "fluid.preset_add"
+    bl_label = "Add Fluid Preset"
+    preset_menu = "FLUID_MT_presets"
+
+    preset_defines = [
+    "fluid = bpy.context.fluid"
+    ]
+
+    preset_values = [
+    "fluid.settings.viscosity_base",
+    "fluid.settings.viscosity_exponent",
+    ]
+
+    preset_subdir = "fluid"
+
+
 class AddPresetSunSky(AddPresetBase, Operator):
     '''Add a Sky & Atmosphere Preset'''
     bl_idname = "lamp.sunsky_preset_add"
index 8d74af2986ef0d6ea1b8e3a2e3d400ad37edb78f..d6f657683a58d65caf876ba63b1b959dc9c567ad 100644 (file)
@@ -59,9 +59,9 @@ def extend(obj, operator, EXTEND_MODE):
         vidx_source = face_source.vertices
         vidx_target = face_target.vertices
 
-        uv_layer = me.uv_loop_layers.active.data
-        uvs_source = [uv_layer[i].uv for i in face_source.loops]
-        uvs_target = [uv_layer[i].uv for i in face_target.loops]
+        uv_layer = me.uv_layers.active.data
+        uvs_source = [uv_layer[i].uv for i in face_source.loop_indices]
+        uvs_target = [uv_layer[i].uv for i in face_target.loop_indices]
 
         # vertex index is the key, uv is the value
 
index 08f471e9022adae9c861f960584fa0c3fbdb8739..3bd0d6fa4ccbc7a62267fec41fae8d91f65befb2 100644 (file)
@@ -88,8 +88,8 @@ class prettyface(object):
             self.children = []
 
         else:  # blender face
-            uv_layer = data.id_data.uv_loop_layers.active.data
-            self.uv = [uv_layer[i].uv for i in data.loops]
+            uv_layer = data.id_data.uv_layers.active.data
+            self.uv = [uv_layer[i].uv for i in data.loop_indices]
 
             # cos = [v.co for v in data]
             cos = [data.id_data.vertices[v].co for v in data.vertices]  # XXX25
@@ -158,7 +158,7 @@ class prettyface(object):
                 I = [i for a, i in angles_co]
 
                 #~ fuv = f.uv
-                uv_layer = f.id_data.uv_loop_layers.active.data
+                uv_layer = f.id_data.uv_layers.active.data
                 fuv = [uv_layer[i].uv for i in f.loops]  # XXX25
 
                 if self.rot:
@@ -245,7 +245,7 @@ def lightmap_uvpack(meshes,
             print("\tWarning, less then 4 faces, skipping")
             continue
 
-        pretty_faces = [prettyface(f) for f in face_sel if len(f.vertices) == 4]
+        pretty_faces = [prettyface(f) for f in face_sel if f.loop_total == 4]
 
         # Do we have any triangles?
         if len(pretty_faces) != len(face_sel):
@@ -269,7 +269,7 @@ def lightmap_uvpack(meshes,
 
                 return f, lens, lens_order
 
-            tri_lengths = [trylens(f) for f in face_sel if len(f.vertices) == 3]
+            tri_lengths = [trylens(f) for f in face_sel if f.loop_total == 3]
             del trylens
 
             def trilensdiff(t1, t2):
@@ -549,7 +549,16 @@ class LightMapPack(Operator):
     '''Follow UVs from active quads along continuous face loops'''
     bl_idname = "uv.lightmap_pack"
     bl_label = "Lightmap Pack"
-    bl_options = {'REGISTER', 'UNDO'}
+
+    # Disable REGISTER flag for now because this operator might create new
+    # images. This leads to non-proper operator redo because current undo
+    # stack is local for edit mode and can not remove images created by this
+    # oprtator.
+    # Proper solution would be to make undo stack aware of such things,
+    # but for now just disable redo. Keep undo here so unwanted changes to uv
+    # coords might be undone.
+    # This fixes infinite image creation reported there [#30968] (sergey)
+    bl_options = {'UNDO'}
 
     PREF_CONTEXT = bpy.props.EnumProperty(
             name="Selection",
index c4a94e7f679670f15128d9988e444664c0665a65..1e18825a155ea63a21267ad32488011e13b62645 100644 (file)
@@ -759,7 +759,7 @@ class thickface(object):
     __slost__= "v", "uv", "no", "area", "edge_keys"
     def __init__(self, face, uv_layer, mesh_verts):
         self.v = [mesh_verts[i] for i in face.vertices]
-        self.uv = [uv_layer[i].uv for i in face.loops]
+        self.uv = [uv_layer[i].uv for i in face.loop_indices]
 
         self.no = face.normal
         self.area = face.area
@@ -889,7 +889,7 @@ def main(context,
         if not me.uv_textures: # Mesh has no UV Coords, don't bother.
             me.uv_textures.new()
 
-        uv_layer = me.uv_loop_layers.active.data
+        uv_layer = me.uv_layers.active.data
         me_verts = list(me.vertices)
 
         if USER_ONLY_SELECTED_FACES:
index a5d361f206ace6243b37c82cb9c9e8072f41faab..bfbde2f4b07ca8324e2f3079c0df512aaaabb8d9 100644 (file)
@@ -26,8 +26,6 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
     from mathutils import Vector
     from math import acos
 
-    #BPyMesh.meshCalcNormals(me)
-
     vert_tone = [0.0] * len(me.vertices)
 
     min_tone = 180.0
@@ -95,7 +93,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
     tone_range = max_tone - min_tone
 
     if not tone_range:
-        return
+        return {'CANCELLED'}
 
     active_col_layer = None
 
@@ -109,18 +107,17 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
         active_col_layer = me.vertex_colors[0].data
 
     if not active_col_layer:
-        return('CANCELLED', )
-
-    for i, f in enumerate(me.faces):
-        if not me.use_paint_mask or f.select:
-
-            f_col = active_col_layer[i]
+        return
 
-            f_col = [f_col.color1, f_col.color2, f_col.color3, f_col.color4]
+    use_paint_mask = me.use_paint_mask
 
-            for j, v in enumerate(f.vertices):
-                col = f_col[j]
-                tone = vert_tone[me.vertices[v].index]
+    for i, p in enumerate(me.polygons):
+        if not use_paint_mask or p.select:
+            for loop_index in p.loop_indices:
+                loop = me.loops[loop_index]
+                v = loop.vertex_index
+                col = active_col_layer[loop_index].color
+                tone = vert_tone[v]
                 tone = (tone - min_tone) / tone_range
 
                 if dirt_only:
@@ -131,6 +128,8 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
                 col[1] = tone * col[1]
                 col[2] = tone * col[2]
 
+    return {'FINISHED'}
+
 
 import bpy
 from bpy.types import Operator
@@ -185,8 +184,8 @@ class VertexPaintDirt(Operator):
 
         t = time.time()
 
-        applyVertexDirt(mesh, self.blur_iterations, self.blur_strength, radians(self.dirt_angle), radians(self.clean_angle), self.dirt_only)
+        ret = applyVertexDirt(mesh, self.blur_iterations, self.blur_strength, radians(self.dirt_angle), radians(self.clean_angle), self.dirt_only)
 
         print('Dirt calculated in %.6f' % (time.time() - t))
 
-        return {'FINISHED'}
+        return ret
index 315b7e5c4fc6dbd243f1c8cc831cd4a76337cdba..9b1bf25630816d26817ea653145466385531c168 100644 (file)
@@ -76,7 +76,9 @@ class VIEW3D_OT_edit_mesh_extrude_move(Operator):
             bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN',
                     TRANSFORM_OT_translate={
                         "constraint_orientation": 'NORMAL',
-                        "constraint_axis": (True, True, False)})
+                        # not a popular choice, too restrictive for retopo.
+                        #~ "constraint_axis": (True, True, False)})
+                        "constraint_axis": (False, False, False)})
         else:
             bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN')
 
index 78f14137ad1e6f31ee0e20bdcfd4aff38d2ec666..926ad9b94f7318738e1d49d63e225a9c076ca0d2 100644 (file)
@@ -1195,7 +1195,7 @@ class WM_OT_copy_prev_settings(Operator):
 class WM_OT_blenderplayer_start(Operator):
     '''Launch the blender-player with the current blend-file'''
     bl_idname = "wm.blenderplayer_start"
-    bl_label = "Start"
+    bl_label = "Start Game In Player"
 
     def execute(self, context):
         import os
@@ -1212,6 +1212,10 @@ class WM_OT_blenderplayer_start(Operator):
         if sys.platform == "darwin":
             player_path = os.path.join(blender_bin_dir, "../../../blenderplayer.app/Contents/MacOS/blenderplayer")
 
+        if not os.path.exists(player_path):
+            self.report({'ERROR'}, "Player path: %r not found" % player_path)
+            return {'CANCELLED'}
+
         filepath = os.path.join(bpy.app.tempdir, "game.blend")
         bpy.ops.wm.save_as_mainfile(filepath=filepath, check_existing=False, copy=True)
         subprocess.call([player_path, filepath])
index b94af13af7e2078ce4d66a8b5153fe8105b0ef0b..08529a0423d13ec46149fe635db53d36445b3128 100644 (file)
@@ -204,7 +204,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
             pose_marker_active = poselib.pose_markers.active
 
             if pose_marker_active is not None:
-                col.operator("poselib.pose_remove", icon='ZOOMOUT', text="").pose = pose_marker_active.name
+                col.operator("poselib.pose_remove", icon='ZOOMOUT', text="")
                 col.operator("poselib.apply_pose", icon='ZOOM_SELECTED', text="").pose_index = poselib.pose_markers.active_index
 
             col.operator("poselib.action_sanitise", icon='HELP', text="")  # XXX: put in menu?
index cc3e8a8e57d576c8b4ba2b7758e9d8cfc6935424..c3f1c42d8a81935c1ae8c91d3b09031e037fcb54 100644 (file)
@@ -166,7 +166,12 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
             subsub.active = game.use_anisotropic_friction
             subsub.prop(game, "friction_coefficients", text="", slider=True)
 
-        elif physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
+        elif physics_type == 'SENSOR':
+            col = layout.column()
+            col.prop(game, "use_actor", text="Detect Actors")
+            col.prop(ob, "hide_render", text="Invisible")
+
+        elif physics_type in {'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
             layout.prop(ob, "hide_render", text="Invisible")
 
         elif physics_type == 'NAVMESH':
index c03aeab1f371956fe075c67db096f423cdb2797a..d7b4b1a2b44483ea5db5abe359819479e7dcb6c4 100644 (file)
@@ -162,7 +162,6 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
 
         # XXX, this is bad practice, yes, I wrote it :( - campbell
         index = 0
-        value = str(tuple(context.scene.cursor_location))
         for group in bpy.data.groups:
             if ob.name in group.objects:
                 col = layout.column(align=True)
@@ -181,9 +180,8 @@ class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
                 col = split.column()
                 col.prop(group, "dupli_offset", text="")
 
-                props = col.operator("wm.context_set_value", text="From Cursor")
-                props.data_path = "object.users_group[%d].dupli_offset" % index
-                props.value = value
+                props = col.operator("object.dupli_offset_from_cursor", text="From Cursor")
+                props.group = index
                 index += 1
 
 
index 74abc8fe5591bdccbcf2e796fdc47f6fc5760114..9200c688394a37d07607e2bad587d72608a10436 100644 (file)
@@ -1185,7 +1185,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
         psys = context.particle_system
 
         split = layout.split(percentage=0.85)
-        
+
         col = split.column()
         col.label(text="Vertex Group:")
         col.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
@@ -1195,7 +1195,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
         col.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text="Roughness 1")
         col.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text="Roughness 2")
         col.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End")
-        
+
         col = split.column()
         col.label(text="Negate:")
         col.alignment = 'RIGHT'
@@ -1206,7 +1206,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
         col.prop(psys, "invert_vertex_group_roughness_1", text="")
         col.prop(psys, "invert_vertex_group_roughness_2", text="")
         col.prop(psys, "invert_vertex_group_roughness_end", text="")
-        
+
         # Commented out vertex groups don't work and are still waiting for better implementation
         # row = layout.row()
         # row.prop_search(psys, "vertex_group_velocity", ob, "vertex_groups", text="Velocity")
index 14c7b381ee79809b565d2e78702fc4744fc2a242..e313112d61a36ee0e0eca9df751def01fbcfa0f0 100644 (file)
@@ -31,9 +31,6 @@ def cloth_panel_enabled(md):
 
 
 class CLOTH_MT_presets(Menu):
-    '''
-    Creates the menu items by scanning scripts/templates
-    '''
     bl_label = "Cloth Presets"
     preset_subdir = "cloth"
     preset_operator = "script.execute_preset"
index d334671292a4dd4beb3a1f98ba59ce6c6a696b9f..beb525bbd076bfa484f581cf16461ff641929b1b 100644 (file)
 
 # <pep8 compliant>
 import bpy
-from bpy.types import Panel
+from bpy.types import Panel, Menu
+
+
+class FLUID_MT_presets(Menu):
+    bl_label = "Fluid Presets"
+    preset_subdir = "fluid"
+    preset_operator = "script.execute_preset"
+    draw = Menu.draw_preset
 
 
 class PhysicButtonsPanel():
@@ -48,11 +55,11 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
             return
 
         col.prop(fluid, "type")
-        if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}:
+        if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID', 'OBSTACLE'}:
             col.prop(fluid, "use")
 
         layout = layout.column()
-        if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}:
+        if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID', 'OBSTACLE'}:
             layout.active = fluid.use
 
         if fluid.type == 'DOMAIN':
@@ -222,16 +229,14 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
 
         col = split.column()
         col.label(text="Viscosity Presets:")
-        sub = col.column(align=True)
-        sub.prop(fluid, "viscosity_preset", text="")
-
-        if fluid.viscosity_preset == 'MANUAL':
-            sub.prop(fluid, "viscosity_base", text="Base")
-            sub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
-        else:
-            # just for padding to prevent jumping around
-            sub.separator()
-            sub.separator()
+        sub = col.row(align=True)
+        sub.menu("FLUID_MT_presets", text=bpy.types.FLUID_MT_presets.bl_label)
+        sub.operator("fluid.preset_add", text="", icon='ZOOMIN')
+        sub.operator("fluid.preset_add", text="", icon='ZOOMOUT').remove_active = True
+
+        subsub = col.column(align=True)
+        subsub.prop(fluid, "viscosity_base", text="Base")
+        subsub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
 
         col.label(text="Optimization:")
         col.prop(fluid, "grid_levels", slider=True)
index c110d344dd05e96cfdd2d34ff7900f6ea9f90ae1..31ef6b79be3cc766588db4f3aad06508d10cbd1e 100644 (file)
@@ -1607,7 +1607,9 @@ class VIEW3D_MT_edit_mesh_specials(Menu):
         layout.operator("mesh.select_all", text="Select Inverse").action = 'INVERT'
         layout.operator("mesh.flip_normals")
         layout.operator("mesh.vertices_smooth", text="Smooth")
+        layout.operator("mesh.inset")
         layout.operator("mesh.bevel", text="Bevel")
+        layout.operator("mesh.bridge_edge_loops")
         layout.operator("mesh.faces_shade_smooth")
         layout.operator("mesh.faces_shade_flat")
         layout.operator("mesh.blend_from_shape")
@@ -1680,7 +1682,7 @@ class VIEW3D_MT_edit_mesh_vertices(Menu):
         layout.operator("mesh.merge")
         layout.operator("mesh.rip_move")
         layout.operator("mesh.split")
-        layout.operator("mesh.separate")
+        layout.operator_menu_enum("mesh.separate", "type")
         layout.operator("mesh.vert_connect")
         layout.operator("mesh.vert_slide")
 
@@ -2176,14 +2178,18 @@ class VIEW3D_PT_view3d_properties(Panel):
         view = context.space_data
 
         col = layout.column()
-        col.active = view.region_3d.view_perspective != 'CAMERA'
+        col.active = bool(view.region_3d.view_perspective != 'CAMERA' or
+                          view.region_quadview)
         col.prop(view, "lens")
         col.label(text="Lock to Object:")
         col.prop(view, "lock_object", text="")
         lock_object = view.lock_object
         if lock_object:
             if lock_object.type == 'ARMATURE':
-                col.prop_search(view, "lock_bone", lock_object.data, "edit_bones" if lock_object.mode == 'EDIT' else "bones", text="")
+                col.prop_search(view, "lock_bone", lock_object.data,
+                                "edit_bones" if lock_object.mode == 'EDIT'
+                                             else "bones",
+                                text="")
         else:
             col.prop(view, "lock_cursor", text="Lock to Cursor")
 
index 52658411fb081695a2ef5778580e428b33e2e219..c494590d0053dd9befa02cbf79bfb246a4644c12 100644 (file)
@@ -142,6 +142,14 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
         col.operator("mesh.spin")
         col.operator("mesh.screw")
 
+        row = col.row(align=True)
+        props = row.operator("mesh.knife_tool", text="Knife")
+        props.use_occlude_geometry = True
+        props.only_select = False
+        props = row.operator("mesh.knife_tool", text="Select")
+        props.use_occlude_geometry = False
+        props.only_select = True
+
         col = layout.column(align=True)
         col.label(text="Remove:")
         col.menu("VIEW3D_MT_edit_mesh_delete")
similarity index 84%
rename from release/scripts/templates/operator_export.py
rename to release/scripts/templates/operator_file_export.py
index 3a7040ae2d2ebbfde130dd3cc2280f9aecb73489..e3e0217e26a6aa74e98b2324c426b265d9d04567 100644 (file)
@@ -3,7 +3,7 @@ import bpy
 
 def write_some_data(context, filepath, use_some_setting):
     print("running write_some_data...")
-    f = open(filepath, 'w')
+    f = open(filepath, 'w', encoding='utf-8')
     f.write("Hello World %s" % use_some_setting)
     f.close()
 
@@ -14,11 +14,12 @@ def write_some_data(context, filepath, use_some_setting):
 # invoke() function which calls the file selector.
 from bpy_extras.io_utils import ExportHelper
 from bpy.props import StringProperty, BoolProperty, EnumProperty
+from bpy.types import Operator
 
 
-class ExportSomeData(bpy.types.Operator, ExportHelper):
-    '''This appears in the tooltip of the operator and in the generated docs.'''
-    bl_idname = "export.some_data"  # this is important since its how bpy.ops.export.some_data is constructed
+class ExportSomeData(Operator, ExportHelper):
+    '''This appears in the tooltip of the operator and in the generated docs'''
+    bl_idname = "export_test.some_data"  # important since its how bpy.ops.import_test.some_data is constructed
     bl_label = "Export Some Data"
 
     # ExportHelper mixin class uses this
@@ -45,10 +46,6 @@ class ExportSomeData(bpy.types.Operator, ExportHelper):
             default='OPT_A',
             )
 
-    @classmethod
-    def poll(cls, context):
-        return context.active_object is not None
-
     def execute(self, context):
         return write_some_data(context, self.filepath, self.use_setting)
 
@@ -72,4 +69,4 @@ if __name__ == "__main__":
     register()
 
     # test call
-    bpy.ops.export.some_data('INVOKE_DEFAULT')
+    bpy.ops.export_test.some_data('INVOKE_DEFAULT')
diff --git a/release/scripts/templates/operator_file_import.py b/release/scripts/templates/operator_file_import.py
new file mode 100644 (file)
index 0000000..80d850a
--- /dev/null
@@ -0,0 +1,75 @@
+import bpy
+
+
+def read_some_data(context, filepath, use_some_setting):
+    print("running read_some_data...")
+    f = open(filepath, 'r', encoding='utf-8')
+    data = f.read()
+    f.close()
+
+    # would normally load the data here
+    print(data)
+
+    return {'FINISHED'}
+
+
+# ImportHelper is a helper class, defines filename and
+# invoke() function which calls the file selector.
+from bpy_extras.io_utils import ImportHelper
+from bpy.props import StringProperty, BoolProperty, EnumProperty
+from bpy.types import Operator
+
+
+class ImportSomeData(Operator, ImportHelper):
+    '''This appears in the tooltip of the operator and in the generated docs'''
+    bl_idname = "import_test.some_data"  # important since its how bpy.ops.import_test.some_data is constructed
+    bl_label = "Import Some Data"
+
+    # ImportHelper mixin class uses this
+    filename_ext = ".txt"
+
+    filter_glob = StringProperty(
+            default="*.txt",
+            options={'HIDDEN'},
+            )
+
+    # List of operator properties, the attributes will be assigned
+    # to the class instance from the operator settings before calling.
+    use_setting = BoolProperty(
+            name="Example Boolean",
+            description="Example Tooltip",
+            default=True,
+            )
+
+    type = EnumProperty(
+            name="Example Enum",
+            description="Choose between two items",
+            items=(('OPT_A', "First Option", "Description one"),
+                   ('OPT_B', "Second Option", "Description two")),
+            default='OPT_A',
+            )
+
+    def execute(self, context):
+        return read_some_data(context, self.filepath, self.use_setting)
+
+
+# Only needed if you want to add into a dynamic menu
+def menu_func_import(self, context):
+    self.layout.operator(ImportSomeData.bl_idname, text="Text Import Operator")
+
+
+def register():
+    bpy.utils.register_class(ImportSomeData)
+    bpy.types.INFO_MT_file_import.append(menu_func_import)
+
+
+def unregister():
+    bpy.utils.unregister_class(ImportSomeData)
+    bpy.types.INFO_MT_file_import.remove(menu_func_import)
+
+
+if __name__ == "__main__":
+    register()
+
+    # test call
+    bpy.ops.import_test.some_data('INVOKE_DEFAULT')
index 0002cb4cf0bef0d363c5c32bea553b534ed42c29..cfb204cd52ae8fa6d6f448c36c188bd5e4b40d6f 100644 (file)
@@ -9,5 +9,5 @@ if env['WITH_BF_GAMEENGINE']:
 if env['WITH_BF_PLAYER']:
     SConscript (['blenderplayer/bad_level_call_stubs/SConscript'])
 
-if env['OURPLATFORM'] in ('win64-vc', 'win32-vc', 'win32-mingw', 'linuxcross'):
+if env['OURPLATFORM'] in ('win64-vc', 'win32-vc', 'win32-mingw', 'linuxcross', 'win64-mingw'):
     SConscript (['icons/SConscript'])
index 0658317a0bd8f1ce506283d7b4540ff3f3ad52fb..59ce879520edaeb63d3fef7e53bad1c843d0d8ae 100644 (file)
@@ -43,7 +43,9 @@
 #include "MEM_guardedalloc.h"
 #include "MEM_sys_types.h"
 
-#include "BLI_winstuff.h"
+#ifdef WIN32
+#  include "BLI_winstuff.h"
+#endif
 
 #include "AVI_avi.h"
 #include "avi_intern.h"
index 483b708bee65375270dcef2ac5907214d4233c01..a2fd756ddaacf72dee6e5b88662a7579d3918195 100644 (file)
  *  \ingroup avi
  */
 
-
 #include "AVI_avi.h"
 #include "avi_intern.h"
 #include "endian.h"
 
-#include "BLI_winstuff.h"
+#ifdef WIN32
+#  include "BLI_winstuff.h"
+#endif
 
 /* avi_set_compress_options gets its own file... now don't WE feel important? */
 
index 5e2fee36af0f9a27ed5f9a7ff14e9339fee72c6f..2c786f87521c869eec35b17980244cd6989ef75e 100644 (file)
@@ -67,6 +67,7 @@ const char *BLF_translate_do_tooltip(const char *contex, const char *msgid);
 
 /* The "translation-marker" macro. */
 #define N_(msgid) msgid
+#define CTX_N_(context, msgid) msgid
 /* Those macros should be used everywhere in UI code. */
 #ifdef WITH_INTERNATIONAL
 /*     #define _(msgid) BLF_gettext(msgid) */
@@ -82,4 +83,18 @@ const char *BLF_translate_do_tooltip(const char *contex, const char *msgid);
        #define CTX_TIP_(context, msgid) msgid
 #endif
 
+/******************************************************************************
+ * All i18n contexts must be defined here.
+ * This is a nice way to be sure not to use a context twice for different
+ * things, and limit the number of existing contexts!
+ */
+
+/* Default, void context. Just in case... */
+#define BLF_I18NCONTEXT_DEFAULT ""
+
+/* Default context for operator names/labels. */
+#define BLF_I18NCONTEXT_OPERATOR_DEFAULT "Operator"
+
+
+
 #endif /* __BLF_TRANSLATION_H__ */
index 84cefc923a0e8bd29019442bd43172982b149eac..7a4e1d4b78189021d02b09acc649d1f68b54d6ea 100644 (file)
@@ -279,8 +279,8 @@ void blf_font_buffer(FontBLF *font, const char *str)
 
                        if (font->b_fbuf) {
                                int yb = yb_start;
-                               for (y = (chy >= 0 ? 0:-chy); y < height_clip; y++) {
-                                       for (x = (chx >= 0 ? 0:-chx); x < width_clip; x++) {
+                               for (y = ((chy >= 0) ? 0 : -chy); y < height_clip; y++) {
+                                       for (x = ((chx >= 0) ? 0 : -chx); x < width_clip; x++) {
                                                a = *(g->bitmap + x + (yb * g->pitch)) / 255.0f;
 
                                                if (a > 0.0f) {
index 5d74a844425fc627c883512d0b92b1c898c4b8fb..12fa15afa3c33f7361dc98c64b6cb4f279ea9eeb 100644 (file)
@@ -93,7 +93,7 @@ void BLF_free_unifont(void)
 const char* BLF_gettext(const char *msgid)
 {
 #ifdef WITH_INTERNATIONAL
-       if (msgid[0])
+       if (msgid && msgid[0])
                return gettext(msgid);
        return "";
 #else
@@ -111,6 +111,9 @@ const char *BLF_pgettext(const char *context, const char *message)
 
        size_t overall_length = strlen(context) + strlen(message) + sizeof(GETTEXT_CONTEXT_GLUE) + 1;
 
+       if (!message || !context || !message[0])
+               return "";
+
        if (overall_length > sizeof(static_msg_ctxt_id)) {
                dynamic_msg_ctxt_id = malloc(overall_length);
                msg_ctxt_id = dynamic_msg_ctxt_id;
index e4802cfa37faef82dbc396a7b6703a7e3d03a374..dfe3fde17eb0a12653bcd2d2fced31c37909ba3e 100644 (file)
@@ -89,7 +89,7 @@ int bone_autoside_name (char name[64], int strip_number, short axis, float head,
 
 struct Bone *get_named_bone (struct bArmature *arm, const char *name);
 
-float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float rad1, float rad2, float rdist);
+float distfactor_to_bone(const float vec[3], const float b1[3], const float b2[3], float r1, float r2, float rdist);
 
 void where_is_armature (struct bArmature *arm);
 void where_is_armature_bone(struct Bone *bone, struct Bone *prevbone);
@@ -136,7 +136,6 @@ Mat4 *b_bone_spline_setup(struct bPoseChannel *pchan, int rest);
 
 /* like EBONE_VISIBLE */
 #define PBONE_VISIBLE(arm, bone) (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P))
-#define _BONE_VISIBLE(arm, bone) (((bone)->layer & (arm)->layer) && !((bone)->flag & BONE_HIDDEN_P))
 
 #ifdef __cplusplus
 }
index ffabbcf32f00d24d49c9ef399f2b857705e3f483..e0fac79359d0e32e9b85bee387e5943a695ebf1e 100644 (file)
@@ -42,7 +42,7 @@ extern "C" {
  * and keep comment above the defines.
  * Use STRINGIFY() rather than defining with quotes */
 #define BLENDER_VERSION                        262
-#define BLENDER_SUBVERSION             3
+#define BLENDER_SUBVERSION             4
 
 #define BLENDER_MINVERSION             250
 #define BLENDER_MINSUBVERSION  0
@@ -51,7 +51,7 @@ extern "C" {
                /* can be left blank, otherwise a,b,c... etc with no quotes */
 #define BLENDER_VERSION_CHAR   
                /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE  beta
+#define BLENDER_VERSION_CYCLE  rc
 
 extern char versionstr[]; /* from blender.c */
 
index 944cce675ccf5e2469f3d99fc7485fd5e0e15e99..b2bd840a09ad622a6b27179709cd9aaa138022bf 100644 (file)
@@ -212,8 +212,11 @@ void CTX_data_list_add(bContextDataResult *result, void *data);
                ListBase ctx_data_list;                                               \
                CollectionPointerLink *ctx_link;                                      \
                CTX_data_##member(C, &ctx_data_list);                                 \
-               for(ctx_link=ctx_data_list.first; ctx_link; ctx_link=ctx_link->next) {\
-                       Type instance= ctx_link->ptr.data;
+               for (ctx_link = ctx_data_list.first;                                  \
+                    ctx_link;                                                        \
+                    ctx_link = ctx_link->next)                                       \
+               {                                                                     \
+                       Type instance = ctx_link->ptr.data;
 
 #define CTX_DATA_END                                                          \
                }                                                                     \
index f54376455513ad5b7091b79c62e42acfab28cf44..c2112d1e1695258fc02bddbfe7cb511c01e74fa5 100644 (file)
@@ -68,6 +68,8 @@ char  BKE_imtype_valid_depths(const char imtype);
 
 char    BKE_imtype_from_arg(const char *arg);
 
+void    BKE_imformat_defaults(struct ImageFormatData *im_format);
+
 struct anim *openanim(const char *name, int flags, int streamindex);
 
 void   image_de_interlace(struct Image *ima, int odd);
index 2d0719a78fae5694c6ff3c355ad1fef8008b2cd0..742e6ef0b8967994ff5c92da399a3733464830ff 100644 (file)
@@ -112,7 +112,7 @@ int poly_get_adj_loops_from_vert(unsigned adj_r[3], const struct MPoly *poly,
                                                                 const struct MLoop *mloop, unsigned vert);
 
 /* update the hide flag for edges and polys from the corresponding
  flag in verts */
* flag in verts */
 void mesh_flush_hidden_from_verts(const struct MVert *mvert,
                                                                  const struct MLoop *mloop,
                                                                  struct MEdge *medge, int totedge,
index 69482706da61e41b496b94bc881f49f254c321a1..bc34b0131bf56a2a0c67dd300d1f371ad79e979d 100644 (file)
@@ -99,7 +99,7 @@ void multiresModifier_prepare_join(struct Scene *scene, struct Object *ob, struc
 int multires_mdisp_corners(struct MDisps *s);
 
 /* update multires data after topology changing */
-void multires_topology_changed(struct Scene *scene, struct Object *ob);
+void multires_topology_changed(struct Mesh *me);
 
 /**** interpolation stuff ****/
 void old_mdisps_bilinear(float out[3], float (*disps)[3], const int st, float u, float v);
index 3e0180a84aac3b664d49dc30d9d9e3ebcefbc2ae..67dba6fd7a7713883bfec9028800b1a5fe7da2b9 100644 (file)
@@ -85,7 +85,7 @@ typedef struct ParticleSimulationData {
        float courant_num;
 } ParticleSimulationData;
 
-typedef struct ParticleTexture{
+typedef struct ParticleTexture {
        float ivel;                                                     /* used in reset */
        float time, life, exist, size;          /* used in init */
        float damp, gravity, field;                     /* used in physics */
@@ -93,13 +93,13 @@ typedef struct ParticleTexture{
        float rough1, rough2, roughe;           /* used in path caching */
 } ParticleTexture;
 
-typedef struct ParticleSeam{
+typedef struct ParticleSeam {
        float v0[3], v1[3];
        float nor[3], dir[3], tan[3];
        float length2;
 } ParticleSeam;
 
-typedef struct ParticleCacheKey{
+typedef struct ParticleCacheKey {
        float co[3];
        float vel[3];
        float rot[4];
index eba5c1171995e8b906b058b94d61e6f227fd37cb..d7d7324dd56ab4ceb6e44d591b4f3a7fabf6dfea 100644 (file)
@@ -187,7 +187,7 @@ typedef struct PTCacheBaker {
 #define PEK_HIDE               4
 #define PEK_USE_WCO            8
 
-typedef struct PTCacheEditKey{
+typedef struct PTCacheEditKey {
        float *co;
        float *vel;
        float *rot;
index 7a84e71c763f862a20b0814c122e6b04b7840027..598d1b681bc66a1de66dc45c18302b78832c1a15 100644 (file)
@@ -69,14 +69,14 @@ void seq_array(struct Editing *ed, struct Sequence ***seqarray, int *tot, int us
 #define SEQP_BEGIN(ed, _seq)                                                  \
 {                                                                             \
        SeqIterator iter;                                                         \
-               for(seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) {           \
-                       _seq= iter.seq;
+               for (seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) {          \
+                       _seq = iter.seq;
                        
 #define SEQ_BEGIN(ed, _seq)                                                   \
        {                                                                         \
                SeqIterator iter;                                                     \
-               for(seq_begin(ed, &iter, 0); iter.valid; seq_next(&iter)) {           \
-                       _seq= iter.seq;
+               for (seq_begin(ed, &iter, 0); iter.valid; seq_next(&iter)) {          \
+                       _seq = iter.seq;
 
 #define SEQ_END                                                               \
                }                                                                     \
@@ -138,12 +138,10 @@ struct SeqEffectHandle {
        int (*early_out)(struct Sequence *seq, float facf0, float facf1); 
        
        /* stores the y-range of the effect IPO */
-       void (*store_icu_yrange)(struct Sequence * seq,
-                                 short adrcode, float *ymin, float *ymax);
+       void (*store_icu_yrange)(struct Sequence * seq, short adrcode, float *ymin, float *ymax);
        
        /* stores the default facf0 and facf1 if no IPO is present */
-       void (*get_default_fac)(struct Sequence *seq, float cfra,
-                                float * facf0, float * facf1);
+       void (*get_default_fac)(struct Sequence *seq, float cfra, float * facf0, float * facf1);
        
        /* execute the effect
         * sequence effects are only required to either support
index 7f9881926a60a113a115a71536ebee568ab10551..8179c688580d7ef52f75f35e151f415cf6f4615d 100644 (file)
@@ -68,7 +68,7 @@ void subsurf_calculate_limit_positions(struct Mesh *me, float (*positions_r)[3])
 int ccg_gridsize(int level);
 
 /* x/y grid coordinates at 'low_level' can be multiplied by the result
  of this function to convert to grid coordinates at 'high_level' */
* of this function to convert to grid coordinates at 'high_level' */
 int ccg_factor(int low_level, int high_level);
 
 void subsurf_copy_grid_hidden(struct DerivedMesh *dm,
@@ -78,7 +78,7 @@ void subsurf_copy_grid_hidden(struct DerivedMesh *dm,
 
 typedef enum MultiresModifiedFlags {
        /* indicates the grids have been sculpted on, so MDisps
-          have to be updated */
+        * have to be updated */
        MULTIRES_COORDS_MODIFIED = 1,
        /* indicates elements have been hidden or unhidden */
        MULTIRES_HIDDEN_MODIFIED = 2
index 684c3d8683b0e53fe75551e5fe1c5fe39d3283df..ee9e6bc7739ca513df8cd9b204765f64d6297f94 100644 (file)
@@ -23,8 +23,11 @@ incs += ' ' + env['BF_ZLIB_INC']
 
 defs = [ 'GLEW_STATIC' ]
 
-defs.append('WITH_SMOKE')  # TODO, make optional
-defs.append('WITH_FRAMESERVER')  # TODO, make optional
+if env['WITH_BF_SMOKE']:
+    defs.append('WITH_SMOKE')
+
+if env['WITH_BF_FRAMESERVER']:
+    defs.append('WITH_FRAMESERVER')
 
 if env['WITH_BF_PYTHON']:
     incs += ' ../python'
@@ -111,7 +114,7 @@ if env['WITH_BF_FFTW3']:
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
 
-if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
+if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
 
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
index 9b55785d1a499d62f669a014da19a6f35ab2ab80..f5718974f9ffcd4afac59fd2598c91fc34f3b875 100644 (file)
@@ -27,7 +27,7 @@
 
 /***/
 
-typedef unsigned char  byte;
+typedef unsigned char byte;
 
 /***/
 
@@ -50,10 +50,13 @@ typedef struct _EHash {
        CCGAllocatorHDL allocator;
 } EHash;
 
-#define EHASH_alloc(eh, nb)                    ((eh)->allocatorIFC.alloc((eh)->allocator, nb))
-#define EHASH_free(eh, ptr)                    ((eh)->allocatorIFC.free((eh)->allocator, ptr))
+#define EHASH_alloc(eh, nb)     ((eh)->allocatorIFC.alloc((eh)->allocator, nb))
+#define EHASH_free(eh, ptr)     ((eh)->allocatorIFC.free((eh)->allocator, ptr))
 
-#define EHASH_hash(eh, item)   (((uintptr_t) (item))%((unsigned int) (eh)->curSize))
+#define EHASH_hash(eh, item)    (((uintptr_t) (item)) % ((unsigned int) (eh)->curSize))
+
+static void ccgSubSurf__sync(CCGSubSurf *ss);
+static int _edge_isBoundary(const CCGEdge *e);
 
 static EHash *_ehash_new(int estimatedNumEntries, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator)
 {
@@ -107,7 +110,7 @@ static void _ehash_insert(EHash *eh, EHEntry *entry)
                memset(eh->buckets, 0, eh->curSize * sizeof(*eh->buckets));
 
                while (numBuckets--) {
-                       for (entry = oldBuckets[numBuckets]; entry;) {
+                       for (entry = oldBuckets[numBuckets]; entry; ) {
                                EHEntry *next = entry->next;
                                
                                hash = EHASH_hash(eh, entry->key);
@@ -125,12 +128,12 @@ static void _ehash_insert(EHash *eh, EHEntry *entry)
 static void *_ehash_lookupWithPrev(EHash *eh, void *key, void ***prevp_r)
 {
        int hash = EHASH_hash(eh, key);
-       void **prevp = (void**) &eh->buckets[hash];
+       void **prevp = (void **) &eh->buckets[hash];
        EHEntry *entry;
        
-       for (; (entry = *prevp); prevp = (void**) &entry->next) {
+       for (; (entry = *prevp); prevp = (void **) &entry->next) {
                if (entry->key == key) {
-                       *prevp_r = (void**) prevp;
+                       *prevp_r = (void **) prevp;
                        return entry;
                }
        }
@@ -279,7 +282,7 @@ static int VertDataEqual(const float *a, const float *b)
 #define VertDataCopy(av, bv) { float *_a = (float *)av, *_b = (float *) bv; _a[0]  = _b[0]; _a[1]  = _b[1]; _a[2]  = _b[2]; }
 #define VertDataAdd(av, bv)  { float *_a = (float *)av, *_b = (float *) bv; _a[0] += _b[0]; _a[1] += _b[1]; _a[2] += _b[2]; }
 #define VertDataSub(av, bv)  { float *_a = (float *)av, *_b = (float *) bv; _a[0] -= _b[0]; _a[1] -= _b[1]; _a[2] -= _b[2]; }
-#define VertDataMulN(av, n)  { float *_a = (float *)av; _a[0]*=n; _a[1]*=n; _a[2] *=n; }
+#define VertDataMulN(av, n)  { float *_a = (float *)av; float _n = n; _a[0] *= _n; _a[1] *= _n; _a[2] *= _n; }
 #define VertDataAvg4(tv, av, bv, cv, dv) \
        { \
                float *_t = (float *) tv, *_a = (float *) av, *_b = (float *) bv, *_c = (float *) cv, *_d = (float *) dv; \
@@ -291,9 +294,6 @@ static int VertDataEqual(const float *a, const float *b)
 #define NormCopy(av, bv) { float *_a = (float *) av, *_b = (float *) bv; _a[0]  = _b[0]; _a[1]  = _b[1]; _a[2]  = _b[2]; }
 #define NormAdd(av, bv)  { float *_a = (float *) av, *_b = (float *) bv; _a[0] += _b[0]; _a[1] += _b[1]; _a[2] += _b[2]; }
 
-
-static int _edge_isBoundary(const CCGEdge *e);
-
 /***/
 
 enum {
@@ -309,8 +309,8 @@ enum {
 } /*FaceFlags*/;
 
 struct CCGVert {
-       CCGVert         *next;  /* EHData.next */
-       CCGVertHDL      vHDL;   /* EHData.key */
+       CCGVert     *next;  /* EHData.next */
+       CCGVertHDL vHDL;    /* EHData.key */
 
        short numEdges, numFaces, flags, pad;
 
@@ -322,17 +322,17 @@ struct CCGVert {
 
 static CCG_INLINE byte *VERT_getLevelData(CCGVert *v)
 {
-       return (byte*)(&(v)[1]);
+       return (byte *)(&(v)[1]);
 }
 
 struct CCGEdge {
-       CCGEdge         *next;  /* EHData.next */
-       CCGEdgeHDL      eHDL;   /* EHData.key */
+       CCGEdge     *next;  /* EHData.next */
+       CCGEdgeHDL eHDL;    /* EHData.key */
 
        short numFaces, flags;
        float crease;
 
-       CCGVert *v0,*v1;
+       CCGVert *v0, *v1;
        CCGFace **faces;
 
 //     byte *levelData;
@@ -341,12 +341,12 @@ struct CCGEdge {
 
 static CCG_INLINE byte *EDGE_getLevelData(CCGEdge *e)
 {
-       return (byte*)(&(e)[1]);
+       return (byte *)(&(e)[1]);
 }
 
 struct CCGFace {
-       CCGFace         *next;  /* EHData.next */
-       CCGFaceHDL      fHDL;   /* EHData.key */
+       CCGFace     *next;  /* EHData.next */
+       CCGFaceHDL fHDL;    /* EHData.key */
 
        short nu