Merging revision 29560:30125 from trunk.
authorJoerg Mueller <nexyon@gmail.com>
Thu, 8 Jul 2010 17:31:43 +0000 (17:31 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Thu, 8 Jul 2010 17:31:43 +0000 (17:31 +0000)
360 files changed:
CMake/macros.cmake
CMakeLists.txt
SConstruct
config/darwin-config.py
config/linux2-config.py
config/linuxcross-config.py
config/win32-vc-config.py
config/win64-vc-config.py
doc/blender.1
doc/blender.1.py [new file with mode: 0644]
intern/ghost/CMakeLists.txt
intern/ghost/GHOST_C-api.h
intern/ghost/GHOST_ISystem.h
intern/ghost/GHOST_Path-api.h [new file with mode: 0644]
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_Path-api.cpp [new file with mode: 0644]
intern/ghost/intern/GHOST_System.h
intern/ghost/intern/GHOST_SystemCarbon.cpp
intern/ghost/intern/GHOST_SystemCarbon.h
intern/ghost/intern/GHOST_SystemCocoa.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemWin32.h
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/Makefile
release/scripts/io/engine_render_pov.py
release/scripts/io/export_3ds.py
release/scripts/io/export_fbx.py
release/scripts/io/export_mdd.py
release/scripts/io/export_obj.py
release/scripts/io/export_ply.py
release/scripts/io/export_x3d.py
release/scripts/io/import_scene_3ds.py
release/scripts/io/netrender/master.py
release/scripts/io/netrender/repath.py
release/scripts/modules/add_object_utils.py
release/scripts/modules/blend_render_info.py
release/scripts/modules/rna_info.py
release/scripts/op/object.py
release/scripts/op/object_align.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/op/wm.py
release/scripts/presets/cloth/cotton.py
release/scripts/presets/cloth/denim.py
release/scripts/presets/cloth/leather.py
release/scripts/presets/cloth/rubber.py
release/scripts/presets/cloth/silk.py
release/scripts/presets/ffmpeg/DV.py
release/scripts/presets/ffmpeg/DVD.py
release/scripts/presets/ffmpeg/SVCD.py
release/scripts/presets/ffmpeg/VCD.py
release/scripts/presets/ffmpeg/h264.py
release/scripts/presets/ffmpeg/theora.py
release/scripts/presets/ffmpeg/xvid.py
release/scripts/presets/render/DVCPRO_HD_1080p.py
release/scripts/presets/render/DVCPRO_HD_720p.py
release/scripts/presets/render/HDTV_1080p.py
release/scripts/presets/render/HDTV_720p.py
release/scripts/presets/render/HDV_1080p.py
release/scripts/presets/render/TV_NTSC_16_colon_9.py
release/scripts/presets/render/TV_NTSC_4_colon_3.py
release/scripts/presets/render/TV_PAL_16_colon_9.py
release/scripts/presets/render/TV_PAL_4_colon_3.py
release/scripts/presets/sss/apple.py
release/scripts/presets/sss/chicken.py
release/scripts/presets/sss/cream.py
release/scripts/presets/sss/ketchup.py
release/scripts/presets/sss/marble.py
release/scripts/presets/sss/potato.py
release/scripts/presets/sss/skim_milk.py
release/scripts/presets/sss/skin1.py
release/scripts/presets/sss/skin2.py
release/scripts/presets/sss/whole_milk.py
release/scripts/presets/sunsky/classic.py
release/scripts/presets/sunsky/desert.py
release/scripts/presets/sunsky/mountain.py
release/scripts/templates/operator.py
release/scripts/templates/operator_modal.py
release/scripts/templates/operator_modal_draw.py
release/scripts/templates/operator_modal_view3d.py
release/scripts/templates/operator_uv.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_object.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_physics_cloth.py
release/scripts/ui/properties_physics_common.py
release/scripts/ui/properties_physics_softbody.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_scene.py
release/scripts/ui/properties_texture.py
release/scripts/ui/space_info.py
release/scripts/ui/space_logic.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_time.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_userpref_keymap.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py
release/windows/inno/blender.iss [deleted file]
release/windows/inno/copyright.txt [deleted file]
release/windows/inno/installer.bmp [deleted file]
release/windows/installer/00.checked.bmp [new file with mode: 0644]
release/windows/installer/00.header.bmp [moved from release/windows/inno/header.bmp with 100% similarity]
release/windows/installer/00.installer.ico [moved from release/windows/inno/installer.ico with 100% similarity]
release/windows/installer/00.sconsblender.nsi [new file with mode: 0644]
source/Makefile
source/blender/blenfont/intern/blf_lang.c
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_image.h
source/blender/blenkernel/BKE_key.h
source/blender/blenkernel/BKE_lattice.h
source/blender/blenkernel/BKE_mball.h
source/blender/blenkernel/BKE_multires.h
source/blender/blenkernel/BKE_paint.h
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_texture.h
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/CCGSubSurf.c
source/blender/blenkernel/intern/CCGSubSurf.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/image.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/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/multires.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/scene.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/texture.c
source/blender/blenlib/BLI_cpu.h [new file with mode: 0644]
source/blender/blenlib/BLI_linklist.h
source/blender/blenlib/BLI_math_base.h
source/blender/blenlib/BLI_math_inline.h
source/blender/blenlib/BLI_math_matrix.h
source/blender/blenlib/BLI_path_util.h
source/blender/blenlib/BLI_pbvh.h
source/blender/blenlib/intern/BLI_args.c
source/blender/blenlib/intern/BLI_bfile.c
source/blender/blenlib/intern/BLI_linklist.c
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/cpu.c [new file with mode: 0644]
source/blender/blenlib/intern/math_matrix.c
source/blender/blenlib/intern/noise.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/threads.c
source/blender/blenloader/intern/readfile.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_deps.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/CMakeLists.txt
source/blender/editors/armature/Makefile
source/blender/editors/armature/SConscript
source/blender/editors/armature/armature_intern.h
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/meshlaplacian.h
source/blender/editors/curve/curve_intern.h
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_keyframing.h
source/blender/editors/include/ED_render.h
source/blender/editors/include/ED_screen.h
source/blender/editors/include/ED_screen_types.h
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/area.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/screen/screendump.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/sculpt_paint/sculpt_intern.h
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_file/fsmenu.c
source/blender/editors/space_file/fsmenu.h
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_image/SConscript
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_intern.h
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/space_time.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/util/ed_util.c
source/blender/gpu/GPU_extensions.h
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/intern/anim.c
source/blender/imbuf/intern/targa.c
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_screen_types.h
source/blender/makesdna/DNA_sequence_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_texture_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_group.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.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_sequencer_api.c [new file with mode: 0644]
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/rna_cleanup/rna_booleans.txt [new file with mode: 0644]
source/blender/makesrna/rna_cleanup/rna_cleaner.py [new file with mode: 0755]
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/nodes/intern/CMP_nodes/CMP_colorbalance.c
source/blender/nodes/intern/CMP_nodes/CMP_defocus.c
source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c
source/blender/python/doc/examples/bpy.data.py [new file with mode: 0644]
source/blender/python/doc/examples/mathutils.py
source/blender/python/doc/sphinx_doc_gen.py
source/blender/python/doc/sphinx_doc_gen.sh
source/blender/python/generic/bgl.c
source/blender/python/generic/blf_api.c
source/blender/python/generic/bpy_internal_import.c
source/blender/python/generic/geometry.c
source/blender/python/generic/mathutils.c
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_driver.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_props.c
source/blender/readblenfile/intern/BLO_readblenfile.c
source/blender/render/CMakeLists.txt
source/blender/render/extern/include/RE_pipeline.h
source/blender/render/intern/include/render_types.h
source/blender/render/intern/include/texture.h
source/blender/render/intern/source/convertblender.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/texture.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
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_jobs.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_subwindow.c
source/blender/windowmanager/wm_event_types.h
source/blender/windowmanager/wm_files.h
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/Rasterizer/Makefile
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/Makefile
source/nan_compile.mk
tools/Blender.py
tools/btools.py

index 914547e168e351228ea5de8b33b4fb1b5128ec8b..aec86f7467ab6ddefc981e5536d6a982e0b6a149 100644 (file)
@@ -181,3 +181,20 @@ MACRO(SETUP_LIBLINKS
                TARGET_LINK_LIBRARIES(${target} ${PTHREADS_LIB})
        ENDIF(WIN32)
 ENDMACRO(SETUP_LIBLINKS)
+
+MACRO(TEST_SSE_SUPPORT)
+       INCLUDE(CheckCXXSourceCompiles)
+
+       MESSAGE(STATUS "Detecting SSE support")
+       IF(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
+               SET(CMAKE_REQUIRED_FLAGS "-msse -msse2")
+       ELSEIF(MSVC)
+               SET(CMAKE_REQUIRED_FLAGS "/arch:SSE2")
+       ENDIF()
+
+       CHECK_CXX_SOURCE_COMPILES("
+               #include <xmmintrin.h>
+               int main() { __m128 v = _mm_setzero_ps(); return 0; }"
+       SUPPORT_SSE_BUILD)
+ENDMACRO(TEST_SSE_SUPPORT)
+
index 60543e1939a41155c7cd007060deaf69863e7cfc..29af4db607307c7e481b129e3a10751cd2530d21 100644 (file)
@@ -59,6 +59,10 @@ SET(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib)
 # ...but thats quite involved, make sure this matches the blender version.
 SET(BLENDER_VERSION  2.5)
 
+#-----------------------------------------------------------------------------
+# Load some macros.
+INCLUDE(CMake/macros.cmake)
+
 #-----------------------------------------------------------------------------
 # Set default config options
 
@@ -110,11 +114,11 @@ OPTION(WITH_LZO           "Enable fast LZO compression (used for pointcache)" ON
 OPTION(WITH_LZMA          "Enable best LZMA compression, (used for pointcache)" ON)
 
 # Misc
-OPTION(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" OFF
+OPTION(WITH_RAYOPTIMIZATION    "Enable use of SIMD (SSE) optimizations for the raytracer" ON
 OPTION(WITH_CXX_GUARDEDALLOC "Enable GuardedAlloc for C++ memory allocation tracking" OFF)
 OPTION(WITH_INSTALL       "Install accompanying scripts and language files needed to run blender" ON)
 
-IF (APPLE)
+IF(APPLE)
        OPTION(WITH_COCOA         "Use Cocoa framework instead of deprecated Carbon" ON)
        OPTION(USE_QTKIT          "Use QtKit instead of Carbon quicktime (needed for having partial quicktime for 64bit)" OFF)
        OPTION(WITH_LIBS10.5  "Use 10.5 libs (needed for 64bit builds)" OFF)
@@ -128,6 +132,8 @@ IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
 ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 
+TEST_SSE_SUPPORT()
+
 # disabled for now, not supported
 # OPTION(WITH_WEBPLUGIN     "Enable Web Plugin (Unix only)" OFF)
 
@@ -139,10 +145,6 @@ ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 #
 # When changing any of this remember to update the notes in doc/blender-cmake.txt
 
-#-----------------------------------------------------------------------------
-# Load some macros.
-INCLUDE(CMake/macros.cmake)
-
 #-----------------------------------------------------------------------------
 #Platform specifics
 
@@ -228,6 +230,10 @@ IF(UNIX AND NOT APPLE)
                        /opt/include/OpenEXR
                )
                SET(OPENEXR_LIB Half IlmImf Iex Imath)
+               
+               IF(NOT OPENEXR_INC)
+                       SET(WITH_OPENEXR OFF)
+               ENDIF(NOT OPENEXR_INC)
        ENDIF(WITH_OPENEXR)
 
        IF(WITH_TIFF)
@@ -255,6 +261,7 @@ IF(UNIX AND NOT APPLE)
                SET(FFMPEG_INC ${FFMPEG}/include)
                SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
                SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        ENDIF(WITH_FFMPEG)
 
        IF(WITH_FFTW3)
@@ -304,6 +311,12 @@ IF(UNIX AND NOT APPLE)
 
        SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -Wno-char-subscripts")
 
+       IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+               SET(PLATFORM_CFLAGS " -msse -msse2 ${PLATFORM_CFLAGS}")
+               ADD_DEFINITIONS(-D__SSE__)
+               ADD_DEFINITIONS(-D__MMX__)
+       ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+
        SET(PLATFORM_LINKFLAGS "-pthread")
 
        # Better warnings
@@ -388,6 +401,11 @@ IF(WIN32)
                SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
        ENDIF(WITH_QUICKTIME)
 
+       IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+               ADD_DEFINITIONS(-D__SSE__)
+               ADD_DEFINITIONS(-D__MMX__)
+       ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+
        IF(MSVC)
                IF(CMAKE_CL_64)
                        SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
@@ -707,13 +725,19 @@ IF(APPLE)
                SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
        ENDIF(WITH_OPENEXR)
 
-    # TODO: IF(WITH_LCMS)
+       IF(WITH_LCMS)
+               SET(LCMS ${LIBDIR}/lcms)
+               SET(LCMS_INCLUDE_DIR ${LCMS}/include)
+               SET(LCMS_LIBRARY lcms)
+               SET(LCMS_LIBPATH ${LCMS}/lib)
+       ENDIF(WITH_LCMS)
 
        IF(WITH_FFMPEG)
                SET(FFMPEG ${LIBDIR}/ffmpeg)
                SET(FFMPEG_INC ${FFMPEG}/include)
                SET(FFMPEG_LIB avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg)
                SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+               SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
        ENDIF(WITH_FFMPEG)
 
        SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
@@ -784,6 +808,12 @@ IF(APPLE)
                SET(TIFF_LIBPATH ${TIFF}/lib)
        ENDIF(WITH_TIFF)
 
+       IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+               SET(PLATFORM_CFLAGS " -msse -msse2 ${PLATFORM_CFLAGS}")
+               ADD_DEFINITIONS(-D__SSE__)
+               ADD_DEFINITIONS(-D__MMX__)
+       ENDIF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+
        SET(EXETYPE MACOSX_BUNDLE)
 
        SET(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
index 531d89b644702f73e188a13996630870f3d2e378..26fa5b471981314756816ff81019d8d86e8b2716 100644 (file)
@@ -56,6 +56,8 @@ BlenderEnvironment = tools.Blender.BlenderEnvironment
 btools = tools.btools
 B = tools.Blender
 
+VERSION = tools.btools.VERSION # This is used in creating the local config directories
+
 ### globals ###
 platform = sys.platform
 quickie = None
@@ -193,7 +195,7 @@ if not env['BF_FANCY']:
 # NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
 # TODO: perhaps we need an option (off by default) to not do this altogether...
 if not env['WITHOUT_BF_INSTALL'] and not env['WITHOUT_BF_OVERWRITE_INSTALL']:
-       scriptsDir = env['BF_INSTALLDIR'] + os.sep + '.blender' + os.sep + 'scripts'
+       scriptsDir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts')
        if os.path.isdir(scriptsDir):
                print B.bc.OKGREEN + "Clearing installation directory%s: %s" % (B.bc.ENDC, os.path.abspath(scriptsDir))
                shutil.rmtree(scriptsDir)
@@ -434,9 +436,11 @@ else:
        
        blenderinstall = env.Install(dir=dir, source=B.program_list)
 
-#-- .blender
-#- dont do .blender and scripts for darwin, it is already in the bundle
+#-- local path = config files in install dir: installdir\VERSION
+#- dont do config and scripts for darwin, it is already in the bundle
 dotblendlist = []
+datafileslist = []
+datafilestargetlist = []
 dottargetlist = []
 scriptinstall = []
 
@@ -455,20 +459,29 @@ if  env['OURPLATFORM']!='darwin':
                                        if f.endswith('.ttf'):
                                                continue
                                
-                               dotblendlist.append(os.path.join(dp, f))
-                               if env['WITH_BF_FHS']:  dir= os.path.join(*([BLENDERPATH] + dp.split(os.sep)[2:]))      # skip bin/.blender
-                               else:                                   dir= os.path.join(*([BLENDERPATH] + dp.split(os.sep)[1:]))      # skip bin
-                               
-                               dottargetlist.append(dir + os.sep + f)
-                                       
+                               if 'locale' in dp:
+                                       datafileslist.append(os.path.join(dp,f))
+                                       if env['WITH_BF_FHS']:  dir= os.path.join(*([BLENDERPATH] + ['datafiles'] + dp.split(os.sep)[2:]))      # skip bin/.blender
+                                       else:                                   dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:]))  # skip bin
+                                       datafilestargetlist.append(dir + os.sep + f)
 
+                               else:
+                                       dotblendlist.append(os.path.join(dp, f))
+                                       if env['WITH_BF_FHS']:  dir= os.path.join(*([BLENDERPATH] + ['config'] + dp.split(os.sep)[2:])) # skip bin/.blender
+                                       else:                                   dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['config'] + dp.split(os.sep)[1:]))     # skip bin
+                                       
+                                       dottargetlist.append(dir + os.sep + f)
+                                       
                dotblenderinstall = []
                for targetdir,srcfile in zip(dottargetlist, dotblendlist):
                        td, tf = os.path.split(targetdir)
                        dotblenderinstall.append(env.Install(dir=td, source=srcfile))
+               for targetdir,srcfile in zip(datafilestargetlist, datafileslist):
+                       td, tf = os.path.split(targetdir)
+                       dotblenderinstall.append(env.Install(dir=td, source=srcfile))
                
                if env['WITH_BF_PYTHON']:
-                       #-- .blender/scripts
+                       #-- local/VERSION/scripts
                        scriptpaths=['release/scripts']
                        for scriptpath in scriptpaths:
                                for dp, dn, df in os.walk(scriptpath):
@@ -476,7 +489,7 @@ if  env['OURPLATFORM']!='darwin':
                                                dn.remove('.svn')
                                        
                                        if env['WITH_BF_FHS']:          dir = BLENDERPATH
-                                       else:                                           dir = os.path.join(env['BF_INSTALLDIR'], '.blender')                            
+                                       else:                                           dir = os.path.join(env['BF_INSTALLDIR'], VERSION)                               
                                        dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
                                        
                                        source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
index 2c3d0a7e87e93909be80fb4f0d4e6892e94be46c..1423e8fb3921d466478fc2c8a5eae0fcb36b6e14 100644 (file)
@@ -151,6 +151,13 @@ BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf
 
 WITH_BF_DDS = True
 
+#Color Management System
+WITH_BF_LCMS = False
+BF_LCMS = LIBDIR + '/lcms'
+BF_LCMS_INC = '${BF_LCMS}/include'
+BF_LCMS_LIB = 'lcms'
+BF_LCMS_LIBPATH = '${BF_LCMS}/lib'
+
 WITH_BF_JPEG = True
 BF_JPEG = LIBDIR + '/jpeg'
 BF_JPEG_INC = '${BF_JPEG}/include'
@@ -272,9 +279,9 @@ else:
 
 CFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
 
-CPPFLAGS = ['-fpascal-strings']+ARCH_FLAGS
-CCFLAGS = ['-pipe','-funsigned-char','-fpascal-strings']+ARCH_FLAGS
-CXXFLAGS = ['-pipe','-funsigned-char', '-fpascal-strings']+ARCH_FLAGS
+CPPFLAGS = []+ARCH_FLAGS
+CCFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
+CXXFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
 
 if WITH_GHOST_COCOA==True:
        PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
index 199ea391d4e5b409ccb4d659eafb3590a20d4d46..7a350a74ed5af2fa0445f9be788d8091d30c0009 100644 (file)
@@ -168,7 +168,7 @@ BF_EXPAT_LIBPATH = '/usr/lib'
 WITH_BF_OPENMP = True
 
 #Ray trace optimization
-WITH_BF_RAYOPTIMIZATION = False
+WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
 
 ##
@@ -181,6 +181,9 @@ CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFIL
 
 CPPFLAGS = []
 CXXFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64']
+if WITH_BF_FFMPEG:
+  # libavutil needs UINT64_C()
+  CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
 REL_CFLAGS = ['-O2']
 REL_CCFLAGS = ['-O2']
 ##BF_DEPEND = True
index 8533c8ac9c76c1b47d5cd941211c0930523ccd1d..1650201f8c62d89723518661a814a3f8976df7e6 100644 (file)
@@ -169,7 +169,7 @@ BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader Open
 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib ${BF_ICONV_LIBPATH}'
 
 #Ray trace optimization
-WITH_BF_RAYOPTIMIZATION = False
+WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
 
 CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
index 02bce0cc7f318fd37d2184e58bf54175d008973e..ce34737fd498e0278ef8199078173a86f5303039 100644 (file)
@@ -150,7 +150,7 @@ BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader Open
 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
 
 #Ray trace optimization
-WITH_BF_RAYOPTIMIZATION = False
+WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
 
 WITH_BF_STATICOPENGL = False
index de1daa16e0bd5b3474579c7dd1615fc129f94783..46b9034823cca58d22bc74ada117d080d75bd7be 100644 (file)
@@ -163,7 +163,7 @@ BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader Open
 BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
 
 #Ray trace optimization
-WITH_BF_RAYOPTIMIZATION = False
+WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE','/arch:SSE2']
 
 WITH_BF_STATICOPENGL = False
index 68f00d8eb9b2bf36f0ff33e301c280af2c045bda..43ac5638765912afedb47ae07952acad430e2352 100644 (file)
@@ -1,10 +1,9 @@
-.TH "BLENDER" "1" "June 06, 2010" "Blender 2\&.5\&.2"
+.TH "BLENDER" "1" "June 27, 2010" "Blender Blender 2\&.52 (sub 5) "
+
 .SH NAME
 blender \- a 3D modelling and rendering package
 .SH SYNOPSIS
 .B blender [args ...] [file] [args ...]
-
-
 .br
 .SH DESCRIPTION
 .PP
@@ -15,209 +14,318 @@ Use Blender to create TV commercials, to make technical visualizations, business
 
 http://www.blender.org
 .SH OPTIONS
-.SS "Render options:"
+
+Blender 2.52 (sub 5) Build
+Usage: blender [args ...] [file] [args ...]
+.br
+.SS "Render Options:"
 
 .TP
-.B \-b, \-\-background <file>
-Load <file> in background (often used for UI-less rendering)
+.B \-b or \-\-background <file>
+.br
+Load <file> in background (often used for UI\-less rendering)
+.br
 
 .TP
-.B \-a, \-\-render-anim 
+.B \-a or \-\-render\-anim
+.br
 Render frames from start to end (inclusive)
+.br
 
 .TP
-.B \-S, \-\-scene <name>
+.B \-S or \-\-scene <name>
+.br
 Set the active scene <name> for rendering
+.br
 
 .TP
-.B \-f, \-\-render-frame <frame>
-Render frame <frame> and save it
+.B \-f or \-\-render\-frame <frame>
+.br
+Render frame <frame> and save it.
+.br
++<frame> start frame relative, \-<frame> end frame relative.
+.br
 
 .TP
-.B \-s, \-\-frame-start <frame>
+.B \-s or \-\-frame\-start <frame>
+.br
 Set start to frame <frame> (use before the \-a argument)
+.br
 
 .TP
-.B \-e, \-\-frame-end <frame>
+.B \-e or \-\-frame\-end <frame>
+.br
 Set end to frame <frame> (use before the \-a argument)
+.br
 
 .TP
-.B \-j, \-\-frame-jump <frames>
+.B \-j or \-\-frame\-jump <frames>
+.br
 Set number of frames to step forward after each rendered frame
+.br
 
 .TP
-.B \-o, --render-output <path>
+.B \-o or \-\-render\-output <path>
+.br
 Set the render path and file name.
-.IP
-Use // at the start of the path to render relative to the blend file.
-.IP
+.br
+Use // at the start of the path to
+.br
+    render relative to the blend file.
+.br
 The # characters are replaced by the frame number, and used to define zero padding.
-.IP
+.br
     ani_##_test.png becomes ani_01_test.png
-    test-######.png becomes test-000001.png
+.br
+    test\-######.png becomes test\-000001.png
+.br
     When the filename does not contain #, The suffix #### is added to the filename
-.IP
+.br
 The frame number will be added at the end of the filename.
-    eg: blender -b foobar.blend -o //render_ -F PNG -x 1 -a
+.br
+    eg: blender \-b foobar.blend \-o //render_ \-F PNG \-x 1 \-a
+.br
     //render_ becomes //render_####, writing frames as //render_0001.png//
+.br
 
-.HP
-.B \-E, \-\-engine <engine>
+.TP
+.B \-E or \-\-engine <engine>
+.br
 Specify the render engine
-use \fI\-E help\fR to list available engines
+.br
+use \-E help to list available engines
+.br
+
+.IP
 
-.SS "Format options:"
+.SS "Format Options:"
 
 .TP
-.B \-F, \-\-render-format <format>
-Set the render format, valid options are...
-.IP
-TGA IRIS JPEG MOVIE IRIZ RAWTGA
-AVIRAW AVIJPEG PNG BMP FRAMESERVER
-.IP
+.B \-F or \-\-render\-format <format>
+.br
+Set the render format, Valid options are...
+.br
+    TGA IRIS JPEG MOVIE IRIZ RAWTGA
+.br
+    AVIRAW AVIJPEG PNG BMP FRAMESERVER
+.br
 (formats that can be compiled into blender, not available on all systems)
-.IP
-HDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS
+.br
+    HDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS
+.br
 
 .TP
-.B \-x, \-\-use-extension <bool>
+.B \-x or \-\-use\-extension <bool>
+.br
 Set option to add the file extension to the end of the file
+.br
 
 .TP
-.B \-t, \-\-threads <threads>
+.B \-t or \-\-threads <threads>
+.br
 Use amount of <threads> for rendering in background
-[1-BLENDER_MAX_THREADS], 0 for systems processor count.
+.br
+[1\-BLENDER_MAX_THREADS], 0 for systems processor count.
+.br
+
+.IP
 
-.SS "Animation options:"
+.SS "Animation Playback Options:"
 
 .TP
 .B \-a <options> <file(s)>
+.br
 Playback <file(s)>, only operates this way when not running in background.
-.IP
-\-p <sx> <sy> \-\- Open with lower left corner at <sx>, <sy>
 .br
-\-m  \-\- Read from disk (Don't buffer)
+    \-p <sx> <sy> Open with lower left corner at <sx>, <sy>
+.br
+    \-m Read from disk (Don't buffer)
 .br
-\-f <fps> <fps-base> \-\- Specify FPS to start with
+    \-f <fps> <fps\-base> Specify FPS to start with
 .br
-\-j <frame> \-\- Set frame step to <frame>
+    \-j <frame> Set frame step to <frame>
+.br
+
+.IP
 
-.SS "Window options:"
+.SS "Window Options:"
 
 .TP
-.B \-w, \-\-window-border
+.B \-w or \-\-window\-border
+.br
 Force opening with borders (default)
+.br
 
 .TP
-.B \-W, \-\-window-borderless
+.B \-W or \-\-window\-borderless
+.br
 Force opening with without borders
+.br
 
 .TP
-.B \-p, --window-geometry <sx> <sy> <w> <h>
-Open with lower left corner at <sx>, <sy> and width and height <w>, <h>
+.B \-p or \-\-window\-geometry <sx> <sy> <w> <h>
+.br
+Open with lower left corner at <sx>, <sy> and width and height as <w>, <h>
+.br
+
+.IP
+
+.SS "Game Engine Specific Options:"
 
-.SS "Game Engine specific options:"
-.TP
-.B \-g fixedtime
-Run on 50 hertz without dropping frames
-.TP
-.B \-g vertexarrays
-Use Vertex Arrays for rendering (usually faster)
-.TP
-.B \-g nomipmap
-No Texture Mipmapping
 .TP
-.B \-g linearmipmap
-Linear Texture Mipmapping instead of Nearest (default)
-.SS "Misc options:"
+.B \-g Game Engine specific options
+.br
+\-g fixedtime Run on 50 hertz without dropping frames
+.br
+\-g vertexarrays Use Vertex Arrays for rendering (usually faster)
+.br
+\-g nomipmap No Texture Mipmapping
+.br
+\-g linearmipmap Linear Texture Mipmapping instead of Nearest (default)
+.br
+
+.IP
+
+.SS "Misc Options:"
+
 .TP
-.B \-d, \-\-debug
+.B \-d or \-\-debug
+.br
 Turn debugging on
+.br
+
 .IP
-Prints every operator call and their arguments
+* Prints every operator call and their arguments
+.br
+* Disables mouse grab (to interact with a debugger in some cases)
 .br
-Disables mouse grab (to interact with a debugger in some cases)
+* Keeps python sys.stdin rather then setting it to None
 .br
-Keeps python sys.stdin rather then setting it to None
 
 .TP
-.B \--debug-fpe 
+.B \-\-debug\-fpe
+.br
 Enable floating point exceptions
+.br
 
-.TP
-.B \-noaudio
-Disable audio on systems that support audio
+.IP
 
 .TP
-.B \-nojoystick 
+.B \-nojoystick
+.br
 Disable joystick support
+.br
 
 .TP
-.B \-noglsl 
+.B \-noglsl
+.br
 Disable GLSL shading
+.br
+
+.TP
+.B \-noaudio
+.br
+Force sound system to None
+.br
+
+.TP
+.B \-setaudio
+.br
+Force sound system to a specific device
+.br
+NULL SDL OPENAL JACK
+.br
+
+.IP
+
+.TP
+.B \-h or \-\-help
+.br
+Print this help text and exit
+.br
+
+.IP
 
 .TP
-.B \-y, \-\-enable-autoexec 
+.B \-y or \-\-enable\-autoexec
+.br
 Enable automatic python script execution (default)
+.br
 
 .TP
-.B \-Y, \-\-disable-autoexec 
+.B \-Y or \-\-disable\-autoexec
+.br
 Disable automatic python script execution (pydrivers, pyconstraints, pynodes)
+.br
+
+.IP
 
 .TP
-.B \-P <filename>
+.B \-P or \-\-python <filename>
+.br
 Run the given Python script (filename or Blender Text)
+.br
 
 .TP
-.B \-\-python-console 
+.B \-\-python\-console
+.br
 Run blender with an interactive console
+.br
 
 .TP
-.B \-v, \-\-version 
+.B \-v or \-\-version
+.br
 Print Blender version and exit
+.br
 
 .TP
-.B \-\- 
+.B \-\-
+.br
 Ends option processing, following arguments passed unchanged. Access via python's sys.argv
+.br
 
-.TP
-.B \-h, \-\-help 
-Show a summary of options.
-
-.SH "ENVIRONMENT VARIABLES"
-
-.PP
-\fIHOME\fR
-.RS 4
-Store files such as .blender/ .B.blend .Bfs .Blog here.
-.RE
+.SS "Other Options:"
 
-.PP
-\fIBLENDERPATH\fR
-.RS 4
-System directory to use for data files and scripts.
-For this build of blender the default BLENDERPATH is...
-"/usr/share/blender"
-setting the $BLENDERPATH will override this
-.RE
+.TP
+.B /?
+.br
+Print this help text and exit (windows only)
+.br
 
-.PP
-\fITMP\fR or \fITMPDIR\fR
-.RS 4
-Store temporary files here.
-.RE
+.TP
+.B \-R
+.br
+Register .blend extension (windows only)
+.br
 
-.PP
-\fISDL_AUDIODRIVER\fR
-.RS 4
-LibSDL audio driver - alsa, esd, alsa, dma.
-.RE
+.SS "Argument Parsing:"
 
-.PP
-\fIPYTHONHOME\fR
-.RS 4
-Path to the python directory, eg. /usr/lib/python.
-.RE
+    arguments must be separated by white space. eg
+        "blender \-ba test.blend"
+    ...will ignore the 'a'
+        "blender \-b test.blend \-f8"
+    ...will ignore 8 because there is no space between the \-f and the frame value
+.br
+.SS "Argument Order:"
+
+Arguments are executed in the order they are given. eg
+        "blender \-\-background test.blend \-\-render\-frame 1 \-\-render\-output /tmp"
+    ...will not render to /tmp because '\-\-render\-frame 1' renders before the output path is set
+        "blender \-\-background \-\-render\-output /tmp test.blend \-\-render\-frame 1"
+    ...will not render to /tmp because loading the blend file overwrites the render output that was set
+        "blender \-\-background test.blend \-\-render\-output /tmp \-\-render\-frame 1" works as expected.
+.br
+.br
+.SH "ENVIRONMENT VARIABLES"
+  \fIHOME\fR Store files such as .blender/ .B.blend .Bfs .Blog here.
+  \fIBLENDERPATH\fR System directory to use for data files and scripts.
+                For this build of blender the default \fIBLENDERPATH\fR is...
+                "/usr/local/share/blender/2.5"
+                setting the \fIBLENDERPATH\fR will override this
+  \fITMP\fR or \fITMPDIR\fR Store temporary files here.
+  \fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python.
+.br
+.br
 
 .br
 .SH SEE ALSO
@@ -228,5 +336,3 @@ Path to the python directory, eg. /usr/lib/python.
 This manpage was written for a Debian GNU/Linux system by Daniel Mester
 <mester@uni-bremen.de> and updated by Cyril Brulebois
 <cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.
-
-
diff --git a/doc/blender.1.py b/doc/blender.1.py
new file mode 100644 (file)
index 0000000..c77e5cc
--- /dev/null
@@ -0,0 +1,134 @@
+#!/usr/bin/python
+
+# ##### 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 #####
+
+# <pep8 compliant>
+
+import subprocess
+import os
+
+import time
+import datetime
+
+
+def man_format(data):
+    data = data.replace("-", "\\-")
+    data = data.replace("\t", "    ")
+    # data = data.replace("$", "\\fI")
+    
+    data_ls = []
+    for w in data.split():
+        if w.startswith("$"):
+            w = "\\fI" + w[1:] + "\\fR"
+           
+        data_ls.append(w)
+
+    data = data[:len(data) - len(data.lstrip())] + " ".join(data_ls)
+
+    return data
+
+
+blender_bin = os.path.join(os.path.dirname(__file__), "../blender")
+
+blender_help = subprocess.Popen([blender_bin, "--help"], stdout=subprocess.PIPE).communicate()[0].decode()
+
+blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode().strip()
+blender_version = blender_version.split("Build")[0]
+
+date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
+
+filepath = __file__.replace(".py", "")
+
+file = open(filepath, "w")
+
+fw = file.write
+
+fw('.TH "BLENDER" "1" "%s" "Blender %s"\n' % (date_string, blender_version.replace(".", "\\&.")))
+
+fw('''
+.SH NAME
+blender \- a 3D modelling and rendering package''')
+
+fw('''
+.SH SYNOPSIS
+.B blender [args ...] [file] [args ...]''')
+
+fw('''
+.br
+.SH DESCRIPTION
+.PP
+.B blender
+is a 3D modelling and rendering package. It is the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
+
+Use Blender to create TV commercials, to make technical visualizations, business graphics, to do some morphing, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
+
+http://www.blender.org''')
+
+fw('''
+.SH OPTIONS''')
+
+fw("\n\n")
+
+lines = [line.rstrip() for line in blender_help.split("\n")]
+
+while lines:
+    l = lines.pop(0)
+    if l.startswith("Environment Variables:"):
+        fw('.SH "ENVIRONMENT VARIABLES"\n') 
+    elif l.endswith(":"): # one line
+        fw('.SS "%s"\n\n' % l) 
+    elif l.startswith("-") or l.startswith("/"): # can be multi line
+
+        fw('.TP\n')
+        fw('.B %s\n' % man_format(l))
+        
+        while lines:
+            # line with no 
+            if lines[0].strip() and len(lines[0].lstrip()) == len(lines[0]): # no white space
+                break
+
+            if not l: # second blank line
+                fw('.IP\n')
+            else:
+                fw('.br\n')
+
+            l = lines.pop(0)
+            l = l[1:] # remove first whitespace (tab)
+
+            fw('%s\n' % man_format(l))
+    
+    else:
+        if not l.strip():
+            fw('.br\n')
+        else:
+            fw('%s\n' % man_format(l))
+
+# footer
+
+fw('''
+.br
+.SH SEE ALSO
+.B yafaray(1)
+
+.br
+.SH AUTHORS
+This manpage was written for a Debian GNU/Linux system by Daniel Mester
+<mester@uni-bremen.de> and updated by Cyril Brulebois
+<cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.
+''')
index fa630ce26f0a3a9aad4b14a46a2ce567ee7a4f98..1a7627c9099a10748b25078b89417b87fe06f556 100644 (file)
@@ -42,6 +42,7 @@ SET(SRC
        ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_ISystem.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_ModifierKeys.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_NDOFManager.cpp
+       ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_Path-api.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_Rect.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_System.cpp
        ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_TimerManager.cpp
index a5fec1f101c96932853902f65011487dcfe35f9b..28fa72f970022b2d9a2ac9da4cac54cf10a3dfca 100644 (file)
@@ -836,20 +836,6 @@ extern GHOST_TUns8* GHOST_getClipboard(int selection);
  */
 extern void GHOST_putClipboard(GHOST_TInt8 *buffer, int selection);
 
-/**
- * Determine the base dir in which shared resources are located. It will first try to use
- * "unpack and run" path, then look for properly installed path, not including versioning.
- * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
- */
-extern const GHOST_TUns8* GHOST_getSystemDir();
-
-/**
- * Determine the base dir in which user configuration is stored, not including versioning.
- * If needed, it will create the base directory.
- * @return Unsigned char string pointing to user dir (eg ~/.blender/).
- */
-extern const GHOST_TUns8* GHOST_getUserDir();
-
 
 #ifdef __cplusplus
 }
index 8d80c74e1409c3bbd1e508c2eb9bd6c0ed19b656..47f142e4c8accf351274f40c4007eae5da655453 100644 (file)
@@ -370,12 +370,7 @@ public:
         */
        virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0;
 
-       
-       /***************************************************************************************
-        ** Determine special paths.
-        ***************************************************************************************/
-
-       /**
+                       /**
         * Determine the base dir in which shared resources are located. It will first try to use
         * "unpack and run" path, then look for properly installed path, not including versioning.
         * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
@@ -389,6 +384,11 @@ public:
         */
        virtual const GHOST_TUns8* getUserDir() const = 0;
 
+       /**
+         * Determine the directory of the current binary
+         * @return Unsigned char string pointing to the binary dir
+         */
+        virtual const GHOST_TUns8* getBinaryDir() const = 0;
 protected:
        /**
         * Initialize the system.
diff --git a/intern/ghost/GHOST_Path-api.h b/intern/ghost/GHOST_Path-api.h
new file mode 100644 (file)
index 0000000..c38a4e2
--- /dev/null
@@ -0,0 +1,63 @@
+/**
+ * $Id$
+ *
+ * ***** 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.
+ *
+ * The Original Code is Copyright (C) 2010 by Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef        GHOST_PATH_API_H
+#define GHOST_PATH_API_H
+
+#include "GHOST_Types.h"
+
+#ifdef __cplusplus
+extern "C" { 
+#endif
+
+/**
+ * Determine the base dir in which shared resources are located. It will first try to use
+ * "unpack and run" path, then look for properly installed path, not including versioning.
+ * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
+ */
+extern const GHOST_TUns8* GHOST_getSystemDir();
+
+/**
+ * Determine the base dir in which user configuration is stored, not including versioning.
+ * @return Unsigned char string pointing to user dir (eg ~).
+ */
+extern const GHOST_TUns8* GHOST_getUserDir();
+
+
+/**
+ * Determine the dir in which the binary file is found.
+ * @return Unsigned char string pointing to binary dir (eg ~/usr/local/bin/).
+ */
+extern const GHOST_TUns8* GHOST_getBinaryDir();
+
+#ifdef __cplusplus
+} 
+#endif
+
+#endif
index 9da20200f63bc1a9e226fc9ea679afe501325d53..839d85c9617d13365809b704cc46d5837530c797 100644 (file)
@@ -865,15 +865,3 @@ void GHOST_putClipboard(GHOST_TInt8 *buffer, int selection)
        GHOST_ISystem* system = GHOST_ISystem::getSystem();
        system->putClipboard(buffer, selection);
 }
-
-const GHOST_TUns8* GHOST_getSystemDir()
-{
-       GHOST_ISystem* system = GHOST_ISystem::getSystem();
-       return system->getSystemDir();
-}
-
-const GHOST_TUns8* GHOST_getUserDir()
-{
-       GHOST_ISystem* system = GHOST_ISystem::getSystem();
-       return system->getUserDir();
-}
diff --git a/intern/ghost/intern/GHOST_Path-api.cpp b/intern/ghost/intern/GHOST_Path-api.cpp
new file mode 100644 (file)
index 0000000..b2b7c68
--- /dev/null
@@ -0,0 +1,50 @@
+/**
+ * $Id$
+ *
+ * ***** 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.
+ *
+ * The Original Code is Copyright (C) 2010 by Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "intern/GHOST_Debug.h"
+#include "GHOST_Path-api.h"
+#include "GHOST_ISystem.h"
+
+const GHOST_TUns8* GHOST_getSystemDir()
+{
+       GHOST_ISystem* system = GHOST_ISystem::getSystem();
+       return system ? system->getSystemDir() : NULL;
+}
+
+const GHOST_TUns8* GHOST_getUserDir()
+{
+       GHOST_ISystem* system = GHOST_ISystem::getSystem();
+       return system ? system->getUserDir() : NULL; /* will be NULL in background mode */
+}
+
+const GHOST_TUns8* GHOST_getBinaryDir()
+{
+       GHOST_ISystem* system = GHOST_ISystem::getSystem();
+       return system ? system->getBinaryDir() : NULL; /* will be NULL in background mode */
+}
index d6c6a356323758d3df60a39d6ce2e3ac1a2d8755..a18670738fed9b880d7073a2396e5b859f2eb806 100644 (file)
@@ -297,7 +297,7 @@ public:
           */
          virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0;
 
-       /**
+               /**
         * Determine the base dir in which shared resources are located. It will first try to use
         * "unpack and run" path, then look for properly installed path, not including versioning.
         * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
@@ -311,6 +311,11 @@ public:
         */
        virtual const GHOST_TUns8* getUserDir() const = 0;
 
+       /**
+         * Determine the directory of the current binary
+         * @return Unsigned char string pointing to the binary dir
+         */
+        virtual const GHOST_TUns8* getBinaryDir() const = 0;
 protected:
        /**
         * Initialize the system.
index 5522a0736c4f6b6baa161a11084d3fc18924d75a..ecdc03b43479f0bb8bb9ec4e26f32d0c7e6afdd3 100644 (file)
@@ -1215,9 +1215,10 @@ void GHOST_SystemCarbon::putClipboard(GHOST_TInt8 *buffer, bool selection) const
        }
 }
 
+
 const GHOST_TUns8* GHOST_SystemCarbon::getSystemDir() const
 {
-       return (GHOST_TUns8*)"/Library/Application Support/Blender";
+       return (GHOST_TUns8*)"/Library/Application Support";
 }
 
 const GHOST_TUns8* GHOST_SystemCarbon::getUserDir() const
@@ -1228,9 +1229,24 @@ const GHOST_TUns8* GHOST_SystemCarbon::getUserDir() const
        if (env) {
                strncpy(usrPath, env, 245);
                usrPath[245]=0;
-               strcat(usrPath, "/Library/Application Support/Blender");
+               strcat(usrPath, "/Library/Application Support");
                return (GHOST_TUns8*) usrPath;
        }
        else
                return NULL;
 }
+
+const GHOST_TUns8* GHOST_SystemCarbon::getBinaryDir() const
+{
+       CFURLRef bundleURL;
+       CFStringRef pathStr;
+       static char path[256];
+       CFBundleRef mainBundle = CFBundleGetMainBundle();
+       
+       bundleURL = CFBundleCopyBundleURL(mainBundle);
+       pathStr = CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle);
+       CFStringGetCString(pathStr, path, 255, kCFStringEncodingASCII);
+       CFRelease(pathStr);
+       CFRelease(bundleURL);
+       return (GHOST_TUns8*)path;
+}
index ebd929749b60e7e83dfb4465deb66eb033088f23..723652dc87268b9fc6a4254463d9091dde0e8784 100644 (file)
@@ -190,6 +190,7 @@ public:
         */
        virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
 
+       
        /**
         * Determine the base dir in which shared resources are located. It will first try to use
         * "unpack and run" path, then look for properly installed path, not including versioning.
@@ -204,6 +205,12 @@ public:
         */
        virtual const GHOST_TUns8* getUserDir() const;
 
+       /**
+         * Determine the directory of the current binary
+         * @return Unsigned char string pointing to the binary dir
+         */
+        virtual const GHOST_TUns8* getBinaryDir() const;
+
 protected:
        /**
         * Initializes the system.
index b97c36f04a8e0d2cceb6e00ae5128c264d3cac8e..2e7c9b1d037739cb7f8c27d978312f8b1e2c0505 100644 (file)
@@ -227,6 +227,12 @@ public:
         */
        virtual const GHOST_TUns8* getUserDir() const;
 
+       /**
+         * Determine the directory of the current binary
+         * @return Unsigned char string pointing to the binary dir
+         */
+        virtual const GHOST_TUns8* getBinaryDir() const;
+
        /**
      * Handles a window event. Called by GHOST_WindowCocoa window delegate
      * @param eventType The type of window event
index 2cec24714be82b1383fae0f0aa1356f7b3f4d4ac..f65d4e93d592835c9dd2f205390bd2a9f432f02c 100644 (file)
@@ -1787,22 +1787,16 @@ const GHOST_TUns8* GHOST_SystemCocoa::getSystemDir() const
 {
        static GHOST_TUns8 tempPath[512] = "";
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-       NSFileManager *fileManager;
        NSString *basePath;
        NSArray *paths;
        
        paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSLocalDomainMask, YES);
        
        if ([paths count] > 0)
-               basePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Blender"];
-       else { //Fall back to standard unix path in case of issue
-               basePath = @"/usr/share/blender";
-       }
-       
-       /* Ensure path exists, creates it if needed */
-       fileManager = [NSFileManager defaultManager];
-       if (![fileManager fileExistsAtPath:basePath isDirectory:NULL]) {
-               [fileManager createDirectoryAtPath:basePath attributes:nil];
+               basePath = [paths objectAtIndex:0];
+       else { 
+               [pool drain];
+               return NULL;
        }
        
        strcpy((char*)tempPath, [basePath cStringUsingEncoding:NSASCIIStringEncoding]);
@@ -1815,22 +1809,35 @@ const GHOST_TUns8* GHOST_SystemCocoa::getUserDir() const
 {
        static GHOST_TUns8 tempPath[512] = "";
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
-       NSFileManager *fileManager;
        NSString *basePath;
        NSArray *paths;
 
        paths = NSSearchPathForDirectoriesInDomains(NSApplicationSupportDirectory, NSUserDomainMask, YES);
 
        if ([paths count] > 0)
-               basePath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Blender"];
-       else { //Fall back to HOME in case of issue
-               basePath = [NSHomeDirectory() stringByAppendingPathComponent:@".blender"];
+               basePath = [paths objectAtIndex:0];
+       else { 
+               [pool drain];
+               return NULL;
        }
+
+       strcpy((char*)tempPath, [basePath cStringUsingEncoding:NSASCIIStringEncoding]);
+       
+       [pool drain];
+       return tempPath;
+}
+
+const GHOST_TUns8* GHOST_SystemCocoa::getBinaryDir() const
+{
+       static GHOST_TUns8 tempPath[512] = "";
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       NSString *basePath;
+       
+       basePath = [[NSBundle mainBundle] bundlePath];
        
-       /* Ensure path exists, creates it if needed */
-       fileManager = [NSFileManager defaultManager];
-       if (![fileManager fileExistsAtPath:basePath isDirectory:NULL]) {
-               [fileManager createDirectoryAtPath:basePath attributes:nil];
+       if (basePath == nil) {
+               [pool drain];
+               return NULL;
        }
        
        strcpy((char*)tempPath, [basePath cStringUsingEncoding:NSASCIIStringEncoding]);
index 91c1927f8e7c037ef66cfead19b354d1c001a4d7..da7a0399f41adaa9b39a61468d400c01df097530 100644 (file)
 #include "GHOST_SystemWin32.h"
 #include "GHOST_EventDragnDrop.h"
 
+#define WIN32_LEAN_AND_MEAN
+#ifdef _WIN32_IE
+#undef _WIN32_IE
+#endif
+#define _WIN32_IE 0x0501
+#include <windows.h>
+#include <shlobj.h>
+
 // win64 doesn't define GWL_USERDATA
 #ifdef WIN32
 #ifndef GWL_USERDATA
@@ -1095,10 +1103,36 @@ void GHOST_SystemWin32::putClipboard(GHOST_TInt8 *buffer, bool selection) const
 
 const GHOST_TUns8* GHOST_SystemWin32::getSystemDir() const
 {
+       static char knownpath[MAX_PATH];
+       HRESULT hResult = SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, SHGFP_TYPE_CURRENT, knownpath);
+
+       if (hResult == S_OK)
+       {
+               return (GHOST_TUns8*)knownpath;
+       }
+
        return NULL;
 }
 
 const GHOST_TUns8* GHOST_SystemWin32::getUserDir() const
 {
+       static char knownpath[MAX_PATH];
+       HRESULT hResult = SHGetFolderPath(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, knownpath);
+
+       if (hResult == S_OK)
+       {
+               return (GHOST_TUns8*)knownpath;
+       }
+
+       return NULL;
+}
+
+const GHOST_TUns8* GHOST_SystemWin32::getBinaryDir() const
+{
+       static char fullname[MAX_PATH];
+       if(GetModuleFileName(0, fullname, MAX_PATH)) {
+               return (GHOST_TUns8*)fullname;
+       }
+
        return NULL;
 }
index e65393a4faa704cec0fb5a2d72b280d7520855a5..888d9c0ab3e09c9dc9b6afeefdf62c58a1fe5698 100644 (file)
@@ -186,22 +186,27 @@ public:
         * @return                              No return
         */
        virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
-       
 
        /**
         * Determine the base dir in which shared resources are located. It will first try to use
         * "unpack and run" path, then look for properly installed path, not including versioning.
-        * @return Unsigned char string pointing to system dir (eg /usr/share/blender/).
+        * @return Unsigned char string pointing to system dir (eg /usr/share/).
         */
        virtual const GHOST_TUns8* getSystemDir() const;
 
        /**
         * Determine the base dir in which user configuration is stored, not including versioning.
         * If needed, it will create the base directory.
-        * @return Unsigned char string pointing to user dir (eg ~/.blender/).
+        * @return Unsigned char string pointing to user dir (eg ~/).
         */
         virtual const GHOST_TUns8* getUserDir() const;
 
+        /**
+         * Determine the directory of the current binary
+         * @return Unsigned char string pointing to the binary dir
+         */
+        virtual const GHOST_TUns8* getBinaryDir() const;
+
        /**
         * Creates a drag'n'drop event and pushes it immediately onto the event queue. 
         * Called by GHOST_DropTargetWin32 class.
index 052c868e5e071922ed7a1b5e6253a7c8502b7a95..7644281bcea820283a8091c31b0ab54cc7a35f0e 100644 (file)
@@ -1461,19 +1461,20 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const
 
 const GHOST_TUns8* GHOST_SystemX11::getSystemDir() const
 {
-       return (GHOST_TUns8*)"/usr/share/blender";
+       return (GHOST_TUns8*)"/usr/share/";
 }
 
 const GHOST_TUns8* GHOST_SystemX11::getUserDir() const
 {
-       static char path[256];
        char* env = getenv("HOME");
        if(env) {
-               strncpy(path, env, 245);
-               path[245]=0;
-               strcat(path, "/.blender/");
-               return (GHOST_TUns8*) path;
+               return (GHOST_TUns8*) env;
        } else {
                return NULL;
        }
 }
+
+const GHOST_TUns8* GHOST_SystemX11::getBinaryDir() const
+{
+       return NULL;
+}
\ No newline at end of file
index ee6cbedb2aee88f26d0b2e91aca0ee94b81c06c6..13ad4200ab8d0c2217bf70e613c875597e4ed7c7 100644 (file)
@@ -240,6 +240,12 @@ public:
         */
        const GHOST_TUns8* getUserDir() const;
 
+       /**
+         * Determine the directory of the current binary
+         * @return Unsigned char string pointing to the binary dir
+         */
+        const GHOST_TUns8* getBinaryDir() const;
+
        /**
         * Atom used for ICCCM, WM-spec and Motif.
         * We only need get this atom at the start, it's relative
index abcb8bcd5ccef1ea27f4163edcc8ce28d49f983c..0b22017c92c35351dbd227b3f8a2c9789093fa71 100644 (file)
@@ -732,7 +732,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
 #ifdef MAC_OS_X_VERSION_10_6
                                //10.6 provides Cocoa functions to autoshow menu bar, and to change a window style
                                //Hide menu & dock if needed
-                               if ([[m_window screen] isEqual:[NSScreen mainScreen]])
+                               if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]])
                                {
                                        [NSApp setPresentationOptions:(NSApplicationPresentationHideDock | NSApplicationPresentationAutoHideMenuBar)];
                                }
@@ -743,7 +743,7 @@ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
 #else
                                //With 10.5, we need to create a new window to change its style to borderless
                                //Hide menu & dock if needed
-                               if ([[m_window screen] isEqual:[NSScreen mainScreen]])
+                               if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]])
                                {
                                        //Cocoa function in 10.5 does not allow to set the menu bar in auto-show mode [NSMenu setMenuBarVisible:NO];
                                        //One of the very few 64bit compatible Carbon function
index 23d27e615907615fd57c2123ceb9a3726020d839..2f5e088f4fec26baa71712411be3e7a5cc05f99b 100644 (file)
@@ -38,7 +38,7 @@ CCSRCS += GHOST_EventManager.cpp GHOST_EventPrinter.cpp GHOST_WindowManager.cpp
 CCSRCS += GHOST_ISystem.cpp GHOST_ModifierKeys.cpp GHOST_TimerManager.cpp
 CCSRCS += GHOST_Rect.cpp GHOST_DisplayManager.cpp GHOST_C-api.cpp
 CCSRCS += GHOST_CallbackEventConsumer.cpp
-CCSRCS += GHOST_NDOFManager.cpp
+CCSRCS += GHOST_NDOFManager.cpp GHOST_Path-api.cpp
 
 ifeq ($(OS),$(findstring $(OS), "darwin"))
     ifeq ($(WITH_COCOA), true)
index 426bc7610415ef799fa8fa36ba743567a0bcf878..9cda4375ecc3aab785f6b27da2a554e6f2225310 100644 (file)
@@ -134,7 +134,7 @@ def write_pov(filename, scene=None, info_callback=None):
 
     def exportCamera():
         camera = scene.camera
-        matrix = camera.matrix
+        matrix = camera.matrix_world
 
         # compute resolution
         Qsize = float(render.resolution_x) / float(render.resolution_y)
@@ -155,7 +155,7 @@ def write_pov(filename, scene=None, info_callback=None):
         for ob in lamps:
             lamp = ob.data
 
-            matrix = ob.matrix
+            matrix = ob.matrix_world
 
             color = tuple([c * lamp.energy for c in lamp.color]) # Colour is modified by energy
 
@@ -263,7 +263,7 @@ def write_pov(filename, scene=None, info_callback=None):
 
             writeObjectMaterial(material)
 
-            writeMatrix(ob.matrix)
+            writeMatrix(ob.matrix_world)
 
             file.write('}\n')
 
@@ -292,7 +292,7 @@ def write_pov(filename, scene=None, info_callback=None):
             #  continue
             # me = ob.data
 
-            matrix = ob.matrix
+            matrix = ob.matrix_world
             try:
                 uv_layer = me.active_uv_texture.data
             except:
index e234ab8600c3256e9f9015fe385800ea6137dd38..bfe568153f98010607bd0ed618c8652a93871cf6 100644 (file)
@@ -82,7 +82,7 @@ def create_derived_objects(scene, ob):
         ob.create_dupli_list(scene)
         return True, [(dob.object, dob.matrix) for dob in ob.dupli_list]
     else:
-        return False, [(ob, ob.matrix)]
+        return False, [(ob, ob.matrix_world)]
 
 # also used by X3D exporter
 def free_derived_objects(ob):
@@ -1122,7 +1122,6 @@ class Export3DS(bpy.types.Operator):
     # to the class instance from the operator settings before calling.
 
 
-    # filename = StringProperty(name="File Name", description="File name used for exporting the 3DS file", maxlen= 1024, default= ""),
     filepath = StringProperty(name="File Path", description="Filepath used for exporting the 3DS file", maxlen= 1024, default= "")
     check_existing = BoolProperty(name="Check Existing", description="Check and warn on overwriting existing files", default=True, options={'HIDDEN'})
 
index 967bbf503072428bb9a0f211b183a8ea629076ff..9468cadec83cb3915ea6cf23bf67b8c69bba0ceb 100644 (file)
@@ -528,7 +528,7 @@ def write(filename, batch_objects = None, \
             self.fbxGroupNames = []
             self.fbxParent = None # set later on IF the parent is in the selection.
             if matrixWorld:            self.matrixWorld = GLOBAL_MATRIX * matrixWorld
-            else:                              self.matrixWorld = GLOBAL_MATRIX * ob.matrix
+            else:                              self.matrixWorld = GLOBAL_MATRIX * ob.matrix_world
 #                      else:                           self.matrixWorld = ob.matrixWorld * GLOBAL_MATRIX
             self.__anim_poselist = {} # we should only access this
 
@@ -539,8 +539,7 @@ def write(filename, batch_objects = None, \
                 return self.matrixWorld
 
         def setPoseFrame(self, f):
-            self.__anim_poselist[f] =  self.blenObject.matrix.copy()
-#                      self.__anim_poselist[f] =  self.blenObject.matrixWorld.copy()
+            self.__anim_poselist[f] =  self.blenObject.matrix_world.copy()
 
         def getAnimParRelMatrix(self, frame):
             if self.fbxParent:
@@ -646,7 +645,7 @@ def write(filename, batch_objects = None, \
 
         else:
             # This is bad because we need the parent relative matrix from the fbx parent (if we have one), dont use anymore
-            #if ob and not matrix: matrix = ob.matrixWorld * GLOBAL_MATRIX
+            #if ob and not matrix: matrix = ob.matrix_world * GLOBAL_MATRIX
             if ob and not matrix: raise Exception("error: this should never happen!")
 
             matrix_rot = matrix
@@ -2025,7 +2024,7 @@ def write(filename, batch_objects = None, \
         if ob_base.parent and ob_base.parent.dupli_type != 'NONE':
             continue
 
-        obs = [(ob_base, ob_base.matrix)]
+        obs = [(ob_base, ob_base.matrix_world)]
         if ob_base.dupli_type != 'NONE':
             ob_base.create_dupli_list(scene)
             obs = [(dob.object, dob.matrix) for dob in ob_base.dupli_list]
index 3c82ff5d497db3905d9e260571af4cfc0032a93e..b7de707c9f0c59f0d6da3fa1e4d69c71bb344fe3 100644 (file)
@@ -113,7 +113,7 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
     """
 
     check_vertcount(me, numverts)
-    me.transform(mat_flip * ob.matrix)
+    me.transform(mat_flip * ob.matrix_world)
     f.write(pack(">%df" % (numverts * 3), *[axis for v in me.verts for axis in v.co]))
 
     for frame in range(PREF_STARTFRAME, PREF_ENDFRAME + 1):#in order to start at desired frame
@@ -125,7 +125,7 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
         sce.set_frame(frame)
         me = ob.create_mesh(sce, True, 'PREVIEW')
         check_vertcount(me, numverts)
-        me.transform(mat_flip * ob.matrix)
+        me.transform(mat_flip * ob.matrix_world)
 
         # Write the vertex data
         f.write(pack(">%df" % (numverts * 3), *[axis for v in me.verts for axis in v.co]))
index 40ef68041debf62d4a1a21c5b0e838cb8b611693..4451cb77a1bf88e9f9f37ef27e04c807ce483d1b 100644 (file)
@@ -403,7 +403,7 @@ def write(filepath, objects, scene,
             # XXX debug print
             print(ob_main.name, 'has', len(obs), 'dupli children')
         else:
-            obs = [(ob_main, ob_main.matrix)]
+            obs = [(ob_main, ob_main.matrix_world)]
 
         for ob, ob_mat in obs:
 
index aee565505263f9789af118e6baa49b881e7c6073..09d25b61010f6fd8b62d416696965fba8863afe7 100644 (file)
@@ -111,7 +111,7 @@ def write(filename, scene, ob, \
         raise ("Error, could not get mesh data from active object")
         return
 
-    # mesh.transform(ob.matrixWorld) # XXX
+    # mesh.transform(ob.matrix_world) # XXX
 
     faceUV = (len(mesh.uv_textures) > 0)
     vertexUV = (len(mesh.sticky) > 0)
index 6dc2340ec9355506ff72d80e40652f6108f7f62f..2ade015a1e9610a7b8c73fab65fbcdcb06d5a610 100644 (file)
@@ -237,7 +237,7 @@ class x3d_class:
         lens = min(lens, math.pi)
 
         # get the camera location, subtract 90 degress from X to orient like X3D does
-        # mat = ob.matrixWorld - mat is now passed!
+        # mat = ob.matrix_world - mat is now passed!
 
         loc = self.rotatePointForVRML(mat.translation_part())
         rot = mat.to_euler()
@@ -300,7 +300,7 @@ class x3d_class:
         # note -dz seems to equal om[3][1]
         # note  dy seems to equal om[3][2]
 
-        #location=(ob.matrixWorld*MATWORLD).translation_part() # now passed
+        #location=(ob.matrix_world*MATWORLD).translation_part() # now passed
         location=(mtx*MATWORLD).translation_part()
 
         radius = lamp.distance*math.cos(beamWidth)
@@ -346,7 +346,7 @@ class x3d_class:
             ambi = 0
             ambientIntensity = 0
 
-        # location=(ob.matrixWorld*MATWORLD).translation_part() # now passed
+        # location=(ob.matrix_world*MATWORLD).translation_part() # now passed
         location= (mtx*MATWORLD).translation_part()
 
         self.file.write("<PointLight DEF=\"%s\" " % safeName)
@@ -364,7 +364,7 @@ class x3d_class:
             return
         else:
             dx,dy,dz = self.computeDirection(mtx)
-            # location=(ob.matrixWorld*MATWORLD).translation_part()
+            # location=(ob.matrix_world*MATWORLD).translation_part()
             location=(mtx*MATWORLD).translation_part()
             self.writeIndented("<%s\n" % obname,1)
             self.writeIndented("direction=\"%s %s %s\"\n" % (round(dx,3),round(dy,3),round(dz,3)))
@@ -445,7 +445,7 @@ class x3d_class:
         else:
             bTwoSided=0
 
-        # mtx = ob.matrixWorld * MATWORLD # mtx is now passed
+        # mtx = ob.matrix_world * MATWORLD # mtx is now passed
         mtx = mtx * MATWORLD
 
         loc= mtx.translation_part()
@@ -601,7 +601,7 @@ class x3d_class:
             self.file.write("\">\n")
         else:
             #-- vertices
-            # mesh.transform(ob.matrixWorld)
+            # mesh.transform(ob.matrix_world)
             self.writeIndented("<Coordinate DEF=\"%s%s\" \n" % ("coord_",meshName), 1)
             self.file.write("\t\t\t\tpoint=\"")
             for v in mesh.verts:
index c579f876371efbc20b98f579dbd27fa8b5f8234f..6502dee73f1aaacb50f66b1695a0b21d56925742 100644 (file)
@@ -427,9 +427,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
             '''
 
             if contextMatrix_rot:
-                # ob.matrix = [x for row in contextMatrix_rot for x in row]
-                ob.matrix = contextMatrix_rot
-#                              ob.setMatrix(contextMatrix_rot)
+                ob.matrix_world = contextMatrix_rot
 
             importedObjects.append(ob)
             bmesh.update()
@@ -892,7 +890,7 @@ def load_3ds(filename, context, IMPORT_CONSTRAIN_BOUNDS=10.0, IMAGE_SEARCH=True,
 #                      me = ob.getData(mesh=1)
 #                      me.verts.delete([me.verts[0],])
 #                      if not APPLY_MATRIX:
-#                              me.transform(ob.matrixWorld.copy().invert())
+#                              me.transform(ob.matrix_world.copy().invert())
 
     # Done DUMMYVERT
     """
@@ -950,7 +948,7 @@ def load_3ds(filename, context, IMPORT_CONSTRAIN_BOUNDS=10.0, IMAGE_SEARCH=True,
 #                      SCALE_MAT = Blender.mathutils.Matrix([SCALE,0,0,0],[0,SCALE,0,0],[0,0,SCALE,0],[0,0,0,1])
 
             for ob in importedObjects:
-                ob.setMatrix(ob.matrixWorld * SCALE_MAT)
+                ob.matrix_world =  ob.matrix_world * SCALE_MAT
 
         # Done constraining to bounds.
 
@@ -1013,8 +1011,6 @@ class IMPORT_OT_autodesk_3ds(bpy.types.Operator):
     # to the class instance from the operator settings before calling.
 
     filepath = StringProperty(name="File Path", description="Filepath used for importing the 3DS file", maxlen= 1024, default= "")
-    filename = StringProperty(name="File Name", description="Name of the file.")
-    directory = StringProperty(name="Directory", description="Directory of the file.")
 
 #      size_constraint = FloatProperty(name="Size Constraint", description="Scale the model by 10 until it reacehs the size constraint. Zero Disables.", min=0.0, max=1000.0, soft_min=0.0, soft_max=1000.0, default=10.0),
 #      search_images = BoolProperty(name="Image Search", description="Search subdirectories for any assosiated images (Warning, may be slow)", default=True),
index 324d046e00ffecf59609fc18d9ecba9e0dfdae0d..f227f61a5363e5559b2b9cb64da0af7cca6bfa6c 100644 (file)
@@ -19,6 +19,7 @@
 import sys, os
 import http, http.client, http.server, urllib, socket, socketserver, threading
 import subprocess, shutil, time, hashlib
+import pickle
 import select # for select.error
 
 from netrender.utils import *
@@ -870,14 +871,18 @@ class RenderHandler(http.server.BaseHTTPRequestHandler):
                 self.send_head(http.client.NO_CONTENT)
 
 class RenderMasterServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
-    def __init__(self, address, handler_class, path):
+    def __init__(self, address, handler_class, path, subdir=True):
         super().__init__(address, handler_class)
         self.jobs = []
         self.jobs_map = {}
         self.slaves = []
         self.slaves_map = {}
         self.job_id = 0
-        self.path = path + "master_" + str(os.getpid()) + os.sep
+
+        if subdir:
+            self.path = path + "master_" + str(os.getpid()) + os.sep
+        else:
+            self.path = path
 
         self.slave_timeout = 5 # 5 mins: need a parameter for that
 
@@ -892,6 +897,22 @@ class RenderMasterServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
         if not os.path.exists(self.path):
             os.mkdir(self.path)
 
+    def restore(self, jobs, slaves, balancer = None):
+        self.jobs = jobs
+        self.jobs_map = {}
+        
+        for job in self.jobs:
+            self.jobs_map[job.id] = job
+            self.job_id = max(self.job_id, int(job.id))
+
+        self.slaves = slaves
+        for slave in self.slaves:
+            self.slaves_map[slave.id] = slave
+        
+        if balancer:
+            self.balancer = balancer
+        
+
     def nextJobID(self):
         self.job_id += 1
         return str(self.job_id)
@@ -1010,8 +1031,29 @@ class RenderMasterServer(socketserver.ThreadingMixIn, http.server.HTTPServer):
 def clearMaster(path):
     shutil.rmtree(path)
 
+def createMaster(address, clear, path):
+    filepath = os.path.join(path, "blender_master.data")
+
+    if not clear and os.path.exists(filepath):
+        print("loading saved master:", filepath)
+        with open(filepath, 'rb') as f:
+            path, jobs, slaves = pickle.load(f)
+            
+            httpd = RenderMasterServer(address, RenderHandler, path, subdir=False)
+            httpd.restore(jobs, slaves)
+            
+            return httpd
+
+    return RenderMasterServer(address, RenderHandler, path)
+
+def saveMaster(path, httpd):
+    filepath = os.path.join(path, "blender_master.data")
+    
+    with open(filepath, 'wb') as f:
+        pickle.dump((httpd.path, httpd.jobs, httpd.slaves), f, pickle.HIGHEST_PROTOCOL)
+
 def runMaster(address, broadcast, clear, path, update_stats, test_break):
-        httpd = RenderMasterServer(address, RenderHandler, path)
+        httpd = createMaster(address, clear, path)
         httpd.timeout = 1
         httpd.stats = update_stats
 
@@ -1040,4 +1082,6 @@ def runMaster(address, broadcast, clear, path, update_stats, test_break):
         httpd.server_close()
         if clear:
             clearMaster(httpd.path)
+        else:
+            saveMaster(path, httpd)
 
index 7d39917290679ffea76f98f86b1c93315bc4fb60..7f9befd34fb2d8c45fb68a4e18a813e121240c90 100755 (executable)
@@ -47,7 +47,9 @@ def update(job):
     
     new_path = path + ".remap" + ext 
     
-    all = main_file.filepath == main_file.original_path 
+    # Disable for now. Partial repath should work anyway
+    #all = main_file.filepath != main_file.original_path
+    all = False 
     
     for rfile in job.files[1:]:
         if all or rfile.original_path != rfile.filepath:
index ed64cf9ae2b18b78c20fbe6f9888e54abeb6f011..cef368c529db5fae0522187d0b6d478b3e362594 100644 (file)
@@ -61,7 +61,7 @@ def add_object_data(context, obdata, operator=None):
         base.layers_from_view(context.space_data)
 
 
-    obj_new.matrix = add_object_align_init(context, operator)
+    obj_new.matrix_world = add_object_align_init(context, operator)
 
     obj_act = scene.objects.active
 
index b7018ad6b6407ce15293b5a7ff96c0610f54d3a9..dcd1f9cbee3d2eb7da0fd35f2c27869342d036ca 100755 (executable)
 #     int SDNAnr, nr;
 # } BHead;
 
+
 def read_blend_rend_chunk(path):
 
     import struct
 
-    file = open(path, 'rb')
-    
-    head = file.read(7)
+    blendfile = open(path, 'rb')
+
+    head = blendfile.read(7)
 
     if head[0:2] == b'\x1f\x8b': # gzip magic
         import gzip
-        file.close()
-        file = gzip.open(path, 'rb')
-        head = file.read(7)
+        blendfile.close()
+        blendfile = gzip.open(path, 'rb')
+        head = blendfile.read(7)
 
     if head != b'BLENDER':
         print("not a blend file:", path)
-        file.close()
+        blendfile.close()
         return []
 
-    is_64_bit = (file.read(1) == b'-')
+    is_64_bit = (blendfile.read(1) == b'-')
 
     # true for PPC, false for X86
-    is_big_endian = (file.read(1) == b'V')
+    is_big_endian = (blendfile.read(1) == b'V')
 
     # Now read the bhead chunk!!!
-    file.read(3) # skip the version
+    blendfile.read(3) # skip the version
 
     scenes = []
-    
+
     sizeof_bhead = 24 if is_64_bit else 20
 
-    while file.read(4) == b'REND':
+    while blendfile.read(4) == b'REND':
         sizeof_bhead_left = sizeof_bhead - 4
-        
-        rend_length = struct.unpack('>i' if is_big_endian else '<i', file.read(4))[0]
+
+        struct.unpack('>i' if is_big_endian else '<i', blendfile.read(4))[0]
         sizeof_bhead_left -= 4
 
         # We dont care about the rest of the bhead struct
-        file.read(sizeof_bhead_left)
-        
+        blendfile.read(sizeof_bhead_left)
+
         # Now we want the scene name, start and end frame. this is 32bites long
-        start_frame, end_frame = struct.unpack('>2i' if is_big_endian else '<2i', file.read(8))
+        start_frame, end_frame = struct.unpack('>2i' if is_big_endian else '<2i', blendfile.read(8))
 
-        scene_name = file.read(24)
+        scene_name = blendfile.read(24)
 
         scene_name = scene_name[:scene_name.index(b'\0')]
 
index 0f6d60066a369f9807d1840f76563ebf7c06fbef..9c2a268894967d3e6c4de35420e96f6e7ff5440a 100644 (file)
@@ -631,8 +631,10 @@ if __name__ == "__main__":
         props = [(prop.identifier, prop) for prop in v.properties]
         
         for prop_id, prop in sorted(props):
-            data += "%s.%s:    %s    %s\n" % (struct_id_str, prop.identifier, prop.type, prop.description)
+            data += "%s.%s -> %s:    %s%s    %s\n" % (struct_id_str, prop.identifier, prop.identifier, prop.type, ", (read-only)" if prop.is_readonly else "", prop.description)
 
-
-    text = bpy.data.texts.new(name="api.py")
-    text.from_string(data)
+    if bpy.app.background:
+        print(data)
+    else:
+        text = bpy.data.texts.new(name="api.py")
+        text.from_string(data)
index 9d240fee5c61301c84fa130e56323d979f203e3c..e76218e46370db4f2deebc5e401389d8bca03063 100644 (file)
@@ -473,7 +473,7 @@ class MakeDupliFace(bpy.types.Operator):
                 linked.setdefault(data, []).append(obj)
 
         for data, objects in linked.items():
-            face_verts = [axis for obj in objects for v in matrix_to_quat(obj.matrix) for axis in v]
+            face_verts = [axis for obj in objects for v in matrix_to_quat(obj.matrix_world) for axis in v]
             faces = list(range(int(len(face_verts) / 3)))
 
             mesh = bpy.data.meshes.new(data.name + "_dupli")
index 970eee58d69923f4265debff5c5db0013fbb3459..6e5eef0fbc289a66fb8db1847e77062a5083663a 100644 (file)
@@ -34,7 +34,7 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
     for obj in bpy.context.selected_objects:
         if obj.type == 'MESH':
 
-            bb_world = [obj.matrix * Vector(v[:]) for v in obj.bound_box]
+            bb_world = [obj.matrix_world * Vector(v[:]) for v in obj.bound_box]
 
             Left_Up_Front = bb_world[1]
             Right_Down_Back = bb_world[7]
@@ -95,7 +95,7 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
         if obj.type == 'MESH':
 
             loc_world = obj.location
-            bb_world = [obj.matrix * Vector(v[:]) for v in obj.bound_box]
+            bb_world = [obj.matrix_world * Vector(v[:]) for v in obj.bound_box]
 
             Left_Up_Front = bb_world[1]
             Right_Down_Back = bb_world[7]
index e0854f3720b7b86ce42c8bb0f05702207c7457dc..13bf6244f4dbba3fd549a94c40e75ef47c4fb2f6 100644 (file)
@@ -935,7 +935,7 @@ def main(context, island_margin, projection_limit):
         # Initialize projectVecs
         if USER_VIEW_INIT:
             # Generate Projection
-            projectVecs = [Vector(Window.GetViewVector()) * ob.matrixWorld.copy().invert().rotation_part()] # We add to this allong the way
+            projectVecs = [Vector(Window.GetViewVector()) * ob.matrix_world.copy().invert().rotation_part()] # We add to this allong the way
         else:
             projectVecs = []
 
index 5ef7988722898a31c6af75d9e065a824de43ddb6..ed77f32ff6d7deb4f5034a19fb4c0ee2cff665a6 100644 (file)
@@ -430,6 +430,39 @@ class WM_OT_url_open(bpy.types.Operator):
         return {'FINISHED'}
 
 
+class WM_OT_path_open(bpy.types.Operator):
+    "Open a path in a file browser"
+    bl_idname = "wm.path_open"
+    bl_label = ""
+
+    filepath = StringProperty(name="File Path", maxlen=1024)
+
+    def execute(self, context):
+        import sys
+        import os
+        import subprocess
+
+        filepath = bpy.utils.expandpath(self.properties.filepath)
+        filepath = os.path.normpath(filepath)
+
+        if not os.path.exists(filepath):
+            self.report({'ERROR'}, "File '%s' not found" % filepath)
+            return {'CANCELLED'}
+
+        if sys.platform == 'win32':
+            subprocess.Popen(['start', filepath], shell=True)
+        elif sys.platform == 'darwin':
+            subprocess.Popen(['open', filepath])
+        else:
+            try:
+                subprocess.Popen(['xdg-open', filepath])
+            except OSError:
+                # xdg-open *should* be supported by recent Gnome, KDE, Xfce
+                pass
+
+        return {'FINISHED'}
+
+
 class WM_OT_doc_view(bpy.types.Operator):
     '''Load online reference docs'''
     bl_idname = "wm.doc_view"
@@ -562,6 +595,7 @@ classes = [
     WM_OT_context_modal_mouse,
 
     WM_OT_url_open,
+    WM_OT_path_open,
 
     WM_OT_doc_view,
     WM_OT_doc_edit,
index 7fe8b890b38265d9eb292ccd861235ad685427f8..695050cf1957a66ab9e425f752d9cbfb421cac9f 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.cloth.settings.quality = 5
 bpy.context.cloth.settings.mass = 0.300
 bpy.context.cloth.settings.structural_stiffness = 15.000
index 4cad384a0140a61ca02fa840fb1056607ce87493..bd72fa873da193cd0bc8dba67268a870afc14680 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.cloth.settings.quality = 12
 bpy.context.cloth.settings.mass = 1
 bpy.context.cloth.settings.structural_stiffness = 40
index 11176c7e81489114633694971519d49c51e13c77..b85f504b0bb02689a66ccd1d101d067dd1ef26a4 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.cloth.settings.quality = 15
 bpy.context.cloth.settings.mass = 0.4
 bpy.context.cloth.settings.structural_stiffness = 80
index 101c11b141ab9d167de2fb2a63378a731c6077c3..c2d7625d3339fc61d7e51d0738618b0f8eca5c73 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.active_object.modifiers['Cloth'].settings.quality = 7
 bpy.context.active_object.modifiers['Cloth'].settings.mass = 3
 bpy.context.active_object.modifiers['Cloth'].settings.structural_stiffness = 15
index a0dea5f1fd3fc25b7cf3add7edf1299b5e7e80e6..c2a98c270b82e5bd6f0771df7f1cd42b185ab9ac 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.cloth.settings.quality = 5
 bpy.context.cloth.settings.mass = 0.150
 bpy.context.cloth.settings.structural_stiffness = 5
index db1bc0fac92019213daf77816c1dce87cf17558a..4cdb2f271b984bfb00a150ff8b7a6c0500d2173b 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 is_ntsc = (bpy.context.scene.render.fps != 25)
 
 bpy.context.scene.render.ffmpeg_format = "DV"
index 6ac6c3c5ff7b29fdb8a68aa00a76d78843ce2d33..233bdab4f20f8c94a862e4c5b56ba026a5111e26 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 is_ntsc = (bpy.context.scene.render.fps != 25)
 
 bpy.context.scene.render.ffmpeg_format = "MPEG2"
@@ -15,4 +16,4 @@ bpy.context.scene.render.ffmpeg_maxrate = 9000
 bpy.context.scene.render.ffmpeg_minrate = 0
 bpy.context.scene.render.ffmpeg_buffersize = 224*8
 bpy.context.scene.render.ffmpeg_packetsize = 2048
-bpy.context.scene.render.ffmpeg_muxrate = 10080000
\ No newline at end of file
+bpy.context.scene.render.ffmpeg_muxrate = 10080000
index 1d8752f02d93403f48f11dcf4154302c964ae214..52f938623b89cdc413642bec01e1b84a44b383ae 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 is_ntsc = (bpy.context.scene.render.fps != 25)
 
 bpy.context.scene.render.ffmpeg_format = "MPEG2"
@@ -15,4 +16,4 @@ bpy.context.scene.render.ffmpeg_maxrate = 2516
 bpy.context.scene.render.ffmpeg_minrate = 0
 bpy.context.scene.render.ffmpeg_buffersize = 224*8
 bpy.context.scene.render.ffmpeg_packetsize = 2324
-bpy.context.scene.render.ffmpeg_muxrate = 0
\ No newline at end of file
+bpy.context.scene.render.ffmpeg_muxrate = 0
index 303fd85eefb028cbea2e08c17fc56355173374f3..876fa2d8ba62b93c373c777457a9b986cebf4703 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 is_ntsc = (bpy.context.scene.render.fps != 25)
 
 bpy.context.scene.render.ffmpeg_format = "MPEG1"
@@ -15,4 +16,4 @@ bpy.context.scene.render.ffmpeg_maxrate = 1150
 bpy.context.scene.render.ffmpeg_minrate = 1150
 bpy.context.scene.render.ffmpeg_buffersize = 40*8
 bpy.context.scene.render.ffmpeg_packetsize = 2324
-bpy.context.scene.render.ffmpeg_muxrate = 2352 * 75 * 8
\ No newline at end of file
+bpy.context.scene.render.ffmpeg_muxrate = 2352 * 75 * 8
index e46dcd4617629d5e6cb803b20046d63e62f64aa8..74e6890a5d4ae87fdc88a7c4091544e42cd9fe68 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 is_ntsc = (bpy.context.scene.render.fps != 25)
 
 bpy.context.scene.render.ffmpeg_format = "H264"
@@ -13,4 +14,4 @@ bpy.context.scene.render.ffmpeg_maxrate = 9000
 bpy.context.scene.render.ffmpeg_minrate = 0
 bpy.context.scene.render.ffmpeg_buffersize = 224*8
 bpy.context.scene.render.ffmpeg_packetsize = 2048
-bpy.context.scene.render.ffmpeg_muxrate = 10080000
\ No newline at end of file
+bpy.context.scene.render.ffmpeg_muxrate = 10080000
index bb84d977da3ad7097766d1b1b230e950ad6c72f6..6ce9d4ea7ed600d286402e7aebef119f9de120e3 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 is_ntsc = (bpy.context.scene.render.fps != 25)
 
 bpy.context.scene.render.ffmpeg_format = "OGG"
@@ -13,4 +14,4 @@ bpy.context.scene.render.ffmpeg_maxrate = 9000
 bpy.context.scene.render.ffmpeg_minrate = 0
 bpy.context.scene.render.ffmpeg_buffersize = 224*8
 bpy.context.scene.render.ffmpeg_packetsize = 2048
-bpy.context.scene.render.ffmpeg_muxrate = 10080000
\ No newline at end of file
+bpy.context.scene.render.ffmpeg_muxrate = 10080000
index c0f5a3adb10e36cbf161d982d12179bb03889354..0c8e3989451d92268d9412d428be751492f1a3ef 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 is_ntsc = (bpy.context.scene.render.fps != 25)
 
 bpy.context.scene.render.ffmpeg_format = "AVI"
@@ -13,4 +14,4 @@ bpy.context.scene.render.ffmpeg_maxrate = 9000
 bpy.context.scene.render.ffmpeg_minrate = 0
 bpy.context.scene.render.ffmpeg_buffersize = 224*8
 bpy.context.scene.render.ffmpeg_packetsize = 2048
-bpy.context.scene.render.ffmpeg_muxrate = 10080000
\ No newline at end of file
+bpy.context.scene.render.ffmpeg_muxrate = 10080000
index 27a2233909e15d0eee825d1afae5df160cd4ebab..f97b389795e5a581cbf244573401b6c1dd2803c1 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 1280
 bpy.context.scene.render.resolution_y = 1080
 bpy.context.scene.render.resolution_percentage = 100
index e3ababa6c5f746909ff06ef4f54d43d9e389ce65..dbe4c9243d8c4cfb4b5ec88d85fe6d2558864104 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 960
 bpy.context.scene.render.resolution_y = 720
 bpy.context.scene.render.resolution_percentage = 100
index 7693dae93470345a739f8f63a447c3daaa0b8bb0..32b771dc4a50ca73c13facabfee04525ff012eb8 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 1920
 bpy.context.scene.render.resolution_y = 1080
 bpy.context.scene.render.resolution_percentage = 100
index ee16c1e8b3393eeabdb82e1b97f9d692d2102b2b..c5c81eeb790172fbed7e10292a90ede59d9a6337 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 1280
 bpy.context.scene.render.resolution_y = 720
 bpy.context.scene.render.resolution_percentage = 100
index 8ac369f14a6fe9f5da23e113e3853ef836d7809c..7637648e53a2c1d6efad9a8419918eb0e8123147 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 1440
 bpy.context.scene.render.resolution_y = 1080
 bpy.context.scene.render.resolution_percentage = 100
index 26833ba0c091ebfbdf443496583b91cf9bc700f2..12ecaab4800051fab387df51b443cfc674182c4f 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 720
 bpy.context.scene.render.resolution_y = 480
 bpy.context.scene.render.resolution_percentage = 100
index 219e9b0506dfc9f39d4e5b3705e8a5ed45966167..471c45b04d74ad183a657b5897ccd4ce690bd1d0 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 720
 bpy.context.scene.render.resolution_y = 486
 bpy.context.scene.render.resolution_percentage = 100
index c8aa6616bb001ca0cf74cc8308e0c49b823a723d..2add29e940875f4954b6cd99192f794cf95d2b16 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 720
 bpy.context.scene.render.resolution_y = 576
 bpy.context.scene.render.resolution_percentage = 100
index 45eaaf47e44d0c3a4b245cc0f4886ad9342b53b7..92cb794558e9508ffedf74f479d94746220d5fb0 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.scene.render.resolution_x = 720
 bpy.context.scene.render.resolution_y = 576
 bpy.context.scene.render.resolution_percentage = 100
index 474769cd36fe59750938773c63f3988ffe992eb3..d505be2b43566051f20d8c1679eabd3f0aec1c35 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 11.605, 3.884, 1.754
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.430, 0.210, 0.168
index 6253de093768b822a0912566a10614f839aaeaa3..53e199455c19f57593110ab306cdaa1a7e4569c4 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 9.436, 3.348, 1.790
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.439, 0.216, 0.141
index f0a5292b85c48f8e185793bf43a212e0687c943c..221739a30ab0d324297c9ff6525d424f7132071d 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 15.028, 4.664, 2.541
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.987, 0.943, 0.827
index caece1ea7ca4145540306aa9891a8d13ae458924..96d136dc2711430ccd41901126e566578fdacafc 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 4.762, 0.575, 0.394
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.222, 0.008, 0.002
index ea894f698001456191e628a4d5cb6afd7baaf5f5..cd68fd7d26f3b60f774958808cbaad193d9f0a57 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 8.509, 5.566, 3.951
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.925, 0.905, 0.884
index 89407dff42733dfef2a3d4ea4ead5be41b4df358..7a6c25db83317dc656f4603637e7c316322a398e 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 14.266, 7.228, 2.036
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.855, 0.740, 0.292
index 2e5b19d4f5366f22b3bcad07263c8ddb0470f35b..5be37b820dae23e379e8afc8b1aded77906ab234 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 18.424, 10.443, 3.502
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.889, 0.888, 0.796
index 42fb1fac43a7d2be9e08f65d69f2840650c5bebd..76dc64f61f96d3562b3b51fc4aaabfddf87faf83 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 3.673, 1.367, 0.683
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.574, 0.313, 0.174
index 52b649ecd8f22300d06076843ef6e84deff1cf75..6a72a78263831a7c1fb9775b54f472afe016dd8a 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 4.821, 1.694, 1.090
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.749, 0.571, 0.467
index 4cb6ccf3dcf7926b9973915449cfc1a8740c6fda..59aaa13593382295b17b86ffde3b392d38fc8b7f 100644 (file)
@@ -1,2 +1,3 @@
+import bpy
 bpy.context.active_object.active_material.subsurface_scattering.radius = 10.899, 6.575, 2.508
 bpy.context.active_object.active_material.subsurface_scattering.color = 0.947, 0.931, 0.852
index 9ee35d68dadb7f20cd619aef86076e89e4d03958..4394dcce24247da76debbbe7f1b1bac40acb3906 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.object.data.sky.atmosphere_turbidity = 4.0
 bpy.context.object.data.sky.sky_blend_type = 'ADD'
 bpy.context.object.data.sky.sky_blend = 1.0
index 26ed4527746ef80c7c1e2828e6bdaafe33dd57b8..f68ea23845b204b1e45348e62addf5ebabe5b6fe 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.object.data.sky.atmosphere_turbidity = 6.0
 bpy.context.object.data.sky.sky_blend_type = 'ADD'
 bpy.context.object.data.sky.sky_blend = 1.0
index e35d39440424e25c8272edcd2a37b2ff637eb20f..9b81ffd4399f764fa6ab7d7b9b9ab1913e37625c 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 bpy.context.object.data.sky.atmosphere_turbidity = 2.00000023842
 bpy.context.object.data.sky.sky_blend_type = 'ADD'
 bpy.context.object.data.sky.sky_blend = 1.0
index de181a13c2583ac1684e0276e5cc953a6b160159..e20b92c9b6a48066fd6106ee3438f774e56f030e 100644 (file)
@@ -1,4 +1,3 @@
-
 import bpy
 
 def write_some_data(context, filepath, use_some_setting):
index b2839efabe4feb4f7672319c5f3a723b2eae7dd4..e029d91a7fa8540799e3eeaa9ef7d7c96a05f324 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 from bpy.props import *
 
 class ModalOperator(bpy.types.Operator):
index 98efa38e9eed0e00d8daaa772e8364381ead762b..1f24672346bb0043f35ebcd7e6d770734fb41d74 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 import bgl
 import blf
 
index afe179376edd7eed57cac72f3ef83b9f1b7e725c..da019c2b653e667d0b0613c0ad8da691634a22d0 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 from mathutils import Vector
 from bpy.props import FloatVectorProperty
 
index 36d8333d49d722bf59800a559d49a3677a3fc0b8..1003bd6c58b1cee0c5f3511da07b60c6102dcea5 100644 (file)
@@ -1,3 +1,4 @@
+import bpy
 
 def main(context):
     obj = context.active_object
index c5bf4b8459b354318aea6f1bee27de32d00079a1..e1d6c9c7f040e7086362fed02e680ca03d4ed5f0 100644 (file)
@@ -368,20 +368,35 @@ class DATA_PT_textboxes(DataButtonsPanel):
         text = context.curve
         wide_ui = context.region.width > narrowui
 
-        for box in text.textboxes:
-            split = layout.box().split()
+        split = layout.split()
+        col = split.column()
+        col.operator("font.textbox_add", icon='ZOOMIN')
+        if wide_ui:
+            col = split.column()
+
+        for i, box in enumerate(text.textboxes):
+
+            boxy = layout.box()
+
+            row = boxy.row()
+
+            split = row.split()
 
             col = split.column(align=True)
+
             col.label(text="Dimensions:")
             col.prop(box, "width", text="Width")
             col.prop(box, "height", text="Height")
 
             if wide_ui:
                 col = split.column(align=True)
+
             col.label(text="Offset:")
             col.prop(box, "x", text="X")
             col.prop(box, "y", text="Y")
 
+            row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
+
 
 classes = [
     DATA_PT_context_curve,
index a2637f7924bdfcf2968772adf606b6ebddfdc102..4e60879d6654e1333a4e87f436bcd9816f6114cd 100644 (file)
@@ -155,9 +155,9 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
         ob = context.object
         wide_ui = context.region.width > narrowui
 
-        split = layout.split(percentage=0.8, align=True)
-        split.operator("object.group_link", text="Add to Group")
-        split.operator("object.group_add", text="", icon='ZOOMIN')
+        row = layout.row(align=True)
+        row.operator("object.group_link", text="Add to Group")
+        row.operator("object.group_add", text="", icon='ZOOMIN')
 
         # XXX, this is bad practice, yes, I wrote it :( - campbell
         index = 0
@@ -170,7 +170,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
 
                 row = col.box().row()
                 row.prop(group, "name", text="")
-                row.operator("object.group_remove", text="", icon='X')
+                row.operator("object.group_remove", text="", icon='X', emboss=False)
 
                 split = col.box().split()
 
@@ -214,6 +214,7 @@ class OBJECT_PT_display(ObjectButtonsPanel):
         col.prop(ob, "draw_name", text="Name")
         col.prop(ob, "draw_axis", text="Axis")
         col.prop(ob, "draw_wire", text="Wire")
+        col.prop(ob, "color", text="Object Color")
 
         if wide_ui:
             col = split.column()
index 6288b51020aa84a09303f05279f6f201ada2f910..335bd25b50114ef06ef61a46d79a1d9d274d4895 100644 (file)
@@ -20,6 +20,7 @@
 import bpy
 
 narrowui = bpy.context.user_preferences.view.properties_width_check
+narrowcon = 260
 
 
 class ConstraintButtonsPanel(bpy.types.Panel):
@@ -30,8 +31,9 @@ class ConstraintButtonsPanel(bpy.types.Panel):
     def draw_constraint(self, context, con):
         layout = self.layout
 
-        box = layout.template_constraint(con)
         wide_ui = context.region.width > narrowui
+        compact_con = context.region.width < narrowcon
+        box = layout.template_constraint(con, compact=compact_con)
 
         if box:
             # match enum type to our functions, avoids a lookup table.
index 834e3cf2450a6c62e3d5f5477776b1cbf05879a5..61e1fe81812a3a1556a0356507ee38e3b97e4eef 100644 (file)
@@ -87,7 +87,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
             col = split.column()
 
             col.label(text="Presets:")
-            sub = col.row(align=True).split(percentage=0.75)
+            sub = col.row(align=True)
             sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
             sub.operator("cloth.preset_add", text="", icon="ZOOMIN")
 
index 350b17e6e9f17c840c0020d5ec1cb04977db4397..6d97e82ff41c280a2cc0be6f2af1c7339b2f0bde 100644 (file)
@@ -38,7 +38,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
     col.operator("ptcache.remove", icon='ZOOMOUT', text="")
 
     row = layout.row()
-    if cachetype in {'PSYS', 'HAIR'}:
+    if cachetype in ('PSYS', 'HAIR', 'SMOKE'):
         row.prop(cache, "external")
 
     if cache.external:
index 43404a5ba8bd8773af07c8e484d17bb310457cdb..60149cf533b4ca3caed4cbd1f980fa1b9803c0ae 100644 (file)
@@ -186,10 +186,13 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
         sub.active = softbody.stiff_quads
         sub.prop(softbody, "shear")
 
-        col.prop(softbody, "new_aero", text="Aero")
-        sub = col.column()
-        sub.enabled = softbody.new_aero
-        sub.prop(softbody, "aero", text="Factor")
+        col.label(text="Aerodynamics:")
+        col.row().prop(softbody, "aerodynamics_type", expand=True)
+        col.prop(softbody, "aero", text="Factor")
+
+        #sub = col.column()
+        #sub.enabled = softbody.aero > 0
+
 
         col.label(text="Collision:")
         col.prop(softbody, "edge_collision", text="Edge")
index 8bbe11a5f9094867091682734bbe4b2b08dde431..829416b86d3b9c37074d4b3470a2874ca257b5b3 100644 (file)
@@ -522,6 +522,7 @@ class RENDER_PT_motion_blur(RenderButtonsPanel):
 
         row = layout.row()
         row.prop(rd, "motion_blur_samples")
+        row.prop(rd, "motion_blur_shutter")
 
 
 class RENDER_PT_dimensions(RenderButtonsPanel):
@@ -535,10 +536,9 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
         rd = scene.render
         wide_ui = context.region.width > narrowui
 
-        row = layout.row().split()
-        sub = row.row(align=True).split(percentage=0.75)
-        sub.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label)
-        sub.operator("render.preset_add", text="", icon="ZOOMIN")
+        row = layout.row(align=True)
+        row.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label)
+        row.operator("render.preset_add", text="", icon="ZOOMIN")
 
         split = layout.split()
 
index 4319711d05e73ac4190dd9eb2ed2289852d5376a..06ad1eda8356d5d1399b1fca707285c35b0d196f 100644 (file)
@@ -230,8 +230,6 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
     bl_label = "Export Keying Set..."
 
     filepath = bpy.props.StringProperty(name="File Path", description="Filepath to write file to.")
-    filename = bpy.props.StringProperty(name="File Name", description="Name of the file.")
-    directory = bpy.props.StringProperty(name="Directory", description="Directory of the file.")
     filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
     filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
     filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
index eb1c547e4191ef86d6bb3bc30b44d0dd00a4e8a2..86f2d867d41aa940dafa2a5f1450a429bcdcde59 100644 (file)
@@ -204,6 +204,7 @@ class TEXTURE_PT_colors(TextureButtonsPanel):
         col.label(text="Adjust:")
         col.prop(tex, "brightness")
         col.prop(tex, "contrast")
+        col.prop(tex, "saturation")
 
 # Texture Slot Panels #
 
index 5ed6043cbe7b0b6b61c5506238c8fd7b97b8ecea..cc9e47905f9e60daf314e423ca36b31834d0e191 100644 (file)
@@ -124,27 +124,6 @@ class INFO_MT_file(bpy.types.Menu):
         layout.operator("wm.exit_blender", text="Quit", icon='QUIT')
 
 
-class INFO_MT_file_open_recent(bpy.types.Menu):
-    bl_idname = "INFO_MT_file_open_recent"
-    bl_label = "Open Recent..."
-
-    def draw(self, context):
-        import os
-        layout = self.layout
-        layout.operator_context = 'EXEC_AREA'
-
-        filepath = os.path.join(bpy.app.home, ".Blog")
-
-        if os.path.isfile(filepath):
-            file = open(filepath, "rU")
-            for line in file:
-                line = line.rstrip()
-                layout.operator("wm.open_mainfile", text=line, icon='FILE_BLEND').filepath = line
-            file.close()
-        else:
-            layout.label(text='No recent files')
-
-
 class INFO_MT_file_import(bpy.types.Menu):
     bl_idname = "INFO_MT_file_import"
     bl_label = "Import"
@@ -212,6 +191,7 @@ class INFO_MT_curve_add(bpy.types.Menu):
         layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text="Nurbs Circle")
         layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path")
 
+
 class INFO_MT_surface_add(bpy.types.Menu):
     bl_idname = "INFO_MT_surface_add"
     bl_label = "Surface"
@@ -226,6 +206,7 @@ class INFO_MT_surface_add(bpy.types.Menu):
         layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
         layout.operator("surface.primitive_nurbs_surface_donut_add", icon='SURFACE_NDONUT', text="NURBS Torus")
 
+
 class INFO_MT_armature_add(bpy.types.Menu):
     bl_idname = "INFO_MT_armature_add"
     bl_label = "Armature"
@@ -374,7 +355,6 @@ class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
 classes = [
     INFO_HT_header,
     INFO_MT_file,
-    INFO_MT_file_open_recent,
     INFO_MT_file_import,
     INFO_MT_file_export,
     INFO_MT_file_external_data,
index c6b5092b6364816a5d0b255c73242daac0d1d211..a01a5ce63050c9051eac486c499801bf57cc38e9 100644 (file)
@@ -35,16 +35,17 @@ class LOGIC_PT_properties(bpy.types.Panel):
         ob = context.active_object
         game = ob.game
 
-        layout.operator("object.game_property_new", text="Add Game Property")
+        layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN')
 
         for i, prop in enumerate(game.properties):
 
-            row = layout.row(align=True)
+            box = layout.box()
+            row = box.row()
             row.prop(prop, "name", text="")
             row.prop(prop, "type", text="")
             row.prop(prop, "value", text="", toggle=True) # we dont care about the type. rna will display correctly
             row.prop(prop, "debug", text="", toggle=True, icon='INFO')
-            row.operator("object.game_property_remove", text="", icon='X').index = i
+            row.operator("object.game_property_remove", text="", icon='X', emboss=False).index = i
 
 
 class LOGIC_MT_logicbricks_add(bpy.types.Menu):
index befb05cff441652b672bf5b49acb6d3c90086a3e..5f014f639e17cbf7c9f4b21bb3611fe9c598a13e 100644 (file)
@@ -69,6 +69,14 @@ class SEQUENCER_HT_header(bpy.types.Header):
         else:
             layout.prop(st, "display_channel", text="Channel")
 
+            ed = context.scene.sequence_editor
+            if ed:
+                row = layout.row(align=True)
+                row.prop(ed, "show_overlay", text="", icon='GHOST_ENABLED')
+                if ed.show_overlay:
+                    row.prop(ed, "overlay_frame", text="")
+                    row.prop(ed, "overlay_lock", text="", icon='LOCKED')
+
 
 class SEQUENCER_MT_view_toggle(bpy.types.Menu):
     bl_label = "View Type"
@@ -126,6 +134,10 @@ class SEQUENCER_MT_view(bpy.types.Menu):
             layout.operator_context = 'INVOKE_REGION_PREVIEW'
             layout.operator("sequencer.view_all_preview", text='Fit preview in window')
             layout.operator_context = 'INVOKE_DEFAULT'
+
+            # # XXX, invokes in the header view
+            # layout.operator("sequencer.view_ghost_border", text='Overlay Border')
+
         layout.operator("sequencer.view_selected")
 
         layout.prop(st, "draw_frames")
@@ -279,6 +291,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
 
         layout.separator()
         layout.operator("sequencer.reload")
+        layout.operator("sequencer.reassign_inputs")
         layout.separator()
         layout.operator("sequencer.lock")
         layout.operator("sequencer.unlock")
@@ -291,6 +304,10 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
 
         layout.operator_menu_enum("sequencer.swap", "side")
 
+        layout.separator()
+
+        layout.operator("sequencer.swap_data")
+
 
 class SequencerButtonsPanel(bpy.types.Panel):
     bl_space_type = 'SEQUENCE_EDITOR'
@@ -347,15 +364,14 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
 
         row = layout.row()
         row.prop(strip, "lock")
-        row.prop(strip, "frame_locked", text="Frame Lock")
 
         col = layout.column()
         col.enabled = not strip.lock
         col.prop(strip, "channel")
         col.prop(strip, "frame_start")
         subrow = col.split(percentage=0.66)
-        subrow.prop(strip, "length")
-        subrow.label(text="%.2f sec" % (strip.length / (render.fps / render.fps_base)))
+        subrow.prop(strip, "frame_final_length")
+        subrow.label(text="%.2f sec" % (strip.frame_final_length / (render.fps / render.fps_base)))
 
         col = layout.column(align=True)
         col.label(text="Offset:")
@@ -741,19 +757,19 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel):
         col.prop(strip, "convert_float")
 
         layout.prop(strip, "use_color_balance")
-        if strip.color_balance: # TODO - need to add this somehow
+        if strip.use_color_balance and strip.color_balance: # TODO - need to add this somehow
             row = layout.row()
             row.active = strip.use_color_balance
             col = row.column()
-            col.template_color_wheel(strip.color_balance, "lift", value_slider=False)
+            col.template_color_wheel(strip.color_balance, "lift", value_slider=False, cubic=True)
             col.row().prop(strip.color_balance, "lift")
             col.prop(strip.color_balance, "inverse_lift", text="Inverse")
             col = row.column()
-            col.template_color_wheel(strip.color_balance, "gamma", value_slider=False)
+            col.template_color_wheel(strip.color_balance, "gamma", value_slider=False, lock_luminosity=True, cubic=True)
             col.row().prop(strip.color_balance, "gamma")
             col.prop(strip.color_balance, "inverse_gamma", text="Inverse")
             col = row.column()
-            col.template_color_wheel(strip.color_balance, "gain", value_slider=False)
+            col.template_color_wheel(strip.color_balance, "gain", value_slider=False, lock_luminosity=True, cubic=True)
             col.row().prop(strip.color_balance, "gain")
             col.prop(strip.color_balance, "inverse_gain", text="Inverse")
 
index 00bdcf785faf72bc92b2d54f644263c5857e25f4..042e4dbc015723d829d50908935a1b9f64f7f100 100644 (file)
@@ -100,9 +100,33 @@ class TIME_MT_view(bpy.types.Menu):
 
         layout.separator()
 
+        layout.menu("TIME_MT_cache")
+
+        layout.separator()
+
         layout.operator("marker.camera_bind")
 
 
+class TIME_MT_cache(bpy.types.Menu):
+    bl_label = "Cache"
+
+    def draw(self, context):
+        layout = self.layout
+
+        st = context.space_data
+
+        layout.prop(st, "show_cache")
+
+        layout.separator()
+
+        col = layout.column()
+        col.enabled = st.show_cache
+        col.prop(st, "cache_softbody")
+        col.prop(st, "cache_particles")
+        col.prop(st, "cache_cloth")
+        col.prop(st, "cache_smoke")
+
+
 class TIME_MT_frame(bpy.types.Menu):
     bl_label = "Frame"
 
@@ -171,6 +195,7 @@ class TIME_MT_autokey(bpy.types.Menu):
 classes = [
     TIME_HT_header,
     TIME_MT_view,
+    TIME_MT_cache,
     TIME_MT_frame,
     TIME_MT_autokey,
     TIME_MT_playback]
index e3287b0a946546d4a40bd26515b21b260ed862a6..a4be17ce4ba97062b82660da4cbf2c532fadecb5 100644 (file)
@@ -25,19 +25,28 @@ import shutil
 def ui_items_general(col, context):
     """ General UI Theme Settings (User Interface)
     """
+
     row = col.row()
-    sub = row.column()
-    sub.prop(context, "outline")
-    sub.prop(context, "item", slider=True)
-    sub = row.column()
-    sub.prop(context, "inner", slider=True)
-    sub.prop(context, "inner_sel", slider=True)
-    sub = row.column()
-    sub.prop(context, "text")
-    sub.prop(context, "text_sel")
-    sub = row.column()
-    sub.prop(context, "shaded")
-    subsub = sub.column(align=True)
+
+    subsplit = row.split(percentage=0.95)
+
+    padding = subsplit.split(percentage=0.15)
+    colsub = padding.column()
+    colsub = padding.column()
+    colsub.row().prop(context, "outline")
+    colsub.row().prop(context, "item", slider=True)
+    colsub.row().prop(context, "inner", slider=True)
+    colsub.row().prop(context, "inner_sel", slider=True)
+
+    subsplit = row.split(percentage=0.85)
+
+    padding = subsplit.split(percentage=0.15)
+    colsub = padding.column()
+    colsub = padding.column()
+    colsub.row().prop(context, "text")
+    colsub.row().prop(context, "text_sel")
+    colsub.prop(context, "shaded")
+    subsub = colsub.column(align=True)
     subsub.active = context.shaded
     subsub.prop(context, "shadetop")
     subsub.prop(context, "shadedown")
@@ -482,6 +491,36 @@ class USERPREF_PT_theme(bpy.types.Panel):
     bl_region_type = 'WINDOW'
     bl_show_header = False
 
+    @staticmethod
+    def _theme_generic(split, themedata):
+
+        row = split.row()
+
+        subsplit = row.split(percentage=0.95)
+
+        padding1 = subsplit.split(percentage=0.15)
+        padding1.column()
+
+        subsplit = row.split(percentage=0.85)
+
+        padding2 = subsplit.split(percentage=0.15)
+        padding2.column()
+
+        colsub_pair = padding1.column(), padding2.column()
+
+        props_type = {}
+
+        for i, prop in enumerate(themedata.rna_type.properties):
+            attr = prop.identifier
+            if attr == "rna_type":
+                continue
+
+            props_type.setdefault((prop.type, prop.subtype), []).append(prop.identifier)
+
+        for props_type, props_ls in sorted(props_type.items()):
+            for i, attr in enumerate(props_ls):
+                colsub_pair[i % 2].row().prop(themedata, attr)
+
     def poll(self, context):
         userpref = context.user_preferences
         return (userpref.active_section == 'THEMES')
@@ -494,6 +533,12 @@ class USERPREF_PT_theme(bpy.types.Panel):
         split_themes = layout.split(percentage=0.2)
         split_themes.prop(theme, "theme_area", expand=True)
 
+        split = layout.split(percentage=0.4)
+
+
+        layout.separator()
+        layout.separator()
+
         split = split_themes.split()
 
         if theme.theme_area == 'USER_INTERFACE':
@@ -567,388 +612,39 @@ class USERPREF_PT_theme(bpy.types.Panel):
             col.label(text="State:")
 
             row = col.row()
-            sub = row.column()
-            sub.prop(ui, "inner_anim")
-            sub.prop(ui, "inner_anim_sel")
-            sub = row.column()
-            sub.prop(ui, "inner_driven")
-            sub.prop(ui, "inner_driven_sel")
-            sub = row.column()
-            sub.prop(ui, "inner_key")
-            sub.prop(ui, "inner_key_sel")
-            sub = row.column()
-            sub.prop(ui, "blend")
 
-            ui = theme.user_interface
-            col.separator()
-            col.separator()
-            col.prop(ui, "icon_file")
-
-            layout.separator()
-            layout.separator()
+            subsplit = row.split(percentage=0.95)
 
+            padding = subsplit.split(percentage=0.15)
+            colsub = padding.column()
+            colsub = padding.column()
+            colsub.row().prop(ui, "inner_anim")
+            colsub.row().prop(ui, "inner_anim_sel")
+            colsub.row().prop(ui, "inner_driven")
+            colsub.row().prop(ui, "inner_driven_sel")
 
-        elif theme.theme_area == 'VIEW_3D':
-            v3d = theme.view_3d
+            subsplit = row.split(percentage=0.85)
 
-            col = split.column()
-            col.prop(v3d, "back")
-            col.prop(v3d, "button")
-            col.prop(v3d, "button_title")
-            col.prop(v3d, "button_text")
-            col.prop(v3d, "header")
-
-            col = split.column()
-            col.prop(v3d, "grid")
-            col.prop(v3d, "wire")
-            col.prop(v3d, "lamp", slider=True)
-            col.prop(v3d, "editmesh_active", slider=True)
+            padding = subsplit.split(percentage=0.15)
+            colsub = padding.column()
+            colsub = padding.column()
+            colsub.row().prop(ui, "inner_key")
+            colsub.row().prop(ui, "inner_key_sel")
+            colsub.row().prop(ui, "blend")
 
-            col = split.column()
-            col.prop(v3d, "object_selected")
-            col.prop(v3d, "object_active")
-            col.prop(v3d, "object_grouped")
-            col.prop(v3d, "object_grouped_active")
-            col.prop(v3d, "transform")
-            col.prop(v3d, "nurb_uline")
-            col.prop(v3d, "nurb_vline")
-            col.prop(v3d, "nurb_sel_uline")
-            col.prop(v3d, "nurb_sel_vline")
-            col.prop(v3d, "handle_free")
-            col.prop(v3d, "handle_auto")
-            col.prop(v3d, "handle_vect")
-            col.prop(v3d, "handle_align")
-            col.prop(v3d, "handle_sel_free")
-            col.prop(v3d, "handle_sel_auto")
-            col.prop(v3d, "handle_sel_vect")
-            col.prop(v3d, "handle_sel_align")
-            col.prop(v3d, "act_spline")
-            col.prop(v3d, "lastsel_point")
-
-            col = split.column()
-            col.prop(v3d, "vertex")
-            col.prop(v3d, "face", slider=True)
-            col.prop(v3d, "normal")
-            col.prop(v3d, "vertex_normal")
-            col.prop(v3d, "bone_solid")
-            col.prop(v3d, "bone_pose")
-            col.prop(v3d, "edge_seam")
-            col.prop(v3d, "edge_select")
-            col.prop(v3d, "edge_facesel")
-            col.prop(v3d, "edge_sharp")
-            col.prop(v3d, "edge_crease")
-
-        elif theme.theme_area == 'GRAPH_EDITOR':
-            graph = theme.graph_editor
-
-            col = split.column()
-            col.prop(graph, "back")
-            col.prop(graph, "button")
-            col.prop(graph, "button_title")
-            col.prop(graph, "button_text")
 
-            col = split.column()
-            col.prop(graph, "header")
-            col.prop(graph, "grid")
-            col.prop(graph, "list")
-            col.prop(graph, "channel_group")
-
-            col = split.column()
-            col.prop(graph, "active_channels_group")
-            col.prop(graph, "dopesheet_channel")
-            col.prop(graph, "dopesheet_subchannel")
-            col.prop(graph, "frame_current")
-
-            col = split.column()
-            col.prop(graph, "vertex")
-            col.prop(graph, "handle_vertex")
-            col.prop(graph, "handle_vertex_select")
-            col.separator()
-            col.prop(graph, "handle_vertex_size")
+            ui = theme.user_interface
             col.separator()
             col.separator()
-            col.prop(graph, "handle_free")
-            col.prop(graph, "handle_auto")
-            col.prop(graph, "handle_vect")
-            col.prop(graph, "handle_align")
-            col.prop(graph, "handle_sel_free")
-            col.prop(graph, "handle_sel_auto")
-            col.prop(graph, "handle_sel_vect")
-            col.prop(graph, "handle_sel_align")
-
-        elif theme.theme_area == 'FILE_BROWSER':
-            file_browse = theme.file_browser
-
-            col = split.column()
-            col.prop(file_browse, "back")
-            col.prop(file_browse, "text")
-            col.prop(file_browse, "text_hi")
-
-            col = split.column()
-            col.prop(file_browse, "header")
-            col.prop(file_browse, "list")
-
-            col = split.column()
-            col.prop(file_browse, "selected_file")
-            col.prop(file_browse, "tiles")
-
-            col = split.column()
-            col.prop(file_browse, "active_file")
-            col.prop(file_browse, "active_file_text")
-
-        elif theme.theme_area == 'NLA_EDITOR':
-            nla = theme.nla_editor
-
-            col = split.column()
-            col.prop(nla, "back")
-            col.prop(nla, "button")
-            col.prop(nla, "button_title")
-
-            col = split.column()
-            col.prop(nla, "button_text")
-            col.prop(nla, "text")
-            col.prop(nla, "header")
-
-            col = split.column()
-            col.prop(nla, "grid")
-            col.prop(nla, "bars")
-            col.prop(nla, "bars_selected")
-
-            col = split.column()
-            col.prop(nla, "strips")
-            col.prop(nla, "strips_selected")
-            col.prop(nla, "frame_current")
-
-        elif theme.theme_area == 'DOPESHEET_EDITOR':
-            dope = theme.dopesheet_editor
-
-            col = split.column()
-            col.prop(dope, "back")
-            col.prop(dope, "list")
-            col.prop(dope, "text")
-            col.prop(dope, "header")
-
-            col = split.column()
-            col.prop(dope, "grid")
-            col.prop(dope, "channels")
-            col.prop(dope, "channels_selected")
-            col.prop(dope, "channel_group")
-
-            col = split.column()
-            col.prop(dope, "active_channels_group")
-            col.prop(dope, "long_key")
-            col.prop(dope, "long_key_selected")
-
-            col = split.column()
-            col.prop(dope, "frame_current")
-            col.prop(dope, "dopesheet_channel")
-            col.prop(dope, "dopesheet_subchannel")
-
-        elif theme.theme_area == 'IMAGE_EDITOR':
-            image = theme.image_editor
-
-            col = split.column()
-            col.prop(image, "back")
-            col.prop(image, "scope_back")
-            col.prop(image, "button")
-
-            col = split.column()
-            col.prop(image, "button_title")
-            col.prop(image, "button_text")
-
-            col = split.column()
-            col.prop(image, "header")
-
-            col = split.column()
-            col.prop(image, "editmesh_active", slider=True)
-
-        elif theme.theme_area == 'SEQUENCE_EDITOR':
-            seq = theme.sequence_editor
-
-            col = split.column()
-            col.prop(seq, "back")
-            col.prop(seq, "button")
-            col.prop(seq, "button_title")
-            col.prop(seq, "button_text")
-            col.prop(seq, "text")
-
-            col = split.column()
-            col.prop(seq, "header")
-            col.prop(seq, "grid")
-            col.prop(seq, "movie_strip")
-            col.prop(seq, "image_strip")
-            col.prop(seq, "scene_strip")
-
-            col = split.column()
-            col.prop(seq, "audio_strip")
-            col.prop(seq, "effect_strip")
-            col.prop(seq, "plugin_strip")
-            col.prop(seq, "transition_strip")
-
-            col = split.column()
-            col.prop(seq, "meta_strip")
-            col.prop(seq, "frame_current")
-            col.prop(seq, "keyframe")
-            col.prop(seq, "draw_action")
-
-        elif theme.theme_area == 'PROPERTIES':
-            prop = theme.properties
 
-            col = split.column()
-            col.prop(prop, "back")
-
-            col = split.column()
-            col.prop(prop, "title")
-
-            col = split.column()
-            col.prop(prop, "text")
-
-            col = split.column()
-            col.prop(prop, "header")
-
-        elif theme.theme_area == 'TEXT_EDITOR':
-            text = theme.text_editor
-
-            col = split.column()
-            col.prop(text, "back")
-            col.prop(text, "button")
-            col.prop(text, "button_title")
-            col.prop(text, "button_text")
-
-            col = split.column()
-            col.prop(text, "text")
-            col.prop(text, "text_hi")
-            col.prop(text, "header")
-            col.prop(text, "line_numbers_background")
-
-            col = split.column()
-            col.prop(text, "selected_text")
-            col.prop(text, "cursor")
-            col.prop(text, "syntax_builtin")
-            col.prop(text, "syntax_special")
-
-            col = split.column()
-            col.prop(text, "syntax_comment")
-            col.prop(text, "syntax_string")
-            col.prop(text, "syntax_numbers")
-
-        elif theme.theme_area == 'TIMELINE':
-            time = theme.timeline
-
-            col = split.column()
-            col.prop(time, "back")
-            col.prop(time, "text")
-
-            col = split.column()
-            col.prop(time, "header")
-
-            col = split.column()
-            col.prop(time, "grid")
-
-            col = split.column()
-            col.prop(time, "frame_current")
-
-        elif theme.theme_area == 'NODE_EDITOR':
-            node = theme.node_editor
-
-            col = split.column()
-            col.prop(node, "back")
-            col.prop(node, "button")
-            col.prop(node, "button_title")
-            col.prop(node, "button_text")
-
-            col = split.column()
-            col.prop(node, "text")
-            col.prop(node, "text_hi")
-            col.prop(node, "header")
-            col.prop(node, "wires")
-
-            col = split.column()
-            col.prop(node, "wire_select")
-            col.prop(node, "selected_text")
-            col.prop(node, "node_backdrop", slider=True)
-            col.prop(node, "in_out_node")
-
-            col = split.column()
-            col.prop(node, "converter_node")
-            col.prop(node, "operator_node")
-            col.prop(node, "group_node")
-
-        elif theme.theme_area == 'LOGIC_EDITOR':
-            logic = theme.logic_editor
-
-            col = split.column()
-            col.prop(logic, "back")
-            col.prop(logic, "button")
-
-            col = split.column()
-            col.prop(logic, "button_title")
-            col.prop(logic, "button_text")
-
-            col = split.column()
-            col.prop(logic, "text")
-            col.prop(logic, "header")
-
-            col = split.column()
-            col.prop(logic, "panel")
+            split = col.split(percentage=0.93)
+            split.prop(ui, "icon_file")
 
-        elif theme.theme_area == 'OUTLINER':
-            out = theme.outliner
-
-            col = split.column()
-            col.prop(out, "back")
-
-            col = split.column()
-            col.prop(out, "text")
-
-            col = split.column()
-            col.prop(out, "text_hi")
-
-            col = split.column()
-            col.prop(out, "header")
-
-        elif theme.theme_area == 'INFO':
-            info = theme.info
-
-            col = split.column()
-            col.prop(info, "back")
-
-            col = split.column()
-            col.prop(info, "header")
-
-            col = split.column()
-            col.prop(info, "header_text")
-
-            col = split.column()
-
-        elif theme.theme_area == 'USER_PREFERENCES':
-            prefs = theme.user_preferences
-
-            col = split.column()
-            col.prop(prefs, "back")
-
-            col = split.column()
-            col.prop(prefs, "text")
-
-            col = split.column()
-            col.prop(prefs, "header")
-
-            col = split.column()
-            col.prop(prefs, "header_text")
-
-        elif theme.theme_area == 'CONSOLE':
-            console = theme.console
-
-            col = split.column()
-            col.prop(console, "back")
-            col.prop(console, "header")
+            layout.separator()
+            layout.separator()
 
-            col = split.column()
-            col.prop(console, "line_output")
-            col.prop(console, "line_input")
-            col.prop(console, "line_info")
-            col.prop(console, "line_error")
-            col.prop(console, "cursor")
+        else:
+            self._theme_generic(split, getattr(theme, theme.theme_area.lower()))
 
 
 class USERPREF_PT_file(bpy.types.Panel):
@@ -1041,7 +737,7 @@ class USERPREF_PT_input(InputKeyMapPanel):
         sub.label(text="Presets:")
         subrow = sub.row(align=True)
         subrow.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label)
-        subrow.operator("wm.interaction_preset_add", text="", icon="ZOOMIN")
+        subrow.operator("wm.interaction_preset_add", text="", icon='ZOOMIN')
         sub.separator()
 
         sub.label(text="Mouse:")
@@ -1123,7 +819,8 @@ class USERPREF_PT_addons(bpy.types.Panel):
         userpref = context.user_preferences
         return (userpref.active_section == 'ADDONS')
 
-    def _addon_list(self):
+    @staticmethod
+    def _addon_list():
         import sys
         modules = []
         loaded_modules = set()
@@ -1148,17 +845,19 @@ class USERPREF_PT_addons(bpy.types.Panel):
         cats = {info["category"] for mod, info in addons}
         cats.discard("")
 
-        cats = ['All', 'Disabled', 'Enabled'] + sorted(cats)
+        cats = ["All", "Enabled", "Disabled"] + sorted(cats)
 
         bpy.types.Scene.EnumProperty(items=[(cat, cat, str(i)) for i, cat in enumerate(cats)],
             name="Category", attr="addon_filter", description="Filter add-ons by category")
         bpy.types.Scene.StringProperty(name="Search", attr="addon_search",
             description="Search within the selected filter")
 
-        row = layout.row()
-        row.prop(context.scene, "addon_filter", text="Filter")
-        row.prop(context.scene, "addon_search", text="Search", icon='VIEWZOOM')
-        layout.separator()
+        split = layout.split(percentage=0.2)
+        col = split.column()
+        col.prop(context.scene, "addon_filter", text="Filter", expand=True)
+        col.prop(context.scene, "addon_search", text="", icon='VIEWZOOM')
+
+        col = split.column()
 
         filter = context.scene.addon_filter
         search = context.scene.addon_search.lower()
@@ -1183,56 +882,45 @@ class USERPREF_PT_addons(bpy.types.Panel):
                         continue
 
                 # Addon UI Code
-                box = layout.column().box()
-                column = box.column()
-                row = column.row()
+                box = col.column().box()
+                colsub = box.column()
+                row = colsub.row()
 
-                # Arrow #
-                # If there are Infos or UI is expanded
-                if info["expanded"]:
-                    row.operator("wm.addon_expand", icon="TRIA_DOWN").module = module_name
-                elif info["author"] or info["version"] or info["wiki_url"] or info["location"]:
-                    row.operator("wm.addon_expand", icon="TRIA_RIGHT").module = module_name
-                else:
-                    # Else, block UI
-                    arrow = row.column()
-                    arrow.enabled = False
-                    arrow.operator("wm.addon_expand", icon="TRIA_RIGHT").module = module_name
+                row.operator("wm.addon_expand", icon='TRIA_DOWN' if info["expanded"] else 'TRIA_RIGHT', emboss=False).module = module_name
 
-                row.label(text=info["name"])
-                
-                if is_enabled: operator = "wm.addon_disable"
-                else: operator = "wm.addon_enable"
+                rowsub = row.row()
+                rowsub.active = is_enabled
+                rowsub.label(text=info["name"], icon='ERROR' if info["warning"] else 'BLENDER')
 
-                if info["warning"]: button_icon='ERROR'
-                else: button_icon='BLENDER'
-
-                row.operator(operator, icon=button_icon).module = module_name
+                if is_enabled:
+                    row.operator("wm.addon_disable", icon='CHECKBOX_HLT', text="", emboss=False).module = module_name
+                else:
+                    row.operator("wm.addon_enable", icon='CHECKBOX_DEHLT', text="", emboss=False).module = module_name
 
                 # Expanded UI (only if additional infos are available)
                 if info["expanded"]:
                     if info["description"]:
-                        split = column.row().split(percentage=0.15)
+                        split = colsub.row().split(percentage=0.15)
                         split.label(text='Description:')
                         split.label(text=info["description"])
                     if info["location"]:
-                        split = column.row().split(percentage=0.15)
+                        split = colsub.row().split(percentage=0.15)
                         split.label(text='Location:')
                         split.label(text=info["location"])
                     if info["author"]:
-                        split = column.row().split(percentage=0.15)
+                        split = colsub.row().split(percentage=0.15)
                         split.label(text='Author:')
                         split.label(text=info["author"])
                     if info["version"]:
-                        split = column.row().split(percentage=0.15)
+                        split = colsub.row().split(percentage=0.15)
                         split.label(text='Version:')
                         split.label(text=info["version"])
                     if info["warning"]:
-                        split = column.row().split(percentage=0.15)
+                        split = colsub.row().split(percentage=0.15)
                         split.label(text="Warning:")
-                        split.label(text='  ' + info["warning"], icon = 'ERROR')
+                        split.label(text='  ' + info["warning"], icon='ERROR')
                     if info["wiki_url"] or info["tracker_url"]:
-                        split = column.row().split(percentage=0.15)
+                        split = colsub.row().split(percentage=0.15)
                         split.label(text="Internet:")
                         if info["wiki_url"]:
                             split.operator("wm.url_open", text="Link to the Wiki", icon='HELP').url = info["wiki_url"]
@@ -1251,17 +939,17 @@ class USERPREF_PT_addons(bpy.types.Panel):
         missing_modules = {ext for ext in used_ext if ext not in module_names}
 
         if missing_modules and filter in ("All", "Enabled"):
-            layout.column().separator()
-            layout.column().label(text="Missing script files")
+            col.column().separator()
+            col.column().label(text="Missing script files")
 
             module_names = {mod.__name__ for mod, info in addons}
             for ext in sorted(missing_modules):
                 # Addon UI Code
-                box = layout.column().box()
-                column = box.column()
-                row = column.row()
+                box = col.column().box()
+                colsub = box.column()
+                row = colsub.row()
 
-                row.label(text=ext, icon="ERROR")
+                row.label(text=ext, icon='ERROR')
                 row.operator("wm.addon_disable").module = ext
 
 from bpy.props import *
@@ -1355,8 +1043,6 @@ class WM_OT_addon_install(bpy.types.Operator):
     module = StringProperty(name="Module", description="Module name of the addon to disable")
 
     filepath = StringProperty(name="File Path", description="File path to write file to")
-    filename = StringProperty(name="File Name", description="Name of the file")
-    directory = StringProperty(name="Directory", description="Directory of the file")
     filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
     filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
 
index 37007c65f7a1ebca756751c058c3f6ec6ef91ca3..c93b24d5cb27b0c7456bbd7eef601c854a80d76a 100644 (file)
@@ -167,7 +167,7 @@ class InputKeyMapPanel(bpy.types.Panel):
         col = self.indented_layout(layout, level)
 
         row = col.row()
-        row.prop(km, "children_expanded", text="", no_bg=True)
+        row.prop(km, "children_expanded", text="", emboss=False)
         row.label(text=km.name)
 
         row.label()
@@ -186,7 +186,7 @@ class InputKeyMapPanel(bpy.types.Panel):
                 # equal in hierarchy to the other children categories
                 subcol = self.indented_layout(col, level + 1)
                 subrow = subcol.row()
-                subrow.prop(km, "items_expanded", text="", no_bg=True)
+                subrow.prop(km, "items_expanded", text="", emboss=False)
                 subrow.label(text="%s (Global)" % km.name)
             else:
                 km.items_expanded = True
@@ -227,11 +227,11 @@ class InputKeyMapPanel(bpy.types.Panel):
 
         # header bar
         row = split.row()
-        row.prop(kmi, "expanded", text="", no_bg=True)
+        row.prop(kmi, "expanded", text="", emboss=False)
 
         row = split.row()
         row.enabled = km.user_defined
-        row.prop(kmi, "active", text="", no_bg=True)
+        row.prop(kmi, "active", text="", emboss=False)
 
         if km.modal:
             row.prop(kmi, "propvalue", text="")
@@ -509,8 +509,6 @@ class WM_OT_keyconfig_import(bpy.types.Operator):
     bl_label = "Import Key Configuration..."
 
     filepath = StringProperty(name="File Path", description="Filepath to write file to")
-    filename = StringProperty(name="File Name", description="Name of the file")
-    directory = StringProperty(name="Directory", description="Directory of the file")
     filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
     filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
     filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
@@ -570,8 +568,6 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
     bl_label = "Export Key Configuration..."
 
     filepath = StringProperty(name="File Path", description="Filepath to write file to")
-    filename = StringProperty(name="File Name", description="Name of the file")
-    directory = StringProperty(name="Directory", description="Directory of the file")
     filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
     filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
     filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
index 14312d3c1ad07aa8daa459f87bb9bd63e7450e20..2d48d2c3dddfa5ee6dfd0e87b523ca4f4f884f37 100644 (file)
@@ -717,30 +717,78 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
         layout = self.layout
 
         obj = context.object
-        if obj.type == 'LAMP':
+        if obj.type == 'CAMERA':
+            layout.operator_context = 'INVOKE_REGION_WIN'
+
+            props = layout.operator("wm.context_modal_mouse", text="Camera Lens Angle")
+            props.data_path_iter = "selected_editable_objects"
+            props.data_path_item = "data.lens"
+            props.input_scale = 0.1
+
+            if not obj.data.dof_object:
+                #layout.label(text="Test Has DOF obj");
+                props = layout.operator("wm.context_modal_mouse", text="DOF Distance")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.dof_distance"
+                props.input_scale = 0.02
+
+        if obj.type in ('CURVE','TEXT'):
             layout.operator_context = 'INVOKE_REGION_WIN'
 
-            props = layout.operator("wm.context_modal_mouse", text="Spot Size")
+            props = layout.operator("wm.context_modal_mouse", text="Extrude Size")
             props.data_path_iter = "selected_editable_objects"
-            props.data_path_item = "data.spot_size"
+            props.data_path_item = "data.extrude"
             props.input_scale = 0.01
 
-            props = layout.operator("wm.context_modal_mouse", text="Distance")
+            props = layout.operator("wm.context_modal_mouse", text="Width Size")
             props.data_path_iter = "selected_editable_objects"
-            props.data_path_item = "data.distance"
-            props.input_scale = 0.1
+            props.data_path_item = "data.width"
+            props.input_scale = 0.01
 
-            props = layout.operator("wm.context_modal_mouse", text="Clip Start")
+        if obj.type == 'EMPTY':
+            layout.operator_context = 'INVOKE_REGION_WIN'
+
+            props = layout.operator("wm.context_modal_mouse", text="Empty Draw Size")
             props.data_path_iter = "selected_editable_objects"
-            props.data_path_item = "data.shadow_buffer_clip_start"
-            props.input_scale = 0.05
+            props.data_path_item = "empty_draw_size"
+            props.input_scale = 0.01
 
-            props = layout.operator("wm.context_modal_mouse", text="Clip End")
+        if obj.type == 'LAMP':
+            layout.operator_context = 'INVOKE_REGION_WIN'
+
+            props = layout.operator("wm.context_modal_mouse", text="Energy")
             props.data_path_iter = "selected_editable_objects"
-            props.data_path_item = "data.shadow_buffer_clip_end"
-            props.input_scale = 0.05
+            props.data_path_item = "data.energy"
 
-            layout.separator()
+            if obj.data.type in ('SPOT', 'AREA', 'POINT'):
+                props = layout.operator("wm.context_modal_mouse", text="Falloff Distance")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.distance"
+                props.input_scale = 0.1
+
+            if obj.data.type == 'SPOT':
+                layout.separator()
+                props = layout.operator("wm.context_modal_mouse", text="Spot Size")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.spot_size"
+                props.input_scale = 0.01
+
+                props = layout.operator("wm.context_modal_mouse", text="Spot Blend")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.spot_blend"
+                props.input_scale = -0.01
+
+                props = layout.operator("wm.context_modal_mouse", text="Clip Start")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.shadow_buffer_clip_start"
+                props.input_scale = 0.05
+
+                props = layout.operator("wm.context_modal_mouse", text="Clip End")
+                props.data_path_iter = "selected_editable_objects"
+                props.data_path_item = "data.shadow_buffer_clip_end"
+                props.input_scale = 0.05
+
+        layout.separator()
 
         props = layout.operator("object.isolate_type_render")
 
@@ -1502,6 +1550,7 @@ class VIEW3D_MT_edit_mesh_faces(bpy.types.Menu):
         layout.operator("mesh.fill")
         layout.operator("mesh.beautify_fill")
         layout.operator("mesh.solidify")
+        layout.operator("mesh.sort_faces")
 
         layout.separator()
 
@@ -2077,7 +2126,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
             layout.active = view.display_background_images
             box = layout.box()
             row = box.row(align=True)
-            row.prop(bg, "show_expanded", text="", no_bg=True)
+            row.prop(bg, "show_expanded", text="", emboss=False)
             row.label(text=getattr(bg.image, "name", "Not Set"))
             row.operator("view3d.remove_background_image", text="", icon='X').index = i
 
@@ -2163,6 +2212,7 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
             col.prop(toolsettings, "etch_autoname")
             col.prop(toolsettings, "etch_number")
             col.prop(toolsettings, "etch_side")
+            col.operator("sketch.convert", text="Convert")
 
 
 class VIEW3D_PT_context_properties(bpy.types.Panel):
index 6984bbeea41164a9d90bd109a8d356cb1ef23f90..c503eaa9b3e394bf41c41325fad71fcbb013e007 100644 (file)
@@ -41,6 +41,9 @@ class VIEW3D_PT_tools_objectmode(View3DPanel):
         col.operator("transform.rotate")
         col.operator("transform.resize", text="Scale")
 
+        col = layout.column(align=True)
+        col.operator("object.origin_set", text="Origin")
+
         col = layout.column(align=True)
         col.label(text="Object:")
         col.operator("object.duplicate_move")
diff --git a/release/windows/inno/blender.iss b/release/windows/inno/blender.iss
deleted file mode 100644 (file)
index 5faf5b4..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-; Script generated by the Inno Setup Script Wizard.\r
-; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!\r
-\r
-\r
-[Setup]\r
-#define VERSION "2.49b"\r
-\r
-; NOTE: The value of AppId uniquely identifies this application.\r
-; Do not use the same AppId value in installers for other applications.\r
-; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)\r
-AppId={{C45CB76D-AD5F-49CC-86DE-72B168A6A888}\r
-AppName=Blender\r
-AppVerName=Blender {#VERSION}\r
-AppPublisher=Blender Foundation\r
-AppPublisherURL=http://www.blender.org\r
-AppSupportURL=http://www.blender.org\r
-AppUpdatesURL=http://www.blender.org\r
-DefaultDirName={pf}\Blender\r
-DefaultGroupName=Blender Foundation\r
-AllowNoIcons=true\r
-LicenseFile=.\copyright.txt\r
-OutputBaseFilename=blender-{#VERSION}\r
-Compression=lzma\r
-SolidCompression=true\r
-ChangesAssociations=true\r
-WizardImageFile=.\installer.bmp\r
-WizardSmallImageFile=.\header.bmp\r
-SetupIconFile=.\installer.ico\r
-MinVersion=,5.01.2600sp1\r
-PrivilegesRequired=none\r
-AllowRootDirectory=true\r
-ShowLanguageDialog=auto\r
-\r
-[Dirs]\r
-Name: {userdocs}\Blender; Flags: uninsneveruninstall; Tasks: ; Languages: \r
-\r
-[Languages]\r
-Name: english; MessagesFile: compiler:Default.isl\r
-\r
-[Tasks]\r
-Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked\r
-Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked\r
-\r
-[Files]\r
-Source: ..\..\..\..\build\bin\release\blender.exe; DestDir: {app}; Flags: ignoreversion\r
-Source: ..\..\..\..\build\bin\release\blender.html; DestDir: {app}; Flags: ignoreversion\r
-Source: ..\..\..\..\build\bin\release\BlenderQuickStart.pdf; DestDir: {app}; Flags: ignoreversion\r
-Source: ..\..\..\..\build\bin\release\copyright.txt; DestDir: {app}; Flags: ignoreversion\r
-Source: ..\..\..\..\build\bin\release\GPL-license.txt; DestDir: {app}; Flags: ignoreversion\r
-Source: ..\..\..\..\build\bin\release\Python-license.txt; DestDir: {app}; Flags: ignoreversion\r
-Source: ..\..\..\..\build\bin\release\release_249.txt; DestDir: {app}; Flags: ignoreversion\r
-Source: ..\..\..\..\build\bin\release\*.dll; DestDir: {app}; Flags: ignoreversion\r
-Source: ..\..\..\..\build\bin\release\plugins\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs\r
-Source: ..\..\..\..\build\bin\release\.blender\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs\r
-; NOTE: Don't use "Flags: ignoreversion" on any shared system files\r
-\r
-[Icons]\r
-Name: {group}\Blender; Filename: {app}\blender.exe\r
-Name: {group}\ReleaseNotes; Filename: {app}\release_249.txt\r
-Name: {group}\Blender.org; Filename: {app}\blender.html\r
-Name: {group}\Copyright; Filename: {app}\copyright.txt\r
-Name: {group}\GPL; Filename: {app}\GPL-license.txt\r
-Name: {group}\Uninstall; Filename: {uninstallexe}; Tasks: ; Languages: \r
-Name: {commondesktop}\Blender; Filename: {app}\blender.exe; Tasks: desktopicon\r
-Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\Blender; Filename: {app}\blender.exe; Tasks: quicklaunchicon\r
-\r
-[Registry]\r
-Root: HKCR; Subkey: .blend; ValueType: string; ValueName: ; ValueData: BlenderFile; Flags: uninsdeletevalue\r
-Root: HKCR; Subkey: BlenderFile; ValueType: string; ValueName: ; ValueData: Blender File; Flags: uninsdeletekey\r
-Root: HKCR; Subkey: BlenderFile\DefaultIcon; ValueType: string; ValueName: ; ValueData: {app}\blender.exe,0\r
-Root: HKCR; Subkey: BlenderFile\shell\open\command; ValueType: string; ValueName: ; ValueData: """{app}\blender.exe"" ""%1"""\r
-\r
-[Run]\r
-Filename: {app}\blender.exe; Description: {cm:LaunchProgram,Blender}; Flags: nowait postinstall skipifsilent\r
-\r
-\r
-[_ISToolDownload]\r
-\r
-[UninstallDelete]\r
-Name: {app}\blender.exe; Type: files\r
-Name: {app}\*.dll; Type: files\r
-Name: {app}\blender.html; Type: files; Tasks: ; Languages: \r
-Name: {app}\BlenderQuickStart.pdf; Type: files\r
-Name: {app}\copyright.txt; Type: files\r
-Name: {app}\GPL-license.txt; Type: files\r
-Name: {app}\Python-license.txt; Type: files\r
-Name: {app}\release_249.txt; Type: files\r
-Name: {app}\.blender\*; Type: filesandordirs\r
-Name: {app}\plugins\*; Type: filesandordirs\r
-Name: {app}\.blender; Type: dirifempty\r
-Name: {app}\plugins; Type: dirifempty\r
-Name: {app}; Type: dirifempty\r
diff --git a/release/windows/inno/copyright.txt b/release/windows/inno/copyright.txt
deleted file mode 100644 (file)
index 4e67c25..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-BLENDER CREATOR LICENSE AGREEMENT
-
-IMPORTANT: PLEASE READ CAREFULLY BEFORE USING THE BLENDER CREATOR SOFTWARE. 
-
-This License Agreement for the Blender Creator software ("License Agreement") is an agreement between NaN Technologies B.V., Meerenakkerplein 11, 5652 BJ Eindhoven, the Netherlands ("NaN") and you (either an individual or a legal entity) ("You") with respect to the software product which this License Agreement accompanies (the "Software"). 
-
-By installing, copying or otherwise using the Software, You agree to be bound by the terms of this License Agreement. If You do not agree to the terms of this License Agreement do not install or use the Software.
-
-
-1. Grant of License
-
-Subject to the provisions of this License Agreement, NaN grants You a limited, non-exclusive, personal, non-sublicenseable, non-transferable, revocable license to use the Software at any computer You own or use. 
-
-2. License Restrictions
-
-Except as expressly provided under this License Agreement, or without prior written consent from NaN, or without permission by law, You may not: (a) remove or alter any proprietary, copyright or trademark notices in or on the Software; (b) modify, decompile, disassemble or reverse-engineer the Software; (c) sublicense, rent, lease, lend, assign or otherwise transfer rights to the Software.
-
-3. Permitted copying and electronic distribution of Software
-
-You are hereby granted permission to copy and distribute the Software without written agreement from NaN, only for non-commercial purposes.  Distributing the Software within a restricted non-public environment, such as using a local network in a company or a local network of a university, is considered a 'non-commercial purpose'. This entire License Agreement must appear in and/or accompany all copies of the Software.
-Distributing the Software 'bundled' in with ANY product is considered to be a 'commercial purpose'. 
-
-4. Intellectual Property Rights and Ownership
-
-Title and ownership to all rights, including intellectual property rights, in and to the Software shall at all times solely and exclusively remain with NaN. The Software is protected by national and international (copyright) laws and treaties. All rights not expressly granted herein are reserved to NaN.
-
-5. Disclaimer of Warranties
-
-NaN provides you with the Software "as is" and with all faults. NaN explicitly disclaims all warranties and guarantees and does not make any representations with respect to the Software, whether express, implied, or statutory, including, but not limited to any (if any) warranties of or related to: fitness for a particular purpose, title, non-infringement, lack of viruses, accuracy or completeness of responses, results, lack of negligence or lack of workmanlike effort, and correspondence to description. The entire risk arising out of use or performance of the Software remains with You.
-
-6. Limitation of Liability
-
-In no event shall NaN or its employees, agents or suppliers be liable for any direct, indirect, consequential, incidental, special, punitive, or other damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, claims of third parties, damages as a result of injury to any person, or any other loss) arising out of or in connection with the license granted under this License Agreement or the use of or inability to use the Software, even if NaN has been advised of the possibility of such damages. 
-7. User warning and indemnification
-
-WARNING: use of the Software and use of any works that are (partially) created with the Software (the "Works") may cause physical or psychological reactions from You or from third parties, which may result in damages, injuries, losses and/or other negative consequences. You acknowledge that NaN can not be held liable for any such damages, injuries, losses and/or other negative consequences. You acknowledge that it is your obligation to investigate, prevent and/or minimize such reactions prior to having third parties use the Works.
-
-You shall indemnify and hold harmless NaN from and against all actions, claims, demands, proceedings, losses, damages, costs, charges and expenses, including but not limited to legal fees and expenses, arising out of or in connection with (i) the use of the Software by You and (ii) the use of any Works created with the Software by You or any third parties.
-
-8. Term and Termination
-
-This License Agreement and the license granted hereunder is effective until terminated. This License Agreement shall terminate automatically and forthwith if You fail to comply with the terms of this License Agreement. Upon termination, You shall cease the use of the Software, remove the Software from (the memory of) your computer and destroy all copies of the Software.
-
-9. Entire Agreement
-
-This License Agreement is the entire agreement between NaN and You in respect of the subject matter of the License Agreement. This License Agreement supersedes all prior written or oral agreements, proposals or understandings, and any other communications between NaN and You relating to the subject matter of this License Agreement.
-
-10. Enforceability
-
-If any provision of this License Agreement is held to be unenforceable by a court of competent jurisdiction for any reason, such provision shall be adapted or amended only to the extent necessary to make it enforceable, and the remainder of the License Agreement shall remain in effect.
-
-11. Governing law and disputes
-
-This License Agreement and all disputes arising from it will be governed by the laws of The Netherlands. All disputes arising in connection with this Agreement that cannot be settled amicably shall be brought before the competent court in Amsterdam, the Netherlands, to which jurisdiction NaN and You hereby irrevocably consent.
-
diff --git a/release/windows/inno/installer.bmp b/release/windows/inno/installer.bmp
deleted file mode 100644 (file)
index 10fb014..0000000
Binary files a/release/windows/inno/installer.bmp and /dev/null differ
diff --git a/release/windows/installer/00.checked.bmp b/release/windows/installer/00.checked.bmp
new file mode 100644 (file)
index 0000000..6c2e98d
Binary files /dev/null and b/release/windows/installer/00.checked.bmp differ
diff --git a/release/windows/installer/00.sconsblender.nsi b/release/windows/installer/00.sconsblender.nsi
new file mode 100644 (file)
index 0000000..89255ce
--- /dev/null
@@ -0,0 +1,225 @@
+;\r
+; $Id$\r
+;\r
+; Blender Self-Installer for Windows (NSIS - http://nsis.sourceforge.net)\r
+;\r
+; Requires the MoreInfo plugin - http://nsis.sourceforge.net/MoreInfo_plug-in\r
+;\r
+\r
+!include "MUI.nsh"\r
+!include "WinVer.nsh"\r
+!include "FileFunc.nsh"\r
+!include "WordFunc.nsh"\r
+!include "nsDialogs.nsh"\r
+\r
+SetCompressor /SOLID lzma\r
+\r
+Name "Blender [VERSION]" \r
+\r
+!define MUI_ABORTWARNING\r
+\r
+!define MUI_WELCOMEPAGE_TEXT  "This wizard will guide you through the installation of Blender. It is recommended that you close all other applications before starting Setup."\r
+!define MUI_WELCOMEFINISHPAGE_BITMAP "[RELDIR]\01.installer.bmp"\r
+!define MUI_HEADERIMAGE\r
+!define MUI_HEADERIMAGE_BITMAP  "[RELDIR]\00.header.bmp"\r
+!define MUI_COMPONENTSPAGE_SMALLDESC\r
+!define MUI_FINISHPAGE_RUN "$INSTDIR\blender.exe"\r
+!define MUI_CHECKBITMAP "[RELDIR]\00.checked.bmp"\r
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "[RELDIR]\01.installer.bmp"\r
+\r
+!insertmacro MUI_PAGE_WELCOME\r
+!insertmacro MUI_PAGE_LICENSE "[DISTDIR]\Copyright.txt"\r
+!insertmacro MUI_PAGE_COMPONENTS\r
+    \r
+!insertmacro MUI_PAGE_DIRECTORY\r
+Page custom DataLocation DataLocationOnLeave\r
+!insertmacro MUI_PAGE_INSTFILES\r
+!insertmacro MUI_PAGE_FINISH\r
+  \r
+!insertmacro MUI_UNPAGE_WELCOME\r
+!insertmacro MUI_UNPAGE_CONFIRM\r
+!insertmacro MUI_UNPAGE_INSTFILES\r
+!insertmacro MUI_UNPAGE_FINISH\r
+\r
+!insertmacro Locate\r
+!insertmacro VersionCompare\r
+\r
+\r
+Icon "[RELDIR]\00.installer.ico"\r
+UninstallIcon "[RELDIR]\00.installer.ico"\r
+\r
+;--------------------------------\r
+;Languages\r
\r
+  !insertmacro MUI_LANGUAGE "English"\r
+    \r
+;--------------------------------\r
+;Language Strings\r
+\r
+  ;Description\r
+  LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy all required files to the application folder."\r
+  LangString DESC_Section2 ${LANG_ENGLISH} "Add shortcut items to the Start Menu. (Recommended)"\r
+  LangString DESC_Section3 ${LANG_ENGLISH} "Add a shortcut to Blender on your desktop."\r
+  LangString DESC_Section4 ${LANG_ENGLISH} "Blender can register itself with .blend files to allow double-clicking from Windows Explorer, etc."\r
+  LangString TEXT_IO_TITLE ${LANG_ENGLISH} "Specify User Data Location"\r
+;--------------------------------\r
+;Data\r
+\r
+Caption "Blender [VERSION] Installer"\r
+OutFile "[DISTDIR]\..\blender-[VERSION]-windows[BITNESS].exe"\r
+InstallDir "$PROGRAMFILES[BITNESS]\Blender Foundation\Blender"\r
+\r
+BrandingText "Blender Foundation | http://www.blender.org"\r
+ComponentText "This will install Blender [VERSION] on your computer."\r
+\r
+DirText "Use the field below to specify the folder where you want Blender to be copied to. To specify a different folder, type a new name or use the Browse button to select an existing folder."\r
+\r
+SilentUnInstall normal\r
+\r
+Var BLENDERHOME\r
+Var SHORTVERSION ; This is blender_version_decimal() from path_util.c\r
+\r
+; custom controls\r
+Var HWND\r
+\r
+Var HWND_APPDATA\r
+Var HWND_INSTDIR\r
+Var HWND_HOMEDIR\r
+\r
+Function .onInit\r
+  ClearErrors\r
+  StrCpy $SHORTVERSION "[SHORTVERSION]"\r
+FunctionEnd\r
+\r
+Function DataLocation\r
+  nsDialogs::Create /NOUNLOAD 1018\r
+  Pop $HWND\r
+  \r
+  ${If} $HWND == error\r
+    Abort\r
+  ${EndIf}\r
+  \r
+  ${NSD_CreateLabel} 0 0 100% 12u "Please specify where you wish to install Blender's user data files."\r
+  ${NSD_CreateRadioButton} 0 20 100% 12u "Use the Application Data directory (Requires Windows 2000 or better)"\r
+  Pop $HWND_APPDATA\r
+  ${NSD_CreateRadioButton} 0 50 100% 12u "Use the installation directory (ie. location chosen to install blender.exe)."\r
+  Pop $HWND_INSTDIR\r
+  ${NSD_CreateRadioButton} 0 80 100% 12u "I have defined a %HOME% variable, please install files here."\r
+  Pop $HWND_HOMEDIR\r
+  \r
+  ${If} ${AtMostWinME}\r
+    GetDlgItem $0 $HWND $HWND_APPDATA\r
+    EnableWindow $0 0\r
+    SendMessage $HWND_INSTDIR ${BM_SETCHECK} 1 0\r
+  ${Else}\r
+    SendMessage $HWND_APPDATA ${BM_SETCHECK} 1 0\r
+  ${EndIf}\r
+  \r
+  nsDialogs::Show\r
+  \r
+FunctionEnd\r
+\r
+Function DataLocationOnLeave\r
+  ${NSD_GetState} $HWND_APPDATA $R0\r
+  ${If} $R0 == "1"\r
+    StrCpy $BLENDERHOME "$APPDATA\Blender Foundation\Blender"\r
+  ${Else}\r
+    ${NSD_GetState} $HWND_INSTDIR $R0\r
+    ${If} $R0 == "1"\r
+      StrCpy $BLENDERHOME $INSTDIR\r
+    ${Else}\r
+      ${NSD_GetState} $HWND_HOMEDIR $R0\r
+      ${If} $R0 == "1"\r
+        ReadEnvStr $BLENDERHOME "HOME"\r
+      ${EndIf}\r
+    ${EndIf}\r
+  ${EndIf}\r
+FunctionEnd\r
+\r
+Section "Blender-[VERSION] (required)" SecCopyUI\r
+  SectionIn RO\r
+\r
+  ; Set output path to the installation directory.\r
+  SetOutPath $INSTDIR\r
+  ; the contents of Blender installation root dir\r
+  [ROOTDIRCONTS]\r
+  \r
+  ; all datafiles (python, scripts, config)\r
+  [DODATAFILES]\r
+  \r
+  SetOutPath $INSTDIR\r
+  ; Write the installation path into the registry\r
+  WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "Install_Dir" "$INSTDIR"\r
+  WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "ConfigData_Dir" "$BLENDERHOME"\r
+  WriteRegStr HKLM "SOFTWARE\BlenderFoundation" "ShortVersion" "[SHORTVERSION]"\r
+  ; Write the uninstall keys for Windows\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "DisplayName" "Blender (remove only)"\r
+  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender" "UninstallString" '"$INSTDIR\uninstall.exe"'\r
+  WriteUninstaller "uninstall.exe"\r
+\r
+  ; Let's now run silent vcredist installer\r
+  SetOutPath $TEMP\r
+  [VCREDIST]\r
+\r
+SectionEnd\r
+\r
+Section "Add Start Menu shortcuts" Section2\r
+  SetShellVarContext all\r
+  CreateDirectory "$SMPROGRAMS\Blender Foundation\Blender\"\r
+  CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0\r
+  CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Blender.lnk" "$INSTDIR\Blender.exe" "" "$INSTDIR\blender.exe" 0\r
+  CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Readme.lnk" "$INSTDIR\readme.html" "" "" 0\r
+  CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\Copyright.lnk" "$INSTDIR\Copyright.txt" "" "$INSTDIR\copyright.txt" 0\r
+  CreateShortCut "$SMPROGRAMS\Blender Foundation\Blender\GPL-license.lnk" "$INSTDIR\GPL-license.txt" "" "$INSTDIR\GPL-license.txt" 0\r
+SectionEnd\r
+\r
+Section "Add Desktop Blender-[VERSION] shortcut" Section3\r
+  CreateShortCut "$DESKTOP\Blender.lnk" "$INSTDIR\blender.exe" "" "$INSTDIR\blender.exe" 0\r
+SectionEnd\r
+\r
+Section "Open .blend files with Blender-[VERSION]" Section4\r
+  \r
+  WriteRegStr HKCR ".blend" "" "blendfile"\r
+  WriteRegStr HKCR "blendfile" "" "Blender .blend File"\r
+  WriteRegStr HKCR "blendfile\shell" "" "open"\r
+  WriteRegStr HKCR "blendfile\DefaultIcon" "" $INSTDIR\blender.exe,1\r
+  WriteRegStr HKCR "blendfile\shell\open\command" "" \\r
+    '"$INSTDIR\blender.exe" "%1"'\r
+  \r
+SectionEnd\r
+\r
+UninstallText "This will uninstall Blender [VERSION], and all datafiles from the installation dir. Hit next to continue."\r
+\r
+Section "Uninstall"\r
+  ; remove registry keys\r
+  ReadRegStr $BLENDERHOME HKLM "SOFTWARE\BlenderFoundation" "ConfigData_Dir"\r
+  ReadRegStr $SHORTVERSION HKLM "SOFTWARE\BlenderFoundation" "ShortVersion"\r
+  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Blender"\r
+  DeleteRegKey HKLM "SOFTWARE\BlenderFoundation"\r
+  SetShellVarContext all\r
+\r
+  StrCpy $0 "$SMPROGRAMS\Blender Foundation\"\r
+  MessageBox MB_OK $0\r
+  ; remove files\r
+  [DELROOTDIRCONTS]\r
+\r
+  Delete "$INSTDIR\uninstall.exe"\r
+\r
+  MessageBox MB_YESNO "Erase $BLENDERHOME? This includes all installed scripts and configuration files and any file you may have created there." IDNO Next\r
+  RMDir /r "$BLENDERHOME"\r
+Next:\r
+  ; remove shortcuts, if any.\r
+  Delete "$DESKTOP\Blender.lnk"\r
+  ; remove all link related directories and files\r
+  RMDir /r "$SMPROGRAMS\Blender Foundation\"\r
+  ; remove entire installation directory, including any file created by the user\r
+  RMDir /r "$INSTDIR"\r
+SectionEnd\r
+\r
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3)\r
+  !insertmacro MUI_DESCRIPTION_TEXT ${Section4} $(DESC_Section4)\r
+!insertmacro MUI_FUNCTION_DESCRIPTION_END\r
+\r
index 2ab5b4faeabb0d4b49491c9a22ff42b368651bce..12e47ba586392fbb2873163f264a054161f0a8bf 100644 (file)
@@ -120,6 +120,7 @@ COMLIB += $(NAN_BSP)/lib/$(DEBUG_DIR)libbsp.a
 COMLIB += $(NAN_BOOLOP)/lib/$(DEBUG_DIR)libboolop.a
 COMLIB += $(NAN_MOTO)/lib/$(DEBUG_DIR)libmoto.a
 COMLIB += $(NAN_DECIMATION)/lib/$(DEBUG_DIR)libdecimation.a
+COMLIB += $(NAN_GHOST)/lib/$(DEBUG_DIR)libghost.a
 
 ifeq ($(WITH_FFMPEG),true)
     COMLIB += $(NAN_AUDASPACE)/lib/$(DEBUG_DIR)libaud_ffmpeg.a
index bc2de70222d984f32e2f3f4c70445db01b09daff..1baf2c82ef79e6ed4b70ab312ec6a2a4d5e21100 100644 (file)
@@ -59,65 +59,19 @@ char global_messagepath[1024];
 char global_language[32];
 char global_encoding_name[32];
 
-#if defined(__APPLE__)
-void BLF_lang_init(void) /* Apple Only, todo - use BLI_gethome_folder  */
-{
-       char *bundlepath;
-
-       strcpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT);
-
-       /* set messagepath directory */
-#ifndef LOCALEDIR
-#define LOCALEDIR "/usr/share/locale"
-#endif
-
-       strcpy(global_messagepath, ".blender/locale");
-
-       if (!BLI_exist(global_messagepath)) { /* locale not in current dir */
-               BLI_make_file_string("/", global_messagepath, BLI_gethome(), ".blender/locale");
 
-               if (!BLI_exist(global_messagepath)) { /* locale not in home dir */
-                       /* message catalogs are stored inside the application bundle */
-                       bundlepath= BLI_getbundle();
-                       strcpy(global_messagepath, bundlepath);
-                       strcat(global_messagepath, "/Contents/Resources/locale");
-                       if (!BLI_exist(global_messagepath)) { /* locale not in bundle (now that's odd..) */
-                               strcpy(global_messagepath, LOCALEDIR);
-
-                               if (!BLI_exist(global_messagepath)) { /* locale not in LOCALEDIR */
-                                       strcpy(global_messagepath, "message"); /* old compatibility as last */
-                               }
-                       }
-               }
-       }
-}
-#elif defined(_WIN32)
-void BLF_lang_init(void) /* Windows Only, todo - use BLI_gethome_folder  */
+void BLF_lang_init(void)
 {
-       strcpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT);
+       char *messagepath= BLI_get_folder(BLENDER_DATAFILES, "locale");
        
-       strcpy(global_messagepath, ".blender/locale");
-
-       if (!BLI_exist(global_messagepath)) { /* locale not in current dir */
-               BLI_make_file_string("/", global_messagepath, BLI_gethome(), ".blender/locale");
-
-               if (!BLI_exist(global_messagepath)) { /* locale not in home dir */
-                       BLI_make_file_string("/", global_messagepath, BLI_gethome(), "/locale");
-               }
-       }
-}
-#else
-void BLF_lang_init(void)  /* not win or mac */
-{
-       char *messagepath= BLI_gethome_folder("locale", BLI_GETHOME_ALL);
+       BLI_strncpy(global_encoding_name, SYSTEM_ENCODING_DEFAULT, sizeof(global_encoding_name));
        
-       if(messagepath)
-               strncpy(global_messagepath, messagepath, sizeof(global_messagepath));
+       if (messagepath)
+               BLI_strncpy(global_messagepath, messagepath, sizeof(global_messagepath));
        else
                global_messagepath[0]= '\0';
-
 }
-#endif
+
 
 void BLF_lang_set(const char *str)
 {
index febe0a11ae6a4b96fa313a47c0f84c9c63bfa968..df0627f61baa0953162c0a7ec26a9af5548e3d50 100644 (file)
@@ -93,13 +93,14 @@ extern void makeDispListCurveTypes(struct Scene *scene, struct Object *ob, int f
 extern void makeDispListCurveTypes_forRender(struct Scene *scene, struct Object *ob, struct ListBase *dispbase, struct DerivedMesh **derivedFinal, int forOrco);
 extern void makeDispListCurveTypes_forOrco(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
 extern void makeDispListMBall(struct Scene *scene, struct Object *ob);
+extern void makeDispListMBall_forRender(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
 extern void shadeDispList(struct Scene *scene, struct Base *base);
 extern void shadeMeshMCol(struct Scene *scene, struct Object *ob, struct Mesh *me);
 
 int surfindex_displist(DispList *dl, int a, int *b, int *p1, int *p2, int *p3, int *p4);
 void imagestodisplist(void);
 void reshadeall_displist(struct Scene *scene);
-void filldisplist(struct ListBase *dispbase, struct ListBase *to);
+void filldisplist(struct ListBase *dispbase, struct ListBase *to, int flipnormal);
 
 void fastshade_free_render(void);
 
index 7bdb9aaf709b6c021f8b405c3735d6c33e3b53c2..d7eb5fe824675143afea05e40c3ad494176632bd 100644 (file)
@@ -115,7 +115,7 @@ void BKE_image_release_ibuf(struct Image *ima, void *lock);
 struct Image *BKE_add_image_file(const char *name, int frame);
 
 /* adds image, adds ibuf, generates color or pattern */
-struct Image *BKE_add_image_size(int width, int height, char *name, int floatbuf, short uvtestgrid, float color[4]);
+struct Image *BKE_add_image_size(int width, int height, char *name, int depth, int floatbuf, short uvtestgrid, float color[4]);
 /* adds image from imbuf, owns imbuf */
 struct Image *BKE_add_image_imbuf(struct ImBuf *ibuf);
 
index 6b8f18e9e1773572447a0749a2610632ef710cf7..31e920406c0f92cb00b93494dfea7e4f5f4e2120 100644 (file)
@@ -75,6 +75,9 @@ void key_to_latt(struct KeyBlock *kb, struct Lattice *lt);
 void latt_to_key(struct Lattice *lt, struct KeyBlock *kb);
 void key_to_curve(struct KeyBlock *kb, struct Curve  *cu, struct ListBase *nurb);
 void curve_to_key(struct Curve *cu, struct KeyBlock *kb, struct ListBase *nurb);
+float (*key_to_vertcos(struct Object *ob, struct KeyBlock *kb))[3];
+void vertcos_to_key(struct Object *ob, struct KeyBlock *kb, float (*vertCos)[3]);
+void offset_to_key(struct Object *ob, struct KeyBlock *kb, float (*ofs)[3]);
 
 #ifdef __cplusplus
 };
index f35dff53cd51a474a1b7c1623f4efa8fb0418c12..880f3f7e7247a58ff2b5f215ff80f3c5f2938721 100644 (file)
@@ -49,7 +49,7 @@ void init_latt_deform(struct Object *oblatt, struct Object *ob);
 void calc_latt_deform(struct Object *, float *co, float weight);
 void end_latt_deform(struct Object *);
 
-int object_deform_mball(struct Object *ob);
+int object_deform_mball(struct Object *ob, struct ListBase *dispbase);
 void outside_lattice(struct Lattice *lt);
 
 void curve_deform_verts(struct Scene *scene, struct Object *cuOb, struct Object *target, 
index e28e2c4d86ee9f78c67dffd9cf03607b83fea2ea..8d7d205e847e699675019e1863dd363540505ff3 100644 (file)
@@ -163,11 +163,12 @@ struct MetaBall *add_mball(char *name);
 struct MetaBall *copy_mball(struct MetaBall *mb);
 void make_local_mball(struct MetaBall *mb);
 void tex_space_mball(struct Object *ob);
-float *make_orco_mball(struct Object *ob);
+float *make_orco_mball(struct Object *ob, struct ListBase *dispbase);
 void copy_mball_properties(struct Scene *scene, struct Object *active_object);
 struct Object *find_basis_mball(struct Scene *scene, struct Object *ob);
 int is_basis_mball(struct Object *ob);
-void metaball_polygonize(struct Scene *scene, struct Object *ob);
+int is_mball_basis_for(struct Object *ob1, struct Object *ob2);
+void metaball_polygonize(struct Scene *scene, struct Object *ob, struct ListBase *dispbase);
 void calc_mballco(struct MetaElem *ml, float *vec);
 float densfunc(struct MetaElem *ball, float x, float y, float z);
 float metaball(float x, float y, float z);
index e8bbb58a895a72ed2de7d1fce4b0e786816a880c..39fc795e6ff8893bd881ef4c374e620761d0febd 100644 (file)
@@ -47,7 +47,8 @@ void multires_force_external_reload(struct Object *ob);
 struct DerivedMesh *multires_dm_create_from_derived(struct MultiresModifierData*,
        int local_mmd, struct DerivedMesh*, struct Object *, int, int);
 
-struct MultiresModifierData *find_multires_modifier(struct Scene *scene, struct Object *ob);
+struct MultiresModifierData *find_multires_modifier_before(struct Scene *scene,
+       struct ModifierData *lastmd);
 struct DerivedMesh *get_multires_dm(struct Scene *scene, struct MultiresModifierData *mmd,
                                struct Object *ob);
 void multiresModifier_join(struct Object *);
index 81fb724b3a5f9a5dfce110c4de27917dfd3130d5..cd412ca5a74718f8528c488914da6d10dc3ff62b 100644 (file)
@@ -70,7 +70,7 @@ typedef struct SculptSession {
        int totvert, totface;
        float *face_normals;
        struct Object *ob;
-       struct KeyBlock *kb, *refkb;
+       struct KeyBlock *kb;
        
        /* Mesh connectivity */
        struct ListBase *fmap;
@@ -94,6 +94,8 @@ typedef struct SculptSession {
        struct StrokeCache *cache;
 
        struct GPUDrawObject *drawobject;
+
+       int modifiers_active;
 } SculptSession;
 
 void free_sculptsession(struct Object *ob);
index 090979b33e9f98ed010d421383a61c99d49f8255..b5b0a72d2d82e966cb5486e0b75983d91f4df584 100644 (file)
@@ -58,7 +58,7 @@ struct Scene *add_scene(char *name);
 struct Base *object_in_scene(struct Object *ob, struct Scene *sce);
 
 void set_scene_bg(struct Scene *sce);
-void set_scene_name(char *name);
+struct Scene *set_scene_name(char *name);
 
 struct Scene *copy_scene(struct Main *bmain, struct Scene *sce, int type);
 void unlink_scene(struct Main *bmain, struct Scene *sce, struct Scene *newsce);
@@ -80,6 +80,8 @@ void scene_select_base(struct Scene *sce, struct Base *selbase);
 /* checks for cycle, returns 1 if it's all OK */
 int scene_check_setscene(struct Scene *sce);
 
+float BKE_curframe(struct Scene *scene);
+
 void scene_update_tagged(struct Scene *sce);
 void scene_update_for_newframe(struct Scene *sce, unsigned int lay);
 
index 354638013ec705afae666fb77610bea38d35c386..002a1958a131d6880016baed23181bed1091be7a 100644 (file)
@@ -136,8 +136,8 @@ struct SeqEffectHandle {
 void printf_strip(struct Sequence *seq);
 
 /* apply functions recursively */
-void seqbase_recursive_apply(struct ListBase *seqbase, int (*apply_func)(struct Sequence *seq, void *), void *arg);
-void seq_recursive_apply(struct Sequence *seq, int (*apply_func)(struct Sequence *, void *), void *arg);
+int seqbase_recursive_apply(struct ListBase *seqbase, int (*apply_func)(struct Sequence *seq, void *), void *arg);
+int seq_recursive_apply(struct Sequence *seq, int (*apply_func)(struct Sequence *, void *), void *arg);
 
 // extern
 void seq_free_sequence(struct Scene *scene, struct Sequence *seq);
@@ -187,21 +187,27 @@ void seq_single_fix(struct Sequence *seq);
 int seq_test_overlap(struct ListBase * seqbasep, struct Sequence *test);
 struct ListBase *seq_seqbase(struct ListBase *seqbase, struct Sequence *seq);
 void seq_offset_animdata(struct Scene *scene, struct Sequence *seq, int ofs);
+void seq_dupe_animdata(struct Scene *scene, char *name_from, char *name_to);
 int shuffle_seq(struct ListBase * seqbasep, struct Sequence *test, struct Scene *evil_scene);
 int shuffle_seq_time(ListBase * seqbasep, struct Scene *evil_scene);
 int seqbase_isolated_sel_check(struct ListBase *seqbase);
 void free_imbuf_seq(struct Scene *scene, struct ListBase * seqbasep, int check_mem_usage);
+struct Sequence        *seq_dupli_recursive(struct Scene *scene, struct Sequence * seq, int dupe_flag);
+int seq_swap(struct Sequence *seq_a, struct Sequence *seq_b);
 
 void seq_update_sound(struct Scene* scene, struct Sequence *seq);
 void seq_update_muting(struct Scene* scene, struct Editing *ed);
 void seqbase_sound_reload(Scene *scene, ListBase *seqbase);
 void seqbase_unique_name_recursive(ListBase *seqbasep, struct Sequence *seq);
+void seqbase_dupli_recursive(struct Scene *scene, ListBase *nseqbase, ListBase *seqbase, int dupe_flag);
+
 void clear_scene_in_allseqs(struct Scene *sce);
 
 struct Sequence *get_seq_by_name(struct ListBase *seqbase, const char *name, int recursive);
 
-struct Sequence *active_seq_get(struct Scene *scene);
-void active_seq_set(struct Scene *scene, struct Sequence *seq);
+struct Sequence *seq_active_get(struct Scene *scene);
+void seq_active_set(struct Scene *scene, struct Sequence *seq);
+int seq_active_pair_get(struct Scene *scene, struct Sequence **seq_act, struct Sequence **seq_other);
 
 /* api for adding new sequence strips */
 typedef struct SeqLoadInfo {
@@ -223,6 +229,13 @@ typedef struct SeqLoadInfo {
 #define SEQ_LOAD_MOVIE_SOUND   1<<2
 #define SEQ_LOAD_SOUND_CACHE   1<<3
 
+
+/* seq_dupli' flags */
+#define SEQ_DUPE_UNIQUE_NAME   1<<0
+#define SEQ_DUPE_CONTEXT               1<<1
+#define SEQ_DUPE_ANIM                  1<<2
+#define SEQ_DUPE_ALL                   1<<3 /* otherwise only selected are copied */
+
 /* use as an api function */
 typedef struct Sequence *(*SeqLoadFunc)(struct bContext *, ListBase *, struct SeqLoadInfo *);
 
index ace352395d237bd071d8c57d9a655f40d8f07e0d..39c12a2bfd875ea9be70c1d83c4b3beef15c03ae 100644 (file)
@@ -64,6 +64,7 @@ void colorband_table_RGBA(struct ColorBand *coba, float **array, int *size);
 
 void default_tex(struct Tex *tex);
 struct Tex *add_texture(const char *name);
+void tex_set_type(struct Tex *tex, int type);
 void default_mtex(struct MTex *mtex);
 struct MTex *add_mtex(void);
 struct Tex *copy_texture(struct Tex *tex);
index 6198520c853a3b2a57dfd92b70f507dc2dac6ce6..a6705653769d9659a2649cdd4cee8cf662fa0f4d 100644 (file)
@@ -67,6 +67,7 @@ if env['BF_NO_ELBEEM']:
 
 if env['WITH_BF_LCMS']:
        defs.append('WITH_LCMS')
+       incs += ' ' + env['BF_LCMS_INC']
 
 if env['WITH_BF_LZO']:
        incs += ' #/extern/lzo/minilzo'
index 8fad398f00aa665f2256591d4ef6e3bec980ac92..bbd68fb797b5cb7088f6c7e14eb6e41af0dc1274 100644 (file)
@@ -1159,7 +1159,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
        int normalDataOffset = ss->normalDataOffset;
        int vertDataSize = ss->meshIFC.vertDataSize;
 
-       //#pragma omp parallel for private(ptrIdx) schedule(static)
+       #pragma omp parallel for private(ptrIdx) if(numEffectedF*edgeSize*edgeSize*4 >= CCG_OMP_LIMIT)
        for (ptrIdx=0; ptrIdx<numEffectedF; ptrIdx++) {
                CCGFace *f = (CCGFace*) effectedF[ptrIdx];
                int S, x, y;
@@ -1285,7 +1285,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
                }
        }
 
-       //#pragma omp parallel for private(ptrIdx) schedule(static)
+       #pragma omp parallel for private(ptrIdx) if(numEffectedF*edgeSize*edgeSize*4 >= CCG_OMP_LIMIT)
        for (ptrIdx=0; ptrIdx<numEffectedF; ptrIdx++) {
                CCGFace *f = (CCGFace*) effectedF[ptrIdx];
                int S, x, y;
@@ -1351,7 +1351,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
        int vertDataSize = ss->meshIFC.vertDataSize;
        void *q = ss->q, *r = ss->r;
 
-       //#pragma omp parallel for private(ptrIdx) schedule(static)
+       #pragma omp parallel for private(ptrIdx) if(numEffectedF*edgeSize*edgeSize*4 >= CCG_OMP_LIMIT)
        for (ptrIdx=0; ptrIdx<numEffectedF; ptrIdx++) {
                CCGFace *f = (CCGFace*) effectedF[ptrIdx];
                int S, x, y;
@@ -1685,17 +1685,17 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
                }
        }
 
-       //#pragma omp parallel private(ptrIdx)
+       #pragma omp parallel private(ptrIdx) if(numEffectedF*edgeSize*edgeSize*4 >= CCG_OMP_LIMIT)
        {
                void *q, *r;
 
-               //#pragma omp critical
+               #pragma omp critical
                {
                        q = MEM_mallocN(ss->meshIFC.vertDataSize, "CCGSubsurf q");
                        r = MEM_mallocN(ss->meshIFC.vertDataSize, "CCGSubsurf r");
                }
 
-               //#pragma omp for schedule(static)
+               #pragma omp for schedule(static)
                for (ptrIdx=0; ptrIdx<numEffectedF; ptrIdx++) {
                        CCGFace *f = (CCGFace*) effectedF[ptrIdx];
                        int S, x, y;
@@ -1779,7 +1779,7 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
                        }
                }
 
-               //#pragma omp critical
+               #pragma omp critical
                {
                        MEM_freeN(q);
                        MEM_freeN(r);
@@ -1791,14 +1791,14 @@ static void ccgSubSurf__calcSubdivLevel(CCGSubSurf *ss,
        gridSize = 1 + (1<<((nextLvl)-1));
        cornerIdx = gridSize-1;
 
-       //#pragma omp parallel for private(i) schedule(static)
+       #pragma omp parallel for private(i) if(numEffectedF*edgeSize*edgeSize*4 >= CCG_OMP_LIMIT)
        for (i=0; i<numEffectedE; i++) {
                CCGEdge *e = effectedE[i];
                VertDataCopy(EDGE_getCo(e, nextLvl, 0), VERT_getCo(e->v0, nextLvl));
                VertDataCopy(EDGE_getCo(e, nextLvl, edgeSize-1), VERT_getCo(e->v1, nextLvl));
        }
 
-       //#pragma omp parallel for private(i) schedule(static)
+       #pragma omp parallel for private(i) if(numEffectedF*edgeSize*edgeSize*4 >= CCG_OMP_LIMIT)
        for (i=0; i<numEffectedF; i++) {
                CCGFace *f = effectedF[i];
                int S, x;
index 12212c7a37b2d94fffc031bca0051aaea62d81ce..34d684221b0371d442ca3ca7d9cd6bd388666e5f 100644 (file)
@@ -39,6 +39,10 @@ typedef enum {
 
 /***/
 
+#define CCG_OMP_LIMIT  1000000
+
+/***/
+
 typedef struct _CCGSubSurf CCGSubSurf;
 
 CCGSubSurf*    ccgSubSurf_new  (CCGMeshIFC *ifc, int subdivisionLevels, CCGAllocatorIFC *allocatorIFC, CCGAllocatorHDL allocator);
index 339326f75d59a5da36b5896b25a2f21d2879f8a3..d5ece6ae31f3f84e6a8a3fdb1f2c7cbe92e56675 100644 (file)
@@ -247,8 +247,8 @@ void DM_to_mesh(DerivedMesh *dm, Mesh *me)
 
        /* if the number of verts has changed, remove invalid data */
        if(tmp.totvert != me->totvert) {
-               if(me->key) me->key->id.us--;
-               me->key = NULL;
+               if(tmp.key) tmp.key->id.us--;
+               tmp.key = NULL;
        }
 
        *me = tmp;
index 50552d33c41996c0bf320ea762fd7be77c230bb8..6c8e5c4874520585b42e83dfb368fece9e5cc283 100644 (file)
@@ -1418,7 +1418,7 @@ static void do_nla(Scene *scene, Object *ob, int blocktype)
        bActionStrip *strip, *striplast=NULL, *stripfirst=NULL;
        float striptime, frametime, length, actlength;
        float blendfac, stripframe;
-       float scene_cfra= frame_to_float(scene, scene->r.cfra); 
+       float scene_cfra= BKE_curframe(scene);
        int     doit, dostride;
        
        if(blocktype==ID_AR) {
index 6044cfa7692341e3c68ee6cfaad036edc08bb749..fa0ddc5f1d3df2b6d4b926cf5edf95b81e5f2fc0 100644 (file)
@@ -1532,7 +1532,10 @@ void free_object_duplilist(ListBase *lb)
 {
        DupliObject *dob;
        
-       for(dob= lb->first; dob; dob= dob->next) {
+       /* loop in reverse order, if object is instanced multiple times
+          the original layer may not really be original otherwise, proper
+          solution is more complicated */
+       for(dob= lb->last; dob; dob= dob->prev) {
                dob->ob->lay= dob->origlay;
                copy_m4_m4(dob->ob->obmat, dob->omat);
        }
index 134d49cdf24e3d27b0eb392fae8c8670147e8b8d..57e72fc56715055ca3fdcae5f0757b6ecd192506 100644 (file)
@@ -55,6 +55,7 @@
 
 #include "BLI_blenlib.h"
 #include "BLI_dynstr.h"
+#include "BLI_path_util.h"
 
 #include "IMB_imbuf.h"
 
@@ -64,6 +65,7 @@
 #include "BKE_displist.h"
 #include "BKE_global.h"
 #include "BKE_idprop.h"
+#include "BKE_ipo.h"
 #include "BKE_library.h"
 #include "BKE_main.h"
 #include "BKE_node.h"
@@ -286,6 +288,11 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename)
                //setscreen(G.curscreen);
        }
        
+       // FIXME: this version patching should really be part of the file-reading code, 
+       // but we still get too many unrelated data-corruption crashes otherwise...
+       if (G.main->versionfile < 250)
+               do_versions_ipos_to_animato(G.main);
+       
        if(recover && bfd->filename[0] && G.relbase_valid) {
                /* in case of autosave or quit.blend, use original filename instead
                 * use relbase_valid to make sure the file is saved, else we get <memory2> in the filename */
@@ -362,7 +369,7 @@ int BKE_read_file(bContext *C, char *dir, void *unused, ReportList *reports)
        BlendFileData *bfd;
        int retval= 1;
 
-       if(strstr(dir, ".B25.blend")==0) /* dont print user-pref loading */
+       if(strstr(dir, BLENDER_STARTUP_FILE)==0) /* dont print user-pref loading */
                printf("read blend: %s\n", dir);
 
        bfd= BLO_read_from_file(dir, reports);
index 80f39531b349184bedf9366872074444abcf79dc..a586ca57966e94f4eb920550359ce16c9653d88f 100644 (file)
@@ -186,6 +186,16 @@ static ListBase *cdDM_getFaceMap(Object *ob, DerivedMesh *dm)
        return cddm->fmap;
 }
 
+static int can_pbvh_draw(Object *ob, DerivedMesh *dm)
+{
+       CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
+       Mesh *me= (ob)? ob->data: NULL;
+
+       if(ob->sculpt->modifiers_active) return 0;
+
+       return (cddm->mvert == me->mvert) || ob->sculpt->kb;
+}
+
 static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
 {
        CDDerivedMesh *cddm = (CDDerivedMesh*) dm;
@@ -200,7 +210,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
                return NULL;
        if(ob->sculpt->pbvh) {
                cddm->pbvh= ob->sculpt->pbvh;
-               cddm->pbvh_draw = (cddm->mvert == me->mvert) || ob->sculpt->kb;
+               cddm->pbvh_draw = can_pbvh_draw(ob, dm);
        }
 
        /* always build pbvh from original mesh, and only use it for drawing if
@@ -208,7 +218,7 @@ static struct PBVH *cdDM_getPBVH(Object *ob, DerivedMesh *dm)
           that this is actually for, to support a pbvh on a modified mesh */
        if(!cddm->pbvh && ob->type == OB_MESH) {
                cddm->pbvh = BLI_pbvh_new();
-               cddm->pbvh_draw = (cddm->mvert == me->mvert) || ob->sculpt->kb;
+               cddm->pbvh_draw = can_pbvh_draw(ob, dm);
                BLI_pbvh_build_mesh(cddm->pbvh, me->mface, me->mvert,
                                   me->totface, me->totvert);
        }
@@ -734,7 +744,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
                                if( flag != lastFlag ) {
                                        if( startFace < i ) {
                                                if( lastFlag != 0 ) { /* if the flag is 0 it means the face is hidden or invisible */
-                                                       if (lastFlag==1 && mcol)
+                                                       if (lastFlag==1 && col)
                                                                GPU_color_switch(1);
                                                        else
                                                                GPU_color_switch(0);
@@ -747,7 +757,7 @@ static void cdDM_drawFacesTex_common(DerivedMesh *dm,
                        }
                        if( startFace < dm->drawObject->nelements/3 ) {
                                if( lastFlag != 0 ) { /* if the flag is 0 it means the face is hidden or invisible */
-                                       if (lastFlag==1 && mcol)
+                                       if (lastFlag==1 && col)
                                                GPU_color_switch(1);
                                        else
                                                GPU_color_switch(0);
@@ -875,7 +885,7 @@ static void cdDM_drawMappedFaces(DerivedMesh *dm, int (*setDrawOptions)(void *us
                                else
                                        orig = actualFace;
 
-                               if(setDrawOptions && !setDrawOptions(userData, orig, &drawSmooth))
+                               if(draw && setDrawOptions && !setDrawOptions(userData, orig, &drawSmooth))
                                        draw = 0;
 
                                /* Goal is to draw as long of a contiguous triangle
index bdeacdf6946e26854eb67b3fca03ed9048794146..1a1ca8a8d3e46b63fbb34a92e9329d729ecfb48d 100644 (file)
@@ -1754,7 +1754,7 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
        node->lasttime= curtime;
        
        ob= node->ob;
-       if(ob && (ob->recalc & OB_RECALC)) {
+       if(ob && (ob->recalc & OB_RECALC_ALL)) {
                all_layer= node->scelay;
 
                /* got an object node that changes, now check relations */
@@ -1797,7 +1797,7 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
                        if(ob->recalc & OB_RECALC_DATA)
                                object_free_display(ob);
                        
-                       ob->recalc &= ~OB_RECALC;
+                       ob->recalc &= ~OB_RECALC_ALL;
                }
        }
        
@@ -1810,7 +1810,7 @@ static void flush_update_node(DagNode *node, unsigned int layer, int curtime)
                        if(itA->node->type==ID_OB) {
                                obc= itA->node->ob;
                                /* child moves */
-                               if((obc->recalc & OB_RECALC)==OB_RECALC_OB) {
+                               if((obc->recalc & OB_RECALC_ALL)==OB_RECALC_OB) {
                                        /* parent has deforming info */
                                        if(itA->type & (DAG_RL_OB_DATA|DAG_RL_DATA_DATA)) {
                                                // printf("parent %s changes ob %s\n", ob->id.name, obc->id.name);
@@ -1864,7 +1864,7 @@ static void flush_pointcache_reset(Scene *scene, DagNode *node, int curtime, int
                        if(itA->node->lasttime!=curtime) {
                                ob= (Object*)(node->ob);
 
-                               if(reset || (ob->recalc & OB_RECALC)) {
+                               if(reset || (ob->recalc & OB_RECALC_ALL)) {
                                        if(BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH))
                                                ob->recalc |= OB_RECALC_DATA;
 
@@ -1877,26 +1877,19 @@ static void flush_pointcache_reset(Scene *scene, DagNode *node, int curtime, int
        }
 }
 
-/* flushes all recalc flags in objects down the dependency tree */
-void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
+/* flush layer flags to dependencies */
+static void dag_scene_flush_layers(Scene *sce, int lay)
 {
-       DagNode *firstnode, *node;
+       DagNode *node, *firstnode;
        DagAdjList *itA;
-       Object *ob;
        Base *base;
        int lasttime;
-       
-       if(sce->theDag==NULL) {
-               printf("DAG zero... not allowed to happen!\n");
-               DAG_scene_sort(sce);
-       }
-       
+
        firstnode= sce->theDag->DagNode.first;  // always scene node
 
        for(itA = firstnode->child; itA; itA= itA->next)
                itA->lay= 0;
-       
-       /* first we flush the layer flags */
+
        sce->theDag->time++;    // so we know which nodes were accessed
        lasttime= sce->theDag->time;
 
@@ -1930,7 +1923,26 @@ void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
        for(itA = firstnode->child; itA; itA= itA->next)
                if(itA->node->lasttime!=lasttime && itA->node->type==ID_OB) 
                        flush_layer_node(sce, itA->node, lasttime);
+}
+
+/* flushes all recalc flags in objects down the dependency tree */
+void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
+{
+       DagNode *firstnode;
+       DagAdjList *itA;
+       Object *ob;
+       int lasttime;
+       
+       if(sce->theDag==NULL) {
+               printf("DAG zero... not allowed to happen!\n");
+               DAG_scene_sort(sce);
+       }
        
+       firstnode= sce->theDag->DagNode.first;  // always scene node
+
+       /* first we flush the layer flags */
+       dag_scene_flush_layers(sce, lay);
+
        /* then we use the relationships + layer info to flush update events */
        sce->theDag->time++;    // so we know which nodes were accessed
        lasttime= sce->theDag->time;
@@ -1946,7 +1958,7 @@ void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
                        if(itA->node->lasttime!=lasttime && itA->node->type==ID_OB)  {
                                ob= (Object*)(itA->node->ob);
 
-                               if(ob->recalc & OB_RECALC) {
+                               if(ob->recalc & OB_RECALC_ALL) {
                                        if(BKE_ptcache_object_reset(sce, ob, PTCACHE_RESET_DEPSGRAPH))
                                                ob->recalc |= OB_RECALC_DATA;
 
@@ -1962,11 +1974,30 @@ void DAG_scene_flush_update(Scene *sce, unsigned int lay, int time)
 static int object_modifiers_use_time(Object *ob)
 {
        ModifierData *md;
-
+       
+       /* check if a modifier in modifier stack needs time input */
        for (md=ob->modifiers.first; md; md=md->next)
                if (modifier_dependsOnTime(md))
                        return 1;
-
+       
+       /* check whether any modifiers are animated */
+       if (ob->adt) {
+               AnimData *adt = ob->adt;
+               
+               /* action - check for F-Curves with paths containing 'modifiers[' */
+               if (adt->action) {
+                       FCurve *fcu;
+                       
+                       for (fcu = adt->action->curves.first; fcu; fcu = fcu->next) {
+                               if (fcu->rna_path && strstr(fcu->rna_path, "modifiers["))
+                                       return 1;
+                       }
+               }
+               
+               // XXX: also, should check NLA strips, though for now assume that nobody uses
+               // that and we can omit that for performance reasons...
+       }
+       
        return 0;
 }
 
@@ -2026,14 +2057,14 @@ static void dag_object_time_update_flags(Object *ob)
                        /* this case is for groups with nla, whilst nla target has no action or nla */
                        for(strip= ob->nlastrips.first; strip; strip= strip->next) {
                                if(strip->object)
-                                       strip->object->recalc |= OB_RECALC;
+                                       strip->object->recalc |= OB_RECALC_ALL;
                        }
                }
        }
 #endif // XXX old animation system
        
        if(animdata_use_time(ob->adt)) {
-               ob->recalc |= OB_RECALC;
+               ob->recalc |= OB_RECALC_OB;
                ob->adt->recalc |= ADT_RECALC_ANIM;
        }
        
@@ -2212,7 +2243,8 @@ void DAG_on_load_update(void)
        Object *ob;
        Group *group;
        GroupObject *go;
-       unsigned int lay;
+       DagNode *node;
+       unsigned int lay, oblay;
 
        dag_current_scene_layers(bmain, &scene, &lay);
 
@@ -2221,10 +2253,14 @@ void DAG_on_load_update(void)
                   remade, tag them so they get remade in the scene update loop,
                   note armature poses or object matrices are preserved and do not
                   require updates, so we skip those */
+               dag_scene_flush_layers(scene, lay);
+
                for(SETLOOPER(scene, base)) {
                        ob= base->object;
+                       node= (sce->theDag)? dag_get_node(sce->theDag, ob): NULL;
+                       oblay= (node)? node->lay: ob->lay;
 
-                       if(base->lay & lay) {
+                       if(oblay & lay) {
                                if(ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL))
                                        ob->recalc |= OB_RECALC_DATA;
                                if(ob->dup_group) 
@@