Merged changes in the trunk up to revision 28536.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 2 May 2010 23:10:22 +0000 (23:10 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 2 May 2010 23:10:22 +0000 (23:10 +0000)
623 files changed:
CMakeLists.txt
config/aix4-config.py
config/irix6-config.py
config/linux2-config.py
doc/blender-cmake.txt
extern/libopenjpeg/opj_malloc.h
extern/libopenjpeg/patches/fbsd.patch [new file with mode: 0644]
intern/audaspace/intern/AUD_C-API.cpp
intern/audaspace/intern/AUD_C-API.h
intern/bsp/intern/BSP_MeshPrimitives.cpp
intern/bsp/intern/CSG_BooleanOps.cpp
intern/bsp/test/BSP_GhostTest/BSP_GhostTest3D.cpp
intern/bsp/test/BSP_GhostTest/BSP_MeshDrawer.cpp
intern/bsp/test/BSP_GhostTest/BSP_PlyLoader.cpp
intern/bsp/test/BSP_GhostTest/main.cpp
intern/bsp/test/BSP_GhostTest/plyfile.c
intern/container/intern/CTR_List.cpp
intern/decimation/intern/LOD_EdgeCollapser.cpp
intern/decimation/intern/LOD_ExternNormalEditor.cpp
intern/decimation/intern/LOD_FaceNormalEditor.cpp
intern/decimation/intern/LOD_ManMesh2.cpp
intern/decimation/intern/LOD_MeshPrimitives.cpp
intern/decimation/intern/LOD_QSDecimator.cpp
intern/decimation/intern/LOD_QuadricEditor.cpp
intern/decimation/intern/LOD_decimation.cpp
intern/ghost/intern/GHOST_Buttons.cpp
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_CallbackEventConsumer.cpp
intern/ghost/intern/GHOST_DisplayManager.cpp
intern/ghost/intern/GHOST_DisplayManagerCarbon.cpp
intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
intern/ghost/intern/GHOST_DisplayManagerX11.cpp
intern/ghost/intern/GHOST_EventManager.cpp
intern/ghost/intern/GHOST_EventPrinter.cpp
intern/ghost/intern/GHOST_ISystem.cpp
intern/ghost/intern/GHOST_ModifierKeys.cpp
intern/ghost/intern/GHOST_Rect.cpp
intern/ghost/intern/GHOST_System.cpp
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_TimerManager.cpp
intern/ghost/intern/GHOST_Window.cpp
intern/ghost/intern/GHOST_WindowCarbon.cpp
intern/ghost/intern/GHOST_WindowManager.cpp
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/ghost/test/gears/GHOST_C-Test.c
intern/ghost/test/gears/GHOST_Test.cpp
intern/ghost/test/multitest/Basic.c
intern/ghost/test/multitest/EventToBuf.c
intern/ghost/test/multitest/MultiTest.c
intern/ghost/test/multitest/ScrollBar.c
intern/ghost/test/multitest/Util.c
intern/ghost/test/multitest/WindowData.c
intern/guardedalloc/MEM_guardedalloc.h
intern/guardedalloc/intern/mallocn.c
intern/guardedalloc/test/simpletest/memtest.c
intern/iksolver/intern/IK_QSegment.cpp
intern/iksolver/test/ik_glut_test/common/GlutDrawer.cpp
intern/iksolver/test/ik_glut_test/common/GlutKeyboardManager.cpp
intern/iksolver/test/ik_glut_test/common/GlutMouseManager.cpp
intern/iksolver/test/ik_glut_test/intern/main.cpp
intern/memutil/intern/MEM_CacheLimiterC-Api.cpp
intern/memutil/intern/MEM_RefCountedC-Api.cpp
intern/moto/intern/MT_CmMatrix4x4.cpp
intern/moto/intern/MT_Matrix3x3.cpp
intern/moto/intern/MT_Matrix4x4.cpp
intern/moto/intern/MT_Plane3.cpp
intern/moto/intern/MT_Point3.cpp
intern/moto/intern/MT_Quaternion.cpp
intern/moto/intern/MT_Transform.cpp
intern/moto/intern/MT_Vector2.cpp
intern/moto/intern/MT_Vector3.cpp
intern/moto/intern/MT_Vector4.cpp
intern/moto/intern/MT_random.cpp
projectfiles_vc9/blender/editors/ED_editors.vcproj
projectfiles_vc9/gameengine/gamelogic/SCA_GameLogic.vcproj
release/datafiles/blenderbuttons
release/scripts/io/engine_render_pov.py
release/scripts/io/export_fbx.py
release/scripts/io/import_anim_bvh.py
release/scripts/io/netrender/__init__.py
release/scripts/io/netrender/client.py
release/scripts/io/netrender/master.py
release/scripts/io/netrender/master_html.py
release/scripts/io/netrender/model.py
release/scripts/io/netrender/netrender.css
release/scripts/io/netrender/operators.py
release/scripts/io/netrender/repath.py [new file with mode: 0755]
release/scripts/io/netrender/slave.py
release/scripts/io/netrender/ui.py
release/scripts/io/netrender/utils.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/console/complete_import.py
release/scripts/modules/graphviz_export.py
release/scripts/op/add_mesh_torus.py
release/scripts/op/console_python.py
release/scripts/op/object.py
release/scripts/op/presets.py
release/scripts/op/sequencer.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/op/vertexpaint_dirt.py
release/scripts/presets/interaction/maya.py
release/scripts/templates/operator_modal_draw.py
release/scripts/templates/operator_simple.py
release/scripts/ui/properties_data_armature.py
release/scripts/ui/properties_data_camera.py
release/scripts/ui/properties_data_lattice.py
release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_particle.py
release/scripts/ui/properties_physics_cloth.py
release/scripts/ui/properties_physics_common.py
release/scripts/ui/properties_physics_field.py
release/scripts/ui/properties_physics_fluid.py
release/scripts/ui/properties_physics_smoke.py
release/scripts/ui/properties_physics_softbody.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_texture.py
release/scripts/ui/space_image.py
release/scripts/ui/space_outliner.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_view3d.py
source/blender/avi/intern/avirgb.c
source/blender/avi/intern/codecs.c
source/blender/avi/intern/endian.c
source/blender/avi/intern/mjpeg.c
source/blender/avi/intern/options.c
source/blender/avi/intern/rgb32.c
source/blender/blenfont/BLF_api.h
source/blender/blenfont/BLF_types.h [new file with mode: 0644]
source/blender/blenfont/intern/Makefile
source/blender/blenfont/intern/blf.c
source/blender/blenkernel/BKE_anim.h
source/blender/blenkernel/BKE_armature.h
source/blender/blenkernel/BKE_constraint.h
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_curve.h
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_screen.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_sound.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/bmfont.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/fmodifier.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/image_gen.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/packedFile.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/property.c
source/blender/blenkernel/intern/report.c
source/blender/blenkernel/intern/sca.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/sketch.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenkernel/intern/writeframeserver.c
source/blender/blenlib/BLI_fnmatch.h
source/blender/blenlib/BLI_path_util.h
source/blender/blenlib/BLI_threads.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/BLI_linklist.c
source/blender/blenlib/intern/BLI_memarena.c
source/blender/blenlib/intern/dynlib.c
source/blender/blenlib/intern/fnmatch.c
source/blender/blenlib/intern/graph.c
source/blender/blenlib/intern/gsqueue.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/noise.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/rand.c
source/blender/blenlib/intern/rct.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/threads.c
source/blender/blenlib/intern/time.c
source/blender/blenlib/intern/voxel.c
source/blender/blenlib/intern/winstuff.c
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/undofile.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/DocumentImporter.cpp
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_generate.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poseobject.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/curve_intern.h
source/blender/editors/curve/editcurve.c
source/blender/editors/datafiles/B.blend.c
source/blender/editors/datafiles/Bfont.c
source/blender/editors/datafiles/blenderbuttons.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/gpencil_buttons.c
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_gpencil.h
source/blender/editors/include/ED_logic.h [new file with mode: 0644]
source/blender/editors/include/ED_physics.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/include/UI_icons.h
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface.c
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_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_lib.c
source/blender/editors/mesh/editmesh_loop.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/loopcut.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_modifier.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/particle_edit.c
source/blender/editors/physics/physics_intern.h
source/blender/editors/physics/physics_ops.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/screen_context.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_console/console_draw.c
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/space_file.c
source/blender/editors/space_file/writeimage.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_logic/logic_intern.h
source/blender/editors/space_logic/logic_ops.c [new file with mode: 0644]
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_outliner/outliner_intern.h
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/drawanimviz.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/space_view3d/space_view3d.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_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_constraints.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/editmode_undo.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/gpu/GPU_draw.h
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_draw.c
source/blender/imbuf/intern/anim.c
source/blender/imbuf/intern/jp2.c
source/blender/imbuf/intern/md5.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_curve_types.h
source/blender/makesdna/DNA_documentation.h
source/blender/makesdna/DNA_lattice_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_object_force.h
source/blender/makesdna/DNA_sequence_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_lattice.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_property.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sensor.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/modifiers/MOD_modifiertypes.h
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_smooth.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_util.c
source/blender/modifiers/intern/MOD_util.h
source/blender/nodes/intern/SHD_nodes/SHD_material.c
source/blender/python/generic/bgl.h
source/blender/python/generic/blf_api.c
source/blender/python/generic/mathutils.c
source/blender/python/generic/mathutils.h
source/blender/python/generic/mathutils_color.c
source/blender/python/generic/mathutils_euler.c
source/blender/python/generic/mathutils_matrix.c
source/blender/python/generic/mathutils_quat.c
source/blender/python/generic/mathutils_vector.c
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_driver.c
source/blender/python/intern/bpy_rna.c
source/blender/quicktime/quicktime_import.h
source/blender/readblenfile/intern/BLO_readblenfile.c
source/blender/readblenfile/test/test.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/gammaCorrectionTables.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/volumetric.c
source/blender/render/intern/source/voxeldata.c
source/blender/verify/intern/BLO_verify.c
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/wm_event_types.h
source/creator/CMakeLists.txt
source/creator/buildinfo.c
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
source/gameengine/BlenderRoutines/KX_BlenderInputDevice.cpp
source/gameengine/BlenderRoutines/KX_BlenderInputDevice.h
source/gameengine/BlenderRoutines/KX_BlenderKeyboardDevice.cpp
source/gameengine/BlenderRoutines/KX_BlenderMouseDevice.cpp
source/gameengine/BlenderRoutines/KX_BlenderSystem.cpp
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_ArmatureActuator.cpp
source/gameengine/Converter/BL_ArmatureChannel.cpp
source/gameengine/Converter/BL_ArmatureConstraint.cpp
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_DeformableGameObject.cpp
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Converter/BlenderWorldInfo.cpp
source/gameengine/Converter/KX_ConvertControllers.cpp
source/gameengine/Converter/KX_ConvertProperties.cpp
source/gameengine/Converter/KX_ConvertSensors.cpp
source/gameengine/Converter/KX_IpoConvert.cpp
source/gameengine/Expressions/BoolValue.cpp
source/gameengine/Expressions/ConstExpr.cpp
source/gameengine/Expressions/EXP_C-Api.cpp
source/gameengine/Expressions/EmptyValue.cpp
source/gameengine/Expressions/ErrorValue.cpp
source/gameengine/Expressions/Expression.cpp
source/gameengine/Expressions/FloatValue.cpp
source/gameengine/Expressions/IdentifierExpr.cpp
source/gameengine/Expressions/IfExpr.cpp
source/gameengine/Expressions/InputParser.cpp
source/gameengine/Expressions/IntValue.cpp
source/gameengine/Expressions/KX_HashedPtr.cpp
source/gameengine/Expressions/ListValue.cpp
source/gameengine/Expressions/Operator1Expr.cpp
source/gameengine/Expressions/Operator2Expr.cpp
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/Expressions/StringValue.cpp
source/gameengine/Expressions/Value.cpp
source/gameengine/Expressions/VectorValue.cpp
source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
source/gameengine/GameLogic/SCA_ANDController.cpp
source/gameengine/GameLogic/SCA_ActuatorEventManager.cpp
source/gameengine/GameLogic/SCA_ActuatorSensor.cpp
source/gameengine/GameLogic/SCA_AlwaysEventManager.cpp
source/gameengine/GameLogic/SCA_AlwaysSensor.cpp
source/gameengine/GameLogic/SCA_BasicEventManager.cpp
source/gameengine/GameLogic/SCA_DelaySensor.cpp
source/gameengine/GameLogic/SCA_EventManager.cpp
source/gameengine/GameLogic/SCA_ExpressionController.cpp
source/gameengine/GameLogic/SCA_IActuator.cpp
source/gameengine/GameLogic/SCA_IController.cpp
source/gameengine/GameLogic/SCA_IInputDevice.h
source/gameengine/GameLogic/SCA_ILogicBrick.cpp
source/gameengine/GameLogic/SCA_IObject.cpp
source/gameengine/GameLogic/SCA_IScene.cpp
source/gameengine/GameLogic/SCA_ISensor.cpp
source/gameengine/GameLogic/SCA_JoystickManager.cpp
source/gameengine/GameLogic/SCA_JoystickSensor.cpp
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GameLogic/SCA_LogicManager.cpp
source/gameengine/GameLogic/SCA_MouseManager.cpp
source/gameengine/GameLogic/SCA_MouseManager.h
source/gameengine/GameLogic/SCA_MouseSensor.cpp
source/gameengine/GameLogic/SCA_NANDController.cpp
source/gameengine/GameLogic/SCA_NORController.cpp
source/gameengine/GameLogic/SCA_ORController.cpp
source/gameengine/GameLogic/SCA_PropertyActuator.cpp
source/gameengine/GameLogic/SCA_PropertyEventManager.cpp
source/gameengine/GameLogic/SCA_PropertySensor.cpp
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GameLogic/SCA_PythonKeyboard.cpp
source/gameengine/GameLogic/SCA_PythonMouse.cpp
source/gameengine/GameLogic/SCA_RandomActuator.cpp
source/gameengine/GameLogic/SCA_RandomEventManager.cpp
source/gameengine/GameLogic/SCA_RandomNumberGenerator.cpp
source/gameengine/GameLogic/SCA_RandomSensor.cpp
source/gameengine/GameLogic/SCA_TimeEventManager.cpp
source/gameengine/GameLogic/SCA_XNORController.cpp
source/gameengine/GameLogic/SCA_XORController.cpp
source/gameengine/GamePlayer/common/GPC_Canvas.cpp
source/gameengine/GamePlayer/common/GPC_Engine.cpp
source/gameengine/GamePlayer/common/GPC_MouseDevice.cpp
source/gameengine/GamePlayer/common/GPC_RawImage.cpp
source/gameengine/GamePlayer/common/GPC_RawLoadDotBlendArray.cpp
source/gameengine/GamePlayer/common/GPC_RawLogoArrays.cpp
source/gameengine/GamePlayer/common/GPC_System.cpp
source/gameengine/GamePlayer/common/bmfont.cpp
source/gameengine/GamePlayer/common/unix/GPU_Canvas.cpp
source/gameengine/GamePlayer/common/unix/GPU_Engine.cpp
source/gameengine/GamePlayer/common/unix/GPU_Engine.h
source/gameengine/GamePlayer/common/unix/GPU_KeyboardDevice.cpp
source/gameengine/GamePlayer/common/unix/GPU_System.cpp
source/gameengine/GamePlayer/common/windows/GPW_Canvas.cpp
source/gameengine/GamePlayer/common/windows/GPW_Engine.cpp
source/gameengine/GamePlayer/common/windows/GPW_KeyboardDevice.cpp
source/gameengine/GamePlayer/common/windows/GPW_System.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_Canvas.cpp
source/gameengine/GamePlayer/ghost/GPG_Canvas.h
source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
source/gameengine/GamePlayer/ghost/GPG_System.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkEventManager.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageActuator.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkMessageSensor.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectActuator.cpp
source/gameengine/Ketsji/KXNetwork/KX_NetworkObjectSensor.cpp
source/gameengine/Ketsji/KX_ArmatureSensor.cpp
source/gameengine/Ketsji/KX_BlenderMaterial.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_CameraActuator.cpp
source/gameengine/Ketsji/KX_CameraIpoSGController.cpp
source/gameengine/Ketsji/KX_ConstraintActuator.cpp
source/gameengine/Ketsji/KX_ConstraintWrapper.cpp
source/gameengine/Ketsji/KX_EmptyObject.cpp
source/gameengine/Ketsji/KX_GameActuator.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IPO_SGController.cpp
source/gameengine/Ketsji/KX_IPhysicsController.cpp
source/gameengine/Ketsji/KX_IpoActuator.cpp
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_Light.cpp
source/gameengine/Ketsji/KX_LightIpoSGController.cpp
source/gameengine/Ketsji/KX_MaterialIpoController.cpp
source/gameengine/Ketsji/KX_MeshProxy.cpp
source/gameengine/Ketsji/KX_MotionState.cpp
source/gameengine/Ketsji/KX_NearSensor.cpp
source/gameengine/Ketsji/KX_ObColorIpoSGController.cpp
source/gameengine/Ketsji/KX_ObjectActuator.cpp
source/gameengine/Ketsji/KX_OrientationInterpolator.cpp
source/gameengine/Ketsji/KX_ParentActuator.cpp
source/gameengine/Ketsji/KX_PhysicsObjectWrapper.cpp
source/gameengine/Ketsji/KX_PolyProxy.cpp
source/gameengine/Ketsji/KX_PolygonMaterial.cpp
source/gameengine/Ketsji/KX_PositionInterpolator.cpp
source/gameengine/Ketsji/KX_PyConstraintBinding.cpp
source/gameengine/Ketsji/KX_PyMath.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_RadarSensor.cpp
source/gameengine/Ketsji/KX_RayCast.cpp
source/gameengine/Ketsji/KX_RayEventManager.cpp
source/gameengine/Ketsji/KX_RaySensor.cpp
source/gameengine/Ketsji/KX_SCA_AddObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_DynamicActuator.cpp
source/gameengine/Ketsji/KX_SCA_EndObjectActuator.cpp
source/gameengine/Ketsji/KX_SCA_ReplaceMeshActuator.cpp
source/gameengine/Ketsji/KX_SG_BoneParentNodeRelationship.cpp
source/gameengine/Ketsji/KX_SG_NodeRelationships.cpp
source/gameengine/Ketsji/KX_ScalarInterpolator.cpp
source/gameengine/Ketsji/KX_ScalingInterpolator.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/KX_Scene.h
source/gameengine/Ketsji/KX_SceneActuator.cpp
source/gameengine/Ketsji/KX_SoundActuator.cpp
source/gameengine/Ketsji/KX_StateActuator.cpp
source/gameengine/Ketsji/KX_TimeCategoryLogger.cpp
source/gameengine/Ketsji/KX_TimeLogger.cpp
source/gameengine/Ketsji/KX_TouchEventManager.cpp
source/gameengine/Ketsji/KX_TouchSensor.cpp
source/gameengine/Ketsji/KX_TrackToActuator.cpp
source/gameengine/Ketsji/KX_VehicleWrapper.cpp
source/gameengine/Ketsji/KX_VertexProxy.cpp
source/gameengine/Ketsji/KX_VisibilityActuator.cpp
source/gameengine/Ketsji/KX_WorldInfo.cpp
source/gameengine/Ketsji/KX_WorldIpoController.cpp
source/gameengine/Network/LoopBackNetwork/NG_LoopBackNetworkDeviceInterface.cpp
source/gameengine/Network/NG_NetworkMessage.cpp
source/gameengine/Network/NG_NetworkObject.cpp
source/gameengine/Network/NG_NetworkScene.cpp
source/gameengine/Network/TerraplayNetwork/NG_TerraplayNetworkDeviceInterface.cpp
source/gameengine/Physics/Dummy/DummyPhysicsEnvironment.cpp
source/gameengine/Physics/common/PHY_IController.cpp
source/gameengine/Physics/common/PHY_IGraphicController.cpp
source/gameengine/Physics/common/PHY_IMotionState.cpp
source/gameengine/Physics/common/PHY_IPhysicsController.cpp
source/gameengine/Physics/common/PHY_IPhysicsEnvironment.cpp
source/gameengine/PyDoc/GameKeys.py
source/gameengine/PyDoc/GameLogic.py
source/gameengine/PyDoc/GameTypes.py
source/gameengine/PyDoc/PhysicsConstraints.py
source/gameengine/PyDoc/VideoTexture.py
source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
source/gameengine/Rasterizer/RAS_FramingManager.cpp
source/gameengine/Rasterizer/RAS_ICanvas.h
source/gameengine/Rasterizer/RAS_IPolygonMaterial.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_VAOpenGLRasterizer.cpp
source/gameengine/Rasterizer/RAS_texmatrix.cpp
source/gameengine/SceneGraph/SG_Controller.cpp
source/gameengine/SceneGraph/SG_IObject.cpp
source/gameengine/SceneGraph/SG_Node.cpp
source/gameengine/SceneGraph/SG_Spatial.cpp
source/kernel/gen_messaging/intern/messaging.c
source/kernel/gen_system/GEN_HashedPtr.cpp
source/kernel/gen_system/GEN_Matrix4x4.cpp
source/kernel/gen_system/SYS_SingletonSystem.cpp
source/kernel/gen_system/SYS_System.cpp
source/nan_compile.mk
source/nan_definitions.mk
source/nan_link.mk

index 3daa389329038994b095dce9efad8418527664fa..71489ca69122134a5cb613a3abb69faaf37dade0 100644 (file)
@@ -102,9 +102,9 @@ ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 
 # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
 # On Unix: 
-#   cmake -D PYTHON_LIB=/usr/local/lib/python2.3/config/libpython2.3.so -D PYTHON_INC=/usr/local/include/python2.3 -D PYTHON_BINARY=/usr/local/bin/python2.3 -G "Unix Makefiles" ../blender
+#   cmake -D PYTHON_LIB=/usr/local/lib/python3.1/config/libpython3.1.so -D PYTHON_INC=/usr/local/include/python3.1 -G "Unix Makefiles" ../blender
 # On Macs: 
-#   cmake -D PYTHON_INC=/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config -D PYTHON_BINARY=/System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 -G Xcode ../blender
+#   cmake -D PYTHON_INC=/System/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1 -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/config -G Xcode ../blender
 #
 # When changing any of this remember to update the notes in doc/blender-cmake.txt
 
@@ -479,7 +479,7 @@ IF(APPLE)
                # otherwise, use custom system framework
 
                SET(PYTHON /System/Library/Frameworks/Python.framework/Versions/)
-               SET(PYTHON_VERSION 2.5)
+               SET(PYTHON_VERSION 3.1)
                SET(PYTHON_INC "${PYTHON}${PYTHON_VERSION}/include/python${PYTHON_VERSION}")
                # SET(PYTHON_BINARY ${PYTHON}${PYTHON_VERSION}/bin/python${PYTHON_VERSION}) # not used yet
                SET(PYTHON_LIB "")
index 3a3db39494d9973636f684ae2572739532f2b553..32344cdabc8d99e8937e85748c45a4d6c90e57b2 100644 (file)
@@ -14,7 +14,7 @@ BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
 BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
-BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python2.5/config/libpython${BF_PYTHON_VERSION}.a'
+BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}/config/libpython${BF_PYTHON_VERSION}.a'
 
 WITH_BF_OPENAL = 'false'
 WITH_BF_STATICOPENAL = 'false'
index df18e0b511f6584208f78cb0310ed40c75d597e4..7c319f7b52070c36528bb6bfaf92e09632ed8b3c 100644 (file)
@@ -10,7 +10,7 @@ BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
 BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}' #BF_PYTHON+'/lib/python'+BF_PYTHON_VERSION+'/config/libpython'+BF_PYTHON_VERSION+'.a'
 BF_PYTHON_LINKFLAGS = ['-Xlinker', '-export-dynamic']
-BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python2.5/config/libpython${BF_PYTHON_VERSION}.a'
+BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}/config/libpython${BF_PYTHON_VERSION}.a'
 
 WITH_BF_OPENAL = 'true'
 WITH_BF_STATICOPENAL = 'true'
index 53cad76d6129fda5e5704dba4686aa8bdaa7eeb2..3951dac2454fdfddcb11b3791c0230a7e46a5dfc 100644 (file)
@@ -175,10 +175,10 @@ CXX = 'g++'
 ##ifeq ($CPU),alpha)
 ##   CFLAGS += -pipe -fPIC -funsigned-char -fno-strict-aliasing -mieee
 
-CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
+CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']
 
 CPPFLAGS = []
-CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing']
+CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']
 REL_CFLAGS = ['-O2']
 REL_CCFLAGS = ['-O2']
 ##BF_DEPEND = True
index 05037a3ab2a9ed1e2f749d7759cc0e73d8f85f98..a49ff629b5bd862b0ba868b19f3a6b5c08bd06c4 100644 (file)
@@ -132,9 +132,9 @@ $Id$
     The commandline can be used to override detected/default settings, e.g:
  
     On Unix: 
-      cmake -D PYTHON_LIB=/usr/local/lib/python2.3/config/libpython2.3.so -D PYTHON_INC=/usr/local/include/python2.3 -D PYTHON_BINARY=/usr/local/bin/python2.3 -G "Unix Makefiles" ../blender
+      cmake -D PYTHON_LIB=/usr/local/lib/python3.1/config/libpython3.1.so -D PYTHON_INC=/usr/local/include/python3.1 -G "Unix Makefiles" ../blender
     On Macs: 
-      cmake -D PYTHON_INC=/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5 -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config -D PYTHON_BINARY=/System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 -G Xcode ../blender
+      cmake -D PYTHON_INC=/System/Library/Frameworks/Python.framework/Versions/3.1/include/python3.1 -G Xcode ../blender
 
     Mote that this should only be needed once per build directory generation because it will keep the overrides in CMakeCache.txt for subsequent runs.
 
index 4e9727af0f37e62adac412ac15da3d5f8672148f..960bdb3ec4b53cfac0a9c3bbb62d21af7671621b 100644 (file)
@@ -76,7 +76,7 @@ Allocate memory aligned to a 16 byte boundry
        #if defined(__sun)
                        #define HAVE_MEMALIGN
                #elif defined(__GNUC__)
-                        #ifndef __APPLE__
+                        #if !defined(__APPLE__) && !defined(__FreeBSD__)
                            #define HAVE_MEMALIGN
                            #include <malloc.h>
                         #endif
diff --git a/extern/libopenjpeg/patches/fbsd.patch b/extern/libopenjpeg/patches/fbsd.patch
new file mode 100644 (file)
index 0000000..90e7760
--- /dev/null
@@ -0,0 +1,13 @@
+Index: extern/libopenjpeg/opj_malloc.h
+===================================================================
+--- extern/libopenjpeg/opj_malloc.h    (revision 27736)
++++ extern/libopenjpeg/opj_malloc.h    (working copy)
+@@ -76,7 +76,7 @@
+       #if defined(__sun)
+                       #define HAVE_MEMALIGN
+               #elif defined(__GNUC__)
+-                        #ifndef __APPLE__
++                        #if !defined(__APPLE__) && !defined(__FreeBSD__)
+                           #define HAVE_MEMALIGN
+                           #include <malloc.h>
+                         #endif
index f7394e36c4dc678f9efe18ce19b0cbcd240a868a..32cfd2098b0c5be8c165d28295eba2d881ce1008 100644 (file)
@@ -84,11 +84,15 @@ static AUD_IDevice* AUD_device = NULL;
 static int AUD_available_devices[4];
 static AUD_I3DDevice* AUD_3ddevice = NULL;
 
-int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
+void AUD_initOnce()
 {
 #ifdef WITH_FFMPEG
        av_register_all();
 #endif
+}
+
+int AUD_init(AUD_DeviceType device, AUD_DeviceSpecs specs, int buffersize)
+{
        AUD_IDevice* dev = NULL;
 
        if(AUD_device)
index a7372c29885780783fd1f3ea77da2f52072764b2..55aed02153fcf17250e7053d3a2f90c850f76622 100644 (file)
@@ -55,6 +55,11 @@ typedef struct
        typedef void (*AUD_syncFunction)(void*, int, float);
 #endif
 
+/**
+ * Initializes FFMPEG if it is enabled.
+ */
+extern void AUD_initOnce();
+
 /**
  * Initializes an audio device.
  * \param device The device type that should be used.
index 16cca56622f16102e002d2dbf2c63e0c01c24850..f77d353ec942ad84aad14cb990ce43374d480a26 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "BSP_MeshPrimitives.h"
 
 #include "MT_assert.h"
index fc7eb5d14d7f7b675b4c1ea6c5d3a9728b76eedd..dfc46dff85d2eb5b86841af40933d7851cab7c35 100644 (file)
  * Implementation of external api for CSG part of BSP lib interface.
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "../extern/CSG_BooleanOps.h"
 #include "BSP_CSGMesh_CFIterator.h"
 #include "MEM_RefCountPtr.h"
index 122eda99f66f7b449808f5b30bfdf7153fdd3ef1..7b0d144c5c7e06f2050896fc84ea3b139d8395cd 100644 (file)
 * $Id$
 * Copyright (C) 2001 NaN Technologies B.V.
 */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #if defined(WIN32) || defined(__APPLE__)
 #      ifdef WIN32
 #              include <windows.h>
index 39b18545f62ede1c4f5b19733c160a03e94f1f90..1d3be0b9ca470a42706ed5351d4bf4b2d4279c57 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "BSP_MeshDrawer.h"
 
 #include "BSP_TMesh.h"
index 07f2503effdfc7248bcfb9ec0fbea87b08816604..9c0499a7977034cbc3eb7e04090a9ac2ba2fb062 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "BSP_PlyLoader.h"
 
 #include "MT_Vector3.h"
index 409334e172067cbc2a19181858959744a9d7813d..a03d85b25e90a88049428a2e0925020d1728fba0 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "BSP_GhostTest3D.h"
 
 #include "BSP_TMesh.h"
index 400b0f20ee77335c41457a61a315445b6ff8f614..aa0db15a334d10e5b102ba8fa704370fb4448af8 100644 (file)
@@ -67,10 +67,6 @@ WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
 #include <string.h>
 #include "ply.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 char *type_names[] = {
 "invalid",
 "char", "short", "int",
index fdb72082604c55213ea804b9379f41d97fc0063f..05090db97d9a52f6e017e468029325cc286245a6 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "CTR_List.h"
 
 
index a5efe87b8b4ea48ba89f5f6885cdd3e261a8d1f3..353ddbf363f20dee9af0e9b600ff9901305ca699 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "LOD_EdgeCollapser.h"
 
 #include "LOD_ManMesh2.h"
index 505970d583f78c305b75d0284635529de774daf6..7130ff2a0d68e2f27f89a7b2e9f3d0ee8b6aeca5 100644 (file)
 #include "LOD_ExternNormalEditor.h"
 #include <vector>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 using namespace std;
 
 
index 91183cbb59fad77ec7efb8e18cc5d2dc7f3a777e..a6175bbb0c833da0f73b2bd51fca8e3da4059f20 100644 (file)
 // implementation of LOD_FaceNormalEditor.h
 
 ///////////////////////////////////////
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "LOD_FaceNormalEditor.h"
 
 using namespace std;
index 7b1b5e150351104fbe54620440ea1d000ba115f0..a48c8fe0db17a9ea1f922b2541cd7bc552080120 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "LOD_ManMesh2.h"
 
 #include "MT_assert.h"
index f7f6448e35e4b5d9fa6889ea9ea7c7f5d10a2d8f..5e5a9ec9fc4df9155ccb8d1a2ea679b38471e1d3 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "LOD_MeshPrimitives.h"
 
 #include "MT_assert.h"
index d19096aead16b85c0730e9b589a91aa8a18d8512..151f06d69fc1da848fc0026a2bb20e08744ff6a8 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "LOD_QSDecimator.h"
 
 #include "LOD_ExternBufferEditor.h"
index 27bf946ef737d6d81c9c629c13905efb67482697..7eb7f24ece4f9f321e4730c24bfbbc6ffa4dc6b7 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "LOD_QuadricEditor.h"
 #include "LOD_ExternNormalEditor.h"
 
index 12d558d518992663a9482e93fe6f5a63bb3f8974..69fb018df98e75bc64ac196704b1c78eee28d587 100644 (file)
  */
 
 // implementation of external c api
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "../extern/LOD_decimation.h"
 #include "LOD_DecimationClass.h"
 
index 01f651037662f4ee789b86aaa18b28988690de9c..edccb24d5a1c142200fa0235feb416c18335136d 100644 (file)
 
 #include "GHOST_Buttons.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 
 
 GHOST_Buttons::GHOST_Buttons()
index 51305e82064254ca9536c0091aed47b6c040bfeb..44b361d21e4eb2005dab2e46daf92adffc157b83 100644 (file)
 
 #include <stdlib.h>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "intern/GHOST_Debug.h"
 #include "GHOST_C-api.h"
 #include "GHOST_ISystem.h"
index af3534fcc38acf775fc4368eadb12e1b4dcc8391..7f5ed859de1160c82f31ba78efb498a80860e732 100644 (file)
  * @date       October 25, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_Debug.h"
 #include "GHOST_C-api.h"
 #include "GHOST_CallbackEventConsumer.h"
index c65914ef1ac6e8f57c32b121a8638278207e007f..eaa00732725e298b1521a54821826a60d3cef098 100644 (file)
  * @date       September 21, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_DisplayManager.h"
 #include "GHOST_Debug.h"
 
index 76291a2ea4ca6ef29fc9df39c491a4e4f468a90f..2c92ef0e2faa00c834716355bbbc055f04d33e56 100644 (file)
  * @date       September 21, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_DisplayManagerCarbon.h"
 #include "GHOST_Debug.h"
 
index 7c9a905ff43f1a67357bacd4c323f1b490314987..29d15d3e4deea873a3b262d4099b68b8b7f465ec 100644 (file)
  * @date       September 21, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_DisplayManagerWin32.h"
 #include "GHOST_Debug.h"
 
index 0c0a0daebc740f41422d37e5f2c13ef8cc82ca0d..fad3149e48c00b17a3c1e2d00486c7aee94f5896 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_DisplayManagerX11.h"
 #include "GHOST_SystemX11.h"
 
index d9cdfe6faa237762a7cbaa3d9a0ef515f2e08b33..0eeb2245cd0fdbbcbae7b66f672a446f38840ede 100644 (file)
 #include <algorithm>
 #include "GHOST_Debug.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 
 GHOST_EventManager::GHOST_EventManager()
 {
index 9bb1532c947084d905382a07cf68d74b8018d4b4..645a33ab8c57609c64c3be94e99e0cdb0aa28339 100644 (file)
 #include "GHOST_EventDragnDrop.h"
 #include "GHOST_Debug.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 
 bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event)
 {
index 1a8bf3d3e842303a630e3cca0b4b044493de5e35..eecf3c51c193a597ccfd452096ba899580031923 100644 (file)
  * @date       May 7, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_ISystem.h"
 
 #ifdef WIN32
index 75bd22cada1957c613571e034dd62f4e80840587..ed884966cb3d5663ad673a7970b84fd26ff28d08 100644 (file)
  * @date       May 31, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_ModifierKeys.h"
 
 
index bb42d89425dad014ca65b66443616865f75de4c0..aa6491cf5e5682c7ed4fd6153cc3111c315152e0 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_Rect.h"
 
 
index dc7d1ddfb91b54dc89509b656e2d5e38dee4637a..c89534e01c554f7a1163d73b0f9e03a9009a95a3 100644 (file)
  * @date       May 7, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_System.h"
 
 #include <time.h>
index c4cdbcd0cd54b1e190c30a5e902c3141b0d72ca6..76ce7703c06e394da6f5eaf5fb0e116a686ae831 100644 (file)
  * @date       May 7, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_SystemWin32.h"
 #include "GHOST_EventDragnDrop.h"
 
index 2479d198970782d30f127d69ef6e39ddcc2ad990..1ae9b666c6bb5930770f4266a5d0d442e7bb44ef 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_SystemX11.h"
 #include "GHOST_WindowX11.h"
 #include "GHOST_WindowManager.h"
index a83e4d2edce7da25b040cab3ef64c9ca3162602a..ec99e323d1473136db41186d1ce129cfa6e429eb 100644 (file)
  * @date       May 31, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_TimerManager.h"
 
 #include <algorithm>
index b5f8050bebb1059d8d6312bd77be70c868607ac2..e1d0d40e22571f632cc261a78dbf90a2ba031756 100644 (file)
  * @date       May 10, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_Window.h"
 
 
index 65584e4cc1f2116b65f7596c6fe46d3552ed57ad..376859d3e1628029909d1bd08c4ab3c3d7ada9a1 100644 (file)
  * @date       May 10, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_WindowCarbon.h"
 #include "GHOST_Debug.h"
 
index c43307c9513a55525cbf3367eba1e68244f0f2d6..1ac357ac97f235a19dc6536555193566c96125a9 100644 (file)
  * @date       May 11, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_WindowManager.h"
 #include <algorithm>
 #include "GHOST_Debug.h"
index 27bea2cec95d378d7c6c58b7ff478cf092bc48cd..19c3e061159c55082a5c9d1f3660863a8cf8e65a 100644 (file)
  * @date       May 10, 2001
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include <string.h>
 #include "GHOST_WindowWin32.h"
 #include "GHOST_SystemWin32.h"
index b57e38b4688f88e33bc580181e8b2ceac95e9397..e8e818abca7c92b9ef0678dde4a61393ed3979e9 100644 (file)
 
 #define FALSE 0
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GHOST_C-api.h"
 
 #if defined(WIN32) || defined(__APPLE__)
index 92e7f4997bc39ddfb7f383a1d990497842ce8616..6e269e1cede7b81dd614d7d1358d1772637c4ffe 100644 (file)
 #include <iostream>
 #include <math.h>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #if defined(WIN32) || defined(__APPLE__)
        #ifdef WIN32
                #include <windows.h>
index be463b39bd5de71990dbeb8944375e222fd12e5f..1510c47f28a8269ccfdfe0f7e8ba6a6a1da4eae5 100644 (file)
 
 #include "Basic.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 int min_i(int a, int b) { 
        return (a<b)?a:b; 
 }
index 0c855c36dedd74ea3770aa06b231c9e12e62a7aa..1dbaad35994b4d618d5a0c04e1202d2cad2d5410 100644 (file)
 
 #include <stdio.h>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MEM_guardedalloc.h"
 
 #include "GHOST_C-api.h"
index cc28ec23986562b63afd5598e3e2238b692287e6..848601b2cc705cf3eff91b3ed73ccc4ff8cc520a 100644 (file)
 
 #include "GL.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MEM_guardedalloc.h"
 
 #include "GHOST_C-api.h"
index 34219be1bed8d57319f0aebb9e8e0e19d697f4c4..7574a5c85f1ba7fcd2027ff837e9767b825147be 100644 (file)
 
 #include <math.h>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MEM_guardedalloc.h"
 
 #include "Basic.h"
index 0bc152f65430b0e0716888319f70846e164414e5..abc4c2651e40efeceba637c23bcf6d2b2b9edea9 100644 (file)
 #include <stdarg.h>
 #include <stdio.h>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MEM_guardedalloc.h"
 
 #include "Util.h"
index 8d8ac8ff426d2e28f8de5184a7c3641c218c9ef9..0a4c2aa8d00baabbe8879a93918e772201c3b9e1 100644 (file)
 
 #include <stdlib.h>
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MEM_guardedalloc.h"
 
 #include "GHOST_C-api.h"
index 45c2e048df996a08780a220968684ff06f854453..705f099ab63a70e0c927509f3b3451f0123c2224 100644 (file)
@@ -66,7 +66,7 @@ extern "C" {
        /** Returns the lenght of the allocated memory segment pointed at
         * by vmemh. If the pointer was not previously allocated by this
         * module, the result is undefined.*/
-       int MEM_allocN_len(void *vmemh);
+       size_t MEM_allocN_len(void *vmemh);
 
        /**
         * Release memory previously allocatred by this module. 
@@ -89,23 +89,23 @@ extern "C" {
          * allocated block, the old one is freed. this is not as optimized
          * as a system realloc but just makes a new allocation and copies
          * over from existing memory. */
-       void *MEM_reallocN(void *vmemh, unsigned int len);
+       void *MEM_reallocN(void *vmemh, size_t len);
 
        /**
         * Allocate a block of memory of size len, with tag name str. The
         * memory is cleared. The name must be static, because only a
         * pointer to it is stored ! */
-       void *MEM_callocN(unsigned int len, const char * str);
+       void *MEM_callocN(size_t len, const char * str);
        
        /** Allocate a block of memory of size len, with tag name str. The
                * name must be a static, because only a pointer to it is stored !
                * */
-       void *MEM_mallocN(unsigned int len, const char * str);
+       void *MEM_mallocN(size_t len, const char * str);
        
        /** Same as callocN, clears memory and uses mmap (disk cached) if supported.
                Can be free'd with MEM_freeN as usual.
                * */
-       void *MEM_mapallocN(unsigned int len, const char * str);
+       void *MEM_mapallocN(size_t len, const char * str);
 
        /** Print a list of the names and sizes of all allocated memory
         * blocks. as a python dict for easy investigation */ 
index 94453e919120413c1ce14f671824e3a350b32972..9f2f57e119c3e3529e350e219a4e947c02e6e874 100644 (file)
 #include <stdlib.h>
 #include <string.h>    /* memcpy */
 #include <stdarg.h>
+#include <sys/types.h>
+/* Blame Microsoft for LLP64 and no inttypes.h, quick workaround needed: */
+#if defined(WIN64)
+#define SIZET_FORMAT "%I64u"
+#define SIZET_ARG(a) ((unsigned long long)(a))
+#else
+#define SIZET_FORMAT "%lu"
+#define SIZET_ARG(a) ((unsigned long)(a))
+#endif
 
 /* mmap exception */
 #if defined(WIN32)
-#include <sys/types.h>
 #include "mmap_win.h"
 #else
-#include <sys/types.h>
 #include <sys/mman.h>
 #endif
 
@@ -82,7 +89,7 @@ typedef struct localListBase
        /* note: keep this struct aligned (e.g., irix/gcc) - Hos */
 typedef struct MemHead {
        int tag1;
-       int len;
+       size_t len;
        struct MemHead *next,*prev;
        const char * name;
        const char * nextname;
@@ -213,7 +220,7 @@ void MEM_set_memory_debug(void)
        malloc_debug_memset= 1;
 }
 
-int MEM_allocN_len(void *vmemh)
+size_t MEM_allocN_len(void *vmemh)
 {
        if (vmemh) {
                MemHead *memh= vmemh;
@@ -245,7 +252,7 @@ void *MEM_dupallocN(void *vmemh)
        return newp;
 }
 
-void *MEM_reallocN(void *vmemh, unsigned int len)
+void *MEM_reallocN(void *vmemh, size_t len)
 {
        void *newp= NULL;
        
@@ -267,7 +274,7 @@ void *MEM_reallocN(void *vmemh, unsigned int len)
        return newp;
 }
 
-static void make_memhead_header(MemHead *memh, unsigned int len, const char *str)
+static void make_memhead_header(MemHead *memh, size_t len, const char *str)
 {
        MemTail *memt;
        
@@ -288,7 +295,7 @@ static void make_memhead_header(MemHead *memh, unsigned int len, const char *str
        mem_in_use += len;
 }
 
-void *MEM_mallocN(unsigned int len, const char *str)
+void *MEM_mallocN(size_t len, const char *str)
 {
        MemHead *memh;
 
@@ -312,11 +319,11 @@ void *MEM_mallocN(unsigned int len, const char *str)
                return (++memh);
        }
        mem_unlock_thread();
-       print_error("Malloc returns nill: len=%d in %s, total %u\n",len, str, mem_in_use);
+       print_error("Malloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", SIZET_ARG(len), str, mem_in_use);
        return NULL;
 }
 
-void *MEM_callocN(unsigned int len, const char *str)
+void *MEM_callocN(size_t len, const char *str)
 {
        MemHead *memh;
 
@@ -337,12 +344,12 @@ void *MEM_callocN(unsigned int len, const char *str)
                return (++memh);
        }
        mem_unlock_thread();
-       print_error("Calloc returns nill: len=%d in %s, total %u\n",len, str, mem_in_use);
+       print_error("Calloc returns null: len=" SIZET_FORMAT " in %s, total %u\n", SIZET_ARG(len), str, mem_in_use);
        return 0;
 }
 
 /* note; mmap returns zero'd memory */
-void *MEM_mapallocN(unsigned int len, const char *str)
+void *MEM_mapallocN(size_t len, const char *str)
 {
        MemHead *memh;
 
@@ -380,7 +387,7 @@ void *MEM_mapallocN(unsigned int len, const char *str)
        }
        else {
                mem_unlock_thread();
-               print_error("Mapalloc returns nill, fallback to regular malloc: len=%d in %s, total %u\n",len, str, mmap_in_use);
+               print_error("Mapalloc returns null, fallback to regular malloc: len=" SIZET_FORMAT " in %s, total %u\n", SIZET_ARG(len), str, mmap_in_use);
                return MEM_callocN(len, str);
        }
 }
@@ -492,12 +499,12 @@ static void MEM_printmemlist_internal( int pydict )
        }
        while(membl) {
                if (pydict) {
-                       fprintf(stderr, "{'len':%i, 'name':'''%s''', 'pointer':'%p'},\\\n", membl->len, membl->name, membl+1);
+                       fprintf(stderr, "{'len':" SIZET_FORMAT ", 'name':'''%s''', 'pointer':'%p'},\\\n", SIZET_ARG(membl->len), membl->name, membl+1);
                } else {
 #ifdef DEBUG_MEMCOUNTER
-                       print_error("%s len: %d %p, count: %d\n",membl->name,membl->len, membl+1, membl->_count);
+                       print_error("%s len: " SIZET_FORMAT " %p, count: %d\n", membl->name, SIZET_ARG(membl->len), membl+1, membl->_count);
 #else
-                       print_error("%s len: %d %p\n",membl->name,membl->len, membl+1);
+                       print_error("%s len: " SIZET_FORMAT " %p\n", membl->name, SIZET_ARG(membl->len), membl+1);
 #endif
                }
                if(membl->next)
index 51f1f4918941315aafb0a6961075161640b1855d..98f943f0d7d8d086442e82245f0b92014370048c 100644 (file)
 #include <stdlib.h>
 #include "MEM_guardedalloc.h"
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 static void mem_error_cb(const char *errorStr)
 {
        fprintf(stderr, "%s", errorStr);
index 50364f3627fa3b1b52539ab888700096d6da47f8..5de5846cb616a23b5a2d5f83ba174b97fa304b0f 100644 (file)
@@ -28,9 +28,6 @@
  */
 
 #include "IK_QSegment.h"
-#ifdef WIN32
-#define _USE_MATH_DEFINES
-#endif
 #include <cmath>
 
 // Utility functions
@@ -372,8 +369,8 @@ void IK_QSphericalSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
                return;
        
        if (axis == 1) {
-               lmin = MT_clamp(lmin, -M_PI, M_PI);
-               lmax = MT_clamp(lmax, -M_PI, M_PI);
+               lmin = MT_clamp(lmin, -MT_PI, MT_PI);
+               lmax = MT_clamp(lmax, -MT_PI, MT_PI);
 
                m_min_y = lmin;
                m_max_y = lmax;
@@ -382,8 +379,8 @@ void IK_QSphericalSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
        }
        else {
                // clamp and convert to axis angle parameters
-               lmin = MT_clamp(lmin, -M_PI, M_PI);
-               lmax = MT_clamp(lmax, -M_PI, M_PI);
+               lmin = MT_clamp(lmin, -MT_PI, MT_PI);
+               lmax = MT_clamp(lmax, -MT_PI, MT_PI);
 
                lmin = sin(lmin*0.5);
                lmax = sin(lmax*0.5);
@@ -615,8 +612,8 @@ void IK_QRevoluteSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
                return;
        
        // clamp and convert to axis angle parameters
-       lmin = MT_clamp(lmin, -M_PI, M_PI);
-       lmax = MT_clamp(lmax, -M_PI, M_PI);
+       lmin = MT_clamp(lmin, -MT_PI, MT_PI);
+       lmax = MT_clamp(lmax, -MT_PI, MT_PI);
 
        m_min = lmin;
        m_max = lmax;
@@ -754,8 +751,8 @@ void IK_QSwingSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
                return;
        
        // clamp and convert to axis angle parameters
-       lmin = MT_clamp(lmin, -M_PI, M_PI);
-       lmax = MT_clamp(lmax, -M_PI, M_PI);
+       lmin = MT_clamp(lmin, -MT_PI, MT_PI);
+       lmax = MT_clamp(lmax, -MT_PI, MT_PI);
 
        lmin = sin(lmin*0.5);
        lmax = sin(lmax*0.5);
@@ -900,8 +897,8 @@ void IK_QElbowSegment::SetLimit(int axis, MT_Scalar lmin, MT_Scalar lmax)
                return;
 
        // clamp and convert to axis angle parameters
-       lmin = MT_clamp(lmin, -M_PI, M_PI);
-       lmax = MT_clamp(lmax, -M_PI, M_PI);
+       lmin = MT_clamp(lmin, -MT_PI, MT_PI);
+       lmax = MT_clamp(lmax, -MT_PI, MT_PI);
 
        lmin = lmin;
        lmax = lmax;
index 7b87c69928fcb357e2790c9c6205bbd5e23cb14c..1882038163d880e22f446951d77829fb08336a02 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GlutDrawer.h"
 
 #include "MT_assert.h"
index 9412dc25e424c5552ff9f8f923646059b12fca30..c7c592204e8acd94d82722acead268e8e16590ff 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GlutKeyboardManager.h"
 #include "MT_assert.h"
 
index 79187a7fd1b8044079e48b2e0f00c70d5794a714..98e36af5c7948f71c762e841261e58ed9dc0c49f 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "GlutMouseManager.h"
 #include "MT_assert.h"
 
index f323648dbd796495e53cd28d99b350a5a07413c9..f2e91ee9c3190ca011ab4e32c43e2c377529dadb 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MEM_SmartPtr.h"
 
 #ifdef USE_QUATERNIONS
index 5b8fc7f37e8ca76fd301956eab28db80ab4b7e53..50700e392039dc6257e0c6a178c4a02628c3d7fd 100644 (file)
  *
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MEM_CacheLimiter.h"
 #include "MEM_CacheLimiterC-Api.h"
 
index f990c8d71eed4c438cc76a7594ebef2ebe4b5b10..3c04d3c4531906ea0a17aee3b000284b1fa57861 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MEM_RefCountedC-Api.h"
 #include "MEM_RefCounted.h"
 
index ff3693cd7d5b3ab01c6e2c945a0fab51237e76dd..e8342f93dd8f7efc0c7bb66f25331b653769dd38 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_CmMatrix4x4.h"
 #include "MT_Vector3.h"
 #include "MT_Point3.h"
index 80bc65fea477e53ba12aa1aeb243aed2c03cbe2f..a186ed22296b5b5c2613bbe8ea1af019b6745b68 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_Matrix3x3.h"
 
 
index 257be4728e86c8e45271c66bbdfac90a77287808..bab67224cd607c393a5d8d4f484635a06a84e4f7 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_Matrix4x4.h"
 
 
index 0889ede1682145cf5809dca0707c39d3ca6bbc53..ea64b5c0457651d3069795d69fe48d3095e2dae4 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #ifndef GEN_INLINED
 #include "MT_Plane3.h"
 #include "MT_Plane3.inl"
index 8ebeda0098db2d20fd2df7beafdd34cdadf0a14d..882709718fb620bf5aaf31a960f3d371c3f31fed 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_Point3.h"
 
 
index 4ed3a9e15c692758f6a5de653347181f01f3d70c..c613d72eb5d964d27bd452d5a933fa5a31a8b12a 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_Quaternion.h"
 
 
index 986a5c24df0cc5050fb9d1e7294c896a8214362b..9d0b371eab203e089634ed9c08b122f854e35538 100644 (file)
 
 */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_Transform.h"
 
 void MT_Transform::setValue(const float *m) {
index 54d15f4087c57398224acfc91dcc37fe3de8c94b..f7674a1a753b06deaf188ae0ce6d3fd0763c336c 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_Vector2.h"
 
 
index 5283f1c9e93c4de9f63180011668f0181a7d9eec..da5bd23ce00a7beacfdf00e7a2b93189da6f248c 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_Vector3.h"
 
 
index 9625c3ef53dd135271636db9bbe94427dae1a4de..d3cea173a64d71b15e908c4c2cdd422f479f4798 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_Vector4.h"
 
 
index aae6439173474fefda7957ec36a00c2a4f323e52..b7389497b4912b1a3d6bc34037077c2f1d54b5a7 100644 (file)
 /* When you use this, send an email to: matumoto@math.keio.ac.jp   */
 /* with an appropriate reference to your work.                     */
 
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
 #include "MT_random.h"
 
 /* Period parameters */  
index 7bfaf4314fb3d2115158e57353426000a84d7967..819d0ca10428af20487c99845bd1dc0357eac7fb 100644 (file)
                                RelativePath="..\..\..\source\blender\editors\include\ED_keyframing.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\include\ED_logic.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\include\ED_markers.h"\r
                                >\r
                                RelativePath="..\..\..\source\blender\editors\space_logic\logic_intern.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\space_logic\logic_ops.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\space_logic\logic_window.c"\r
                                >\r
index f59a028094008f0ff9e6a8dca33d2e9810c55bfe..8c74ec18b411bfd64b1c2125cd650d18e17fe6ad 100644 (file)
                                RelativePath="..\..\..\source\gameengine\GameLogic\SCA_PythonController.cpp"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\gameengine\GameLogic\SCA_PythonKeyboard.cpp"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\gameengine\GameLogic\SCA_PythonMouse.cpp"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\gameengine\GameLogic\SCA_RandomActuator.cpp"\r
                                >\r
                                RelativePath="..\..\..\source\gameengine\GameLogic\SCA_PythonController.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\gameengine\GameLogic\SCA_PythonKeyboard.h"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\gameengine\GameLogic\SCA_PythonMouse.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\gameengine\GameLogic\SCA_RandomActuator.h"\r
                                >\r
index 2aee30b407fcc0b7cfb64d8abf67ec4090cccf7d..d53a7b8ec511141af92d68a55faffa3e524d60ca 100644 (file)
Binary files a/release/datafiles/blenderbuttons and b/release/datafiles/blenderbuttons differ
index 146708bd69cabebebd96d1606e8bb4e1d219736d..d0f03aee65c5fa7366f9e4003131912518d92b02 100644 (file)
@@ -880,6 +880,30 @@ for member in dir(properties_material):
     except:
         pass
 del properties_material
+import properties_data_mesh
+for member in dir(properties_data_mesh):
+    subclass = getattr(properties_data_mesh, member)
+    try:
+        subclass.COMPAT_ENGINES.add('POVRAY_RENDER')
+    except:
+        pass
+del properties_data_mesh
+import properties_texture
+for member in dir(properties_texture):
+    subclass = getattr(properties_texture, member)
+    try:
+        subclass.COMPAT_ENGINES.add('POVRAY_RENDER')
+    except:
+        pass
+del properties_texture
+import properties_data_camera
+for member in dir(properties_data_camera):
+    subclass = getattr(properties_data_camera, member)
+    try:
+        subclass.COMPAT_ENGINES.add('POVRAY_RENDER')
+    except:
+        pass
+del properties_data_camera
 
 
 class RenderButtonsPanel(bpy.types.Panel):
index 3aed242289de6160797065691ab081a1c0abc913..ee92399287f31a3e34b5947735d179dfeb738346 100644 (file)
@@ -54,50 +54,11 @@ import time
 import math # math.pi
 import shutil # for file copying
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# import Blender
 import bpy
-import mathutils
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+from mathutils import Vector, Euler, Matrix, RotationMatrix
 
 def copy_file(source, dest):
+    # XXX - remove, can use shutil
     file = open(source, 'rb')
     data = file.read()
     file.close()
@@ -135,7 +96,7 @@ def copy_images(dest_dir, textures):
 # I guess FBX uses degrees instead of radians (Arystan).
 # Call this function just before writing to FBX.
 def eulerRadToDeg(eul):
-    ret = mathutils.Euler()
+    ret = Euler()
 
     ret.x = 180 / math.pi * eul[0]
     ret.y = 180 / math.pi * eul[1]
@@ -143,10 +104,10 @@ def eulerRadToDeg(eul):
 
     return ret
 
-mtx4_identity = mathutils.Matrix()
+mtx4_identity = Matrix()
 
 # testing
-mtx_x90                = mathutils.RotationMatrix( math.pi/2, 3, 'X') # used
+mtx_x90                = RotationMatrix( math.pi/2, 3, 'X') # used
 #mtx_x90n      = RotationMatrix(-90, 3, 'x')
 #mtx_y90       = RotationMatrix( 90, 3, 'y')
 #mtx_y90n      = RotationMatrix(-90, 3, 'y')
@@ -154,11 +115,11 @@ mtx_x90           = mathutils.RotationMatrix( math.pi/2, 3, 'X') # used
 #mtx_z90n      = RotationMatrix(-90, 3, 'z')
 
 #mtx4_x90      = RotationMatrix( 90, 4, 'x')
-mtx4_x90n      = mathutils.RotationMatrix(-math.pi/2, 4, 'X') # used
+mtx4_x90n      = RotationMatrix(-math.pi/2, 4, 'X') # used
 #mtx4_y90      = RotationMatrix( 90, 4, 'y')
-mtx4_y90n      = mathutils.RotationMatrix(-math.pi/2, 4, 'Y') # used
-mtx4_z90       = mathutils.RotationMatrix( math.pi/2, 4, 'Z') # used
-mtx4_z90n      = mathutils.RotationMatrix(-math.pi/2, 4, 'Z') # used
+mtx4_y90n      = RotationMatrix(-math.pi/2, 4, 'Y') # used
+mtx4_z90       = RotationMatrix( math.pi/2, 4, 'Z') # used
+mtx4_z90n      = RotationMatrix(-math.pi/2, 4, 'Z') # used
 
 # def strip_path(p):
 #      return p.split('\\')[-1].split('/')[-1]
@@ -333,7 +294,7 @@ def write(filename, batch_objects = None, \
         EXP_CAMERA =                           True,
         EXP_EMPTY =                                    True,
         EXP_IMAGE_COPY =                       False,
-        GLOBAL_MATRIX =                                mathutils.Matrix(),
+        GLOBAL_MATRIX =                                Matrix(),
         ANIM_ENABLE =                          True,
         ANIM_OPTIMIZE =                                True,
         ANIM_OPTIMIZE_PRECISSION =     6,
@@ -600,8 +561,8 @@ def write(filename, batch_objects = None, \
                 matrix_rot = matrix_rot * mtx_x90
             elif type =='CAMERA':
 #                      elif ob and type =='Camera':
-                y = matrix_rot * mathutils.Vector(0,1,0)
-                matrix_rot = mathutils.RotationMatrix(math.pi/2, 3, y) * matrix_rot
+                y = matrix_rot * Vector((0.0, 1.0, 0.0))
+                matrix_rot = RotationMatrix(math.pi/2, 3, y) * matrix_rot
 
             return matrix_rot
 
@@ -702,8 +663,8 @@ def write(filename, batch_objects = None, \
                     matrix_rot = matrix_rot * mtx_x90
                     rot = tuple(matrix_rot.to_euler())
                 elif ob and ob.type =='Camera':
-                    y = matrix_rot * mathutils.Vector(0,1,0)
-                    matrix_rot = mathutils.RotationMatrix(math.pi/2, 3, y) * matrix_rot
+                    y = matrix_rot * Vector((0.0, 1.0, 0.0))
+                    matrix_rot = RotationMatrix(math.pi/2, 3, y) * matrix_rot
                     rot = tuple(matrix_rot.to_euler())
                 else:
                     rot = tuple(matrix_rot.to_euler())
@@ -1088,8 +1049,8 @@ def write(filename, batch_objects = None, \
         file.write('\n\t\tTypeFlags: "Camera"')
         file.write('\n\t\tGeometryVersion: 124')
         file.write('\n\t\tPosition: %.6f,%.6f,%.6f' % loc)
-        file.write('\n\t\tUp: %.6f,%.6f,%.6f' % tuple(matrix_rot * mathutils.Vector(0,1,0)) )
-        file.write('\n\t\tLookAt: %.6f,%.6f,%.6f' % tuple(matrix_rot * mathutils.Vector(0,0,-1)) )
+        file.write('\n\t\tUp: %.6f,%.6f,%.6f' % tuple(matrix_rot * Vector((0.0, 1.0, 0.0))))
+        file.write('\n\t\tLookAt: %.6f,%.6f,%.6f' % tuple(matrix_rot * Vector((0.0, 0.0, -1.0))))
 
         #file.write('\n\t\tUp: 0,0,0' )
         #file.write('\n\t\tLookAt: 0,0,0' )
index b1020d14b127753d5dbf35d5255808ddae1851e8..bab692f9daf75fec08c574ee5dcb171fa5df19ef 100644 (file)
@@ -83,7 +83,7 @@ def eulerRotate(x, y, z, rot_order):
 
     # Should work but doesnt!
     '''
-    eul = Euler(x,y,z)
+    eul = Euler((x, y, z))
     eul.order = "XYZ"[rot_order[0]] + "XYZ"[rot_order[1]] + "XYZ"[rot_order[2]]
     return tuple(eul.to_matrix().to_euler())
     '''
@@ -136,7 +136,7 @@ def read_bvh(context, file_path, ROT_MODE='XYZ', GLOBAL_SCALE=1.0):
             #print '%snode: %s, parent: %s' % (len(bvh_nodes_serial) * '  ', name,  bvh_nodes_serial[-1])
 
             lineIdx += 2 # Incriment to the next line (Offset)
-            rest_head_local = Vector(float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3])) * GLOBAL_SCALE
+            rest_head_local = Vector((float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3]))) * GLOBAL_SCALE
             lineIdx += 1 # Incriment to the next line (Channels)
 
             # newChannel[Xposition, Yposition, Zposition, Xrotation, Yrotation, Zrotation]
@@ -188,7 +188,7 @@ def read_bvh(context, file_path, ROT_MODE='XYZ', GLOBAL_SCALE=1.0):
         # Account for an end node
         if file_lines[lineIdx][0].lower() == 'end' and file_lines[lineIdx][1].lower() == 'site': # There is somtimes a name after 'End Site' but we will ignore it.
             lineIdx += 2 # Incriment to the next line (Offset)
-            rest_tail = Vector(float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3])) * GLOBAL_SCALE
+            rest_tail = Vector((float(file_lines[lineIdx][1]), float(file_lines[lineIdx][2]), float(file_lines[lineIdx][3]))) * GLOBAL_SCALE
 
             bvh_nodes_serial[-1].rest_tail_world = bvh_nodes_serial[-1].rest_head_world + rest_tail
             bvh_nodes_serial[-1].rest_tail_local = bvh_nodes_serial[-1].rest_head_local + rest_tail
@@ -267,8 +267,8 @@ def read_bvh(context, file_path, ROT_MODE='XYZ', GLOBAL_SCALE=1.0):
                 #      raise 'error, bvh node has no end and no children. bad file'
 
                 # Removed temp for now
-                rest_tail_world = Vector(0.0, 0.0, 0.0)
-                rest_tail_local = Vector(0.0, 0.0, 0.0)
+                rest_tail_world = Vector((0.0, 0.0, 0.0))
+                rest_tail_local = Vector((0.0, 0.0, 0.0))
                 for bvh_node_child in bvh_node.children:
                     rest_tail_world += bvh_node_child.rest_head_world
                     rest_tail_local += bvh_node_child.rest_head_local
@@ -328,7 +328,7 @@ def bvh_node_dict2objects(context, bvh_nodes, IMPORT_START_FRAME=1, IMPORT_LOOP=
             lx, ly, lz, rx, ry, rz = bvh_node.anim_data[frame_current]
 
             rest_head_local = bvh_node.rest_head_local
-            bvh_node.temp.loc = rest_head_local + Vector(lx, ly, lz)
+            bvh_node.temp.loc = rest_head_local + Vector((lx, ly, lz))
 
             bvh_node.temp.rot = rx, ry, rz
 
@@ -531,7 +531,7 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM
                     prev_euler[i] = euler
 
             if bvh_node.has_loc:
-                pose_bone.location = (bone_rest_matrix_inv * TranslationMatrix(Vector(lx, ly, lz) - bvh_node.rest_head_local)).translation_part()
+                pose_bone.location = (bone_rest_matrix_inv * TranslationMatrix(Vector((lx, ly, lz)) - bvh_node.rest_head_local)).translation_part()
 
             if bvh_node.has_loc:
                 pose_bone.keyframe_insert("location")
index e06d061f1738e0ea1b699054ef85a340477e2e49..f5f104d6d9229d2eb6eb6dc7a4231be6d46b2693 100644 (file)
@@ -27,6 +27,7 @@ from netrender import master_html
 from netrender import utils
 from netrender import balancing
 from netrender import ui
+from netrender import repath
 
 jobs = []
 slaves = []
index 3acc0e1c2e1c42a4cea9bacd4ad39315705431b5..5c01884a20ed656e3c390822cf7556d5c582bda4 100644 (file)
@@ -125,6 +125,10 @@ def clientSendJob(conn, scene, anim = False):
             file_path = bpy.utils.expandpath(image.filename)
             if os.path.exists(file_path):
                 job.addFile(file_path)
+                
+                tex_path = os.path.splitext(file_path)[0] + ".tex"
+                if os.path.exists(tex_path):
+                    job.addFile(tex_path)
 
     ###########################
     # FLUID + POINT CACHE
@@ -144,6 +148,9 @@ def clientSendJob(conn, scene, anim = False):
                 addPointCache(job, object, modifier.domain_settings.point_cache_low, default_path)
                 if modifier.domain_settings.highres:
                     addPointCache(job, object, modifier.domain_settings.point_cache_high, default_path)
+            elif modifier.type == "MULTIRES" and modifier.external:
+                file_path = bpy.utils.expandpath(modifier.filename)
+                job.addFile(file_path)
 
         # particles modifier are stupid and don't contain data
         # we have to go through the object property
@@ -284,3 +291,6 @@ def compatible(module):
 #compatible("properties_render")
 compatible("properties_world")
 compatible("properties_material")
+compatible("properties_data_mesh")
+compatible("properties_data_camera")
+compatible("properties_texture")
index 019f33047d86221cddbb676f06d268ab469c9d58..324d046e00ffecf59609fc18d9ecba9e0dfdae0d 100644 (file)
@@ -27,12 +27,16 @@ import netrender.balancing
 import netrender.master_html
 
 class MRenderFile(netrender.model.RenderFile):
-    def __init__(self, filepath, index, start, end):
-        super().__init__(filepath, index, start, end)
+    def __init__(self, filepath, index, start, end, signature):
+        super().__init__(filepath, index, start, end, signature)
         self.found = False
 
     def test(self):
         self.found = os.path.exists(self.filepath)
+        if self.found:
+            found_signature = hashFile(self.filepath)
+            self.found = self.signature == found_signature
+            
         return self.found
 
 
@@ -74,7 +78,7 @@ class MRenderJob(netrender.model.RenderJob):
         # special server properties
         self.last_update = 0
         self.save_path = ""
-        self.files = [MRenderFile(rfile.filepath, rfile.index, rfile.start, rfile.end) for rfile in job_info.files]
+        self.files = [MRenderFile(rfile.filepath, rfile.index, rfile.start, rfile.end, rfile.signature) for rfile in job_info.files]
 
         self.resolution = None
 
@@ -190,6 +194,11 @@ pause_pattern = re.compile("/pause_([a-zA-Z0-9]+)")
 edit_pattern = re.compile("/edit_([a-zA-Z0-9]+)")
 
 class RenderHandler(http.server.BaseHTTPRequestHandler):
+    def log_message(self, format, *args):
+        # override because the original calls self.address_string(), which
+        # is extremely slow due to some timeout..
+        sys.stderr.write("[%s] %s\n" % (self.log_date_time_string(), format%args))
+
     def send_head(self, code = http.client.OK, headers = {}, content = "application/octet-stream"):
         self.send_response(code)
         self.send_header("Content-type", content)
@@ -711,7 +720,7 @@ class RenderHandler(http.server.BaseHTTPRequestHandler):
                         buf = self.rfile.read(length)
 
                         # add same temp file + renames as slave
-
+                        
                         f = open(file_path, "wb")
                         f.write(buf)
                         f.close()
@@ -870,7 +879,7 @@ class RenderMasterServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
         self.job_id = 0
         self.path = path + "master_" + str(os.getpid()) + os.sep
 
-        self.slave_timeout = 30 # 30 mins: need a parameter for that
+        self.slave_timeout = 5 # 5 mins: need a parameter for that
 
         self.balancer = netrender.balancing.Balancer()
         self.balancer.addRule(netrender.balancing.RatingUsageByCategory(self.getJobs))
@@ -1010,7 +1019,7 @@ def runMaster(address, broadcast, clear, path, update_stats, test_break):
             s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
             s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
 
-        start_time = time.time()
+        start_time = time.time() - 2
 
         while not test_break():
             try:
@@ -1018,7 +1027,7 @@ def runMaster(address, broadcast, clear, path, update_stats, test_break):
             except select.error:
                 pass
 
-            if time.time() - start_time >= 10: # need constant here
+            if time.time() - start_time >= 2: # need constant here
                 httpd.timeoutSlaves()
 
                 httpd.updateUsage()
@@ -1031,3 +1040,4 @@ def runMaster(address, broadcast, clear, path, update_stats, test_break):
         httpd.server_close()
         if clear:
             clearMaster(httpd.path)
+
index e5feac86e12c22c2cb5c1701f35d006bbddc1386..c3695cd4f0f06b07d2f8262b61fa1e1539fc3d7a 100644 (file)
@@ -29,6 +29,7 @@ def get(handler):
 
     def head(title):
         output("<html><head>")
+        output("<meta http-equiv='refresh' content=5>")
         output("<script src='/html/netrender.js' type='text/javascript'></script>")
 #              output("<script src='/html/json2.js' type='text/javascript'></script>")
         output("<title>")
@@ -105,53 +106,6 @@ def get(handler):
         handler.send_head(content = "text/html")
         head("NetRender")
 
-        output("<h2>Master</h2>")
-
-        output("""<button title="remove all jobs" onclick="clear_jobs();">CLEAR JOB LIST</button>""")
-
-        startTable(caption = "Rules", class_style = "rules")
-
-        headerTable("type", "enabled", "description", "limit")
-
-        for rule in handler.server.balancer.rules:
-            rowTable(
-                        "rating",
-                        checkbox("", rule.enabled, "balance_enable('%i', '%s')" % (id(rule), str(not rule.enabled))),
-                        rule,
-                        rule.str_limit() +
-                        """<button title="edit limit" onclick="balance_edit('%i', '%s');">edit</button>""" % (id(rule), str(rule.limit)) if hasattr(rule, "limit") else "&nbsp;"
-                    )
-
-        for rule in handler.server.balancer.priorities:
-            rowTable(
-                        "priority",
-                        checkbox("", rule.enabled, "balance_enable('%i', '%s')" % (id(rule), str(not rule.enabled))),
-                        rule,
-                        rule.str_limit() +
-                        """<button title="edit limit" onclick="balance_edit('%i', '%s');">edit</button>""" % (id(rule), str(rule.limit)) if hasattr(rule, "limit") else "&nbsp;"
-                    )
-
-        for rule in handler.server.balancer.exceptions:
-            rowTable(
-                        "exception",
-                        checkbox("", rule.enabled, "balance_enable('%i', '%s')" % (id(rule), str(not rule.enabled))),
-                        rule,
-                        rule.str_limit() +
-                        """<button title="edit limit" onclick="balance_edit('%i', '%s');">edit</button>""" % (id(rule), str(rule.limit)) if hasattr(rule, "limit") else "&nbsp;"
-                    )
-
-        endTable()
-
-        output("<h2>Slaves</h2>")
-
-        startTable()
-        headerTable("name", "address", "last seen", "stats", "job")
-
-        for slave in handler.server.slaves:
-            rowTable(slave.name, slave.address[0], time.ctime(slave.last_seen), slave.stats, link(slave.job.name, "/html/job" + slave.job.id) if slave.job else "None")
-
-        endTable()
-
         output("<h2>Jobs</h2>")
 
         startTable()
@@ -203,6 +157,53 @@ def get(handler):
                     )
 
         endTable()
+        
+        output("<h2>Slaves</h2>")
+
+        startTable()
+        headerTable("name", "address", "last seen", "stats", "job")
+
+        for slave in handler.server.slaves:
+            rowTable(slave.name, slave.address[0], time.ctime(slave.last_seen), slave.stats, link(slave.job.name, "/html/job" + slave.job.id) if slave.job else "None")
+
+        endTable()
+
+        output("<h2>Configuration</h2>")
+
+        output("""<button title="remove all jobs" onclick="clear_jobs();">CLEAR JOB LIST</button>""")
+
+        startTable(caption = "Rules", class_style = "rules")
+
+        headerTable("type", "enabled", "description", "limit")
+
+        for rule in handler.server.balancer.rules:
+            rowTable(
+                        "rating",
+                        checkbox("", rule.enabled, "balance_enable('%i', '%s')" % (id(rule), str(not rule.enabled))),
+                        rule,
+                        rule.str_limit() +
+                        """<button title="edit limit" onclick="balance_edit('%i', '%s');">edit</button>""" % (id(rule), str(rule.limit)) if hasattr(rule, "limit") else "&nbsp;"
+                    )
+
+        for rule in handler.server.balancer.priorities:
+            rowTable(
+                        "priority",
+                        checkbox("", rule.enabled, "balance_enable('%i', '%s')" % (id(rule), str(not rule.enabled))),
+                        rule,
+                        rule.str_limit() +
+                        """<button title="edit limit" onclick="balance_edit('%i', '%s');">edit</button>""" % (id(rule), str(rule.limit)) if hasattr(rule, "limit") else "&nbsp;"
+                    )
+
+        for rule in handler.server.balancer.exceptions:
+            rowTable(
+                        "exception",
+                        checkbox("", rule.enabled, "balance_enable('%i', '%s')" % (id(rule), str(not rule.enabled))),
+                        rule,
+                        rule.str_limit() +
+                        """<button title="edit limit" onclick="balance_edit('%i', '%s');">edit</button>""" % (id(rule), str(rule.limit)) if hasattr(rule, "limit") else "&nbsp;"
+                    )
+
+        endTable()
 
         output("</body></html>")
 
@@ -234,13 +235,17 @@ def get(handler):
             tot_cache = 0
             tot_fluid = 0
 
+            rowTable(job.files[0].filepath)
+            rowTable("Other Files", class_style = "toggle", extra = "onclick='toggleDisplay(&quot;.other&quot;, &quot;none&quot;, &quot;table-row&quot;)'")
+
             for file in job.files:
                 if file.filepath.endswith(".bphys"):
                     tot_cache += 1
                 elif file.filepath.endswith(".bobj.gz") or file.filepath.endswith(".bvel.gz"):
                     tot_fluid += 1
                 else:
-                    rowTable(file.filepath)
+                    if file != job.files[0]:
+                        rowTable(file.filepath, class_style = "other")
 
             if tot_cache > 0:
                 rowTable("%i physic cache files" % tot_cache, class_style = "toggle", extra = "onclick='toggleDisplay(&quot;.cache&quot;, &quot;none&quot;, &quot;table-row&quot;)'")
@@ -256,9 +261,9 @@ def get(handler):
 
             endTable()
 
-            output("<h2>Blacklist</h2>")
-
             if job.blacklist:
+                output("<h2>Blacklist</h2>")
+
                 startTable()
                 headerTable("name", "address")
 
@@ -267,8 +272,6 @@ def get(handler):
                     rowTable(slave.name, slave.address[0])
 
                 endTable()
-            else:
-                output("<i>Empty</i>")
 
             output("<h2>Frames</h2>")
 
index 8b0f50ba848520cc4ab241ff0b1ed4ecf38dfdc5..e7656f498b4a450800d5bf35e9cd580b98ab9150 100644 (file)
@@ -103,8 +103,10 @@ JOB_TYPES = {
                         }
 
 class RenderFile:
-    def __init__(self, filepath = "", index = 0, start = -1, end = -1):
+    def __init__(self, filepath = "", index = 0, start = -1, end = -1, signature=0):
         self.filepath = filepath
+        self.original_path = filepath
+        self.signature = signature
         self.index = index
         self.start = start
         self.end = end
@@ -112,9 +114,11 @@ class RenderFile:
     def serialize(self):
         return         {
                     "filepath": self.filepath,
+                    "original_path": self.original_path,
                     "index": self.index,
                     "start": self.start,
-                    "end": self.end
+                    "end": self.end,
+                    "signature": self.signature
                 }
 
     @staticmethod
@@ -122,7 +126,8 @@ class RenderFile:
         if not data:
             return None
 
-        rfile = RenderFile(data["filepath"], data["index"], data["start"], data["end"])
+        rfile = RenderFile(data["filepath"], data["index"], data["start"], data["end"], data["signature"])
+        rfile.original_path = data["original_path"]
 
         return rfile
 
@@ -153,7 +158,8 @@ class RenderJob:
             self.blacklist = job_info.blacklist
 
     def addFile(self, file_path, start=-1, end=-1):
-        self.files.append(RenderFile(file_path, len(self.files), start, end))
+        signature = hashFile(file_path)
+        self.files.append(RenderFile(file_path, len(self.files), start, end, signature))
 
     def addFrame(self, frame_number, command = ""):
         frame = RenderFrame(frame_number, command)
index cc8a93bb9a71aaea6d67fca80875a9c42239c6da..0c54690e0024c743c681c7cb7966d262a9dcb065 100644 (file)
@@ -68,6 +68,10 @@ button {
        display: none;
 }
 
+.other {
+       display: none;
+}
+
 .rules {
        width: 60em;
        text-align: left;
index 4c027436560c6efeb92d5113aa21ac27112e3383..fbb0f0b40439686e1049c9ae126f123c57b7b747 100644 (file)
@@ -158,6 +158,36 @@ class RENDER_OT_netclientsend(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
+@rnaType
+class RENDER_OT_netclientsendframe(bpy.types.Operator):
+    '''Send Render Job with current frame to the Network'''
+    bl_idname = "render.netclientsendframe"
+    bl_label = "Send current frame job"
+
+    def poll(self, context):
+        return True
+
+    def execute(self, context):
+        scene = context.scene
+        netsettings = scene.network_render
+
+        try:
+            conn = clientConnection(netsettings.server_address, netsettings.server_port, self.report)
+
+            if conn:
+                # Sending file
+                scene.network_render.job_id = client.clientSendJob(conn, scene, False)
+                conn.close()
+                self.report('INFO', "Job sent to master")
+        except Exception as err:
+            self.report('ERROR', str(err))
+
+
+        return {'FINISHED'}
+
+    def invoke(self, context, event):
+        return self.execute(context)
+
 @rnaType
 class RENDER_OT_netclientstatus(bpy.types.Operator):
     '''Refresh the status of the current jobs'''
diff --git a/release/scripts/io/netrender/repath.py b/release/scripts/io/netrender/repath.py
new file mode 100755 (executable)
index 0000000..5287fc0
--- /dev/null
@@ -0,0 +1,145 @@
+# ##### BEGIN GPL LICENSE BLOCK #####
+#
+#  This program is free software; you can redistribute it and/or
+#  modify it under the terms of the GNU General Public License
+#  as published by the Free Software Foundation; either version 2
+#  of the License, or (at your option) any later version.
+#
+#  This program is distributed in the hope that it will be useful,
+#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#  GNU General Public License for more details.
+#
+#  You should have received a copy of the GNU General Public License
+#  along with this program; if not, write to the Free Software Foundation,
+#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+import sys, os
+import subprocess
+
+import bpy
+
+from netrender.utils import *
+import netrender.model
+
+BLENDER_PATH = sys.argv[0]
+
+def reset(job):
+    main_file = job.files[0]
+    
+    job_full_path = main_file.filepath
+
+    if os.path.exists(job_full_path + ".bak"):
+        os.remove(job_full_path) # repathed file
+        os.renames(job_full_path + ".bak", job_full_path)
+
+def update(job):
+    paths = []
+    
+    main_file = job.files[0]
+    
+    job_full_path = main_file.filepath
+
+        
+    path, ext = os.path.splitext(job_full_path)
+    
+    new_path = path + ".remap" + ext 
+    
+    all = main_file.filepath == main_file.original_path 
+    
+    for rfile in job.files[1:]:
+        if all or rfile.original_path != rfile.filepath:
+            paths.append(rfile.original_path)
+            paths.append(rfile.filepath)
+    
+    # Only update if needed
+    if paths:        
+        process = subprocess.Popen([BLENDER_PATH, "-b", "-noaudio", job_full_path, "-P", __file__, "--", new_path] + paths, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+        process.wait()
+        
+        os.renames(job_full_path, job_full_path + ".bak")
+        os.renames(new_path, job_full_path)
+
+def process(paths):
+    def processPointCache(point_cache):
+        point_cache.external = False
+
+    def processFluid(fluid):
+        new_path = path_map.get(fluid.path, None)
+        if new_path:
+            fluid.path = new_path
+    
+    path_map = {}
+    for i in range(0, len(paths), 2):
+        # special case for point cache
+        if paths[i].endswith(".bphys"):
+            pass # Don't need them in the map, they all use the default external path
+            # NOTE: This is probably not correct all the time, need to be fixed.
+        # special case for fluids
+        elif paths[i].endswith(".bobj.gz"):
+            path_map[os.path.split(paths[i])[0]] = os.path.split(paths[i+1])[0]
+        else:
+            path_map[paths[i]] = paths[i+1]
+    
+    ###########################
+    # LIBRARIES
+    ###########################
+    for lib in bpy.data.libraries:
+        file_path = bpy.utils.expandpath(lib.filename)
+        new_path = path_map.get(file_path, None)
+        if new_path:
+            lib.filename = new_path
+
+    ###########################
+    # IMAGES
+    ###########################
+    for image in bpy.data.images:
+        if image.source == "FILE" and not image.packed_file:
+            file_path = bpy.utils.expandpath(image.filename)
+            new_path = path_map.get(file_path, None)
+            if new_path:
+                image.filename = new_path
+            
+
+    ###########################
+    # FLUID + POINT CACHE
+    ###########################
+    for object in bpy.data.objects:
+        for modifier in object.modifiers:
+            if modifier.type == 'FLUID_SIMULATION' and modifier.settings.type == "DOMAIN":
+                processFluid(settings)
+            elif modifier.type == "CLOTH":
+                processPointCache(modifier.point_cache)
+            elif modifier.type == "SOFT_BODY":
+                processPointCache(modifier.point_cache)
+            elif modifier.type == "SMOKE" and modifier.smoke_type == "TYPE_DOMAIN":
+                processPointCache(modifier.domain_settings.point_cache_low)
+                if modifier.domain_settings.highres:
+                    processPointCache(modifier.domain_settings.point_cache_high)
+            elif modifier.type == "MULTIRES" and modifier.external:
+                file_path = bpy.utils.expandpath(modifier.filename)
+                new_path = path_map.get(file_path, None)
+                if new_path:
+                    modifier.filename = new_path
+
+        # particles modifier are stupid and don't contain data
+        # we have to go through the object property
+        for psys in object.particle_systems:
+            processPointCache(psys.point_cache)
+                
+
+if __name__ == "__main__":
+    try:
+        i = sys.argv.index("--")
+    except:
+        i = 0
+    
+    if i:
+        new_path = sys.argv[i+1]
+        args = sys.argv[i+2:]
+        
+        process(args)
+        
+        bpy.ops.wm.save_as_mainfile(path=new_path, check_existing=False)
index d24490385fb9763fc9c0ca08acb2e489557e76b1..9fd00152dc129bb65a7c908b960e8878d64a7d51 100644 (file)
@@ -22,6 +22,7 @@ import subprocess, time
 
 from netrender.utils import *
 import netrender.model
+import netrender.repath
 
 BLENDER_PATH = sys.argv[0]
 
@@ -64,12 +65,22 @@ def testCancel(conn, job_id, frame_number):
         else:
             return False
 
-def testFile(conn, job_id, slave_id, file_index, JOB_PREFIX, file_path, main_path = None):
-    job_full_path = prefixPath(JOB_PREFIX, file_path, main_path)
-
-    if not os.path.exists(job_full_path):
-        temp_path = JOB_PREFIX + "slave.temp.blend"
-        conn.request("GET", fileURL(job_id, file_index), headers={"slave-id":slave_id})
+def testFile(conn, job_id, slave_id, rfile, JOB_PREFIX, main_path = None):
+    job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path)
+    
+    found = os.path.exists(job_full_path)
+    
+    if found:
+        found_signature = hashFile(job_full_path)
+        found = found_signature == rfile.signature
+        
+        if not found:
+            print("Found file %s at %s but signature mismatch!" % (rfile.filepath, job_full_path))
+            job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force = True)
+
+    if not found:
+        temp_path = JOB_PREFIX + "slave.temp"
+        conn.request("GET", fileURL(job_id, rfile.index), headers={"slave-id":slave_id})
         response = conn.getresponse()
 
         if response.status != http.client.OK:
@@ -85,6 +96,8 @@ def testFile(conn, job_id, slave_id, file_index, JOB_PREFIX, file_path, main_pat
         f.close()
 
         os.renames(temp_path, job_full_path)
+        
+    rfile.filepath = job_full_path
 
     return job_full_path
 
@@ -105,6 +118,8 @@ def render_slave(engine, netsettings, threads):
         if not os.path.exists(NODE_PREFIX):
             os.mkdir(NODE_PREFIX)
 
+        engine.update_stats("", "Network render connected to master, waiting for jobs")
+
         while not engine.test_break():
             conn.request("GET", "/job", headers={"slave-id":slave_id})
             response = conn.getresponse()
@@ -113,6 +128,7 @@ def render_slave(engine, netsettings, threads):
                 timeout = 1 # reset timeout on new job
 
                 job = netrender.model.RenderJob.materialize(eval(str(response.read(), encoding='utf8')))
+                engine.update_stats("", "Network render processing job from master")
 
                 JOB_PREFIX = NODE_PREFIX + "job_" + job.id + os.sep
                 if not os.path.exists(JOB_PREFIX):
@@ -123,14 +139,17 @@ def render_slave(engine, netsettings, threads):
                     job_path = job.files[0].filepath # path of main file
                     main_path, main_file = os.path.split(job_path)
 
-                    job_full_path = testFile(conn, job.id, slave_id, 0, JOB_PREFIX, job_path)
+                    job_full_path = testFile(conn, job.id, slave_id, job.files[0], JOB_PREFIX)
                     print("Fullpath", job_full_path)
                     print("File:", main_file, "and %i other files" % (len(job.files) - 1,))
-                    engine.update_stats("", "Render File "+ main_file+ " for job "+ job.id)
 
                     for rfile in job.files[1:]:
+                        testFile(conn, job.id, slave_id, rfile, JOB_PREFIX, main_path)
                         print("\t", rfile.filepath)
-                        testFile(conn, job.id, slave_id, rfile.index, JOB_PREFIX, rfile.filepath, main_path)
+                        
+                    netrender.repath.update(job)
+
+                    engine.update_stats("", "Render File "+ main_file+ " for job "+ job.id)
 
                 # announce log to master
                 logfile = netrender.model.LogFile(job.id, slave_id, [frame.number for frame in job.frames])
@@ -175,6 +194,10 @@ def render_slave(engine, netsettings, threads):
                             # (only need to update on one frame, they are linked
                             conn.request("PUT", logURL(job.id, first_frame), stdout, headers=headers)
                             response = conn.getresponse()
+                            
+                            # Also output on console
+                            if netsettings.slave_thumb:
+                                print(str(stdout, encoding='utf8'), end="")
 
                             stdout = bytes()
 
@@ -182,6 +205,9 @@ def render_slave(engine, netsettings, threads):
                         if testCancel(conn, job.id, first_frame):
                             cancelled = True
 
+                if job.type == netrender.model.JOB_BLENDER:
+                    netrender.repath.reset(job)
+
                 # read leftovers if needed
                 stdout += process.stdout.read()
 
@@ -191,6 +217,17 @@ def render_slave(engine, netsettings, threads):
                         process.terminate()
                     continue # to next frame
 
+                # flush the rest of the logs
+                if stdout:
+                    # Also output on console
+                    if netsettings.slave_thumb:
+                        print(str(stdout, encoding='utf8'), end="")
+                    
+                    # (only need to update on one frame, they are linked
+                    conn.request("PUT", logURL(job.id, first_frame), stdout, headers=headers)
+                    if conn.getresponse().status == http.client.NO_CONTENT:
+                        continue
+
                 total_t = time.time() - start_t
 
                 avg_t = total_t / len(job.frames)
@@ -199,13 +236,6 @@ def render_slave(engine, netsettings, threads):
 
                 print("status", status)
 
-                # flush the rest of the logs
-                if stdout:
-                    # (only need to update on one frame, they are linked
-                    conn.request("PUT", logURL(job.id, first_frame), stdout, headers=headers)
-                    if conn.getresponse().status == http.client.NO_CONTENT:
-                        continue
-
                 headers = {"job-id":job.id, "slave-id":slave_id, "job-time":str(avg_t)}
 
 
@@ -245,6 +275,8 @@ def render_slave(engine, netsettings, threads):
                         conn.request("PUT", "/render", headers=headers)
                         if conn.getresponse().status == http.client.NO_CONTENT:
                             continue
+
+                engine.update_stats("", "Network render connected to master, waiting for jobs")
             else:
                 if timeout < MAX_TIMEOUT:
                     timeout += INCREMENT_TIMEOUT
index f8b29fdd326370025cb7e310599ed87a0a59654d..c554c3031fba369029f221577f7e7193a2878dee 100644 (file)
@@ -76,7 +76,7 @@ def verify_address(netsettings):
         else:
             netsettings.server_address = "[default]"
 
-class RenderButtonsPanel(bpy.types.Panel):
+class RenderButtonsPanel():
     bl_space_type = "PROPERTIES"
     bl_region_type = "WINDOW"
     bl_context = "render"
@@ -88,7 +88,7 @@ class RenderButtonsPanel(bpy.types.Panel):
 
 # Setting panel, use in the scene for now.
 @rnaType
-class RENDER_PT_network_settings(RenderButtonsPanel):
+class RENDER_PT_network_settings(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Network Settings"
     COMPAT_ENGINES = {'NET_RENDER'}
 
@@ -123,7 +123,7 @@ class RENDER_PT_network_settings(RenderButtonsPanel):
         layout.operator("render.netclientweb", icon='QUESTION')
 
 @rnaType
-class RENDER_PT_network_slave_settings(RenderButtonsPanel):
+class RENDER_PT_network_slave_settings(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Slave Settings"
     COMPAT_ENGINES = {'NET_RENDER'}
 
@@ -141,13 +141,14 @@ class RENDER_PT_network_slave_settings(RenderButtonsPanel):
 
         layout.prop(netsettings, "slave_clear")
         layout.prop(netsettings, "slave_thumb")
+        layout.prop(netsettings, "slave_outputlog")
         layout.label(text="Threads:")
         layout.prop(rd, "threads_mode", expand=True)
         sub = layout.column()
         sub.enabled = rd.threads_mode == 'FIXED'
         sub.prop(rd, "threads")
 @rnaType
-class RENDER_PT_network_master_settings(RenderButtonsPanel):
+class RENDER_PT_network_master_settings(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Master Settings"
     COMPAT_ENGINES = {'NET_RENDER'}
 
@@ -166,7 +167,7 @@ class RENDER_PT_network_master_settings(RenderButtonsPanel):
         layout.prop(netsettings, "master_clear")
 
 @rnaType
-class RENDER_PT_network_job(RenderButtonsPanel):
+class RENDER_PT_network_job(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Job Settings"
     COMPAT_ENGINES = {'NET_RENDER'}
 
@@ -186,6 +187,7 @@ class RENDER_PT_network_job(RenderButtonsPanel):
         if netsettings.server_address != "[default]":
             layout.operator("render.netclientanim", icon='RENDER_ANIMATION')
             layout.operator("render.netclientsend", icon='FILE_BLEND')
+            layout.operator("render.netclientsendframe", icon='RENDER_STILL')
             if netsettings.job_id:
                 row = layout.row()
                 row.operator("render.render", text="Get Image", icon='RENDER_STILL')
@@ -206,16 +208,17 @@ class RENDER_PT_network_job(RenderButtonsPanel):
         row.prop(netsettings, "chunks")
 
 @rnaType
-class RENDER_PT_network_slaves(RenderButtonsPanel):
+class RENDER_PT_network_slaves(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Slaves Status"
     COMPAT_ENGINES = {'NET_RENDER'}
 
     def poll(self, context):
         scene = context.scene
         netsettings = scene.network_render
+        if netsettings.mode != "RENDER_CLIENT":
+            return False
         verify_address(netsettings)
         return (super().poll(context)
-                and netsettings.mode == "RENDER_CLIENT"
                 and netsettings.server_address != "[default]")
 
     def draw(self, context):
@@ -244,16 +247,17 @@ class RENDER_PT_network_slaves(RenderButtonsPanel):
             layout.label(text="Stats: " + slave.stats)
 
 @rnaType
-class RENDER_PT_network_slaves_blacklist(RenderButtonsPanel):
+class RENDER_PT_network_slaves_blacklist(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Slaves Blacklist"
     COMPAT_ENGINES = {'NET_RENDER'}
 
     def poll(self, context):
         scene = context.scene
         netsettings = scene.network_render
+        if netsettings.mode != "RENDER_CLIENT":
+            return False
         verify_address(netsettings)
         return (super().poll(context)
-                and netsettings.mode == "RENDER_CLIENT"
                 and netsettings.server_address != "[default]")
 
     def draw(self, context):
@@ -281,16 +285,17 @@ class RENDER_PT_network_slaves_blacklist(RenderButtonsPanel):
             layout.label(text="Stats: " + slave.stats)
 
 @rnaType
-class RENDER_PT_network_jobs(RenderButtonsPanel):
+class RENDER_PT_network_jobs(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Jobs"
     COMPAT_ENGINES = {'NET_RENDER'}
 
     def poll(self, context):
         scene = context.scene
         netsettings = scene.network_render
+        if netsettings.mode != "RENDER_CLIENT":
+            return False
         verify_address(netsettings)
         return (super().poll(context)
-                and netsettings.mode == "RENDER_CLIENT"
                 and netsettings.server_address != "[default]")
 
     def draw(self, context):
@@ -362,6 +367,11 @@ NetRenderSettings.BoolProperty( attr="slave_thumb",
                 description="Generate thumbnails on slaves instead of master",
                 default = False)
 
+NetRenderSettings.BoolProperty( attr="slave_outputlog",
+                name="Output render log on console",
+                description="Output render text log to console as well as sending it to the master",
+                default = True)
+
 NetRenderSettings.BoolProperty( attr="master_clear",
                 name="Clear on exit",
                 description="delete saved files on exit",
index 37787732f09db46a5f89e23184b92afcbb589627..f194cdc9559589f67935bf3ca8f75a4dd15ae834 100644 (file)
@@ -19,7 +19,7 @@
 import sys, os
 import re
 import http, http.client, http.server, urllib, socket
-import subprocess, shutil, time, hashlib
+import subprocess, shutil, time, hashlib, zlib
 
 import netrender.model
 
@@ -28,7 +28,7 @@ try:
 except:
   bpy = None
 
-VERSION = bytes("0.8", encoding='utf8')
+VERSION = bytes("0.9", encoding='utf8')
 
 # Jobs status
 JOB_WAITING = 0 # before all data has been entered
@@ -154,18 +154,33 @@ def renderURL(job_id, frame_number):
 def cancelURL(job_id):
     return "/cancel_%s" % (job_id)
 
-def prefixPath(prefix_directory, file_path, prefix_path):
+def hashFile(path):
+    f = open(path, "rb")
+    value = hashData(f.read())
+    f.close()
+    return value
+    
+def hashData(data):
+    m = hashlib.md5()
+    m.update(data)
+    return m.hexdigest()
+    
+
+def prefixPath(prefix_directory, file_path, prefix_path, force = False):
     if os.path.isabs(file_path):
         # if an absolute path, make sure path exists, if it doesn't, use relative local path
         full_path = file_path
-        if not os.path.exists(full_path):
+        if force or not os.path.exists(full_path):
             p, n = os.path.split(full_path)
 
             if prefix_path and p.startswith(prefix_path):
-                directory = prefix_directory + p[len(prefix_path):]
-                full_path = directory + os.sep + n
-                if not os.path.exists(directory):
-                    os.mkdir(directory)
+                if len(prefix_path) < len(p):
+                    directory = prefix_directory + p[len(prefix_path)+1:] + os.sep # +1 to remove separator
+                    if not os.path.exists(directory):
+                        os.mkdir(directory)
+                else:
+                    directory = prefix_directory
+                full_path = directory + n
             else:
                 full_path = prefix_directory + n
     else:
index 1adb02f13586359940772d1d57b0cdee103766c0..a3fee82e56685cbcddaa145719fb3328894146c9 100644 (file)
@@ -205,12 +205,30 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
 
 
 def expandpath(path):
+    """
+    Returns the absolute path relative to the current blend file using the "//" prefix.
+    """
     if path.startswith("//"):
         return _os.path.join(_os.path.dirname(_bpy.data.filename), path[2:])
 
     return path
 
 
+def relpath(path, start=None):
+    """
+    Returns the path relative to the current blend file using the "//" prefix.
+
+    :arg start: Relative to this path, when not set the current filename is used.
+    :type start: string
+    """
+    if not path.startswith("//"):
+        if start is None:
+            start = _os.path.dirname(_bpy.data.filename)
+        return "//" + _os.path.relpath(path, start)
+
+    return path
+
+
 _unclean_chars = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, \
     17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, \
     35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 58, 59, 60, 61, 62, 63, \
index 6def7dcb41f44e4fc1e5fac5fafdaf668473f539..5f3270506686db42fe2be1906c33c27638e4a81d 100644 (file)
@@ -95,19 +95,19 @@ class _GenericBone:
     def x_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector(1.0, 0.0, 0.0)
+        return self.matrix.rotation_part() * Vector((1.0, 0.0, 0.0))
 
     @property
     def y_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector(0.0, 1.0, 0.0)
+        return self.matrix.rotation_part() * Vector((0.0, 1.0, 0.0))
 
     @property
     def z_axis(self):
         """ Vector pointing down the x-axis of the bone.
         """
-        return self.matrix.rotation_part() * Vector(0.0, 0.0, 1.0)
+        return self.matrix.rotation_part() * Vector((0.0, 0.0, 1.0))
 
     @property
     def basename(self):
@@ -237,7 +237,7 @@ class EditBone(StructRNA, _GenericBone):
         Expects a 4x4 or 3x3 matrix.
         """
         from mathutils import Vector
-        z_vec = self.matrix.rotation_part() * Vector(0.0, 0.0, 1.0)
+        z_vec = self.matrix.rotation_part() * Vector((0.0, 0.0, 1.0))
         self.tail = matrix * self.tail
         self.head = matrix * self.head
         scalar = matrix.median_scale
index 875c557f497c561bf0daa39eea7595c8b93fee0f..4b50cf6deb822f3761b8d04dd5d8567c740d0d11 100644 (file)
@@ -32,6 +32,7 @@ changes have been made:
 - limit list of modules to prefix in case of "from w"
 - sorted modules
 - added sphinx documentation
+- complete() returns a blank list of the module isnt found
 """
 
 
@@ -183,3 +184,8 @@ def complete(line):
     if len(words) >= 3 and words[0] == 'from':
         mod = words[1]
         return filter_prefix(try_import(mod), words[-1])
+
+    # get here if the import is not found
+    # import invalidmodule
+    #                      ^, in this case return nothing
+    return []
index 1e7c7adfb7fe58634333a3a9e699910b479d8299..fd32a7ee3b97513949cd3b7cfceac2fac43193c6 100644 (file)
@@ -157,17 +157,18 @@ def graph_armature(obj, path, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=True,
                 pbone = rna_path_as_pbone(rna_path)
 
                 if pbone:
-                    for target in fcurve_driver.driver.targets:
-                        pbone_target = rna_path_as_pbone(target.data_path)
-                        rna_path_target = target.data_path
-                        if pbone_target:
-                            opts = ['dir=forward', "weight=1", "arrowhead=normal", "arrowtail=none", "constraint=false", 'color="blue"', "labelfontsize=4"] # ,
-                            display_source = rna_path.replace("pose.bones", "")
-                            display_target = rna_path_target.replace("pose.bones", "")
-                            if XTRA_INFO:
-                                label = "%s\\n%s" % (display_source, display_target)
-                                opts.append('label="%s"' % compat_str(label))
-                            fw('"%s" -> "%s" [%s] ;\n' % (pbone_target.name, pbone.name, ','.join(opts)))
+                    for var in fcurve_driver.driver.variables:
+                        for target in var.targets:
+                            pbone_target = rna_path_as_pbone(target.data_path)
+                            rna_path_target = target.data_path
+                            if pbone_target:
+                                opts = ['dir=forward', "weight=1", "arrowhead=normal", "arrowtail=none", "constraint=false", 'color="blue"', "labelfontsize=4"] # ,
+                                display_source = rna_path.replace("pose.bones", "")
+                                display_target = rna_path_target.replace("pose.bones", "")
+                                if XTRA_INFO:
+                                    label = "%s\\n%s" % (display_source, display_target)
+                                    opts.append('label="%s"' % compat_str(label))
+                                fw('"%s" -> "%s" [%s] ;\n' % (pbone_target.name, pbone.name, ','.join(opts)))
 
     fw(footer)
     fileobject.close()
index 183a122f513870e8926f9fa9213d5f3eedb89193..f9ca0f604683f67157fcc5139845a007b0ad9181 100644 (file)
@@ -39,10 +39,10 @@ def add_torus(major_rad, minor_rad, major_seg, minor_seg):
         for minor_index in range(minor_seg):
             angle = 2 * pi * minor_index / minor_seg
 
-            vec = Vector(major_rad + (cos(angle) * minor_rad), 0.0,
-                        (sin(angle) * minor_rad)) * quat
+            vec = Vector((major_rad + (cos(angle) * minor_rad), 0.0,
+                        (sin(angle) * minor_rad))) * quat
 
-            verts.extend([vec.x, vec.y, vec.z])
+            verts.extend(vec[:])
 
             if minor_index + 1 == minor_seg:
                 i2 = (major_index) * minor_seg
index 6a235e118ce196510882e503034966c1609acb70..99654505c172207025cca2bd0fa78165642c561a 100644 (file)
@@ -55,6 +55,13 @@ def get_console(console_id):
 
     try:
         console, stdout, stderr = consoles[console_id]
+        
+        # XXX, bug in python 3.1.2 ?
+        # seems there is no way to clear StringIO objects for writing, have to make new ones each time.
+        import io
+        stdout = io.StringIO()
+        stderr = io.StringIO()
+        
     except:
         namespace = {'__builtins__': __builtins__, 'bpy': bpy}
         console = InteractiveConsole(namespace)
@@ -190,7 +197,7 @@ def banner(context):
     add_scrollback("Execute:          Enter", 'OUTPUT')
     add_scrollback("Autocomplete:     Ctrl+Space", 'OUTPUT')
     add_scrollback("Ctrl +/-  Wheel:  Zoom", 'OUTPUT')
-    add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, mathutils, Geometry", 'OUTPUT')
+    add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, mathutils, geometry", 'OUTPUT')
     add_scrollback("", 'OUTPUT')
     add_scrollback("  WARNING!!! Blender 2.5 API is subject to change, see API reference for more info.", 'ERROR')
     add_scrollback("", 'OUTPUT')
index 0b8970ce7989f0e3fa8ca76eca5a43d00152eeb4..8a11ef7aaf69e8d83c07f7a3652b31b4b1cf0766 100644 (file)
@@ -457,7 +457,7 @@ class MakeDupliFace(bpy.types.Operator):
 
         SCALE_FAC = 0.01
         offset = 0.5 * SCALE_FAC
-        base_tri = Vector(-offset, -offset, 0.0), Vector(offset, -offset, 0.0), Vector(offset, offset, 0.0), Vector(-offset, offset, 0.0)
+        base_tri = Vector((-offset, -offset, 0.0)), Vector((offset, -offset, 0.0)), Vector((offset, offset, 0.0)), Vector((-offset, offset, 0.0))
 
         def matrix_to_quat(matrix):
             # scale = matrix.median_scale
index c47b58c76a16f03a41af2083fbe68d6bafc2b5b0..f02c1c62ab91aa9bcb9bec66e01e9c543b0a602b 100644 (file)
@@ -198,6 +198,9 @@ class AddPresetInteraction(AddPresetBase):
         "bpy.context.user_preferences.inputs.zoom_axis",
         "bpy.context.user_preferences.inputs.view_rotation",
         "bpy.context.user_preferences.inputs.invert_zoom_direction",
+        "bpy.context.user_preferences.inputs.emulate_numpad",
+        "bpy.context.user_preferences.inputs.emulate_3_button_mouse",
+        "bpy.context.user_preferences.inputs.continuous_mouse",
     ]
 
     preset_subdir = "interaction"
index b3b674cb97ec4320172211a4c1642cdbf7614f4d..c72fa45655e837569ada01cb868681d5ae826791 100644 (file)
@@ -20,6 +20,7 @@
 
 import bpy
 
+from bpy.props import *
 
 class SequencerCrossfadeSounds(bpy.types.Operator):
     '''Do crossfading volume animation of two selected sound strips.'''
@@ -71,12 +72,52 @@ class SequencerCrossfadeSounds(bpy.types.Operator):
             return {'CANCELLED'}
 
 
+class SequencerCutMulticam(bpy.types.Operator):
+    '''Cut multicam strip and select camera.'''
+
+    bl_idname = "sequencer.cut_multicam"
+    bl_label = "Cut multicam"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    camera = IntProperty(name="Camera",
+            default=1, min=1, max=32, soft_min=1, soft_max=32)
+
+    def poll(self, context):
+        if context.scene and context.scene.sequence_editor and context.scene.sequence_editor.active_strip:
+            return context.scene.sequence_editor.active_strip.type == 'MULTICAM'
+        else:
+            return False
+
+    def execute(self, context):
+        camera = self.properties.camera
+
+        s = context.scene.sequence_editor.active_strip
+
+        if not s.selected:
+            s.selected = True
+            
+        cfra = context.scene.frame_current
+        bpy.ops.sequencer.cut(frame=cfra,type='HARD',side='RIGHT')
+        for s in context.scene.sequence_editor.sequences:
+            if s.selected and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end:
+                context.scene.sequence_editor.active_strip = s
+                
+        context.scene.sequence_editor.active_strip.multicam_source = camera
+        return {'FINISHED'}
+
+
 def register():
-    bpy.types.register(SequencerCrossfadeSounds)
+    register = bpy.types.register
+    
+    register(SequencerCrossfadeSounds)
+    register(SequencerCutMulticam)
 
 
 def unregister():
-    bpy.types.unregister(SequencerCrossfadeSounds)
+    unregister = bpy.types.unregister
+    
+    unregister(SequencerCrossfadeSounds)
+    unregister(SequencerCutMulticam)
 
 if __name__ == "__main__":
     register()
index 230f2863a7ff362879314b0bc20add4caa580685..e0854f3720b7b86ce42c8bb0f05702207c7457dc 100644 (file)
@@ -199,7 +199,7 @@ def pointInEdges(pt, edges):
 """
 
 def pointInIsland(pt, island):
-    vec1 = Vector(); vec2 = Vector(); vec3 = Vector()
+    vec1, vec2, vec3 = Vector(), Vector(), Vector()
     for f in island:
         vec1.x, vec1.y = f.uv[0]
         vec2.x, vec2.y = f.uv[1]
@@ -389,7 +389,7 @@ def mergeUvIslands(islandList):
         w, h = maxx-minx, maxy-miny
 
         totFaceArea = 0
-        offset= Vector(minx, miny)
+        offset= Vector((minx, miny))
         for f in islandList[islandIdx]:
             for uv in f.uv:
                 uv -= offset
@@ -513,7 +513,7 @@ def mergeUvIslands(islandList):
 
                             ##testcount+=1
                             #print 'Testing intersect'
-                            Intersect = islandIntersectUvIsland(sourceIsland, targetIsland, Vector(boxLeft, boxBottom))
+                            Intersect = islandIntersectUvIsland(sourceIsland, targetIsland, Vector((boxLeft, boxBottom)))
                             #print 'Done', Intersect
                             if Intersect == 1:  # Line intersect, dont bother with this any more
                                 pass
@@ -539,7 +539,7 @@ def mergeUvIslands(islandList):
 
                                 # Move faces into new island and offset
                                 targetIsland[0].extend(sourceIsland[0])
-                                offset= Vector(boxLeft, boxBottom)
+                                offset= Vector((boxLeft, boxBottom))
 
                                 for f in sourceIsland[0]:
                                     for uv in f.uv:
@@ -564,7 +564,7 @@ def mergeUvIslands(islandList):
 
 
                                 targetIsland[7].extend(sourceIsland[7])
-                                offset= Vector(boxLeft, boxBottom, 0)
+                                offset= Vector((boxLeft, boxBottom, 0.0))
                                 for p in sourceIsland[7]:
                                     p+= offset
 
@@ -780,9 +780,9 @@ def packIslands(islandList):
 def VectoMat(vec):
     a3 = vec.__copy__().normalize()
 
-    up = Vector(0,0,1)
+    up = Vector((0.0, 0.0, 1.0))
     if abs(a3.dot(up)) == 1.0:
-        up = Vector(0,1,0)
+        up = Vector((0.0, 1.0, 0.0))
 
     a1 = a3.cross(up).normalize()
     a2 = a3.cross(a1)
@@ -963,7 +963,7 @@ def main(context, island_margin, projection_limit):
                     newProjectMeshFaces.append(tempMeshFaces.pop(fIdx))
 
             # Add the average of all these faces normals as a projectionVec
-            averageVec = Vector(0,0,0)
+            averageVec = Vector((0.0, 0.0, 0.0))
             if USER_AREA_WEIGHT:
                 for fprop in newProjectMeshFaces:
                     averageVec += (fprop.no * fprop.area)
index 0b0d70c5e560155a0f6f01b6441bbd3ae7167aca..c7b7ee71964d66dc8126ac963288a8406d247287 100644 (file)
@@ -58,17 +58,22 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
         con[e.verts[0]].append(e.verts[1])
         con[e.verts[1]].append(e.verts[0])
 
-    for v in me.verts:
+    for i, v in enumerate(me.verts):
         vec = Vector()
         no = v.normal
         co = v.co
 
         # get the direction of the vectors between the vertex and it's connected vertices
-        for c in con[v.index]:
-            vec += Vector(me.verts[c].co - co).normalize()
+        for c in con[i]:
+            vec += (me.verts[c].co - co).normalize()
 
         # normalize the vector by dividing by the number of connected verts
-        vec /= len(con[v.index])
+        tot_con = len(con[i])
+        
+        if tot_con == 0:
+            continue
+        
+        vec /= tot_con
 
         # angle is the acos of the dot product between vert and connected verts normals
         ang = math.acos(no.dot(vec))
@@ -79,7 +84,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
         if not dirt_only:
             ang = min(clamp_clean, ang)
 
-        vert_tone[v.index] = ang
+        vert_tone[i] = ang
 
     # blur tones
     for i in range(blur_iterations):
@@ -146,7 +151,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
 
 class VertexPaintDirt(bpy.types.Operator):
 
-    bl_idname = "mesh.vertex_paint_dirt"
+    bl_idname = "paint.vertex_color_dirt"
     bl_label = "Dirty Vertex Colors"
     bl_options = {'REGISTER', 'UNDO'}
 
@@ -171,7 +176,7 @@ class VertexPaintDirt(bpy.types.Operator):
 
         print('Dirt calculated in %.6f' % (time.time() - t))
 
-        return('FINISHED',)
+        return {'FINISHED'}
 
 
 def register():
index 84b1d10e2b927359ac2cbf4677136a7ebd0597e3..3e54cb4391b67a2ff8204250ecfb341a22ee15d0 100644 (file)
@@ -154,6 +154,7 @@ kmi.properties.center = True
 kmi.properties.enumerate = True
 kmi.properties.extend = True
 kmi = km.items.add('view3d.select_border', 'EVT_TWEAK_S', 'ANY')
+kmi.properties.extend = False
 kmi = km.items.add('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)
 kmi = km.items.add('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)
 kmi.properties.deselect = True
@@ -204,12 +205,96 @@ kmi = km.items.add('view3d.enable_manipulator', 'E', 'PRESS')
 kmi.properties.rotate = True
 kmi = km.items.add('view3d.enable_manipulator', 'R', 'PRESS')
 kmi.properties.scale = True
+kmi = km.items.add('view3d.select_border', 'EVT_TWEAK_S', 'ANY', shift=True)
+kmi.properties.extend = True
+
+# Map Object Mode
+km = kc.add_keymap('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False)
+
+kmi = km.items.add('wm.context_cycle_enum', 'O', 'PRESS', shift=True)
+kmi.properties.path = 'tool_settings.proportional_editing_falloff'
+kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS')
+kmi.properties.path = 'tool_settings.proportional_editing'
+kmi.properties.value_1 = 'DISABLED'
+kmi.properties.value_2 = 'ENABLED'
+kmi = km.items.add('view3d.game_start', 'P', 'PRESS')
+kmi = km.items.add('object.select_all', 'A', 'PRESS')
+kmi = km.items.add('object.select_inverse', 'I', 'PRESS', ctrl=True)
+kmi = km.items.add('object.select_linked', 'L', 'PRESS', shift=True)
+kmi = km.items.add('object.select_grouped', 'G', 'PRESS', shift=True)
+kmi = km.items.add('object.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)
+kmi = km.items.add('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS')
+kmi.properties.direction = 'PARENT'
+kmi = km.items.add('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)
+kmi.properties.direction = 'PARENT'
+kmi.properties.extend = True
+kmi = km.items.add('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')
+kmi.properties.direction = 'CHILD'
+kmi = km.items.add('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)
+kmi.properties.direction = 'CHILD'
+kmi.properties.extend = True
+kmi = km.items.add('object.parent_set', 'P', 'PRESS', ctrl=True)
+kmi = km.items.add('object.parent_no_inverse_set', 'P', 'PRESS', shift=True, ctrl=True)
+kmi = km.items.add('object.parent_clear', 'P', 'PRESS', alt=True)
+kmi = km.items.add('object.track_set', 'T', 'PRESS', ctrl=True)
+kmi = km.items.add('object.track_clear', 'T', 'PRESS', alt=True)
+kmi = km.items.add('object.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)
+kmi = km.items.add('object.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)
+kmi = km.items.add('object.location_clear', 'G', 'PRESS', alt=True)
+kmi = km.items.add('object.rotation_clear', 'R', 'PRESS', alt=True)
+kmi = km.items.add('object.scale_clear', 'S', 'PRESS', alt=True)
+kmi = km.items.add('object.origin_clear', 'O', 'PRESS', alt=True)
+kmi = km.items.add('object.restrictview_clear', 'H', 'PRESS', alt=True)
+kmi = km.items.add('object.restrictview_set', 'H', 'PRESS')
+kmi = km.items.add('object.restrictview_set', 'H', 'PRESS', shift=True)
+kmi.properties.unselected = True
+kmi = km.items.add('object.move_to_layer', 'M', 'PRESS')
+kmi = km.items.add('object.delete', 'X', 'PRESS')
+kmi = km.items.add('object.delete', 'DEL', 'PRESS')
+kmi = km.items.add('wm.call_menu', 'A', 'PRESS', shift=True)
+kmi.properties.name = 'INFO_MT_add'
+kmi = km.items.add('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True)
+kmi = km.items.add('wm.call_menu', 'A', 'PRESS', ctrl=True)
+kmi.properties.name = 'VIEW3D_MT_object_apply'
+kmi = km.items.add('wm.call_menu', 'U', 'PRESS')
+kmi.properties.name = 'VIEW3D_MT_make_single_user'
+kmi = km.items.add('wm.call_menu', 'L', 'PRESS', ctrl=True)
+kmi.properties.name = 'VIEW3D_MT_make_links'
+kmi = km.items.add('object.duplicate_move', 'D', 'PRESS', shift=True)
+kmi = km.items.add('object.duplicate_move_linked', 'D', 'PRESS', alt=True)
+kmi = km.items.add('object.join', 'J', 'PRESS', ctrl=True)
+kmi = km.items.add('object.convert', 'C', 'PRESS', alt=True)
+kmi = km.items.add('object.proxy_make', 'P', 'PRESS', ctrl=True, alt=True)
+kmi = km.items.add('object.make_local', 'L', 'PRESS')
+kmi = km.items.add('anim.keyframe_insert_menu', 'I', 'PRESS')
+kmi = km.items.add('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)
+kmi = km.items.add('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)
+kmi = km.items.add('group.create', 'G', 'PRESS', ctrl=True)
+kmi = km.items.add('group.objects_remove', 'G', 'PRESS', ctrl=True, alt=True)
+kmi = km.items.add('group.objects_add_active', 'G', 'PRESS', shift=True, ctrl=True)
+kmi = km.items.add('group.objects_remove_active', 'G', 'PRESS', shift=True, alt=True)
+kmi = km.items.add('wm.call_menu', 'W', 'PRESS', ctrl=True)
+kmi.properties.name = 'VIEW3D_MT_object_specials'
+kmi = km.items.add('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)
+kmi.properties.level = 0
+kmi = km.items.add('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)
+kmi.properties.level = 1
+kmi = km.items.add('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)
+kmi.properties.level = 2
+kmi = km.items.add('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)
+kmi.properties.level = 3
+kmi = km.items.add('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)
+kmi.properties.level = 4
+kmi = km.items.add('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)
+kmi.properties.level = 5
+kmi = km.items.add('object.select_all', 'SELECTMOUSE', 'CLICK')
+kmi.properties.action = 'DESELECT'
 
 # Map Mesh
 km = kc.add_keymap('Mesh', space_type='EMPTY', region_type='WINDOW', modal=False)
 
 kmi = km.items.add('mesh.loopcut_slide', 'R', 'PRESS', ctrl=True)
-kmi = km.items.add('mesh.loop_select', 'SELECTMOUSE', 'PRESS', alt=True)
+kmi = km.items.add('mesh.loop_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
 kmi = km.items.add('mesh.loop_select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
 kmi.properties.extend = True
 kmi = km.items.add('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
@@ -287,92 +372,11 @@ kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS', alt=True)
 kmi.properties.path = 'tool_settings.proportional_editing'
 kmi.properties.value_1 = 'DISABLED'
 kmi.properties.value_2 = 'CONNECTED'
-
-# Map Object Mode
-km = kc.add_keymap('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False)
-
-kmi = km.items.add('wm.context_cycle_enum', 'O', 'PRESS', shift=True)
-kmi.properties.path = 'tool_settings.proportional_editing_falloff'
-kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS')
-kmi.properties.path = 'tool_settings.proportional_editing'
-kmi.properties.value_1 = 'DISABLED'
-kmi.properties.value_2 = 'ENABLED'
-kmi = km.items.add('view3d.game_start', 'P', 'PRESS')
-kmi = km.items.add('object.select_all', 'A', 'PRESS')
-kmi = km.items.add('object.select_inverse', 'I', 'PRESS', ctrl=True)
-kmi = km.items.add('object.select_linked', 'L', 'PRESS', shift=True)
-kmi = km.items.add('object.select_grouped', 'G', 'PRESS', shift=True)
-kmi = km.items.add('object.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)
-kmi = km.items.add('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS')
-kmi.properties.direction = 'PARENT'
-kmi = km.items.add('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)
-kmi.properties.direction = 'PARENT'
-kmi.properties.extend = True
-kmi = km.items.add('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')
-kmi.properties.direction = 'CHILD'
-kmi = km.items.add('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)
-kmi.properties.direction = 'CHILD'
-kmi.properties.extend = True
-kmi = km.items.add('object.parent_set', 'P', 'PRESS', ctrl=True)
-kmi = km.items.add('object.parent_no_inverse_set', 'P', 'PRESS', shift=True, ctrl=True)
-kmi = km.items.add('object.parent_clear', 'P', 'PRESS', alt=True)
-kmi = km.items.add('object.track_set', 'T', 'PRESS', ctrl=True)
-kmi = km.items.add('object.track_clear', 'T', 'PRESS', alt=True)
-kmi = km.items.add('object.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)
-kmi = km.items.add('object.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)
-kmi = km.items.add('object.location_clear', 'G', 'PRESS', alt=True)
-kmi = km.items.add('object.rotation_clear', 'R', 'PRESS', alt=True)
-kmi = km.items.add('object.scale_clear', 'S', 'PRESS', alt=True)
-kmi = km.items.add('object.origin_clear', 'O', 'PRESS', alt=True)
-kmi = km.items.add('object.restrictview_clear', 'H', 'PRESS', alt=True)
-kmi = km.items.add('object.restrictview_set', 'H', 'PRESS')
-kmi = km.items.add('object.restrictview_set', 'H', 'PRESS', shift=True)
-kmi.properties.unselected = True
-kmi = km.items.add('object.move_to_layer', 'M', 'PRESS')
-kmi = km.items.add('object.delete', 'X', 'PRESS')
-kmi = km.items.add('object.delete', 'DEL', 'PRESS')
-kmi = km.items.add('wm.call_menu', 'A', 'PRESS', shift=True)
-kmi.properties.name = 'INFO_MT_add'
-kmi = km.items.add('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True)
-kmi = km.items.add('wm.call_menu', 'A', 'PRESS', ctrl=True)
-kmi.properties.name = 'VIEW3D_MT_object_apply'
-kmi = km.items.add('wm.call_menu', 'U', 'PRESS')
-kmi.properties.name = 'VIEW3D_MT_make_single_user'
-kmi = km.items.add('wm.call_menu', 'L', 'PRESS', ctrl=True)
-kmi.properties.name = 'VIEW3D_MT_make_links'
-kmi = km.items.add('object.duplicate_move', 'D', 'PRESS', shift=True)
-kmi = km.items.add('object.duplicate_move_linked', 'D', 'PRESS', alt=True)
-kmi = km.items.add('object.join', 'J', 'PRESS', ctrl=True)
-kmi = km.items.add('object.convert', 'C', 'PRESS', alt=True)
-kmi = km.items.add('object.proxy_make', 'P', 'PRESS', ctrl=True, alt=True)
-kmi = km.items.add('object.make_local', 'L', 'PRESS')
-kmi = km.items.add('anim.keyframe_insert_menu', 'I', 'PRESS')
-kmi = km.items.add('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)
-kmi = km.items.add('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)
-kmi = km.items.add('group.create', 'G', 'PRESS', ctrl=True)
-kmi = km.items.add('group.objects_remove', 'G', 'PRESS', ctrl=True, alt=True)
-kmi = km.items.add('group.objects_add_active', 'G', 'PRESS', shift=True, ctrl=True)
-kmi = km.items.add('group.objects_remove_active', 'G', 'PRESS', shift=True, alt=True)
-kmi = km.items.add('wm.call_menu', 'W', 'PRESS', ctrl=True)
-kmi.properties.name = 'VIEW3D_MT_object_specials'
-kmi = km.items.add('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)
-kmi.properties.level = 0
-kmi = km.items.add('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)
-kmi.properties.level = 1
-kmi = km.items.add('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)
-kmi.properties.level = 2
-kmi = km.items.add('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)
-kmi.properties.level = 3
-kmi = km.items.add('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)
-kmi.properties.level = 4
-kmi = km.items.add('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)
-kmi.properties.level = 5
+kmi = km.items.add('mesh.select_all', 'SELECTMOUSE', 'CLICK')
+kmi.properties.action = 'DESELECT'
 
 wm.active_keyconfig = kc
 
-bpy.context.user_preferences.view.auto_depth = False
-bpy.context.user_preferences.view.zoom_to_mouse = False
-bpy.context.user_preferences.view.rotate_around_selection = False
 bpy.context.user_preferences.edit.drag_immediately = True
 bpy.context.user_preferences.edit.insertkey_xyz_to_rgb = False
 bpy.context.user_preferences.inputs.select_mouse = 'LEFT'
index 3c7c4409f50361f143b7d5d2fc4d680bdca0c561..98efa38e9eed0e00d8daaa772e8364381ead762b 100644 (file)
@@ -4,10 +4,12 @@ import blf
 def draw_callback_px(self, context):
     print("mouse points", len(self.mouse_path))
 
+    font_id = 0 # XXX, need to find out how best to get this.
+
     # draw some text
-    blf.position(15, 30, 0)
-    blf.size(20, 72)
-    blf.draw("Hello Word " + str(len(self.mouse_path)))
+    blf.position(font_id, 15, 30, 0)
+    blf.size(font_id, 20, 72)
+    blf.draw(font_id, "Hello Word " + str(len(self.mouse_path)))
 
     # 50% alpha, 2 pixel width line
     bgl.glEnable(bgl.GL_BLEND)
index c62d3720d96ae261d4ab0b8f43924ad81f2d14a8..985a628c2d01869d5c1166390a8357dd26c3053b 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 
 def main(context):
     for ob in context.scene.objects:
@@ -15,7 +16,11 @@ class SimpleOperator(bpy.types.Operator):
         main(context)
         return {'FINISHED'}
 
-bpy.types.register(SimpleOperator)
+def register():
+    bpy.types.register(SimpleOperator)
+
+def unregister():
+    bpy.types.unregister(SimpleOperator)
 
 if __name__ == "__main__":
-    bpy.ops.object.simple_operator()
+    register()
index 976c2ad78d5f57914dccef3c4958f5a4ea9bab8a..953ab5e5abdbdc13471f3fcc7e56682fd3ecdb66 100644 (file)
@@ -69,7 +69,10 @@ class DATA_PT_skeleton(DataButtonsPanel):
         arm = context.armature
         wide_ui = context.region.width > narrowui
 
-        layout.prop(arm, "pose_position", expand=True)
+        if wide_ui:
+            layout.prop(arm, "pose_position", expand=True)
+        else:
+            layout.prop(arm, "pose_position", text="")
 
         split = layout.split()
 
@@ -79,11 +82,16 @@ class DATA_PT_skeleton(DataButtonsPanel):
         col.label(text="Protected Layers:")
         col.prop(arm, "layer_protection", text="")
 
-        if wide_ui:
-            col = split.column()
         col.label(text="Deform:")
+
+        split = layout.split()
+
+        col = split.column()
         col.prop(arm, "deform_vertexgroups", text="Vertex Groups")
         col.prop(arm, "deform_envelope", text="Envelopes")
+
+        if wide_ui:
+            col = split.column()
         col.prop(arm, "deform_quaternion", text="Quaternion")
         col.prop(arm, "deform_bbone_rest", text="B-Bones Rest")
 
index be0a4f84145fb172cfb34083a7da65f8b254ad64..4ce124a279e782d4fce7b2a5517a94d93648c2b5 100644 (file)
@@ -29,12 +29,14 @@ class DataButtonsPanel(bpy.types.Panel):
     bl_context = "data"
 
     def poll(self, context):
-        return context.camera
+        engine = context.scene.render.engine
+        return context.camera and (engine in self.COMPAT_ENGINES)
 
 
 class DATA_PT_context_camera(DataButtonsPanel):
     bl_label = ""
     bl_show_header = False
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -61,10 +63,12 @@ class DATA_PT_context_camera(DataButtonsPanel):
 
 class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel):
     _context_path = "object.data"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
 
 class DATA_PT_camera(DataButtonsPanel):
     bl_label = "Lens"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -125,6 +129,7 @@ class DATA_PT_camera(DataButtonsPanel):
 
 class DATA_PT_camera_display(DataButtonsPanel):
     bl_label = "Display"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
index 0c1f9d8001c033172e43f897b7e9bef02ddea8e5..2a78d329223a1bc8d1bd341e302917d99b7328fb 100644 (file)
@@ -93,7 +93,9 @@ class DATA_PT_lattice(DataButtonsPanel):
             col = split.column()
         col.prop(lat, "interpolation_type_w", text="")
 
-        layout.prop(lat, "outside")
+        row = layout.row()
+        row.prop(lat, "outside")
+        row.prop_object(lat, "vertex_group", context.object, "vertex_groups", text="")
 
 
 classes = [
index 86aec2655b9631d637f81001f2d8466beb92e053..a33b4f2236814c193ae5b4801b9800f153b876ab 100644 (file)
@@ -25,6 +25,7 @@ narrowui = 180
 
 class MESH_MT_vertex_group_specials(bpy.types.Menu):
     bl_label = "Vertex Group Specials"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -38,6 +39,7 @@ class MESH_MT_vertex_group_specials(bpy.types.Menu):
 
 class MESH_MT_shape_key_specials(bpy.types.Menu):
     bl_label = "Shape Key Specials"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -53,12 +55,14 @@ class DataButtonsPanel(bpy.types.Panel):
     bl_context = "data"
 
     def poll(self, context):
-        return context.mesh
+        engine = context.scene.render.engine
+        return context.mesh and (engine in self.COMPAT_ENGINES)
 
 
 class DATA_PT_context_mesh(DataButtonsPanel):
     bl_label = ""
     bl_show_header = False
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -85,10 +89,12 @@ class DATA_PT_context_mesh(DataButtonsPanel):
 
 class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel):
     _context_path = "object.data"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
 
 class DATA_PT_normals(DataButtonsPanel):
     bl_label = "Normals"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -114,6 +120,7 @@ class DATA_PT_normals(DataButtonsPanel):
 
 class DATA_PT_settings(DataButtonsPanel):
     bl_label = "Settings"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -125,9 +132,11 @@ class DATA_PT_settings(DataButtonsPanel):
 
 class DATA_PT_vertex_groups(DataButtonsPanel):
     bl_label = "Vertex Groups"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
-        return (context.object and context.object.type in ('MESH', 'LATTICE'))
+        engine = context.scene.render.engine
+        return (context.object and context.object.type in ('MESH', 'LATTICE') and (engine in self.COMPAT_ENGINES))
 
     def draw(self, context):
         layout = self.layout
@@ -167,9 +176,11 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
 
 class DATA_PT_shape_keys(DataButtonsPanel):
     bl_label = "Shape Keys"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
-        return (context.object and context.object.type in ('MESH', 'LATTICE', 'CURVE', 'SURFACE'))
+        engine = context.scene.render.engine
+        return (context.object and context.object.type in ('MESH', 'LATTICE', 'CURVE', 'SURFACE') and (engine in self.COMPAT_ENGINES))
 
     def draw(self, context):
         layout = self.layout
@@ -263,6 +274,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
 
 class DATA_PT_uv_texture(DataButtonsPanel):
     bl_label = "UV Texture"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
@@ -285,6 +297,7 @@ class DATA_PT_uv_texture(DataButtonsPanel):
 
 class DATA_PT_texface(DataButtonsPanel):
     bl_label = "Texture Face"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
         ob = context.active_object
@@ -331,6 +344,7 @@ class DATA_PT_texface(DataButtonsPanel):
 
 class DATA_PT_vertex_colors(DataButtonsPanel):
     bl_label = "Vertex Colors"
+    COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
index 35a7f55621411813a69814714aefcde5845ed357..888d20cb5e138ccc7d8f1fe10408730cc135207f 100644 (file)
@@ -164,7 +164,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
         split = layout.split()
 
         col = split.column()
-        col.prop(md, "start")
+        col.prop(md, "frame_start")
         col.prop(md, "length")
 
         if wide_ui:
index f80494a9d40b9e5af45136ed1702ca9e462dd40c..a7d9af9999deed97479789d32b4c5815cbd90403 100644 (file)
@@ -570,10 +570,11 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
 
         col = split.column()
         col.separator()
-        col.prop(raym, "distance", text="Max Dist")
         col.prop(raym, "depth")
+        col.prop(raym, "distance", text="Max Dist")
         col.separator()
         sub = col.split(percentage=0.4)
+        sub.active = raym.distance > 0.0
         sub.label(text="Fade To:")
         sub.prop(raym, "fade_to", text="")
 
index 481da716e02737a9ef29cc305f48d9df1d039e10..a81ab2fb4d20629d7029c7a26a6b5b9e6b24bf8f 100644 (file)
@@ -37,7 +37,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
             # match enum type to our functions, avoids a lookup table.
             getattr(self, con.type)(context, box, con, wide_ui)
 
-            if con.type not in ('RIGID_BODY_JOINT', 'SPLINE_IK', 'NULL'):
+            if con.type not in ('RIGID_BODY_JOINT', 'NULL'):
                 box.prop(con, "influence")
 
     def space_template(self, layout, con, wide_ui, target=True, owner=True):
index f3ab64258d9b12621a46be34f843f2f42ee204ba..84b756e62570ca39096e926ce59f4e9bf78defdf 100644 (file)
@@ -25,6 +25,8 @@ from properties_physics_common import effector_weights_ui
 from properties_physics_common import basic_force_field_settings_ui
 from properties_physics_common import basic_force_field_falloff_ui
 
+narrowui = 180
+
 
 def particle_panel_enabled(context, psys):
     return (psys.point_cache.baked is False) and (not psys.edited) and (not context.particle_system_editable)
@@ -149,6 +151,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
 
         psys = context.particle_system
         part = psys.settings
+        wide_ui = context.region.width > narrowui
 
         layout.enabled = particle_panel_enabled(context, psys) and not psys.multiple_caches
 
@@ -160,8 +163,8 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
             split = layout.split()
 
             col = split.column(align=True)
-            col.prop(part, "start")
-            col.prop(part, "end")
+            col.prop(part, "frame_start")
+            col.prop(part, "frame_end")
 
             col = split.column(align=True)
             col.prop(part, "lifetime")
@@ -170,7 +173,10 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
         layout.row().label(text="Emit From:")
 
         row = layout.row()
-        row.prop(part, "emit_from", expand=True)
+        if wide_ui:
+            row.prop(part, "emit_from", expand=True)
+        else:
+            row.prop(part, "emit_from", text="")
         row = layout.row()
         row.prop(part, "trand")
         if part.distribution != 'GRID':
@@ -178,7 +184,10 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
 
         if part.emit_from == 'FACE' or part.emit_from == 'VOLUME':
             row = layout.row()
-            row.prop(part, "distribution", expand=True)
+            if wide_ui:
+                row.prop(part, "distribution", expand=True)
+            else:
+                row.prop(part, "distribution", text="")
 
             row = layout.row()
 
@@ -327,6 +336,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel):
 
         psys = context.particle_system
         part = psys.settings
+        wide_ui = context.region.width > narrowui
 
 &n