synched with trunk at revision 30597
authorNick Samarin <nicks1987@bigmir.net>
Wed, 21 Jul 2010 20:54:53 +0000 (20:54 +0000)
committerNick Samarin <nicks1987@bigmir.net>
Wed, 21 Jul 2010 20:54:53 +0000 (20:54 +0000)
381 files changed:
CMakeLists.txt
Makefile
SConstruct
bin/blender-thumbnailer.py [new file with mode: 0755]
build_files/cmake/example_scripts/cmake_linux_install.sh [new file with mode: 0755]
build_files/cmake/macros.cmake
build_files/make/nan_compile.mk [moved from source/nan_compile.mk with 100% similarity]
build_files/make/nan_definitions.mk [moved from source/nan_definitions.mk with 99% similarity]
build_files/make/nan_link.mk [moved from source/nan_link.mk with 100% similarity]
build_files/make/nan_subdirs.mk [moved from source/nan_subdirs.mk with 100% similarity]
build_files/make/nan_warn.mk [moved from source/nan_warn.mk with 100% similarity]
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
doc/blender.1
doc/blender.1.py
extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp
extern/libopenjpeg/dwt.c
intern/ghost/CMakeLists.txt
intern/ghost/SConscript
intern/ghost/intern/GHOST_EventDragnDrop.h
intern/ghost/intern/GHOST_SystemCocoa.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_SystemWin32.h
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_WindowCarbon.cpp
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/iksolver/intern/TNT/vec.h
intern/itasc/MovingFrame.cpp
intern/string/intern/STR_String.cpp
projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
projectfiles_vc9/blender/editors/ED_editors.vcproj
projectfiles_vc9/blender/gpu/BL_gpu.vcproj
release/VERSION
release/datafiles/brushicons/add.png [new file with mode: 0644]
release/datafiles/brushicons/blob.png [new file with mode: 0644]
release/datafiles/brushicons/blur.png [new file with mode: 0644]
release/datafiles/brushicons/clay.png [new file with mode: 0644]
release/datafiles/brushicons/clone.png [new file with mode: 0644]
release/datafiles/brushicons/crease.png [new file with mode: 0644]
release/datafiles/brushicons/darken.png [new file with mode: 0644]
release/datafiles/brushicons/draw.png [new file with mode: 0644]
release/datafiles/brushicons/fill.png [new file with mode: 0644]
release/datafiles/brushicons/flatten.png [new file with mode: 0644]
release/datafiles/brushicons/grab.png [new file with mode: 0644]
release/datafiles/brushicons/inflate.png [new file with mode: 0644]
release/datafiles/brushicons/layer.png [new file with mode: 0644]
release/datafiles/brushicons/lighten.png [new file with mode: 0644]
release/datafiles/brushicons/mix.png [new file with mode: 0644]
release/datafiles/brushicons/multiply.png [new file with mode: 0644]
release/datafiles/brushicons/nudge.png [new file with mode: 0644]
release/datafiles/brushicons/pinch.png [new file with mode: 0644]
release/datafiles/brushicons/scrape.png [new file with mode: 0644]
release/datafiles/brushicons/smear.png [new file with mode: 0644]
release/datafiles/brushicons/smooth.png [new file with mode: 0644]
release/datafiles/brushicons/snake_hook.png [new file with mode: 0644]
release/datafiles/brushicons/soften.png [new file with mode: 0644]
release/datafiles/brushicons/subtract.png [new file with mode: 0644]
release/datafiles/brushicons/texdraw.png [new file with mode: 0644]
release/datafiles/brushicons/thumb.png [new file with mode: 0644]
release/datafiles/brushicons/twist.png [new file with mode: 0644]
release/datafiles/brushicons/vertexdraw.png [new file with mode: 0644]
release/datafiles/splash.png
release/freedesktop/blender.desktop
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_anim_bvh.py
release/scripts/io/import_scene_3ds.py
release/scripts/io/import_scene_obj.py
release/scripts/io/netrender/master_html.py
release/scripts/io/netrender/repath.py
release/scripts/io/netrender/slave.py
release/scripts/io/netrender/utils.py
release/scripts/modules/add_object_utils.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/console/complete_calltip.py
release/scripts/modules/rigify/__init__.py
release/scripts/modules/rigify/arm_biped.py
release/scripts/modules/rigify/spine_pivot_flex.py
release/scripts/modules/rna_info.py
release/scripts/op/console_python.py
release/scripts/op/fcurve_euler_filter.py
release/scripts/op/mesh.py
release/scripts/op/nla.py
release/scripts/op/object.py
release/scripts/op/presets.py
release/scripts/op/sequencer.py
release/scripts/op/uv.py
release/scripts/op/uvcalc_follow_active.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/op/vertexpaint_dirt.py
release/scripts/presets/interaction/maya.py
release/scripts/templates/operator_uv.py
release/scripts/ui/properties_data_armature.py
release/scripts/ui/properties_data_bone.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_physics_common.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_texture.py
release/scripts/ui/properties_world.py
release/scripts/ui/space_image.py
release/scripts/ui/space_info.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_time.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py
release/text/readme.html
source/blender/avi/AVI_avi.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_brush.h
source/blender/blenkernel/BKE_fcurve.h
source/blender/blenkernel/BKE_object.h
source/blender/blenkernel/BKE_paint.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_scene.h
source/blender/blenkernel/BKE_sequencer.h
source/blender/blenkernel/BKE_sound.h
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/fmodifier.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/icons.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/world.c
source/blender/blenlib/BLI_path_util.h
source/blender/blenlib/BLI_pbvh.h
source/blender/blenlib/BLI_winstuff.h
source/blender/blenlib/intern/fileops.c
source/blender/blenlib/intern/math_color.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/storage.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_markers.c
source/blender/editors/animation/anim_ops.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/animation/keyframing.c
source/blender/editors/armature/armature_intern.h
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/poseobject.c
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/datafiles/B.blend.c [deleted file]
source/blender/editors/datafiles/SConscript
source/blender/editors/datafiles/add.png.c [new file with mode: 0644]
source/blender/editors/datafiles/blob.png.c [new file with mode: 0644]
source/blender/editors/datafiles/blur.png.c [new file with mode: 0644]
source/blender/editors/datafiles/clay.png.c [new file with mode: 0644]
source/blender/editors/datafiles/clone.png.c [new file with mode: 0644]
source/blender/editors/datafiles/crease.png.c [new file with mode: 0644]
source/blender/editors/datafiles/darken.png.c [new file with mode: 0644]
source/blender/editors/datafiles/draw.png.c [new file with mode: 0644]
source/blender/editors/datafiles/fill.png.c [new file with mode: 0644]
source/blender/editors/datafiles/flatten.png.c [new file with mode: 0644]
source/blender/editors/datafiles/grab.png.c [new file with mode: 0644]
source/blender/editors/datafiles/inflate.png.c [new file with mode: 0644]
source/blender/editors/datafiles/layer.png.c [new file with mode: 0644]
source/blender/editors/datafiles/lighten.png.c [new file with mode: 0644]
source/blender/editors/datafiles/mix.png.c [new file with mode: 0644]
source/blender/editors/datafiles/multiply.png.c [new file with mode: 0644]
source/blender/editors/datafiles/nudge.png.c [new file with mode: 0644]
source/blender/editors/datafiles/pinch.png.c [new file with mode: 0644]
source/blender/editors/datafiles/scrape.png.c [new file with mode: 0644]
source/blender/editors/datafiles/smear.png.c [new file with mode: 0644]
source/blender/editors/datafiles/smooth.png.c [new file with mode: 0644]
source/blender/editors/datafiles/snake_hook.png.c [new file with mode: 0644]
source/blender/editors/datafiles/soften.png.c [new file with mode: 0644]
source/blender/editors/datafiles/splash.png.c
source/blender/editors/datafiles/startup.blend.c [new file with mode: 0644]
source/blender/editors/datafiles/subtract.png.c [new file with mode: 0644]
source/blender/editors/datafiles/texdraw.png.c [new file with mode: 0644]
source/blender/editors/datafiles/thumb.png.c [new file with mode: 0644]
source/blender/editors/datafiles/twist.png.c [new file with mode: 0644]
source/blender/editors/datafiles/vertexdraw.png.c [new file with mode: 0644]
source/blender/editors/gpencil/gpencil_buttons.c
source/blender/editors/include/ED_datafiles.h
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_icons.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/resources.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_ops.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/metaball/mball_ops.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_transform.c
source/blender/editors/physics/physics_ops.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/SConscript
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_intern.h
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_intern.h
source/blender/editors/sculpt_paint/sculpt_undo.c [new file with mode: 0644]
source/blender/editors/space_action/action_ops.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/fsmenu.c
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_ops.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_ops.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_state.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_ops.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_input.c
source/blender/gpu/GPU_buffers.h [moved from source/blender/gpu/gpu_buffers.h with 95% similarity]
source/blender/gpu/GPU_extensions.h
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/intern/anim.c
source/blender/imbuf/intern/imageprocess.c
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/imbuf/intern/png.c
source/blender/imbuf/intern/thumbs_blend.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_actuator_types.h
source/blender/makesdna/DNA_brush_types.h
source/blender/makesdna/DNA_color_types.h
source/blender/makesdna/DNA_curve_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_sdna_types.h
source/blender/makesdna/DNA_sequence_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/DNA_windowmanager_types.h
source/blender/makesdna/DNA_world_types.h
source/blender/makesdna/intern/dna_genfile.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_animviz.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_color.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_fcurve.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_timeline.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_world.c
source/blender/makesrna/rna_cleanup/rna_booleans.txt
source/blender/makesrna/rna_cleanup/rna_cleaner.py
source/blender/makesrna/rna_cleanup/rna_properties.txt [new file with mode: 0644]
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/nodes/intern/CMP_util.c
source/blender/python/doc/epy/Geometry.py
source/blender/python/doc/examples/bpy.data.py
source/blender/python/doc/sphinx_doc_gen.py
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/generic/mathutils.h
source/blender/python/generic/mathutils_vector.c
source/blender/python/generic/noise.c [new file with mode: 0644]
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_app.c
source/blender/python/intern/bpy_rna.c
source/blender/render/SConscript
source/blender/render/intern/raytrace/reorganize.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/texture.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/SConscript
source/blender/windowmanager/WM_api.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_operators.c
source/blender/windowmanager/intern/wm_window.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/Expressions/PyObjectPlus.cpp
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/KX_Camera.cpp
source/gameengine/Ketsji/KX_Camera.h
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_PythonSeq.cpp
source/gameengine/Network/NG_NetworkScene.cpp
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/PyDoc/VideoTexture.py
source/gameengine/PyDoc/bge.logic.rst
source/gameengine/PyDoc/bge.render.rst
source/gameengine/PyDoc/bge.types.rst

index 9c14bdd..bec1353 100644 (file)
@@ -55,10 +55,6 @@ PROJECT(Blender)
 SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
 SET(LIBRARY_OUTPUT_PATH  ${CMAKE_BINARY_DIR}/lib)
 
-# Note! - Could create this from the blender version string
-# ...but thats quite involved, make sure this matches the blender version.
-SET(BLENDER_VERSION  2.5)
-
 #-----------------------------------------------------------------------------
 # Load some macros.
 INCLUDE(build_files/cmake/macros.cmake)
@@ -66,6 +62,8 @@ INCLUDE(build_files/cmake/macros.cmake)
 #-----------------------------------------------------------------------------
 # Set default config options
 
+GET_BLENDER_VERSION()
+
 # Blender internal features
 OPTION(WITH_INTERNATIONAL "Enable I18N   (International fonts and text)" ON)
 OPTION(WITH_LCMS          "Enable color correction with lcms" OFF)
@@ -628,6 +626,12 @@ IF(WIN32)
                        SET(WITH_JACK OFF)
                ENDIF(WITH_JACK)
 
+               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)
+
        ENDIF(MSVC)
 
 ENDIF(WIN32)
index 7c883c4..b16e046 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -41,7 +41,7 @@ sinclude user-def.mk
 # export NAN_NO_OPENAL=true
 
 export NANBLENDERHOME=$(shell pwd)
-MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory
+MAKEFLAGS=-I$(NANBLENDERHOME)/build_files/make --no-print-directory
 
 SOURCEDIR = 
 ifeq ($(FREE_WINDOWS),true)
@@ -50,7 +50,7 @@ else
     DIRS ?= extern intern source po
 endif
 
-include source/nan_subdirs.mk
+include build_files/make/nan_subdirs.mk
 
 .PHONY: release
 release:
index 09ada7d..acdf618 100644 (file)
@@ -46,20 +46,22 @@ import glob
 import re
 from tempfile import mkdtemp
 
+# store path to tools
+toolpath=os.path.join(".", "build_files", "scons", "tools")
+
 # needed for importing tools
-sys.path.append(os.path.join(".", "build_files", "scons"))
+sys.path.append(toolpath)
 
-import tools.Blender
-import tools.btools
-import tools.bcolors
+import Blender
+import btools
+import bcolors
 
 EnsureSConsVersion(1,0,0)
 
-BlenderEnvironment = tools.Blender.BlenderEnvironment
-btools = tools.btools
-B = tools.Blender
+BlenderEnvironment = Blender.BlenderEnvironment
+B = Blender
 
-VERSION = tools.btools.VERSION # This is used in creating the local config directories
+VERSION = btools.VERSION # This is used in creating the local config directories
 
 ### globals ###
 platform = sys.platform
@@ -122,7 +124,7 @@ if toolset:
        print "Using " + toolset
        if toolset=='mstoolkit':
                env = BlenderEnvironment(ENV = os.environ)
-               env.Tool('mstoolkit', ['tools'])
+               env.Tool('mstoolkit', [toolpath])
        else:
                env = BlenderEnvironment(tools=[toolset], ENV = os.environ)
                # xxx commented out, as was supressing warnings under mingw..
@@ -171,7 +173,7 @@ else:
 
 if crossbuild and env['PLATFORM'] != 'win32':
        print B.bc.HEADER+"Preparing for crossbuild"+B.bc.ENDC
-       env.Tool('crossmingw', ['tools'])
+       env.Tool('crossmingw', [toolpath])
        # todo: determine proper libs/includes etc.
        # Needed for gui programs, console programs should do without it
 
@@ -628,9 +630,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
                                        '${BF_FFMPEG_LIBPATH}/avdevice-52.dll',
                                        '${BF_FFMPEG_LIBPATH}/avutil-50.dll',
                                        '${BF_FFMPEG_LIBPATH}/swscale-0.dll']
-
-       if env['WITH_BF_JACK']:
-               dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
        windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
        allinstall += windlls
 
diff --git a/bin/blender-thumbnailer.py b/bin/blender-thumbnailer.py
new file mode 100755 (executable)
index 0000000..27d6259
--- /dev/null
@@ -0,0 +1,131 @@
+#!/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 #####
+
+"""
+Thumbnailer runs with python 2.6 and 3.x.
+To run automatically with nautilus:
+   gconftool --type boolean --set /desktop/gnome/thumbnailers/application@x-blender/enable true
+   gconftool --type string --set /desktop/gnome/thumbnailers/application@x-blender/command "blender-thumbnailer.py %i %o"
+"""
+
+import struct
+
+def blend_extract_thumb(path):
+    import os
+
+    # def MAKE_ID(tag): ord(tag[0])<<24 | ord(tag[1])<<16 | ord(tag[2])<<8 | ord(tag[3])
+    REND = 1145980242 # MAKE_ID(b'REND')
+    TEST = 1414743380 # MAKE_ID(b'TEST')
+
+    blendfile = open(path, 'rb')
+
+    head = blendfile.read(12)
+
+    if head[0:2] == b'\x1f\x8b': # gzip magic
+        import gzip
+        blendfile.close()
+        blendfile = gzip.open(path, 'rb')
+        head = blendfile.read(12)
+
+    if not head.startswith(b'BLENDER'):
+        blendfile.close()
+        return None, 0, 0
+
+    is_64_bit = (head[7] == b'-')
+
+    # true for PPC, false for X86
+    is_big_endian = (head[8] == b'V')
+
+    # blender pre 2.5 had no thumbs
+    if head[9:11] <= b'24':
+        return None, 0, 0
+
+    sizeof_bhead = 24 if is_64_bit else 20
+    int_endian_pair = '>ii' if is_big_endian else '<ii'
+
+    while True:
+        bhead = blendfile.read(sizeof_bhead)
+
+        if len(bhead) < sizeof_bhead:
+            return None, 0, 0
+
+        code, length = struct.unpack(int_endian_pair, bhead[0:8]) # 8 == sizeof(int) * 2
+
+        if code == REND:
+            blendfile.seek(length, os.SEEK_CUR)
+        else:
+            break
+            
+    
+    if code != TEST:
+        return None, 0, 0
+
+    try:
+        x, y = struct.unpack(int_endian_pair, blendfile.read(8)) # 8 == sizeof(int) * 2
+    except struct.error:
+        return None, 0, 0
+
+    length -= 8 # sizeof(int) * 2
+
+    if length != x * y * 4:
+        return None, 0, 0
+
+    image_buffer = blendfile.read(length)
+
+    if len(image_buffer) != length:
+        return None, 0, 0
+
+    return image_buffer, x, y
+
+
+def write_png(buf, width, height):
+    import zlib
+
+    # reverse the vertical line order and add null bytes at the start
+    width_byte_4 = width * 4
+    raw_data = b"".join([b'\x00' + buf[span:span + width_byte_4] for span in range((height - 1) * width * 4, -1, - width_byte_4)])
+
+    def png_pack(png_tag, data):
+        chunk_head = png_tag + data
+        return struct.pack("!I", len(data)) + chunk_head + struct.pack("!I", 0xFFFFFFFF & zlib.crc32(chunk_head))
+
+    return b"".join([
+        b'\x89PNG\r\n\x1a\n',
+        png_pack(b'IHDR', struct.pack("!2I5B", width, height, 8, 6, 0, 0, 0)),
+        png_pack(b'IDAT', zlib.compress(raw_data, 9)),
+        png_pack(b'IEND', b'')])
+
+
+if __name__ == '__main__':
+    import sys
+
+    if len(sys.argv) < 2:
+        print("Expected 2 arguments <input.blend> <output.png>")
+    else:
+        file_in = sys.argv[-2]
+
+        buf, width, height = blend_extract_thumb(file_in)
+        
+        if buf:
+            file_out = sys.argv[-1]
+
+            f = open(file_out, "wb")
+            f.write(write_png(buf, width, height))
+            f.close()
diff --git a/build_files/cmake/example_scripts/cmake_linux_install.sh b/build_files/cmake/example_scripts/cmake_linux_install.sh
new file mode 100755 (executable)
index 0000000..7770efc
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# This shell script checks out and compiles blender, tested on ubuntu 10.04
+# assumes you have dependancies installed alredy
+
+# See this page for more info:
+#  http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Generic_Distro/CMake
+
+# grab blender
+mkdir ~/blender-svn 
+cd ~/blender-svn
+svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender
+
+# create cmake dir
+mkdir ~/blender-svn/build-cmake
+cd ~/blender-svn/build-cmake
+
+# cmake without copying files for fast rebuilds
+# the files from svn will be used in place
+cmake ../blender -DWITH_INSTALL:BOOL=FALSE
+
+# make blender, will take some time
+make
+
+# link the binary to blenders source directory to run quickly
+ln -s ~/blender-svn/build-cmake/bin/blender ~/blender-svn/blender/blender.bin
+
+# useful info
+echo ""
+echo "* Useful Commands *"
+echo "   Run Blender: ~/blender-svn/blender/blender.bin"
+echo "   Update Blender: svn up ~/blender-svn/blender"
+echo "   Reconfigure Blender: cd ~/blender-svn/build-cmake ; cmake ."
+echo "   Build Blender: cd ~/blender-svn/build-cmake ; make"
+echo ""
+
+
index aec86f7..84e6b78 100644 (file)
@@ -198,3 +198,36 @@ MACRO(TEST_SSE_SUPPORT)
        SUPPORT_SSE_BUILD)
 ENDMACRO(TEST_SSE_SUPPORT)
 
+MACRO(GET_BLENDER_VERSION)
+       FILE(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT)
+       STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")
+       STRING(REGEX REPLACE "\t" ";" CONTENT "${CONTENT}")
+       STRING(REGEX REPLACE " " ";" CONTENT "${CONTENT}")
+
+       FOREACH(ITEM ${CONTENT})
+               IF(LASTITEM MATCHES "BLENDER_VERSION")
+                       MATH(EXPR BLENDER_VERSION_MAJOR "${ITEM} / 100")
+                       MATH(EXPR BLENDER_VERSION_MINOR "${ITEM} % 100")
+                       SET(BLENDER_VERSION "${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}")
+               ENDIF(LASTITEM MATCHES "BLENDER_VERSION")
+               
+               IF(LASTITEM MATCHES "BLENDER_SUBVERSION")
+                       SET(BLENDER_SUBVERSION ${ITEM})
+               ENDIF(LASTITEM MATCHES "BLENDER_SUBVERSION")
+               
+               IF(LASTITEM MATCHES "BLENDER_MINVERSION")
+                       MATH(EXPR BLENDER_MINVERSION_MAJOR "${ITEM} / 100")
+                       MATH(EXPR BLENDER_MINVERSION_MINOR "${ITEM} % 100")
+                       SET(BLENDER_MINVERSION "${BLENDER_MINVERSION_MAJOR}.${BLENDER_MINVERSION_MINOR}")
+               ENDIF(LASTITEM MATCHES "BLENDER_MINVERSION")
+               
+               IF(LASTITEM MATCHES "BLENDER_MINSUBVERSION")
+                       SET(BLENDER_MINSUBVERSION ${ITEM})
+               ENDIF(LASTITEM MATCHES "BLENDER_MINSUBVERSION")
+
+               SET(LASTITEM ${ITEM})
+       ENDFOREACH(ITEM ${CONTENT})
+       
+       MESSAGE(STATUS "Version major: ${BLENDER_VERSION_MAJOR}, Version minor: ${BLENDER_VERSION_MINOR}, Subversion: ${BLENDER_SUBVERSION}, Version: ${BLENDER_VERSION}")
+       MESSAGE(STATUS "Minversion major: ${BLENDER_MINVERSION_MAJOR}, Minversion minor: ${BLENDER_MINVERSION_MINOR}, MinSubversion: ${BLENDER_MINSUBVERSION}, Minversion: ${BLENDER_MINVERSION}")
+ENDMACRO(GET_BLENDER_VERSION)
similarity index 99%
rename from source/nan_definitions.mk
rename to build_files/make/nan_definitions.mk
index 37df7b0..d14bdb0 100644 (file)
@@ -31,7 +31,7 @@
 # set some defaults when these are not overruled (?=) by environment variables
 #
 
-sinclude ../user-def.mk
+sinclude ../../user-def.mk
 
 # This warning only takes place once in source/
 ifeq (debug, $(findstring debug, $(MAKECMDGOALS)))
index 1195b00..7f5ce47 100644 (file)
@@ -498,7 +498,9 @@ def AppIt(target=None, source=None, env=None):
        builddir, b = os.path.split(a)
        libdir = env['LCGDIR'][1:]
        osxarch = env['MACOSX_ARCHITECTURE']
+       installdir = env['BF_INSTALLDIR']
        print("compiled architecture: %s"%(osxarch))
+       print("Installing to %s"%(installdir))
        if  libdir == '../lib/darwin-9.x.universal':
                python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip
        else:
@@ -513,45 +515,45 @@ def AppIt(target=None, source=None, env=None):
        
        sourcedir = bldroot + '/source/darwin/%s.app'%binary
        sourceinfo = bldroot + "/source/darwin/%s.app/Contents/Info.plist"%binary
-       targetinfo = builddir +'/' + "%s.app/Contents/Info.plist"%binary
-       cmd = builddir + '/' +'%s.app'%binary
+       targetinfo = installdir +'/' + "%s.app/Contents/Info.plist"%binary
+       cmd = installdir + '/' +'%s.app'%binary
        
        if os.path.isdir(cmd):
                shutil.rmtree(cmd)
        shutil.copytree(sourcedir, cmd)
        cmd = "cat %s | sed s/VERSION/`cat release/VERSION`/ | sed s/DATE/`date +'%%Y-%%b-%%d'`/ > %s"%(sourceinfo,targetinfo)
        commands.getoutput(cmd)
-       cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,builddir, binary, binary)
+       cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary)
        commands.getoutput(cmd)
-       cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(builddir, binary, VERSION)
+       cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION)
 #      print cmd
        commands.getoutput(cmd)
-       cmd = builddir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
+       cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
        shutil.copy(bldroot + '/bin/.blender/.bfont.ttf', cmd)
        shutil.copy(bldroot + '/bin/.blender/.Blanguages', cmd)
-       cmd = 'cp -R %s/bin/%s/locale %s/%s.app/Contents/Resources/'%(bldroot,VERSION,builddir,binary)
+       cmd = 'cp -R %s/bin/%s/locale %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
        commands.getoutput(cmd)
-       cmd = 'cp -R %s/bin/%s/locale %s/%s.app/Contents/MacOS/%s/'%(bldroot,VERSION,builddir,binary,VERSION)
+       cmd = 'cp -R %s/bin/%s/locale %s/%s.app/Contents/MacOS/%s/'%(bldroot,VERSION,installdir,binary,VERSION)
        commands.getoutput(cmd)
-       cmd = 'cp %s/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,builddir,binary)
+       cmd = 'cp %s/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
        commands.getoutput(cmd)
-       cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(builddir,binary, VERSION)
+       cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
        commands.getoutput(cmd)
-       cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,builddir,binary,VERSION)
+       cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
        commands.getoutput(cmd) 
-       cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,builddir,binary,VERSION)
+       cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
        commands.getoutput(cmd)
-       cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/%s/'%(bldroot,builddir,binary,VERSION)
+       cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
        commands.getoutput(cmd)
-       cmd = 'cp -R %s/release/io %s/%s.app/Contents/MacOS/%s/'%(bldroot,builddir,binary,VERSION)
+       cmd = 'cp -R %s/release/io %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
        commands.getoutput(cmd)
-       cmd = 'chmod +x  %s/%s.app/Contents/MacOS/%s'%(builddir,binary, binary)
+       cmd = 'chmod +x  %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
        commands.getoutput(cmd)
-       cmd = 'find %s/%s.app -name .svn -prune -exec rm -rf {} \;'%(builddir, binary)
+       cmd = 'find %s/%s.app -name .svn -prune -exec rm -rf {} \;'%(installdir, binary)
        commands.getoutput(cmd)
-       cmd = 'find %s/%s.app -name .DS_Store -exec rm -rf {} \;'%(builddir, binary)
+       cmd = 'find %s/%s.app -name .DS_Store -exec rm -rf {} \;'%(installdir, binary)
        commands.getoutput(cmd)
-       cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(builddir, binary)
+       cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
        commands.getoutput(cmd)
 
 # extract copy system python, be sure to update other build systems
index 03a1a0f..5647ef0 100644 (file)
@@ -15,7 +15,7 @@ import sys
 Variables = SCons.Variables
 BoolVariable = SCons.Variables.BoolVariable
 
-VERSION = '2.52' # This is used in creating the local config directories
+VERSION = '2.53' # This is used in creating the local config directories
 
 def print_arguments(args, bc):
     if len(args):
index 43ac563..dd5e60f 100644 (file)
@@ -1,4 +1,4 @@
-.TH "BLENDER" "1" "June 27, 2010" "Blender Blender 2\&.52 (sub 5) "
+.TH "BLENDER" "1" "July 15, 2010" "Blender Blender 2\&.52 (sub 5) "
 
 .SH NAME
 blender \- a 3D modelling and rendering package
@@ -317,11 +317,13 @@ Arguments are executed in the order they are given. eg
 .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
+  \fIBLENDER_USER_CONFIG\fR Directory for user configuration files.
+  \fIBLENDER_SYSTEM_CONFIG\fR Directory for system wide configuration files.
+  \fIBLENDER_USER_SCRIPTS\fR Directory for user scripts.
+  \fIBLENDER_SYSTEM_SCRIPTS\fR Directory for system wide scripts.
+  \fIBLENDER_USER_DATAFILES\fR Directory for user data files (icons, translations, ..).
+  \fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files.
+  \fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries.
   \fITMP\fR or \fITMPDIR\fR Store temporary files here.
   \fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python.
 .br
index c77e5cc..7c7fc98 100644 (file)
@@ -31,12 +31,12 @@ 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)
@@ -53,7 +53,7 @@ blender_version = blender_version.split("Build")[0]
 
 date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
 
-filepath = __file__.replace(".py", "")
+filepath = os.path.splitext(__file__)[0]
 
 file = open(filepath, "w")
 
@@ -90,16 +90,16 @@ 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') 
+        fw('.SH "ENVIRONMENT VARIABLES"\n')
     elif l.endswith(":"): # one line
-        fw('.SS "%s"\n\n' % l) 
+        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 
+            # line with no
             if lines[0].strip() and len(lines[0].lstrip()) == len(lines[0]): # no white space
                 break
 
@@ -112,7 +112,7 @@ while lines:
             l = l[1:] # remove first whitespace (tab)
 
             fw('%s\n' % man_format(l))
-    
+
     else:
         if not l.strip():
             fw('.br\n')
@@ -132,3 +132,5 @@ 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>.
 ''')
+
+print("written:", filepath)
index 50a7945..07262b9 100644 (file)
@@ -601,7 +601,7 @@ void btConeTwistConstraint::calcAngleInfo2()
        m_solveSwingLimit = false;
        // compute rotation of A wrt B (in constraint space)
        if (m_bMotorEnabled && (!m_useSolveConstraintObsolete))
-       {       // it is assumed that setMotorTarget() was alredy called 
+       {       // it is assumed that setMotorTarget() was already called 
                // and motor target m_qTarget is within constraint limits
                // TODO : split rotation to pure swing and pure twist
                // compute desired transforms in world
index 78d18d1..357b475 100644 (file)
@@ -610,7 +610,7 @@ static void v4dwt_decode_step1_sse(v4* w, int count, const __m128 c){
        int i;
        for(i = 0; i < count; ++i){
                __m128 tmp = vw[i*2];
-               vw[i*2] = tmp * c;
+               vw[i*2] = _mm_mul_ps(tmp, c);
        }
 }
 
@@ -622,18 +622,18 @@ static void v4dwt_decode_step2_sse(v4* l, v4* w, int k, int m, __m128 c){
                __m128 tmp1 = vl[ 0];
                __m128 tmp2 = vw[-1];
                __m128 tmp3 = vw[ 0];
-               vw[-1] = tmp2 + ((tmp1 + tmp3) * c);
+               vw[-1] = _mm_add_ps(tmp2, _mm_mul_ps(_mm_add_ps(tmp1, tmp3), c));
                vl = vw;
                vw += 2;
        }
        if(m >= k){
                return;
        }
-       c += c;
-       c *= vl[0];
+       c = _mm_add_ps(c, c);
+       c = _mm_mul_ps(c, vl[0]);
        for(; m < k; ++m){
                __m128 tmp = vw[-1];
-               vw[-1] = tmp + c;
+               vw[-1] = _mm_add_ps(tmp, c);
                vw += 2;
        }
 }
index 1a7627c..c262ea8 100644 (file)
@@ -85,6 +85,9 @@ ELSEIF(UNIX)
                ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_SystemX11.cpp
                ${CMAKE_CURRENT_SOURCE_DIR}/intern/GHOST_WindowX11.cpp
        )
+
+       ADD_DEFINITIONS(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+
 ENDIF(APPLE)
 
 BLENDERLIB(bf_ghost "${SRC}" "${INC}")
index 1269c63..65c00b1 100644 (file)
@@ -56,9 +56,8 @@ else:
 
 if env['BF_GHOST_DEBUG']:
        defs.append('BF_GHOST_DEBUG')
-       
+
 incs = '. ../string #extern/glew/include #source/blender/imbuf #source/blender/makesdna ' + env['BF_OPENGL_INC']
 if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
        incs = env['BF_WINTAB_INC'] + ' ' + incs
 env.BlenderLib ('bf_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15] ) 
-
index ea13a33..1fcfddf 100644 (file)
@@ -69,7 +69,7 @@ public:
         * @param time          The time this event was generated.
         * @param type          The type of this event.
         * @param dataType      The type of the drop candidate object
-        * @param window        The window where the event occured
+        * @param window        The window where the event occurred
         * @param x                     The x-coordinate of the location the cursor was at at the time of the event.
         * @param y                     The y-coordinate of the location the cursor was at at the time of the event.
         * @param data          The "content" dropped in the window
index 2e7c9b1..3ae8ec0 100644 (file)
@@ -155,7 +155,7 @@ public:
         * @param draggedObjectType The type object concerned (currently array of file names, string, TIFF image)
         * @param mouseX x mouse coordinate (in cocoa base window coordinates)
         * @param mouseY y mouse coordinate
-        * @param window The window on which the event occured
+        * @param window The window on which the event occurred
      * @return Indication whether the event was handled. 
      */
        GHOST_TSuccess handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,
@@ -236,7 +236,7 @@ public:
        /**
      * Handles a window event. Called by GHOST_WindowCocoa window delegate
      * @param eventType The type of window event
-        * @param window The window on which the event occured
+        * @param window The window on which the event occurred
      * @return Indication whether the event was handled. 
      */
     GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window);
index 6c29b74..bec243f 100644 (file)
@@ -1550,7 +1550,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
                                                NSPoint mousePos = [event locationInWindow];
                                                pushEvent(new GHOST_EventCursor([event timestamp]*1000, GHOST_kEventCursorMove, window, mousePos.x, mousePos.y));
                                                m_cursorDelta_x=0;
-                                               m_cursorDelta_y=0; //Mouse motion occured between two cursor warps, so we can reset the delta counter
+                                               m_cursorDelta_y=0; //Mouse motion occurred between two cursor warps, so we can reset the delta counter
                                        }
                                                break;
                                }
index 888d9c0..35b8deb 100644 (file)
@@ -214,7 +214,7 @@ public:
         * @param draggedObjectType The type object concerned (currently array of file names, string, ?bitmap)
         * @param mouseX x mouse coordinate (in window coordinates)
         * @param mouseY y mouse coordinate
-        * @param window The window on which the event occured
+        * @param window The window on which the event occurred
         * @return Indication whether the event was handled. 
         */
        static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,GHOST_IWindow* window, int mouseX, int mouseY, void* data);
index c9228e6..961a637 100644 (file)
 #include <stdio.h> // for fprintf only
 #include <cstdlib> // for exit
 
+#ifndef PREFIX
+#  define PREFIX "/usr/local"
+#endif
+
 typedef struct NDOFPlatformInfo {
        Display *display;
        Window window;
@@ -1461,7 +1465,7 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const
 
 const GHOST_TUns8* GHOST_SystemX11::getSystemDir() const
 {
-       return (GHOST_TUns8*)"/usr/share";
+       return (GHOST_TUns8*) PREFIX "/share";
 }
 
 const GHOST_TUns8* GHOST_SystemX11::getUserDir() const
index 376859d..a8295ec 100644 (file)
@@ -42,7 +42,7 @@ AGLContext GHOST_WindowCarbon::s_firstaglCtx = NULL;
 const GHOST_TInt32 GHOST_WindowCarbon::s_sizeRectSize = 16;
 #endif //GHOST_DRAW_CARBON_GUTTER
 
-static const GLint sPreferredFormatWindow[8] = {
+static const GLint sPreferredFormatWindow[10] = {
 AGL_RGBA,
 AGL_DOUBLEBUFFER,      
 AGL_ACCELERATED,
@@ -50,7 +50,7 @@ AGL_DEPTH_SIZE,               32,
 AGL_NONE,
 };
 
-static const GLint sPreferredFormatFullScreen[9] = {
+static const GLint sPreferredFormatFullScreen[11] = {
 AGL_RGBA,
 AGL_DOUBLEBUFFER,
 AGL_ACCELERATED,
index 0b22017..a97f762 100644 (file)
@@ -348,10 +348,11 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        
        pixelFormatAttrsWindow[i++] = NSOpenGLPFAAccelerated;
        //pixelFormatAttrsWindow[i++] = NSOpenGLPFAAllowOfflineRenderers,;   // Removed to allow 10.4 builds, and 2 GPUs rendering is not used anyway
-       
+
        pixelFormatAttrsWindow[i++] = NSOpenGLPFADepthSize;
        pixelFormatAttrsWindow[i++] = (NSOpenGLPixelFormatAttribute) 32;
        
+       
        if (stereoVisual) pixelFormatAttrsWindow[i++] = NSOpenGLPFAStereo;
        
        if (numOfAASamples>0) {
index bbfa84d..1366aeb 100644 (file)
@@ -1093,7 +1093,7 @@ static int WeightPixelFormat(PIXELFORMATDESCRIPTOR& pfd) {
                !(pfd.dwFlags & PFD_DRAW_TO_WINDOW) ||
                !(pfd.dwFlags & PFD_DOUBLEBUFFER) || /* Blender _needs_ this */
                ( pfd.cDepthBits <= 8 ) ||
-               !(pfd.iPixelType == PFD_TYPE_RGBA) )
+               !(pfd.iPixelType == PFD_TYPE_RGBA))
                return 0;
 
        weight = 1;  /* it's usable */
index 1729d83..040097a 100644 (file)
@@ -416,7 +416,7 @@ void vectoradd(
             A[i] += B[i];
 }
 
-// same with seperate output vector
+// same with separate output vector
 
 template <class T>
 void vectoradd(
index e923b1f..914f950 100644 (file)
@@ -52,7 +52,7 @@ void MovingFrame::pushInternalFrame(CacheTS timestamp)
        }
 }
 
-// load pose just preceeding timestamp
+// load pose just preceding timestamp
 // return false if no cache position was found
 bool MovingFrame::popInternalFrame(CacheTS timestamp)
 {
index d468cd4..3e035fd 100644 (file)
@@ -359,7 +359,7 @@ int STR_String::Find(char c, int pos) const
 
 
 //
-// Find the first occurence of <str> in the string
+// Find the first occurrence of <str> in the string
 //
 int    STR_String::Find(const char *str, int pos) const
 {
@@ -373,7 +373,7 @@ int STR_String::Find(const char *str, int pos) const
 
 
 //
-// Find the first occurence of <str> in the string
+// Find the first occurrence of <str> in the string
 //
 int    STR_String::Find(rcSTR_String str, int pos) const
 {
@@ -387,7 +387,7 @@ int STR_String::Find(rcSTR_String str, int pos) const
 
 
 //
-// Find the last occurence of <c> in the string
+// Find the last occurrence of <c> in the string
 //
 int STR_String::RFind(char c) const
 {
@@ -399,7 +399,7 @@ int STR_String::RFind(char c) const
 
 
 //
-// Find the first occurence of any character in character set <set> in the string
+// Find the first occurrence of any character in character set <set> in the string
 //
 int STR_String::FindOneOf(const char *set, int pos) const
 {
index 5271b7f..fde32f2 100644 (file)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="Windows-1252"?>\r
 <VisualStudioProject\r
        ProjectType="Visual C++"\r
-       Version="9,00"\r
+       Version="9.00"\r
        Name="BPY_python"\r
        ProjectGUID="{5A2EA6DC-1A53-4E87-9166-52870CE3B4EA}"\r
        RootNamespace="BPY_python"\r
                                        RelativePath="..\..\..\source\blender\python\generic\mathutils_vector.c"\r
                                        >\r
                                </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\noise.c"\r
+                                       >\r
+                               </File>\r
                        </Filter>\r
                </Filter>\r
                <Filter\r
index 14aceb6..7755145 100644 (file)
                        Filter="c"\r
                        >\r
                        <File\r
-                               RelativePath="..\..\..\source\blender\editors\datafiles\B.blend.c"\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\add.png.c"\r
                                >\r
                        </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\blenderbuttons.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\blob.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\blur.png.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\bmonofont.ttf.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\clay.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\clone.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\crease.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\darken.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\draw.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\fill.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\flatten.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\grab.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\inflate.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\layer.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\lighten.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\mix.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\multiply.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\nudge.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\pinch.png.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\preview.blend.c"\r
                                >\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\prvicons.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\scrape.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\smear.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\smooth.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\snake_hook.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\soften.png.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\editors\datafiles\splash.png.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\startup.blend.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\subtract.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\texdraw.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\thumb.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\twist.png.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\datafiles\vertexdraw.png.c"\r
+                               >\r
+                       </File>\r
                </Filter>\r
                <Filter\r
                        Name="interface"\r
                                RelativePath="..\..\..\source\blender\editors\sculpt_paint\sculpt_intern.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\editors\sculpt_paint\sculpt_undo.c"\r
+                               >\r
+                       </File>\r
                </Filter>\r
                <Filter\r
                        Name="uvedit"\r
index d92121a..f69af19 100644 (file)
                        Filter="h;hpp;hxx;hm;inl"\r
                        >\r
                        <File\r
-                               RelativePath="..\..\..\source\blender\gpu\gpu_buffers.h"\r
+                               RelativePath="..\..\..\source\blender\gpu\GPU_buffers.h"\r
                                >\r
                        </File>\r
                        <File\r
index 49d0a5d..c43732b 100644 (file)
@@ -1 +1 @@
-2.5-alpha2
+2.5-beta
diff --git a/release/datafiles/brushicons/add.png b/release/datafiles/brushicons/add.png
new file mode 100644 (file)
index 0000000..ad041be
Binary files /dev/null and b/release/datafiles/brushicons/add.png differ
diff --git a/release/datafiles/brushicons/blob.png b/release/datafiles/brushicons/blob.png
new file mode 100644 (file)
index 0000000..1d63d1e
Binary files /dev/null and b/release/datafiles/brushicons/blob.png differ
diff --git a/release/datafiles/brushicons/blur.png b/release/datafiles/brushicons/blur.png
new file mode 100644 (file)
index 0000000..6b8fc4b
Binary files /dev/null and b/release/datafiles/brushicons/blur.png differ
diff --git a/release/datafiles/brushicons/clay.png b/release/datafiles/brushicons/clay.png
new file mode 100644 (file)
index 0000000..dab73b7
Binary files /dev/null and b/release/datafiles/brushicons/clay.png differ
diff --git a/release/datafiles/brushicons/clone.png b/release/datafiles/brushicons/clone.png
new file mode 100644 (file)
index 0000000..8967796
Binary files /dev/null and b/release/datafiles/brushicons/clone.png differ
diff --git a/release/datafiles/brushicons/crease.png b/release/datafiles/brushicons/crease.png
new file mode 100644 (file)
index 0000000..ac057e0
Binary files /dev/null and b/release/datafiles/brushicons/crease.png differ
diff --git a/release/datafiles/brushicons/darken.png b/release/datafiles/brushicons/darken.png
new file mode 100644 (file)
index 0000000..ee312c7
Binary files /dev/null and b/release/datafiles/brushicons/darken.png differ
diff --git a/release/datafiles/brushicons/draw.png b/release/datafiles/brushicons/draw.png
new file mode 100644 (file)
index 0000000..2cbc805
Binary files /dev/null and b/release/datafiles/brushicons/draw.png differ
diff --git a/release/datafiles/brushicons/fill.png b/release/datafiles/brushicons/fill.png
new file mode 100644 (file)
index 0000000..654ec7b
Binary files /dev/null and b/release/datafiles/brushicons/fill.png differ
diff --git a/release/datafiles/brushicons/flatten.png b/release/datafiles/brushicons/flatten.png
new file mode 100644 (file)
index 0000000..401226b
Binary files /dev/null and b/release/datafiles/brushicons/flatten.png differ
diff --git a/release/datafiles/brushicons/grab.png b/release/datafiles/brushicons/grab.png
new file mode 100644 (file)
index 0000000..d3ebbef
Binary files /dev/null and b/release/datafiles/brushicons/grab.png differ
diff --git a/release/datafiles/brushicons/inflate.png b/release/datafiles/brushicons/inflate.png
new file mode 100644 (file)
index 0000000..f3ad313
Binary files /dev/null and b/release/datafiles/brushicons/inflate.png differ
diff --git a/release/datafiles/brushicons/layer.png b/release/datafiles/brushicons/layer.png
new file mode 100644 (file)
index 0000000..df3b02f
Binary files /dev/null and b/release/datafiles/brushicons/layer.png differ
diff --git a/release/datafiles/brushicons/lighten.png b/release/datafiles/brushicons/lighten.png
new file mode 100644 (file)
index 0000000..6dacf6d
Binary files /dev/null and b/release/datafiles/brushicons/lighten.png differ
diff --git a/release/datafiles/brushicons/mix.png b/release/datafiles/brushicons/mix.png
new file mode 100644 (file)
index 0000000..d871d24
Binary files /dev/null and b/release/datafiles/brushicons/mix.png differ
diff --git a/release/datafiles/brushicons/multiply.png b/release/datafiles/brushicons/multiply.png
new file mode 100644 (file)
index 0000000..2dd3246
Binary files /dev/null and b/release/datafiles/brushicons/multiply.png differ
diff --git a/release/datafiles/brushicons/nudge.png b/release/datafiles/brushicons/nudge.png
new file mode 100644 (file)
index 0000000..84964e9
Binary files /dev/null and b/release/datafiles/brushicons/nudge.png differ
diff --git a/release/datafiles/brushicons/pinch.png b/release/datafiles/brushicons/pinch.png
new file mode 100644 (file)
index 0000000..b60bcd6
Binary files /dev/null and b/release/datafiles/brushicons/pinch.png differ
diff --git a/release/datafiles/brushicons/scrape.png b/release/datafiles/brushicons/scrape.png
new file mode 100644 (file)
index 0000000..9b7a57c
Binary files /dev/null and b/release/datafiles/brushicons/scrape.png differ
diff --git a/release/datafiles/brushicons/smear.png b/release/datafiles/brushicons/smear.png
new file mode 100644 (file)
index 0000000..4cdc220
Binary files /dev/null and b/release/datafiles/brushicons/smear.png differ
diff --git a/release/datafiles/brushicons/smooth.png b/release/datafiles/brushicons/smooth.png
new file mode 100644 (file)
index 0000000..052e245
Binary files /dev/null and b/release/datafiles/brushicons/smooth.png differ
diff --git a/release/datafiles/brushicons/snake_hook.png b/release/datafiles/brushicons/snake_hook.png
new file mode 100644 (file)
index 0000000..f8351d9
Binary files /dev/null and b/release/datafiles/brushicons/snake_hook.png differ
diff --git a/release/datafiles/brushicons/soften.png b/release/datafiles/brushicons/soften.png
new file mode 100644 (file)
index 0000000..2b2e911
Binary files /dev/null and b/release/datafiles/brushicons/soften.png differ
diff --git a/release/datafiles/brushicons/subtract.png b/release/datafiles/brushicons/subtract.png
new file mode 100644 (file)
index 0000000..c28975e
Binary files /dev/null and b/release/datafiles/brushicons/subtract.png differ
diff --git a/release/datafiles/brushicons/texdraw.png b/release/datafiles/brushicons/texdraw.png
new file mode 100644 (file)
index 0000000..1241349
Binary files /dev/null and b/release/datafiles/brushicons/texdraw.png differ
diff --git a/release/datafiles/brushicons/thumb.png b/release/datafiles/brushicons/thumb.png
new file mode 100644 (file)
index 0000000..8c39075
Binary files /dev/null and b/release/datafiles/brushicons/thumb.png differ
diff --git a/release/datafiles/brushicons/twist.png b/release/datafiles/brushicons/twist.png
new file mode 100644 (file)
index 0000000..5390442
Binary files /dev/null and b/release/datafiles/brushicons/twist.png differ
diff --git a/release/datafiles/brushicons/vertexdraw.png b/release/datafiles/brushicons/vertexdraw.png
new file mode 100644 (file)
index 0000000..8bd2dc1
Binary files /dev/null and b/release/datafiles/brushicons/vertexdraw.png differ
index 78a44ba..89e1959 100644 (file)
Binary files a/release/datafiles/splash.png and b/release/datafiles/splash.png differ
index 39e0e3a..1069958 100644 (file)
@@ -3,7 +3,7 @@ Encoding=UTF-8
 Name=Blender
 Comment=3D modeling, animation, rendering and post-production
 Exec=blender
-Icon=blender.png
+Icon=blender.svg
 Terminal=false
 Type=Application
 Categories=Graphics;3DGraphics;
index bfe5681..6b776c7 100644 (file)
@@ -1006,7 +1006,7 @@ def save_3ds(filename, context):
                             mat = mat_ls[mat_index]
                             if mat:    mat_name = mat.name
                             else:      mat_name = None
-                        # else there alredy set to none
+                        # else there already set to none
 
                         img = uf.image
 #                                              img = f.image
@@ -1140,7 +1140,7 @@ class Export3DS(bpy.types.Operator):
 
 # Add to a menu
 def menu_func(self, context):
-    default_path = bpy.data.filepath.replace(".blend", ".3ds")
+    default_path = os.path.splitext(bpy.data.filepath)[0] + ".3ds"
     self.layout.operator(Export3DS.bl_idname, text="3D Studio (.3ds)").filepath = default_path
 
 
@@ -1154,4 +1154,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 9468cad..bb846b0 100644 (file)
@@ -83,7 +83,7 @@ def copy_images(dest_dir, textures):
         if Blender.sys.exists(image_path):
             # Make a name for the target path.
             dest_image_path = dest_dir + image_path.split('\\')[-1].split('/')[-1]
-            if not Blender.sys.exists(dest_image_path): # Image isnt alredy there
+            if not Blender.sys.exists(dest_image_path): # Image isnt already there
                 print('\tCopying "%s" > "%s"' % (image_path, dest_image_path))
                 try:
                     copy_file(image_path, dest_image_path)
@@ -359,7 +359,7 @@ def write(filename, batch_objects = None, \
 
             if BATCH_OWN_DIR:
                 new_fbxpath = fbxpath + newname + os.sep
-                # path may alredy exist
+                # path may already exist
                 # TODO - might exist but be a file. unlikely but should probably account for it.
 
                 if bpy.utils.exists(new_fbxpath) == 0:
@@ -391,7 +391,7 @@ def write(filename, batch_objects = None, \
 
 
             # Call self with modified args
-            # Dont pass batch options since we alredy usedt them
+            # Dont pass batch options since we already usedt them
             write(filename, data.objects,
                 context,
                 False,
@@ -2763,7 +2763,7 @@ Takes:  {''')
                 act_end =      end
             else:
                 # use existing name
-                if blenAction == blenActionDefault: # have we alredy got the name
+                if blenAction == blenActionDefault: # have we already got the name
                     file.write('\n\tTake: "%s" {' % sane_name_mapping_take[blenAction.name])
                 else:
                     file.write('\n\tTake: "%s" {' % sane_takename(blenAction))
@@ -2782,7 +2782,7 @@ Takes:  {''')
 
                 # Set the action active
                 for my_bone in ob_arms:
-                    if blenAction in my_bone.blenActionList:
+                    if ob.animation_data and blenAction in my_bone.blenActionList:
                         ob.animation_data.action = blenAction
                         # print '\t\tSetting Action!', blenAction
                 # scene.update(1)
@@ -2918,7 +2918,7 @@ Takes:  {''')
                                         for val, frame in context_bone_anim_keys:
                                             if frame != context_bone_anim_keys[0][1]: # not the first
                                                 file.write(',')
-                                            # frame is alredy one less then blenders frame
+                                            # frame is already one less then blenders frame
                                             file.write('\n\t\t\t\t\t\t\t%i,%.15f,L'  % (fbx_time(frame), val ))
 
                                 if             i==0:   file.write('\n\t\t\t\t\t\tColor: 1,0,0')
@@ -2940,7 +2940,8 @@ Takes:  {''')
             # end action loop. set original actions
             # do this after every loop incase actions effect eachother.
             for my_bone in ob_arms:
-                my_bone.blenObject.animation_data.action = my_bone.blenAction
+                if my_bone.blenObject.animation_data:
+                    my_bone.blenObject.animation_data.action = my_bone.blenAction
 
         file.write('\n}')
 
@@ -3037,7 +3038,7 @@ Takes:  {''')
 
 # --------------------------------------------
 # UI Function - not a part of the exporter.
-# this is to seperate the user interface from the rest of the exporter.
+# this is to separate the user interface from the rest of the exporter.
 # from Blender import Draw, Window
 EVENT_NONE = 0
 EVENT_EXIT = 1
@@ -3437,7 +3438,7 @@ class ExportFBX(bpy.types.Operator):
 
 
 def menu_func(self, context):
-    default_path = bpy.data.filepath.replace(".blend", ".fbx")
+    default_path = os.path.splitext(bpy.data.filepath)[0] + ".fbx"
     self.layout.operator(ExportFBX.bl_idname, text="Autodesk FBX (.fbx)").filepath = default_path
 
 
index b7de707..d2e5307 100644 (file)
@@ -183,7 +183,8 @@ class ExportMDD(bpy.types.Operator):
 
 
 def menu_func(self, context):
-    default_path = bpy.data.filepath.replace(".blend", ".mdd")
+    import os
+    default_path = os.path.splitext(bpy.data.filepath)[0] + ".mdd"
     self.layout.operator(ExportMDD.bl_idname, text="Lightwave Point Cache (.mdd)").filepath = default_path
 
 
index 4451cb7..6b47f6d 100644 (file)
@@ -193,7 +193,7 @@ def copy_images(dest_dir):
 #              if bpy.sys.exists(image_path):
 #                      # Make a name for the target path.
 #                      dest_image_path = dest_dir + image_path.split('\\')[-1].split('/')[-1]
-#                      if not bpy.utils.exists(dest_image_path): # Image isnt alredy there
+#                      if not bpy.utils.exists(dest_image_path): # Image isnt already there
 #                              print('\tCopying "%s" > "%s"' % (image_path, dest_image_path))
 #                              copy_file(image_path, dest_image_path)
 #                              copyCount+=1
@@ -299,7 +299,7 @@ def write(filepath, objects, scene,
           EXPORT_POLYGROUPS=False,
           EXPORT_CURVE_AS_NURBS=True):
     '''
-    Basic write function. The context and options must be alredy set
+    Basic write function. The context and options must be already set
     This can be accessed externaly
     eg.
     write( 'c:\\test\\foobar.obj', Blender.Object.GetSelected() ) # Using default options.
@@ -681,7 +681,7 @@ def write(filepath, objects, scene,
 
                 # CHECK FOR CONTEXT SWITCH
                 if key == contextMat:
-                    pass # Context alredy switched, dont do anything
+                    pass # Context already switched, dont do anything
                 else:
                     if key[0] == None and key[1] == None:
                         # Write a null material, since we know the context has changed.
@@ -964,7 +964,7 @@ class ExportOBJ(bpy.types.Operator):
 
 
 def menu_func(self, context):
-    default_path = bpy.data.filepath.replace(".blend", ".obj")
+    default_path = os.path.splitext(bpy.data.filepath)[0] + ".obj"
     self.layout.operator(ExportOBJ.bl_idname, text="Wavefront (.obj)").filepath = default_path
 
 
index 09d25b6..0b936bd 100644 (file)
@@ -310,7 +310,8 @@ class ExportPLY(bpy.types.Operator):
 
 
 def menu_func(self, context):
-    default_path = bpy.data.filepath.replace(".blend", ".ply")
+    import os
+    default_path = os.path.splitext(bpy.data.filepath)[0] + ".ply"
     self.layout.operator(ExportPLY.bl_idname, text="Stanford (.ply)").filepath = default_path
 
 
index 2ade015..1bad80f 100644 (file)
@@ -1242,7 +1242,7 @@ class ExportX3D(bpy.types.Operator):
 
 
 def menu_func(self, context):
-    default_path = bpy.data.filepath.replace(".blend", ".x3d")
+    default_path = os.path.splitext(bpy.data.filepath)[0] + ".x3d"
     self.layout.operator(ExportX3D.bl_idname, text="X3D Extensible 3D (.x3d)").filepath = default_path
 
 
@@ -1259,4 +1259,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index d497ac4..89097fd 100644 (file)
@@ -347,7 +347,7 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM
     scn = context.scene
 #XXX   scn.objects.selected = []
     for ob in scn.objects:
-        ob.selected = False
+        ob.select = False
 
     scn.set_frame(IMPORT_START_FRAME)
 
@@ -356,7 +356,7 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM
 
     scn.objects.link(arm_ob)
 
-    arm_ob.selected = True
+    arm_ob.select = True
     scn.objects.active = arm_ob
     print(scn.objects.active)
 
index 6502dee..7b3004d 100644 (file)
@@ -360,7 +360,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
             vertMappingIndex = 0
 
             vertsToUse = [i for i in range(len(myContextMesh_vertls)) if faceVertUsers[i]]
-            myVertMapping = dict( [ (ii, i) for i, ii in enumerate(vertsToUse) ] )
+            myVertMapping = {ii: i for i, ii in enumerate(vertsToUse)}
 
             tempName= '%s_%s' % (contextObName, matName) # matName may be None.
             bmesh = bpy.data.meshes.new(tempName)
index 942619c..9bbb912 100644 (file)
@@ -506,7 +506,7 @@ def create_materials(filepath, material_libs, unique_materials, unique_material_
 
 def split_mesh(verts_loc, faces, unique_materials, filepath, SPLIT_OB_OR_GROUP, SPLIT_MATERIALS):
     '''
-    Takes vert_loc and faces, and seperates into multiple sets of
+    Takes vert_loc and faces, and separates into multiple sets of
     (verts_loc, faces, unique_materials, dataname)
     '''
 
@@ -596,7 +596,7 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
 
     if unique_smooth_groups:
         sharp_edges= {}
-        smooth_group_users= dict([ (context_smooth_group, {}) for context_smooth_group in list(unique_smooth_groups.keys()) ])
+        smooth_group_users = {context_smooth_group: {} for context_smooth_group in list(unique_smooth_groups.keys())}
         context_smooth_group_old= -1
 
     # Split fgons into tri's
@@ -691,7 +691,7 @@ def create_mesh(scn, new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_l
 
 
     # map the material names to an index
-    material_mapping= dict([(name, i) for i, name in enumerate(unique_materials)]) # enumerate over unique_materials keys()
+    material_mapping = {name: i for i, name in enumerate(unique_materials)} # enumerate over unique_materials keys()
 
     materials= [None] * len(unique_materials)
 
@@ -1346,7 +1346,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
     'Separate objects from obj...',\
     ('Object', SPLIT_OBJECTS, 'Import OBJ Objects into Blender Objects'),\
     ('Group', SPLIT_GROUPS, 'Import OBJ Groups into Blender Objects'),\
-    ('Split Materials', SPLIT_MATERIALS, 'Import each material into a seperate mesh'),\
+    ('Split Materials', SPLIT_MATERIALS, 'Import each material into a separate mesh'),\
     'Options...',\
     ('Keep Vert Order', KEEP_VERT_ORDER, 'Keep vert and face order, disables some other options.'),\
     ('Clamp Scale:', CLAMP_SIZE, 0.0, 1000.0, 'Clamp the size to this maximum (Zero to Disable)'),\
@@ -1432,7 +1432,7 @@ def load_obj_ui(filepath, BATCH_LOAD= False):
             Draw.BeginAlign()
             SPLIT_OBJECTS = Draw.Toggle('Object', EVENT_REDRAW, ui_x+9, ui_y+89, 55, 21, SPLIT_OBJECTS.val, 'Import OBJ Objects into Blender Objects', do_split)
             SPLIT_GROUPS = Draw.Toggle('Group', EVENT_REDRAW, ui_x+64, ui_y+89, 55, 21, SPLIT_GROUPS.val, 'Import OBJ Groups into Blender Objects', do_split)
-            SPLIT_MATERIALS = Draw.Toggle('Split Materials', EVENT_REDRAW, ui_x+119, ui_y+89, 60, 21, SPLIT_MATERIALS.val, 'Import each material into a seperate mesh', do_split)
+            SPLIT_MATERIALS = Draw.Toggle('Split Materials', EVENT_REDRAW, ui_x+119, ui_y+89, 60, 21, SPLIT_MATERIALS.val, 'Import each material into a separate mesh', do_split)
             Draw.EndAlign()
 
             # Only used for user feedback
@@ -1570,7 +1570,7 @@ class IMPORT_OT_obj(bpy.types.Operator):
     CREATE_EDGES = BoolProperty(name="Lines as Edges", description="Import lines and faces with 2 verts as edge", default= True)
     SPLIT_OBJECTS = BoolProperty(name="Object", description="Import OBJ Objects into Blender Objects", default= True)
     SPLIT_GROUPS = BoolProperty(name="Group", description="Import OBJ Groups into Blender Objects", default= True)
-    SPLIT_MATERIALS = BoolProperty(name="Split Materials", description="Import each material into a seperate mesh", default= False)
+    SPLIT_MATERIALS = BoolProperty(name="Split Materials", description="Import each material into a separate mesh", default= False)
     # old comment: only used for user feedback
     # disabled this option because in old code a handler for it disabled SPLIT* params, it's not passed to load_obj
     # KEEP_VERT_ORDER = BoolProperty(name="Keep Vert Order", description="Keep vert and face order, disables split options, enable for morph targets", default= True)
index c3695cd..74155f6 100644 (file)
@@ -27,9 +27,10 @@ def get(handler):
     def output(text):
         handler.wfile.write(bytes(text, encoding='utf8'))
 
-    def head(title):
+    def head(title, refresh = False):
         output("<html><head>")
-        output("<meta http-equiv='refresh' content=5>")
+        if refresh:
+            output("<meta http-equiv='refresh' content=5>")
         output("<script src='/html/netrender.js' type='text/javascript'></script>")
 #              output("<script src='/html/json2.js' type='text/javascript'></script>")
         output("<title>")
@@ -104,7 +105,7 @@ def get(handler):
         f.close()
     elif handler.path == "/html" or handler.path == "/":
         handler.send_head(content = "text/html")
-        head("NetRender")
+        head("NetRender", refresh = True)
 
         output("<h2>Jobs</h2>")
 
index 7f9befd..d9a13ad 100755 (executable)
@@ -83,14 +83,17 @@ def process(paths):
         elif paths[i].endswith(".bobj.gz"):
             path_map[os.path.split(paths[i])[0]] = os.path.split(paths[i+1])[0]
         else:
-            path_map[paths[i]] = paths[i+1]
+            path_map[os.path.split(paths[i])[1]] = paths[i+1]
+            
+    # TODO original paths aren't really the orignal path (they are the normalized path
+    # so we repath using the filenames only. 
     
     ###########################
     # LIBRARIES
     ###########################
     for lib in bpy.data.libraries:
         file_path = bpy.utils.expandpath(lib.filepath)
-        new_path = path_map.get(file_path, None)
+        new_path = path_map.get(os.path.split(file_path)[1], None)
         if new_path:
             lib.filepath = new_path
 
@@ -100,7 +103,7 @@ def process(paths):
     for image in bpy.data.images:
         if image.source == "FILE" and not image.packed_file:
             file_path = bpy.utils.expandpath(image.filepath)
-            new_path = path_map.get(file_path, None)
+            new_path = path_map.get(os.path.split(file_path)[1], None)
             if new_path:
                 image.filepath = new_path
             
@@ -144,4 +147,4 @@ if __name__ == "__main__":
         
         process(args)
         
-        bpy.ops.wm.save_as_mainfile(path=new_path, check_existing=False)
+        bpy.ops.wm.save_as_mainfile(filepath=new_path, check_existing=False)
index 9fd0015..fbaf225 100644 (file)
@@ -79,6 +79,8 @@ def testFile(conn, job_id, slave_id, rfile, JOB_PREFIX, main_path = None):
             job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force = True)
 
     if not found:
+        # Force prefix path if not found
+        job_full_path = prefixPath(JOB_PREFIX, rfile.filepath, main_path, force = True)
         temp_path = JOB_PREFIX + "slave.temp"
         conn.request("GET", fileURL(job_id, rfile.index), headers={"slave-id":slave_id})
         response = conn.getresponse()
index 6288b97..fa2eb6f 100644 (file)
@@ -171,7 +171,7 @@ def prefixPath(prefix_directory, file_path, prefix_path, force = False):
         # if an absolute path, make sure path exists, if it doesn't, use relative local path
         full_path = file_path
         if force or not os.path.exists(full_path):
-            p, n = os.path.split(full_path)
+            p, n = os.path.split(os.path.normpath(full_path))
 
             if prefix_path and p.startswith(prefix_path):
                 if len(prefix_path) < len(p):
index cef368c..9031121 100644 (file)
@@ -50,12 +50,12 @@ def add_object_data(context, obdata, operator=None):
 
     # ugh, could be made nicer
     for ob in scene.objects:
-        ob.selected = False
+        ob.select = False
 
     obj_new = bpy.data.objects.new(obdata.name, obdata)
 
     base = scene.objects.link(obj_new)
-    base.selected = True
+    base.select = True
 
     if context.space_data and context.space_data.type == 'VIEW_3D':
         base.layers_from_view(context.space_data)
@@ -68,7 +68,7 @@ def add_object_data(context, obdata, operator=None):
     if obj_act and obj_act.mode == 'EDIT' and obj_act.type == obj_new.type:
         bpy.ops.object.mode_set(mode='OBJECT')
 
-        obj_act.selected = True
+        obj_act.select = True
         scene.update() # apply location
         #scene.objects.active = obj_new
 
index 5cde709..404013f 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 
 """
-This module contains utility functions spesific to blender but
+This module contains utility functions specific to blender but
 not assosiated with blenders internal data.
 """
 
@@ -27,7 +27,8 @@ import bpy as _bpy
 import os as _os
 import sys as _sys
 
-from _bpy import home_paths, blend_paths
+from _bpy import blend_paths
+from _bpy import script_paths as _bpy_script_paths
 
 
 def _test_import(module_name, loaded_modules):
@@ -59,7 +60,7 @@ def modules_from_path(path, loaded_modules):
 
     :arg path: this path is scanned for scripts and packages.
     :type path: string
-    :arg loaded_modules: alredy loaded module names, files matching these names will be ignored.
+    :arg loaded_modules: already loaded module names, files matching these names will be ignored.
     :type loaded_modules: set
     :return: all loaded modules.
     :rtype: list
@@ -313,7 +314,7 @@ def script_paths(subdir=None, user=True):
     else:
         user_script_path = None
 
-    for path in home_paths("scripts") + (user_script_path, ):
+    for path in _bpy_script_paths() + (user_script_path, ):
         if path:
             path = _os.path.normpath(path)
             if path not in scripts and _os.path.isdir(path):
index b1c5429..8cbb2bf 100644 (file)
@@ -444,7 +444,7 @@ class Mesh(bpy_types.ID):
         if not hasattr(edges, "pop"):
             edges = edges[:]
 
-        edge_dict = dict((ed.key, ed) for ed in self.edges if ed.selected)
+        edge_dict = {ed.key: ed for ed in self.edges if ed.select}
 
         while edges:
             current_edge = edges.pop()
index c4687b4..87fac9f 100644 (file)
@@ -124,7 +124,7 @@ def get_argspec(func, strip_self=True, doc=None, source=None):
         if source is None:
             try:
                 source = inspect.getsource(func)
-            except TypeError:
+            except (TypeError, IOError):
                 source = ''
         if source:
             match = re.search(DEF_SOURCE % func_name, source, RE_FLAG)
index ef8f62a..0952290 100644 (file)
@@ -191,8 +191,8 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
     obj.animation_data_clear()
 
     # Select generated rig object
-    obj_orig.selected = False
-    obj.selected = True
+    obj_orig.select = False
+    obj.select = True
     scene.objects.active = obj
 
     # Remove all bones from the generated rig armature.
@@ -212,9 +212,9 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
 
     # Select the temp rigs for merging
     for objt in scene.objects:
-        objt.selected = False # deselect all objects
-    temp_rig_1.selected = True
-    temp_rig_2.selected = True
+        objt.select = False # deselect all objects
+    temp_rig_1.select = True
+    temp_rig_2.select = True
     scene.objects.active = temp_rig_2
 
     # Merge the temporary rigs
@@ -225,8 +225,8 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
 
     # Select the generated rig
     for objt in scene.objects:
-        objt.selected = False # deselect all objects
-    obj.selected = True
+        objt.select = False # deselect all objects
+    obj.select = True
     scene.objects.active = obj
 
     # Copy over the pose_bone properties
@@ -464,7 +464,7 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
     arm.layer = layer_show
 
 
-    # obj.restrict_view = True
+    # obj.hide = True
     obj.data.draw_axes = False
 
     bpy.ops.object.mode_set(mode=mode_orig)
@@ -490,8 +490,8 @@ def generate_test(context, metarig_type="", GENERATE_FINAL=True):
         scene.objects.link(obj_new)
         scene.objects.active = obj_new
         for obj in scene.objects:
-            obj.selected = False
-        obj_new.selected = True
+            obj.select = False
+        obj_new.select = True
 
     for module_name in get_submodule_types():
         if (metarig_type and module_name != metarig_type):
@@ -551,8 +551,8 @@ def generate_test_all(context, GRAPH=False):
         obj.data.drawtype = 'STICK'
         obj.location[1] += i
         obj_new.location[1] += i
-        obj_new.selected = False
-        obj.selected = True
+        obj_new.select = False
+        obj.select = True
         i += 4
 
 
index 7a99eb5..f80a617 100644 (file)
@@ -137,8 +137,8 @@ def ik(obj, definitions, base_names, options):
     ik.pole_vis = add_stretch_to(obj, mt.forearm, ik.pole, "VIS-%s_ik" % base_names[mt.forearm])
 
     ik.update()
-    ik.hand_vis_e.restrict_select = True
-    ik.pole_vis_e.restrict_select = True
+    ik.hand_vis_e.hide_select = True
+    ik.pole_vis_e.hide_select = True
 
     bpy.ops.object.mode_set(mode='OBJECT')
 
index d3bab72..86f2399 100644 (file)
@@ -236,7 +236,7 @@ def main(obj, bone_definition, base_names, options):
             attr_parent = ex_chain.attr_names[i - 1] + "_e"
             ebone.parent = getattr(ex_chain, attr_parent)
 
-        # intentional! get the parent from the other paralelle chain member
+        # intentional! get the parent from the other parallel chain member
         getattr(rv_chain, attr).parent = ebone
 
 
index 9c2a268..71895a2 100644 (file)
@@ -631,6 +631,8 @@ if __name__ == "__main__":
         props = [(prop.identifier, prop) for prop in v.properties]
         
         for prop_id, prop in sorted(props):
+            # if prop.type == 'boolean':
+            #     continue
             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)
 
     if bpy.app.background:
index 83a3130..d3a90cb 100644 (file)
@@ -68,7 +68,7 @@ def get_console(console_id):
         stderr = io.StringIO()
     else:
         namespace = {'__builtins__': __builtins__, 'bpy': bpy}
-        console = InteractiveConsole(namespace)
+        console = InteractiveConsole(locals=namespace, filename="<blender_console>")
 
         import io
         stdout = io.StringIO()
index bba4576..39c2262 100644 (file)
@@ -40,7 +40,7 @@ def main(context):
 
     flist = bpy.context.active_object.animation_data.action.fcurves
     for f in flist:
-        if f.selected and f.data_path.endswith("rotation_euler"):
+        if f.select and f.data_path.endswith("rotation_euler"):
             cleanupEulCurve(f)
 
 class DiscontFilterOp(bpy.types.Operator):
index 78ca9a1..b63997b 100644 (file)
@@ -54,9 +54,9 @@ class MeshSelectInteriorFaces(bpy.types.Operator):
 
         for index, face in enumerate(face_list):
             if(test_interior(index)):
-                face.selected = True
+                face.select = True
             else:
-                face.selected = False
+                face.select = False
 
         if is_editmode:
             bpy.ops.object.mode_set(mode='EDIT', toggle=False)
@@ -122,7 +122,7 @@ class MeshMirrorUV(bpy.types.Operator):
         # as a list
         faces = mesh.faces[:]
 
-        fuvsel = [(False not in uv.uv_selected) for uv in active_uv_layer]
+        fuvsel = [(False not in uv.select_uv) for uv in active_uv_layer]
         fcents = [f.center for f in faces]
 
         # find mirror faces
index d0c5375..ceb4621 100644 (file)
@@ -100,7 +100,7 @@ def bake(frame_start, frame_end, step=1, only_selected=False):
     pose_items = pose.bones.items()
 
     for name, pbone in pose_items:
-        if only_selected and not pbone.selected:
+        if only_selected and not pbone.select:
             continue
 
         for f in frame_range:
index e76218e..2df1250 100644 (file)
@@ -52,9 +52,9 @@ class SelectPattern(bpy.types.Operator):
         # Can be pose bones or objects
         for item in items:
             if pattern_match(item.name, self.properties.pattern):
-                item.selected = True
+                item.select = True
             elif not self.properties.extend:
-                item.selected = False
+                item.select = False
 
         return {'FINISHED'}
 
@@ -90,7 +90,7 @@ class SelectCamera(bpy.types.Operator):
             self.report({'WARNING'}, "Active camera is not in this scene")
 
         context.scene.objects.active = camera
-        camera.selected = True
+        camera.select = True
         return {'FINISHED'}
 
 
@@ -113,24 +113,42 @@ class SelectHierarchy(bpy.types.Operator):
         return context.object
 
     def execute(self, context):
-        obj = context.object
-        if self.properties.direction == 'PARENT':
-            parent = obj.parent
-            if not parent:
-                return {'CANCELLED'}
-            obj_act = parent
-        else:
-            children = obj.children
-            if len(children) != 1:
-                return {'CANCELLED'}
-            obj_act = children[0]
+        objs = context.selected_objects
+        obj_act = context.object
+
+        if context.object not in objs:
+            objs.append(context.object)
 
         if not self.properties.extend:
-            # obj.selected = False
+            # for obj in objs:
+            #     obj.select = False
             bpy.ops.object.select_all(action='DESELECT')
 
-        obj_act.selected = True
-        context.scene.objects.active = obj_act
+        if self.properties.direction == 'PARENT':
+            parents = []
+            for obj in objs:
+                parent = obj.parent
+
+                if parent:
+                    parents.append(parent)
+
+                    if obj_act == obj:
+                        context.scene.objects.active = parent
+
+                    parent.select = True
+                
+            if parents:
+                return {'CANCELLED'}
+
+        else:
+            children = []
+            for obj in objs:
+                children += list(obj.children)
+                for obj_iter in children:
+                    obj_iter.select = True
+
+            children.sort(key=lambda obj_iter: obj_iter.name)
+            context.scene.objects.active = children[0]
 
         return {'FINISHED'}
 
@@ -518,11 +536,11 @@ class IsolateTypeRender(bpy.types.Operator):
 
         for obj in context.visible_objects:
 
-            if obj.selected:
-                obj.restrict_render = False
+            if obj.select:
+                obj.hide_render = False
             else:
                 if obj.type == act_type:
-                    obj.restrict_render = True
+                    obj.hide_render = True
 
         return {'FINISHED'}
 
index 9552a5e..f80c5e6 100644 (file)
@@ -27,8 +27,8 @@ class AddPresetBase(bpy.types.Operator):
     subclasses must define
      - preset_values
      - preset_subdir '''
-    bl_idname = "script.add_preset_base"
-    bl_label = "Add a Python Preset"
+    # bl_idname = "script.preset_base_add"
+    bl_label = "Add a Python Preset"
 
     name = bpy.props.StringProperty(name="Name", description="Name of the preset, used to make the path name", maxlen=64, default="")
 
index 1366849..432486b 100644 (file)
@@ -40,7 +40,7 @@ class SequencerCrossfadeSounds(bpy.types.Operator):
         seq1 = None
         seq2 = None
         for s in context.scene.sequence_editor.sequences:
-            if s.selected and s.type == 'SOUND':
+            if s.select and s.type == 'SOUND':
                 if seq1 == None:
                     seq1 = s
                 elif seq2 == None:
@@ -94,16 +94,16 @@ class SequencerCutMulticam(bpy.types.Operator):
 
         s = context.scene.sequence_editor.active_strip
 
-        if s.multicam_source == camera:
+        if s.multicam_source == camera or camera >= s.channel:
             return {'FINISHED'}
 
-        if not s.selected:
-            s.selected = True
+        if not s.select:
+            s.select = True
 
         cfra = context.scene.frame_current
         bpy.ops.sequencer.cut(frame=cfra, type='SOFT', side='RIGHT')
         for s in context.scene.sequence_editor.sequences_all:
-            if s.selected and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end:
+            if s.select and s.type == 'MULTICAM' and s.frame_final_start <= cfra and cfra < s.frame_final_end:
                 context.scene.sequence_editor.active_strip = s
 
         context.scene.sequence_editor.active_strip.multicam_source = camera
@@ -125,7 +125,7 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
 
     def execute(self, context):
         for s in context.scene.sequence_editor.sequences_all:
-            if s.selected and s.type == 'MOVIE':
+            if s.select and s.type == 'MOVIE':
                 s.de_interlace = True
 
         return {'FINISHED'}
index b9bc54b..a7abd47 100644 (file)
@@ -85,9 +85,9 @@ class ExportUVLayout(bpy.types.Operator):
             for i in range(uv_layer_len):
                 uv_elem = uv_layer[i]
                 # context checks
-                if faces[i].selected and (local_image is Ellipsis or local_image == uv_elem.image):
+                if faces[i].select and (local_image is Ellipsis or local_image == uv_elem.image):
                     #~ uv = uv_elem.uv
-                    #~ if False not in uv_elem.uv_selected[:len(uv)]:
+                    #~ if False not in uv_elem.select_uv[:len(uv)]:
                     #~     yield (i, uv)
 
                     # just write what we see.
@@ -210,7 +210,8 @@ class ExportUVLayout(bpy.types.Operator):
 
 
 def menu_func(self, context):
-    default_path = bpy.data.filepath.replace(".blend", ".svg")
+    import os
+    default_path = os.path.splitext(bpy.data.filepath)[0] + ".svg"
     self.layout.operator(ExportUVLayout.bl_idname).filepath = default_path
 
 
index 81229f7..6466d48 100644 (file)
@@ -65,9 +65,9 @@ def extend(obj, operator, EXTEND_MODE):
 
         # vertex index is the key, uv is the value
 
-        uvs_vhash_source = dict([(vindex, uvs_source[i]) for i, vindex in enumerate(vidx_source)])
+        uvs_vhash_source = {vindex: uvs_source[i] for i, vindex in enumerate(vidx_source)}
 
-        uvs_vhash_target = dict([(vindex, uvs_target[i]) for i, vindex in enumerate(vidx_target)])
+        uvs_vhash_target = {vindex: uvs_target[i] for i, vindex in enumerate(vidx_target)}
 
         edge_idxs_source = face_edge_vs(vidx_source)
         edge_idxs_target = face_edge_vs(vidx_target)
@@ -146,7 +146,7 @@ def extend(obj, operator, EXTEND_MODE):
         operator.report({'ERROR'}, "No active face.")
         return
 
-    face_sel = [f for f in me.faces if len(f.verts) == 4 and f.selected]
+    face_sel = [f for f in me.faces if len(f.verts) == 4 and f.select]
 
     face_act_local_index = -1
     for i, f in enumerate(face_sel):
index 13bf624..78cef26 100644 (file)
@@ -524,7 +524,7 @@ def mergeUvIslands(islandList):
                                 then move us 1 whole width accross,
                                 Its possible this is a bad idea since 2 skinny Angular faces
                                 could join without 1 whole move, but its a lot more optimal to speed this up
-                                since we have alredy tested for it.
+                                since we have already tested for it.
 
                                 It gives about 10% speedup with minimal errors.
                                 '''
@@ -821,7 +821,7 @@ def main(context, island_margin, projection_limit):
 #XXX   ob = objects.active
     ob= objects[0]
 
-    if ob and ob.selected == 0 and ob.type == 'MESH':
+    if ob and (not ob.select) and ob.type == 'MESH':
         # Add to the list
         obList =[ob]
     del objects
@@ -899,7 +899,7 @@ def main(context, island_margin, projection_limit):
         me_verts = list(me.verts)
 
         if USER_ONLY_SELECTED_FACES:
-            meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.selected]
+            meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select]
         #else:
         #      meshFaces = map(thickface, me.faces)
 
@@ -1027,7 +1027,7 @@ def main(context, island_margin, projection_limit):
             bestAng = fvec.dot(projectVecs[0])
             bestAngIdx = 0
 
-            # Cycle through the remaining, first alredy done
+            # Cycle through the remaining, first already done
             while i-1:
                 i-=1
 
index c152186..63a3aa3 100644 (file)
@@ -127,7 +127,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
         return('CANCELLED', )
 
     for i, f in enumerate(me.faces):
-        if not me.use_paint_mask or f.selected:
+        if not me.use_paint_mask or f.select:
 
             f_col = active_col_layer[i]
 
index 3165203..ba4eae8 100644 (file)
@@ -244,9 +244,9 @@ kmi = km.items.add('object.location_clear', 'G', 'PRESS', alt=True)
 kmi = km.items.add('object.rotation_clear', 'R', 'PRESS', alt=True)
 kmi = km.items.add('object.scale_clear', 'S', 'PRESS', alt=True)
 kmi = km.items.add('object.origin_clear', 'O', 'PRESS', alt=True)
-kmi = km.items.add('object.restrictview_clear', 'H', 'PRESS', alt=True)
-kmi = km.items.add('object.restrictview_set', 'H', 'PRESS')
-kmi = km.items.add('object.restrictview_set', 'H', 'PRESS', shift=True)
+kmi = km.items.add('object.hide_view_clear', 'H', 'PRESS', alt=True)
+kmi = km.items.add('object.hide_view_set', 'H', 'PRESS')
+kmi = km.items.add('object.hide_view_set', 'H', 'PRESS', shift=True)
 kmi.properties.unselected = True
 kmi = km.items.add('object.move_to_layer', 'M', 'PRESS')
 kmi = km.items.add('object.delete', 'X', 'PRESS')
index 1003bd6..9327de3 100644 (file)
@@ -16,7 +16,7 @@ def main(context):
     for i, uv in enumerate(mesh.active_uv_texture.data):
         uvs = uv.uv1, uv.uv2, uv.uv3, uv.uv4
         for j, v_idx in enumerate(mesh.faces[i].verts):
-            if uv.uv_selected[j]:
+            if uv.select_uv[j]:
                 # apply the location of the vertex as a UV
                 uvs[j][:] = mesh.verts[v_idx].co.xy
 
index 0575f13..38903cc 100644 (file)
@@ -160,13 +160,16 @@ class DATA_PT_bone_groups(DataButtonsPanel):
                     col = split.column()
                 col.template_triColorSet(group, "colors")
 
-        row = layout.row(align=True)
+        row = layout.row()
         row.active = (ob.proxy is None)
 
-        row.operator("pose.group_assign", text="Assign")
-        row.operator("pose.group_unassign", text="Remove") #row.operator("pose.bone_group_remove_from", text="Remove")
-        #row.operator("object.bone_group_select", text="Select")
-        #row.operator("object.bone_group_deselect", text="Deselect")
+        sub = row.row(align=True)
+        sub.operator("pose.group_assign", text="Assign")
+        sub.operator("pose.group_unassign", text="Remove") #row.operator("pose.bone_group_remove_from", text="Remove")
+
+        sub = row.row(align=True)
+        sub.operator("pose.group_select", text="Select")
+        sub.operator("pose.group_deselect", text="Deselect")
 
 
 # TODO: this panel will soon be depreceated too
index b6b638e..a4be7b3 100644 (file)
@@ -81,13 +81,13 @@ class BONE_PT_transform(BoneButtonsPanel):
                 sub.label(text="Roll:")
                 sub.prop(bone, "roll", text="")
                 sub.label()
-                sub.prop(bone, "locked")
+                sub.prop(bone, "lock")
             else:
                 col = layout.column()
                 col.prop(bone, "head")
                 col.prop(bone, "tail")
                 col.prop(bone, "roll")
-                col.prop(bone, "locked")
+                col.prop(bone, "lock")
 
         else:
             pchan = ob.pose.bones[context.bone.name]
@@ -231,7 +231,7 @@ class BONE_PT_display(BoneButtonsPanel):
 
             col = split.column()
             col.prop(bone, "draw_wire", text="Wireframe")
-            col.prop(bone, "hidden", text="Hide")
+            col.prop(bone, "hide", text="Hide")
 
             if wide_ui:
                 col = split.column()
index e1d6c9c..fd836f5 100644 (file)
@@ -44,7 +44,7 @@ class DataButtonsPanelActive(DataButtonsPanel):
 
     def poll(self, context):
         curve = context.curve
-        return (curve and curve.splines.active)
+        return (curve and type(curve) is not bpy.types.TextCurve and curve.splines.active)
 
 
 class DATA_PT_context_curve(DataButtonsPanel):
@@ -308,10 +308,11 @@ class DATA_PT_font(DataButtonsPanel):
 
         split = layout.split()
 
-        col = split.column(align=True)
-        col.label(text="Underline:")
-        col.prop(text, "ul_position", text="Position")
-        col.prop(text, "ul_height", text="Thickness")
+        col = split.column()
+        colsub = col.column(align=True)
+        colsub.label(text="Underline:")
+        colsub.prop(text, "ul_position", text="Position")
+        colsub.prop(text, "ul_height", text="Thickness")
 
         if wide_ui:
             col = split.column()
@@ -319,8 +320,13 @@ class DATA_PT_font(DataButtonsPanel):
         col.prop(char, "bold")
         col.prop(char, "italic")
         col.prop(char, "underline")
-#       col.prop(char, "style")
-#       col.prop(char, "wrap")
+        
+        split = layout.split()
+        col = split.column()
+        col.prop(text, "small_caps_scale", text="Small Caps")
+        
+        col = split.column()
+        col.prop(char, "use_small_caps")
 
 
 class DATA_PT_paragraph(DataButtonsPanel):
index a334e16..b7b4c8d 100644 (file)
@@ -437,6 +437,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
         col.prop(md, "levels", text="Preview")
         col.prop(md, "sculpt_levels", text="Sculpt")
         col.prop(md, "render_levels", text="Render")
+        col.prop(bpy.context.tool_settings.sculpt, "fast_navigate")
 
         if wide_ui:
             col = split.column()
index b428518..b3baead 100644 (file)
@@ -58,7 +58,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
             col = split.column()
             col.prop(game, "actor")
             col.prop(game, "ghost")
-            col.prop(ob, "restrict_render", text="Invisible") # out of place but useful
+            col.prop(ob, "hide_render", text="Invisible") # out of place but useful
 
             if wide_ui:
                 col = split.column()
@@ -120,7 +120,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
             col = layout.column()
             col.prop(game, "actor")
             col.prop(game, "ghost")
-            col.prop(ob, "restrict_render", text="Invisible")
+            col.prop(ob, "hide_render", text="Invisible")
 
             layout.separator()
 
@@ -156,10 +156,10 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
             col = layout.column()
             col.prop(game, "actor")
             col.prop(game, "ghost")
-            col.prop(ob, "restrict_render", text="Invisible")
+            col.prop(ob, "hide_render", text="Invisible")
 
         elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
-            layout.prop(ob, "restrict_render", text="Invisible")
+            layout.prop(ob, "hide_render", text="Invisible")
 
 
 class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
index 1526bd0..8d37949 100644 (file)
@@ -118,6 +118,9 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
             if ob:
                 split.template_ID(ob, "active_material", new="material.new")
                 row = split.row()
+                if mat:
+                    row.prop(mat, "use_nodes", icon="NODETREE", text="")
+
                 if slot:
                     row.prop(slot, "link", text="")
                 else:
index 335bd25..edeadb9 100644 (file)
@@ -523,7 +523,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         row = layout.row()
         if wide_ui:
             row.label(text="Lock:")
-        row.prop(con, "locked", expand=True)
+        row.prop(con, "lock", expand=True)
 
     def LIMIT_DISTANCE(self, context, layout, con, wide_ui):
         self.target_template(layout, con, wide_ui)
index 6d97e82..be8972e 100644 (file)
@@ -46,7 +46,10 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
         split.prop(cache, "name", text="File Name")
         split.prop(cache, "index", text="")
 
-        layout.label(text="File Path:")
+        row = layout.row()
+        row.label(text="File Path:")
+        row.prop(cache, "use_library_path", "Use Lib Path")
+        
         layout.prop(cache, "filepath", text="")
 
         layout.label(text=cache.info)
index 829416b..9a15387 100644 (file)
@@ -295,6 +295,7 @@ class RENDER_PT_output(RenderButtonsPanel):
         layout = self.layout
 
         rd = context.scene.render
+        file_format = rd.file_format
         wide_ui = context.region.width > narrowui
 
         layout.prop(rd, "output_path", text="")
@@ -310,11 +311,15 @@ class RENDER_PT_output(RenderButtonsPanel):
         col.prop(rd, "use_overwrite")
         col.prop(rd, "use_placeholder")
 
-        if rd.file_format in ('AVI_JPEG', 'JPEG'):
+        if file_format in ('AVI_JPEG', 'JPEG'):
             split = layout.split()
             split.prop(rd, "file_quality", slider=True)
+        
+        if file_format == 'PNG':
+            split = layout.split()
+            split.prop(rd, "file_quality", slider=True, text="Compression")
 
-        elif rd.file_format == 'MULTILAYER':
+        elif file_format == 'MULTILAYER':
             split = layout.split()
 
             col = split.column()
@@ -323,7 +328,7 @@ class RENDER_PT_output(RenderButtonsPanel):
             if wide_ui:
                 col = split.column()
 
-        elif rd.file_format == 'OPEN_EXR':
+        elif file_format == 'OPEN_EXR':
             split = layout.split()
 
             col = split.column()
@@ -340,7 +345,7 @@ class RENDER_PT_output(RenderButtonsPanel):
                 col = subsplit.column()
             col.prop(rd, "exr_preview")
 
-        elif rd.file_format == 'JPEG2000':
+        elif file_format == 'JPEG2000':
             split = layout.split()
             col = split.column()
             col.label(text="Depth:")
@@ -351,7 +356,7 @@ class RENDER_PT_output(RenderButtonsPanel):
             col.prop(rd, "jpeg2k_preset", text="")
             col.prop(rd, "jpeg2k_ycc")
 
-        elif rd.file_format in ('CINEON', 'DPX'):
+        elif file_format in ('CINEON', 'DPX'):
             split = layout.split()
             col = split.column()
             col.prop(rd, "cineon_log", text="Convert to Log")
@@ -363,15 +368,15 @@ class RENDER_PT_output(RenderButtonsPanel):
             col.prop(rd, "cineon_white", text="White")
             col.prop(rd, "cineon_gamma", text="Gamma")
 
-        elif rd.file_format == 'TIFF':
+        elif file_format == 'TIFF':
             split = layout.split()
             split.prop(rd, "tiff_bit")
 
-        elif rd.file_format == 'QUICKTIME_CARBON':
+        elif file_format == 'QUICKTIME_CARBON':
             split = layout.split()
             split.operator("scene.render_data_set_quicktime_codec")
 
-        elif rd.file_format == 'QUICKTIME_QTKIT':
+        elif file_format == 'QUICKTIME_QTKIT':
             split = layout.split()
             col = split.column()
             col.prop(rd, "quicktime_codec_type", text="Video Codec")
index 86f2d86..2bfbe18 100644 (file)
@@ -275,15 +275,12 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
 
         if type(idblock) == bpy.types.Brush:
             if context.sculpt_object:
+                layout.label(text="Brush Mapping:")
                 layout.prop(tex, "map_mode", expand=True)
 
                 row = layout.row()
                 row.active = tex.map_mode in ('FIXED', 'TILED')
                 row.prop(tex, "angle")
-
-                row = layout.row()
-                row.active = tex.map_mode in ('TILED', '3D')
-                row.column().prop(tex, "size")
         else:
             if type(idblock) == bpy.types.Material:
                 split = layout.split(percentage=0.3)
@@ -307,15 +304,17 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
                 row.prop(tex, "y_mapping", text="")
                 row.prop(tex, "z_mapping", text="")
 
-            # any non brush
-            split = layout.split()
+        split = layout.split()
+
+        col = split.column()
+        col.prop(tex, "offset")
 
+        if wide_ui:
             col = split.column()
-            col.prop(tex, "offset")
+        else:
+            col.separator()
 
-            if wide_ui:
-                col = split.column()
-            col.prop(tex, "size")
+        col.prop(tex, "size")
 
 
 class TEXTURE_PT_influence(TextureSlotPanel):
index e63d513..22acd49 100644 (file)
@@ -205,6 +205,10 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel):
     bl_label = "Indirect Lighting"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
+    def poll(self, context):
+        light = context.world.lighting
+        return light.gather_method == 'APPROXIMATE'
+
     def draw_header(self, context):
         light = context.world.lighting
         self.layout.prop(light, "use_indirect_lighting", text="")
index e9c963d..5afe715 100644 (file)
@@ -562,22 +562,10 @@ class IMAGE_PT_paint(bpy.types.Panel):
 
         toolsettings = context.tool_settings.image_paint
         brush = toolsettings.brush
-        wide_ui = context.region.width > narrowui
 
         col = layout.split().column()
         row = col.row()
-        row.template_list(toolsettings, "brushes", toolsettings, "active_brush_index", rows=2)
-
-        col.template_ID(toolsettings, "brush", new="brush.add")
-
-        if wide_ui:
-            sub = layout.row(align=True)
-        else:
-            sub = layout.column(align=True)
-        sub.prop_enum(brush, "imagepaint_tool", 'DRAW')
-        sub.prop_enum(brush, "imagepaint_tool", 'SOFTEN')
-        sub.prop_enum(brush, "imagepaint_tool", 'CLONE')
-        sub.prop_enum(brush, "imagepaint_tool", 'SMEAR')
+        col.template_ID_preview(toolsettings, "brush", new="brush.add", filter="is_imapaint_brush", rows=3, cols=8)
 
         if brush:
             col = layout.column()
index ca8371b..25f4e8b 100644 (file)
@@ -93,6 +93,8 @@ class INFO_MT_file(bpy.types.Menu):
         layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK').check_existing = False
         layout.operator_context = 'INVOKE_AREA'
         layout.operator("wm.save_as_mainfile", text="Save As...")
+        layout.operator_context = 'INVOKE_AREA'
+        layout.operator("wm.save_as_mainfile", text="Save Copy...").copy = True
 
         layout.separator()
 
index 5f014f6..b9b9003 100644 (file)
@@ -336,7 +336,9 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
 
     def draw(self, context):
         layout = self.layout
+        scene = context.scene
         render = context.scene.render
+        frame_current = scene.frame_current
         strip = act_strip(context)
 
         split = layout.split(percentage=0.3)
@@ -351,37 +353,30 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
         split.label(text="Blend:")
         split.prop(strip, "blend_mode", text="")
 
-        row = layout.row()
-        if strip.mute == True:
-            row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON', text="")
-        elif strip.mute is False:
-            row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_OFF', text="")
-
+        row = layout.row(align=True)
         sub = row.row()
         sub.active = (not strip.mute)
-
         sub.prop(strip, "blend_opacity", text="Opacity", slider=True)
-
-        row = layout.row()
-        row.prop(strip, "lock")
+        sub = row.row()
+        row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
+        row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="")
 
         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, "frame_final_length")
-        subrow.label(text="%.2f sec" % (strip.frame_final_length / (render.fps / render.fps_base)))
+        sub = col.column()
+        sub.enabled = not strip.lock
+        sub.prop(strip, "channel")
+        sub.prop(strip, "frame_start")
+        sub.prop(strip, "frame_final_length")
 
         col = layout.column(align=True)
-        col.label(text="Offset:")
-        col.prop(strip, "frame_offset_start", text="Start")
-        col.prop(strip, "frame_offset_end", text="End")
+        row = col.row()
+        row.label(text="Final Length: %s" % bpy.utils.smpte_from_frame(strip.frame_final_length))
+        row = col.row()
+        row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_length)
+        row.label(text="Playhead: %d" % (frame_current - strip.frame_start))
 
-        col = layout.column(align=True)
-        col.label(text="Still:")
-        col.prop(strip, "frame_still_start", text="Start")
-        col.prop(strip, "frame_still_end", text="End")
+        col.label(text="Frame Offset %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
+        col.label(text="Frame Still %d:%d" % (strip.frame_still_start, strip.frame_still_end))
 
 
 class SEQUENCER_PT_preview(bpy.types.Panel):
@@ -552,16 +547,14 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
         self.draw_filename(context)
 
         layout.prop(strip, "use_translation", text="Image Offset:")
-        if strip.transform:
+        if strip.use_translation:
             col = layout.column(align=True)
-            col.active = strip.use_translation
             col.prop(strip.transform, "offset_x", text="X")
             col.prop(strip.transform, "offset_y", text="Y")
 
         layout.prop(strip, "use_crop", text="Image Crop:")
-        if strip.crop:
+        if strip.use_crop:
             col = layout.column(align=True)
-            col.active = strip.use_crop
             col.prop(strip.crop, "top")
             col.prop(strip.crop, "left")
             col.prop(strip.crop, "bottom")
@@ -596,6 +589,7 @@ class SEQUENCER_PT_input_movie(SEQUENCER_PT_input):
         col.label(text="Path:")
         col = split.column()
         col.prop(strip, "filepath", text="")
+        col.prop(strip, "mpeg_preseek", text="MPEG Preseek")
 
 
 class SEQUENCER_PT_input_image(SEQUENCER_PT_input):
@@ -752,6 +746,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel):
 
         col = layout.column()
         col.label(text="Colors:")
+        col.prop(strip, "color_saturation", text="Saturation")
         col.prop(strip, "multiply_colors", text="Multiply")
         col.prop(strip, "premultiply")
         col.prop(strip, "convert_float")
index 042e4db..8c24dbc 100644 (file)
@@ -141,7 +141,7 @@ class TIME_MT_frame(bpy.types.Menu):
 
         # it was ok for riscos... ok TODO, operator
         for marker in context.scene.timeline_markers:
-            if marker.selected:
+            if marker.select:
                 layout.separator()
                 layout.prop(marker, "name", text="", icon='MARKER_HLT')
                 break
index 44b6858..2429f6e 100644 (file)
@@ -327,7 +327,21 @@ class USERPREF_PT_edit(bpy.types.Panel):
         row.separator()
         row.separator()
 
+        sculpt = context.tool_settings.sculpt
         col = row.column()
+        col.label(text="Paint and Sculpt:")
+        col.prop(edit, "sculpt_paint_use_unified_size", text="Unify Size")
+        col.prop(edit, "sculpt_paint_use_unified_strength", text="Unify Strength")
+        row = col.row(align=True)
+        row.label("Overlay Color:")
+        row.prop(edit, "sculpt_paint_overlay_col", text="")
+        col.prop(sculpt, "use_openmp", text="Threaded Sculpt")
+        col.prop(sculpt, "show_brush")
+
+        col.separator()
+        col.separator()
+        col.separator()
+
         col.label(text="Duplicate Data:")
         col.prop(edit, "duplicate_mesh", text="Mesh")
         col.prop(edit, "duplicate_surface", text="Surface")
@@ -338,7 +352,7 @@ class USERPREF_PT_edit(bpy.types.Panel):
         col.prop(edit, "duplicate_lamp", text="Lamp")
         col.prop(edit, "duplicate_material", text="Material")
         col.prop(edit, "duplicate_texture", text="Texture")
-        col.prop(edit, "duplicate_fcurve", text="F-Curve")
+        #col.prop(edit, "duplicate_fcurve", text="F-Curve")
         col.prop(edit, "duplicate_action", text="Action")
         col.prop(edit, "duplicate_particle", text="Particle")
 
@@ -764,8 +778,9 @@ class USERPREF_PT_input(InputKeyMapPanel):
 
         #col.separator()
 
-        #sub = col.column()
-        #sub.label(text="Mouse Wheel:")
+        sub = col.column()
+        sub.label(text="Mouse Wheel:")
+        sub.prop(inputs, "wheel_invert_zoom", text="Invert Wheel Zoom Direction")
         #sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
 
         col.separator()
@@ -1097,7 +1112,7 @@ class WM_OT_addon_expand(bpy.types.Operator):
     def execute(self, context):
         module_name = self.properties.module
 
-        # unlikely to fail, module should have alredy been imported
+        # unlikely to fail, module should have already been imported
         try:
             mod = __import__(module_name)
         except:
index 6860739..c5d74d3 100644 (file)
@@ -859,9 +859,9 @@ class VIEW3D_MT_object_showhide(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
 
-        layout.operator("object.restrictview_clear", text="Show Hidden")
-        layout.operator("object.restrictview_set", text="Hide Selected")
-        layout.operator("object.restrictview_set", text="Hide Unselected").unselected = True
+        layout.operator("object.hide_view_clear", text="Show Hidden")
+        layout.operator("object.hide_view_set", text="Hide Selected")
+        layout.operator("object.hide_view_set", text="Hide Unselected").unselected = True
 
 
 class VIEW3D_MT_make_single_user(bpy.types.Menu):
@@ -1707,6 +1707,13 @@ class VIEW3D_MT_edit_text(bpy.types.Menu):
 
         layout.menu("VIEW3D_MT_edit_text_chars")
 
+        layout.separator()
+        
+        layout.operator("font.style_toggle", text="Toggle Bold").style = 'BOLD'
+        layout.operator("font.style_toggle", text="Toggle Italic").style = 'ITALIC'
+        layout.operator("font.style_toggle", text="Toggle Underline").style = 'UNDERLINE'
+        layout.operator("font.style_toggle", text="Toggle Small Caps").style = 'SMALL_CAPS'
+
 
 class VIEW3D_MT_edit_text_chars(bpy.types.Menu):
     bl_label = "Special Characters"
@@ -2140,10 +2147,11 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
                     box.template_image(bg, "image", bg.image_user, compact=True)
 
                     box.prop(bg, "transparency", slider=True)
-                    box.prop(bg, "size")
-                    row = box.row(align=True)
-                    row.prop(bg, "offset_x", text="X")
-                    row.prop(bg, "offset_y", text="Y")
+                    if bg.view_axis != 'CAMERA':
+                        box.prop(bg, "size")
+                        row = box.row(align=True)
+                        row.prop(bg, "offset_x", text="X")
+                        row.prop(bg, "offset_y", text="Y")
 
 
 class VIEW3D_PT_transform_orientations(bpy.types.Panel):
index c503eaa..f902ba8 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 import bpy
 
+narrowui = bpy.context.user_preferences.view.properties_width_check
 
 class View3DPanel(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
@@ -503,18 +504,26 @@ class VIEW3D_PT_tools_brush(PaintPanel):
 
         if not context.particle_edit_object:
             col = layout.split().column()
-            row = col.row()
 
-            if context.sculpt_object and brush:
-                defaultbrushes = 8
-            elif context.texture_paint_object and brush:
-                defaultbrushes = 4
+            if context.sculpt_object and context.tool_settings.sculpt:
+                col.template_ID_preview(settings, "brush", new="brush.add", filter="is_sculpt_brush", rows=3, cols=8)
+            elif context.texture_paint_object and context.tool_settings.image_paint:
+                col.template_ID_preview(settings, "brush", new="brush.add", filter="is_imapaint_brush", rows=3, cols=8)
+            elif context.vertex_paint_object and context.tool_settings.vertex_paint:
+                col.template_ID_preview(settings, "brush", new="brush.add", filter="is_vpaint_brush", rows=3, cols=8)
+            elif context.weight_paint_object and context.tool_settings.weight_paint:
+                col.template_ID_preview(settings, "brush", new="brush.add", filter="is_wpaint_brush", rows=3, cols=8)
             else:
-                defaultbrushes = 7
+                row = col.row()
 
-            row.template_list(settings, "brushes", settings, "active_brush_index", rows=2, maxrows=defaultbrushes)
+                if context.sculpt_object and brush:
+                    defaultbrushes = 8
+                elif context.texture_paint_object and brush:
+                    defaultbrushes = 4
+                else:
+                    defaultbrushes = 7
 
-            col.template_ID(settings, "brush", new="brush.add")
+                row.template_list(settings, "brushes", settings, "active_brush_index", rows=2, maxrows=defaultbrushes)
 
         # Particle Mode #
 
@@ -546,44 +555,152 @@ class VIEW3D_PT_tools_brush(PaintPanel):
         # Sculpt Mode #
 
         elif context.sculpt_object and brush:
+            edit = context.user_preferences.edit
+
             col = layout.column()
+
+
             col.separator()
 
             row = col.row(align=True)
-            row.prop(brush, "size", slider=True)
 
-            if brush.sculpt_tool != 'GRAB':
-                row.prop(brush, "use_size_pressure", toggle=True, text="")
+            if edit.sculpt_paint_use_unified_size:
+                if edit.sculpt_paint_unified_lock_brush_size:
+                    row.prop(edit, "sculpt_paint_unified_lock_brush_size", toggle=True, text="", icon='LOCKED')
+                    row.prop(edit, "sculpt_paint_unified_unprojected_radius", text="Radius", slider=True)
+                else:
+                    row.prop(edit, "sculpt_paint_unified_lock_brush_size", toggle=True, text="", icon='UNLOCKED')
+                    row.prop(edit, "sculpt_paint_unified_size", text="Radius", slider=True)
+
+            else:
+                if brush.lock_brush_size:
+                    row.prop(brush, "lock_brush_size", toggle=True, text="", icon='LOCKED')
+                    row.prop(brush, "unprojected_radius", text="Radius", slider=True)
+                else:
+                    row.prop(brush, "lock_brush_size", toggle=True, text="", icon='UNLOCKED')
+                    row.prop(brush, "size", text="Radius", slider=True)
+
+            row.prop(brush, "use_size_pressure", toggle=True, text="")
+
+
+            if brush.sculpt_tool not in ('SNAKE_HOOK', 'GRAB', 'ROTATE'):
+                col.separator()
 
                 row = col.row(align=True)
-                row.prop(brush, "strength", slider=True)
+
+                if brush.use_space and brush.sculpt_tool not in ('SMOOTH'):
+                    if brush.use_space_atten:
+                        row.prop(brush, "use_space_atten", toggle=True, text="", icon='LOCKED')
+                    else:
+                        row.prop(brush, "use_space_atten", toggle=True, text="", icon='UNLOCKED')
+
+                if edit.sculpt_paint_use_unified_strength:
+                    row.prop(edit, "sculpt_paint_unified_strength", text="Unified Strength", slider=True)
+                else:
+                    row.prop(brush, "strength", text="Strength", slider=True)
+
                 row.prop(brush, "use_strength_pressure", text="")
 
-                # XXX - TODO
-                #row = col.row(align=True)
-                #row.prop(brush, "jitter", slider=True)
-                #row.prop(brush, "use_jitter_pressure", toggle=True, text="")
 
-                col = layout.column()
 
-                if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
-                    col.row().prop(brush, "direction", expand=True)
+            if brush.sculpt_tool not in ('SMOOTH'):
+                col.separator()
+
+                row = col.row(align=True)
+                row.prop(brush, "autosmooth_factor", slider=True)
+                row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="")
+
+
+
+            if brush.sculpt_tool in ('GRAB', 'SNAKE_HOOK'):
+                col.separator()
+
+                row = col.row(align=True)
+                row.prop(brush, "normal_weight", slider=True)
+
+
+
+            if brush.sculpt_tool in ('CREASE', 'BLOB'):
+                col.separator()
+
+                row = col.row(align=True)
+                row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
+
+            if brush.sculpt_tool not in ('PINCH', 'INFLATE', 'SMOOTH'):
+                row = col.row(align=True)
+
+                col.separator()
+
+                if brush.use_original_normal:
+                    row.prop(brush, "use_original_normal", toggle=True, text="", icon='LOCKED')
+                else:
+                    row.prop(brush, "use_original_normal", toggle=True, text="", icon='UNLOCKED')
+
+                row.prop(brush, "sculpt_plane", text="")
+
+            #if brush.sculpt_tool in ('CLAY', 'CLAY_TUBES', 'FLATTEN', 'FILL', 'SCRAPE'):
+            if brush.sculpt_tool in ('CLAY', 'FLATTEN', 'FILL', 'SCRAPE'):
+                row = col.row(align=True)
+                row.prop(brush, "plane_offset", slider=True)
+                row.prop(brush, "use_offset_pressure", text="")
+
+                col.separator()
+
+                row= col.row()
+                row.prop(brush, "use_plane_trim", text="Trim")
+                row= col.row()
+                row.active=brush.use_plane_trim
+                row.prop(brush, "plane_trim", slider=True, text="Distance")
+
+            col.separator()
+
+            row= col.row()
+            row.prop(brush, "use_frontface", text="Front Faces Only")
+
+            #if brush.sculpt_tool in ('DRAW', 'CREASE', 'BLOB', 'LAYER', 'CLAY', 'CLAY_TUBES'):
+            if brush.sculpt_tool in ('DRAW', 'CREASE', 'BLOB', 'LAYER', 'CLAY'):
+                col.separator()
+                col.row().prop(brush, "direction", expand=True)
+            elif brush.sculpt_tool in ('FLATTEN'):
+                col.separator()
+                col.row().prop(brush, "flatten_contrast", expand=True)
+            elif brush.sculpt_tool in ('FILL'):
+                col.separator()
+                col.row().prop(brush, "fill_deepen", expand=True)
+            elif brush.sculpt_tool in ('SCRAPE'):
+                col.separator()
+                col.row().prop(brush, "scrape_peaks", expand=True)
+            elif brush.sculpt_tool in ('INFLATE'):
+                col.separator()
+                col.row().prop(brush, "inflate_deflate", expand=True)
+            elif brush.sculpt_tool in ('PINCH'):
+                col.separator()
+                col.row().prop(brush, "pinch_magnify", expand=True)
+
+
+
+            #if brush.sculpt_tool in ('DRAW', 'CREASE', 'BLOB', 'INFLATE', 'LAYER', 'CLAY', 'CLAY_TUBES'):
+            if brush.sculpt_tool in ('DRAW', 'CREASE', 'BLOB', 'INFLATE', 'LAYER', 'CLAY'):
+                col.separator()
+
+                col.prop(brush, "use_accumulate")
+
 
-                if brush.sculpt_tool in ('DRAW', 'INFLATE', 'LAYER'):
-                    col.prop(brush, "use_accumulate")
 
-                if brush.sculpt_tool == 'LAYER':
-                    ob = context.sculpt_object
-                    do_persistent = True
+            if brush.sculpt_tool == 'LAYER':
+                col.separator()
 
-                    # not supported yet for this case
-                    for md in ob.modifiers:
-                        if md.type == 'MULTIRES':
-                            do_persistent = False
+                ob = context.sculpt_object
+                do_persistent = True
 
-                    if do_persistent:
-                        col.prop(brush, "use_persistent")
-                        col.operator("sculpt.set_persistent_base")
+                # not supported yet for this case
+                for md in ob.modifiers:
+                    if md.type == 'MULTIRES':
+                        do_persistent = False
+
+                if do_persistent:
+                    col.prop(brush, "use_persistent")
+                    col.operator("sculpt.set_persistent_base")
 
         # Texture Paint Mode #
 
@@ -669,10 +786,88 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel):
 
         col = layout.column()
 
-        col.template_ID_preview(brush, "texture", new="texture.new", rows=2, cols=4)
+        col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
 
         if context.sculpt_object:
-            col.row().prop(tex_slot, "map_mode", expand=True)
+            #XXX duplicated from properties_texture.py
+
+            wide_ui = context.region.width > narrowui
+
+
+            col.separator()
+
+
+            col.label(text="Brush Mapping:")
+            row = col.row(align=True)
+            row.prop(tex_slot, "map_mode", expand=True)
+
+            col.separator()
+
+            col = layout.column()
+            col.active = tex_slot.map_mode in ('FIXED')
+            col.label(text="Angle:")
+            
+            col = layout.column()
+            if not brush.use_anchor and brush.sculpt_tool not in ('GRAB', 'SNAKE_HOOK', 'THUMB', 'ROTATE') and tex_slot.map_mode in ('FIXED'):
+                col.prop(brush, "texture_angle_source", text="")
+            else:
+                col.prop(brush, "texture_angle_source_no_random", text="")
+
+            #row = col.row(align=True)
+            #row.label(text="Angle:")
+            #row.active = tex_slot.map_mode in ('FIXED', 'TILED')
+
+            #row = col.row(align=True)
+
+            #col = row.column()
+            #col.active = tex_slot.map_mode in ('FIXED')
+            #col.prop(brush, "use_rake", toggle=True, icon='PARTICLEMODE', text="")
+
+            col = layout.column()
+            col.prop(tex_slot, "angle", text="")
+            col.active = tex_slot.map_mode in ('FIXED', 'TILED')
+
+            #col = layout.column()
+            #col.prop(brush, "use_random_rotation")
+            #col.active = (not brush.use_rake) and (not brush.use_anchor) and brush.sculpt_tool not in ('GRAB', 'SNAKE_HOOK', 'THUMB', 'ROTATE') and tex_slot.map_mode in ('FIXED')
+
+            split = layout.split()
+
+            col = split.column()
+            col.prop(tex_slot, "offset")
+
+            if wide_ui:
+                col = split.column()
+            else:
+                col.separator()
+
+            col.prop(tex_slot, "size")
+
+            col = layout.column()
+
+            row = col.row(align=True)
+            row.label(text="Sample Bias:")
+            row = col.row(align=True)
+            row.prop(brush, "texture_sample_bias", slider=True, text="")
+
+            row = col.row(align=True)
+            row.label(text="Overlay:")
+            row.active = tex_slot.map_mode in ('FIXED', 'TILED')
+
+            row = col.row(align=True)
+
+            col = row.column()
+
+            if brush.use_texture_overlay:
+                col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='MUTE_IPO_OFF')
+            else:
+                col.prop(brush, "use_texture_overlay", toggle=True, text="", icon='MUTE_IPO_ON')
+
+            col.active = tex_slot.map_mode in ('FIXED', 'TILED')
+
+            col = row.column()
+            col.prop(brush, "texture_overlay_alpha", text="Alpha")
+            col.active = tex_slot.map_mode in ('FIXED', 'TILED') and brush.use_texture_overlay
 
 
 class VIEW3D_PT_tools_brush_tool(PaintPanel):
@@ -696,15 +891,11 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel):
         col = layout.column(align=True)
 
         if context.sculpt_object:
-            col.prop(brush, "sculpt_tool", expand=True)
+            col.prop(brush, "sculpt_tool", expand=False, text="")
         elif context.texture_paint_object:
-            col.prop(brush, "imagepaint_tool", expand=True)
-            #col.prop_enum(settings, "tool", 'DRAW')
-            #col.prop_enum(settings, "tool", 'SOFTEN')
-            #col.prop_enum(settings, "tool", 'CLONE')
-            #col.prop_enum(settings, "tool", 'SMEAR')
+            col.prop(brush, "imagepaint_tool", expand=False, text="")
         elif context.vertex_paint_object or context.weight_paint_object:
-            col.prop(brush, "vertexpaint_tool", expand=True)
+            col.prop(brush, "vertexpaint_tool", expand=False, text="")
 
 
 class VIEW3D_PT_tools_brush_stroke(PaintPanel):
@@ -725,29 +916,83 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel):
         brush = settings.brush
         texture_paint = context.texture_paint_object
 
+        col = layout.column()
+
         if context.sculpt_object:
-            if brush.sculpt_tool != 'LAYER':
-                layout.prop(brush, "use_anchor")
-            layout.prop(brush, "use_rake")
+            col.label(text="Stroke Method:")
+            col.prop(brush, "stroke_method", text="")
+
+            if brush.use_anchor:
+                col.separator()
+                row = col.row()
+                row.prop(brush, "edge_to_edge", "Edge To Edge")
+
+            if brush.use_airbrush:
+                col.separator()
+                row = col.row()
+                row.prop(brush, "rate", text="Rate", slider=True)
+
+            if brush.use_space:
+                col.separator()
+                row = col.row()
+                row.active = brush.use_space
+                row.prop(brush, "spacing", text="Spacing")
+
+            if brush.sculpt_tool not in ('GRAB', 'THUMB', 'SNAKE_HOOK', 'ROTATE') and (not brush.use_anchor) and (not brush.restore_mesh):
+                col = layout.column()
+                col.separator()
 
-        layout.prop(brush, "use_airbrush")
-        col = layout.column()
-        col.active = brush.use_airbrush
-        col.prop(brush, "rate", slider=True)
+                col.prop(brush, "use_smooth_stroke")
+
+                sub = col.column()
+                sub.active = brush.use_smooth_stroke
+                sub.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
+                sub.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
+
+                col.separator()
+
+                row = col.row(align=True)
+                row.prop(brush, "jitter", slider=True)
+                row.prop(brush, "use_jitter_pressure", toggle=True, text="")
+
+        else:
+            row = col.row()
+            row.prop(brush, "use_airbrush")
+
+            row = col.row()
+            row.active = brush.use_airbrush and (not brush.use_space) and (not brush.use_anchor)
+            row.prop(brush, "rate", slider=True)
+
+            col.separator()
+
+            if not texture_paint:
+                row = col.row()
+                row.prop(brush, "use_smooth_stroke")
+
+                col = layout.column()
+                col.active = brush.use_smooth_stroke
+                col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
+                col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
+
+            col.separator()
 
-        if not texture_paint:
-            layout.prop(brush, "use_smooth_stroke")
             col = layout.column()
-            col.active = brush.use_smooth_stroke
-            col.prop(brush, "smooth_stroke_radius", text="Radius", slider=True)
-            col.prop(brush, "smooth_stroke_factor", text="Factor", slider=True)
+            col.active = (not brush.use_anchor) and (brush.sculpt_tool not in ('GRAB', 'THUMB', 'ROTATE', 'SNAKE_HOOK'))
 
-        layout.prop(brush, "use_space")
-        row = layout.row(align=True)
-        row.active = brush.use_space
-        row.prop(brush, "spacing", text="Distance", slider=True)
-        if texture_paint:
-            row.prop(brush, "use_spacing_pressure", toggle=True, text="")
+            row = col.row()
+            row.prop(brush, "use_space")
+
+            row = col.row()
+            row.active = brush.use_space
+            row.prop(brush, "spacing", text="Spacing")
+
+            #col.prop(brush, "use_space_atten", text="Adaptive Strength")
+            #col.prop(brush, "use_adaptive_space", text="Adaptive Spacing")
+
+            #col.separator()
+
+            #if texture_paint:
+            #    row.prop(brush, "use_spacing_pressure", toggle=True, text="")
 
 
 class VIEW3D_PT_tools_brush_curve(PaintPanel):
@@ -767,13 +1012,17 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel):
         layout.template_curve_mapping(brush, "curve", brush=True)
 
         row = layout.row(align=True)
-        row.operator("brush.curve_preset", text="Sharp").shape = 'SHARP'
-        row.operator("brush.curve_preset", text="Smooth").shape = 'SMOOTH'
-        row.operator("brush.curve_preset", text="Max").shape = 'MAX'
-
+        row.operator("brush.curve_preset", icon="SMOOTHCURVE", text="").shape = 'SMOOTH'
+        row.operator("brush.curve_preset", icon="SPHERECURVE", text="").shape = 'ROUND'
+        row.operator("brush.curve_preset", icon="ROOTCURVE", text="").shape = 'ROOT'
+        row.operator("brush.curve_preset", icon="SHARPCURVE", text="").shape = 'SHARP'
+        row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
+        row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
+        row.operator("brush.curve_preset", icon="RNDCURVE", text="").shape = 'MID9'
 
 class VIEW3D_PT_sculpt_options(PaintPanel):
     bl_label = "Options"
+    bl_default_closed = True
 
     def poll(self, context):
         return (context.sculpt_object and context.tool_settings.sculpt)
@@ -781,25 +1030,104 @@ class VIEW3D_PT_sculpt_options(PaintPanel):
     def draw(self, context):
         layout = self.layout
 
+        wide_ui = context.region.width > narrowui
+
         sculpt = context.tool_settings.sculpt
+        settings = self.paint_settings(context)
+        brush = settings.brush
 
-        col = layout.column()
-        col.prop(sculpt, "show_brush")
-        col.prop(sculpt, "fast_navigate")
+        split = layout.split()
+
+        col = split.column()
+
+        edit = context.user_preferences.edit
+        col.label(text="Unified Settings:")
+        col.prop(edit, "sculpt_paint_use_unified_size", text="Size")
+        col.prop(edit, "sculpt_paint_use_unified_strength", text="Strength")
+
+        if wide_ui:
+            col = split.column()
+        else:
+            col.separator()
+
+        col.label(text="Lock:")
+        row = col.row(align=True)
+        row.prop(sculpt, "lock_x", text="X", toggle=True)
+        row.prop(sculpt, "lock_y", text="Y", toggle=True)
+        row.prop(sculpt, "lock_z", text="Z", toggle=True)
+
+class VIEW3D_PT_sculpt_symmetry(PaintPanel):
+    bl_label = "Symmetry"
+    bl_default_closed = True
+
+    def poll(self, context):
+        return (context.sculpt_object and context.tool_settings.sculpt)
+
+    def draw(self, context):
+        wide_ui = context.region.width > narrowui
 
-        split = self.layout.split()
+        layout = self.layout
+
+        sculpt = context.tool_settings.sculpt
+        settings = self.paint_settings(context)
+        brush = settings.brush
+
+        split = layout.split()
 
         col = split.column()
-        col.label(text="Symmetry:")
+
+        col.label(text="Mirror:")
         col.prop(sculpt, "symmetry_x", text="X")
         col.prop(sculpt, "symmetry_y", text="Y")
         col.prop(sculpt, "symmetry_z", text="Z")
 
-        col = split.column()
-        col.label(text="Lock:")
-        col.prop(sculpt, "lock_x", text="X")
-        col.prop(sculpt, "lock_y", text="Y")
-        col.prop(sculpt, "lock_z", text="Z")
+        if wide_ui:
+            col = split.column()
+        else:
+            col.separator()
+
+        col.prop(sculpt, "radial_symm", text="Radial")
+
+        col = layout.column()
+
+        col.separator()
+
+        col.prop(sculpt, "use_symmetry_feather", text="Feather")
+
+class VIEW3D_PT_tools_brush_appearance(PaintPanel):
+    bl_label = "Appearance"
+    bl_default_closed = True
+
+    def poll(self, context):
+        return (context.sculpt_object and context.tool_settings.sculpt) or (context.vertex_paint_object and context.tool_settings.vertex_paint) or (context.weight_paint_object and context.tool_settings.weight_paint) or (context.texture_paint_object and context.tool_settings.image_paint)
+
+    def draw(self, context):
+        layout = self.layout
+
+        sculpt = context.tool_settings.sculpt
+        settings = self.paint_settings(context)
+        brush = settings.brush
+
+        if context.sculpt_object and context.tool_settings.sculpt:
+            col = layout.column();
+
+            #if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'CLAY_TUBES', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE'):
+            if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE'):
+                col.prop(brush, "add_col", text="Add Color")
+                col.prop(brush, "sub_col", text="Subtract Color")
+            else:
+                col.prop(brush, "add_col", text="Color")
+
+            col.separator()
+
+        col = layout.column()
+        col.label(text="Icon:")
+
+        row = col.row(align=True)
+        row.prop(brush, "icon", text="")
+
+        row = col.row(align=True)
+        row.prop(brush, "icon_filepath", text="")
 
 # ********** default tools for weightpaint ****************
 
@@ -1049,9 +1377,11 @@ classes = [
     VIEW3D_PT_tools_posemode_options,
     VIEW3D_PT_tools_brush,
     VIEW3D_PT_tools_brush_texture,
-    VIEW3D_PT_tools_brush_tool,
     VIEW3D_PT_tools_brush_stroke,
     VIEW3D_PT_tools_brush_curve,
+    VIEW3D_PT_tools_brush_appearance,
+    VIEW3D_PT_tools_brush_tool,
+    VIEW3D_PT_sculpt_symmetry,
     VIEW3D_PT_sculpt_options,
     VIEW3D_PT_tools_vertexpaint,
     VIEW3D_PT_tools_weightpaint_options,
index 1da4b62..1b14c63 100644 (file)
   </style>
 </head>
 <body>
-<p class="title"><b>Blender 2.5 Alpha 2</b></p>
+<p class="title"><b>Blender 2.5 Beta</b></p>
 <p><br></p>
 <p class="header"><b>About</b></p>
 <p class="body">Welcome to Blender, the free, open source 3D application for modeling, animation, rendering, compositing, video editing and game creation. Blender is available for Linux, Mac OS X, Windows, Solaris and Irix and has a large world-wide community.</p>
 <p class="body">Blender can be used freely for any purpose, including commercial use and distribution. It's free and open-source software, released under the GNU GPL licence. The entire source code is available on our website.</p>
 <p class="body">For more information, visit <a href="http://www.blender.org">blender.org</a>.</p>
 <p><br></p>
-<p class="header"><b>2.5 Alpha 2</b></p>
-<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.5 Alpha 2. This release is the third official testing release of the Blender 2.5 series, and represents the culmination of many years of redesign and development work. <a href="http://www.blender.org/development/release-logs/blender-250/">More information about this release</a>.</p>
+<p class="header"><b>2.5 Beta</b></p>
+<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.5 Beta. This release is the third official testing release of the Blender 2.5 series, and represents the culmination of many years of redesign and development work. <a href="http://www.blender.org/development/release-logs/blender-250/">More information about this release</a>.</p>
 <p class="body">What to Expect:</p>
 <p class="body">       •     Big improvements - This is our most exciting version to date, already a significant improvement in many ways over 2.49</p>
 <p class="body">       •     Missing/Incomplete Features - Although most of it is there, not all functionality from pre-2.5 versions has been restored yet. Some functionality may be re-implemented a different way.</p>
-<p class="body">       •     Bugs - We've fixed a lot lately, but there are still quite a few bugs. This is alpha software, we're still working on it!</p>
+<p class="body">       •     Bugs - We've fixed a lot lately, but there are still quite a few bugs. This is beta software, we're still working on it!</p>
 <p class="body">       •     Changes - If you're used to the old Blenders, Blender 2.5 may seem quite different at first, but it won't be long before it grows on you even more than before.</p>
 <p><br></p>
 <p class="header"><b>Bugs</b></p>
-<p class="body">Blender 2.5 Alpha 2 is unfinished software. If you encounter a bug, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.5. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
+<p class="body">Blender 2.5 Beta is unfinished software. If you encounter a bug, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.5. If it wasn’t reported yet, please log in (or register) and fill in detailed information about the error. Please post detailed instructions on how to reproduce it or post a .blend file showcasing the bug.</p>
 <p><br></p>
 <p class="header"><b>Package Contents</b></p>
 <p class="body">The downloaded Blender package includes:</p>
index a3115e0..2e71bd9 100644 (file)
@@ -163,7 +163,7 @@ typedef struct _AviIndex {
 typedef enum {
   AVI_FORMAT_RGB24,  /* The most basic of forms, 3 bytes per pixel, 1 per r, g, b */
   AVI_FORMAT_RGB32,  /* The second most basic of forms, 4 bytes per pixel, 1 per r, g, b, alpha */
-  AVI_FORMAT_AVI_RGB, /* Same as above, but is in the wierd AVI order (bottom to top, left to right) */
+  AVI_FORMAT_AVI_RGB, /* Same as above, but is in the weird AVI order (bottom to top, left to right) */
   AVI_FORMAT_MJPEG /* Motion-JPEG */
 } AviFormat;
 
index 7ac5815..4e299ac 100644 (file)
@@ -43,9 +43,9 @@ struct bContext;
 struct ReportList;
 struct Scene;
 struct Main;
-       
-#define BLENDER_VERSION                        252
-#define BLENDER_SUBVERSION             5
+
+#define BLENDER_VERSION                        253
+#define BLENDER_SUBVERSION             0
 
 #define BLENDER_MINVERSION             250
 #define BLENDER_MINSUBVERSION  0
index fcc6362..75fdb71 100644 (file)
@@ -44,6 +44,9 @@ struct Brush *copy_brush(struct Brush *brush);
 void make_local_brush(struct Brush *brush);
 void free_brush(struct Brush *brush);
 
+/* image icon function */
+struct ImBuf *get_brush_icon(struct Brush *brush);
+
 /* brush library operations used by different paint panels */
 int brush_set_nr(struct Brush **current_brush, int nr, const char *name);
 int brush_delete(struct Brush **current_brush);
@@ -84,5 +87,15 @@ unsigned int *brush_gen_texture_cache(struct Brush *br, int half_side);
 void brush_radial_control_invoke(struct wmOperator *op, struct Brush *br, float size_weight);
 int brush_radial_control_exec(struct wmOperator *op, struct Brush *br, float size_weight);
 
+/* unified strength and size */
+int sculpt_get_brush_size(struct Brush *brush);
+void sculpt_set_brush_size(struct Brush *brush, int size);
+int sculpt_get_lock_brush_size(struct Brush *brush);
+float sculpt_get_brush_unprojected_radius(struct Brush *brush);
+void sculpt_set_brush_unprojected_radius(struct Brush *brush, float unprojected_radius);
+float sculpt_get_brush_alpha(struct Brush *brush);
+void sculpt_set_brush_alpha(struct Brush *brush, float alpha);
+
+
 #endif
 
index 835e2ed..6de0c55 100644 (file)
@@ -143,7 +143,7 @@ typedef enum eFMI_Action_Types {
 typedef enum eFMI_Requirement_Flags {
                /* modifier requires original data-points (kindof beats the purpose of a modifier stack?) */
        FMI_REQUIRES_ORIGINAL_DATA              = (1<<0),
-               /* modifier doesn't require on any preceeding data (i.e. it will generate a curve). 
+               /* modifier doesn't require on any preceding data (i.e. it will generate a curve). 
                 * Use in conjunction with FMI_TYPE_GENRATE_CURVE 
                 */
        FMI_REQUIRES_NOTHING                    = (1<<1),
index 07c3da4..2a7ba4f 100644 (file)
@@ -83,7 +83,6 @@ struct Lamp *copy_lamp(struct Lamp *la);
 void make_local_lamp(struct Lamp *la);
 void free_camera(struct Camera *ca);
 void free_lamp(struct Lamp *la);
-void *add_wave(void);
 
 struct Object *add_only_object(int type, char *name);
 struct Object *add_object(struct Scene *scene, int type);
index cd412ca..f9954b3 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef BKE_PAINT_H
 #define BKE_PAINT_H
 
+#include "DNA_vec_types.h"
+
 struct Brush;
 struct MFace;
 struct MultireModifierData;
@@ -96,6 +98,8 @@ typedef struct SculptSession {
        struct GPUDrawObject *drawobject;
 
        int modifiers_active;
+
+       rcti previous_r;
 } SculptSession;
 
 void free_sculptsession(struct Object *ob);
index 33a4182..fcef00a 100644 (file)
@@ -255,11 +255,9 @@ void psys_threads_free(ParticleThread *threads);
 void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
 
 /* particle_system.c */
-void psys_update_path_cache(struct ParticleSimulationData *sim, float cfra);
 struct ParticleSystem *psys_get_target_system(struct Object *ob, struct ParticleTarget *pt);
 void psys_count_keyed_targets(struct ParticleSimulationData *sim);
 void psys_update_particle_tree(struct ParticleSystem *psys, float cfra);
-void psys_update_children(struct ParticleSimulationData *sim);
 
 void psys_make_temp_pointcache(struct Object *ob, struct ParticleSystem *psys);
 void psys_get_pointcache_start_end(struct Scene *scene, ParticleSystem *psys, int *sfra, int *efra);
index b5b0a72..f0fb2a6 100644 (file)
@@ -63,7 +63,7 @@ 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);
 
-int next_object(struct Scene *scene, int val, struct Base **base, struct Object **ob);
+int next_object(struct Scene **scene, int val, struct Base **base, struct Object **ob);
 struct Object *scene_find_camera(struct Scene *sc);
 struct Object *scene_camera_switch_find(struct Scene *scene); // DURIAN_CAMERA_SWITCH
 int scene_camera_switch_update(struct Scene *scene);
index 002a195..c5417e0 100644 (file)
@@ -191,13 +191,13 @@ 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);
+void free_imbuf_seq(struct Scene *scene, struct ListBase * seqbasep, int check_mem_usage, int keep_file_handles);
 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_sound_reload(struct 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);
 
index 50c86e8..190b040 100644 (file)
@@ -94,6 +94,6 @@ float sound_sync_scene(struct Scene *scene);
 
 int sound_scene_playing(struct Scene *scene);
 
-int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length);
+int sound_read_sound_buffer(struct bSound* sound, float* buffer, int length, float start, float end);
 
 #endif
index d5ece6a..8b14434 100644 (file)
@@ -59,7 +59,7 @@
 #include "BIF_gl.h"
 #include "BIF_glutil.h"
 
-#include "gpu_buffers.h"
+#include "GPU_buffers.h"
 #include "GPU_draw.h"
 #include "GPU_extensions.h"
 #include "GPU_material.h"
index 6c8e5c4..228860c 100644 (file)
@@ -301,7 +301,7 @@ void action_groups_add_channel (bAction *act, bActionGroup *agrp, FCurve *fcurve
                /* firstly, link this F-Curve to the group */
                agrp->channels.first = agrp->channels.last = fcurve;
                
-               /* step through the groups preceeding this one, finding the F-Curve there to attach this one after */
+               /* step through the groups preceding this one, finding the F-Curve there to attach this one after */
                for (grp= agrp->prev; grp; grp= grp->prev) {
                        /* if this group has F-Curves, we want weave the given one in right after the last channel there,
                         * but via the Action's list not this group's list
index fa0ddc5..157c074 100644 (file)
@@ -741,7 +741,7 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int level, i
 
                        if(go->ob->transflag & OB_DUPLI) {
                                copy_m4_m4(dob->ob->obmat, dob->mat);
-                               object_duplilist_recursive((ID *)group, scene, go->ob, lb, ob->obmat, level+1, animated);
+                               object_duplilist_recursive(&group->id, scene, go->ob, lb, ob->obmat, level+1, animated);
                                copy_m4_m4(dob->ob->obmat, dob->omat);
                        }
                }
index 57e72fc..101c7a3 100644 (file)
@@ -313,8 +313,6 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, char *filename)
 
        /* baseflags, groups, make depsgraph, etc */
        set_scene_bg(CTX_data_scene(C));
-
-       DAG_on_load_update();
        
        MEM_freeN(bfd);
 }
@@ -478,6 +476,9 @@ static int read_undosave(bContext *C, UndoElem *uel)
        strcpy(G.sce, scestr);
        G.fileflags= fileflags;
 
+       if(success)
+               DAG_on_load_update();
+
        return success;
 }
 
index 538012c..8e3cc07 100644 (file)
@@ -53,8 +53,7 @@
 #include "BKE_main.h"
 #include "BKE_paint.h"
 #include "BKE_texture.h"
-
-
+#include "BKE_icons.h"
 
 #include "IMB_imbuf.h"
 #include "IMB_imbuf_types.h"
@@ -70,29 +69,57 @@ Brush *add_brush(const char *name)
 
        brush= alloc_libblock(&G.main->brush, ID_BR, name);
 
-       brush->rgb[0]= 1.0f;
+       /* BRUSH SCULPT TOOL SETTINGS */
+       brush->sculpt_tool = SCULPT_TOOL_DRAW; /* sculpting defaults to the draw tool for new brushes */
+       brush->size= 35; /* radius of the brush in pixels */
+       brush->alpha= 0.5f; /* brush strength/intensity probably variable should be renamed? */
+       brush->autosmooth_factor= 0.0f;
+       brush->crease_pinch_factor= 0.5f;
+       brush->sculpt_plane = SCULPT_DISP_DIR_VIEW;
+       brush->plane_offset= 0.0f; /* how far above or below the plane that is found by averaging the faces */
+       brush->plane_trim= 0.5f;
+       brush->clone.alpha= 0.5f;
+       brush->normal_weight= 0.0f;
+
+       /* BRUSH PAINT TOOL SETTINGS */
+       brush->rgb[0]= 1.0f; /* default rgb color of the brush when painting - white */
        brush->rgb[1]= 1.0f;
        brush->rgb[2]= 1.0f;
-       brush->alpha= 0.2f;
-       brush->size= 25;
-       brush->spacing= 3.5f;
+
+       /* BRUSH STROKE SETTINGS */
+       brush->flag |= (BRUSH_SPACE|BRUSH_SPACE_ATTEN);
+       brush->spacing= 10; /* how far each brush dot should be spaced as a percentage of brush diameter */
+
        brush->smooth_stroke_radius= 75;
-       brush->smooth_stroke_factor= 0.9;
-       brush->rate= 0.1f;
+       brush->smooth_stroke_factor= 0.9f;
+
+       brush->rate= 0.1f; /* time delay between dots of paint or sculpting when doing airbrush mode */
+
        brush->jitter= 0.0f;
-       brush->clone.alpha= 0.5;
-       brush->sculpt_tool = SCULPT_TOOL_DRAW;
-       brush->flag |= BRUSH_SPACE;
 
-       brush_curve_preset(brush, CURVE_PRESET_SMOOTH);
-       
+       /* BRUSH TEXTURE SETTINGS */
        default_mtex(&brush->mtex);
 
+       brush->texture_sample_bias= 0; /* value to added to texture samples */
+
+       /* brush appearance  */
+
+       brush->add_col[0]= 1.00; /* add mode color is light red */
+       brush->add_col[1]= 0.39;
+       brush->add_col[2]= 0.39;
+
+       brush->sub_col[0]= 0.39; /* subtract mode color is light blue */
+       brush->sub_col[1]= 0.39;
+       brush->sub_col[2]= 1.00;
+
+        /* the default alpha falloff curve */
+       brush_curve_preset(brush, CURVE_PRESET_SMOOTH);
+
        /* enable fake user by default */
        brush->id.flag |= LIB_FAKEUSER;
        brush_toggled_fake_user(brush);
-       
-       return brush;   
+
+       return brush;
 }
 
 Brush *copy_brush(Brush *brush)
@@ -101,8 +128,12 @@ Brush *copy_brush(Brush *brush)
        
        brushn= copy_libblock(brush);
 
-       if(brush->mtex.tex) id_us_plus((ID*)brush->mtex.tex);
-       
+       if (brush->mtex.tex)
+               id_us_plus((ID*)brush->mtex.tex);
+
+       if (brush->icon_imbuf)
+               brushn->icon_imbuf= IMB_dupImBuf(brush->icon_imbuf);
+
        brushn->curve= curvemapping_copy(brush->curve);
 
        /* enable fake user by default */
@@ -117,8 +148,14 @@ Brush *copy_brush(Brush *brush)
 /* not brush itself */
 void free_brush(Brush *brush)
 {
-       if(brush->mtex.tex) brush->mtex.tex->id.us--;
-       
+       if (brush->mtex.tex)
+               brush->mtex.tex->id.us--;
+
+       if (brush->icon_imbuf)
+               IMB_freeImBuf(brush->icon_imbuf);
+
+       BKE_previewimg_free(&(brush->preview));
+
        curvemapping_free(brush->curve);
 }
 
@@ -147,7 +184,7 @@ void make_local_brush(Brush *brush)
                        if(scene->id.lib) lib= 1;
                        else local= 1;
                }
-       
+
        if(local && lib==0) {
                brush->id.lib= 0;
                brush->id.flag= LIB_LOCAL;
@@ -731,11 +768,19 @@ static void brush_apply_pressure(BrushPainter *painter, Brush *brush, float pres
                brush->spacing = MAX2(1.0, painter->startspacing*(1.5f-pressure));
 }
 
-static void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos)
+void brush_jitter_pos(Brush *brush, float *pos, float *jitterpos)
 {
        if(brush->jitter){
-               jitterpos[0] = pos[0] + ((BLI_frand()-0.5f) * brush->size * brush->jitter * 2);
-               jitterpos[1] = pos[1] + ((BLI_frand()-0.5f) * brush->size * brush->jitter * 2);
+               float rand_pos[2];
+
+               // find random position within a circle of diameter 1
+               do {
+                       rand_pos[0] = BLI_frand()-0.5f;
+                       rand_pos[1] = BLI_frand()-0.5f;
+               } while (len_v2(rand_pos) > 0.5f);
+
+               jitterpos[0] = pos[0] + 2*rand_pos[0]*brush->size*brush->jitter;
+               jitterpos[1] = pos[1] + 2*rand_pos[1]*brush->size*brush->jitter;
        }
        else {
                VECCOPY2D(jitterpos, pos);
@@ -887,7 +932,7 @@ int brush_painter_paint(BrushPainter *painter, BrushFunc func, float *pos, doubl
 /* Uses the brush curve control to find a strength value between 0 and 1 */
 float brush_curve_strength_clamp(Brush *br, float p, const float len)
 {
-       if(p >= len)    p= 1.0f;
+       if(p >= len)    return 0;
        else                    p= p/len;
 
        p= curvemapping_evaluateF(br->curve, 0, p);
@@ -899,9 +944,12 @@ float brush_curve_strength_clamp(Brush *br, float p, const float len)
  * used for sculpt only */
 float brush_curve_strength(Brush *br, float p, const float len)
 {
-       if(p >= len)    p= 1.0f;
-       else                    p= p/len;
-       return curvemapping_evaluateF(br->curve, 0, p);
+    if(p >= len)
+        p= 1.0f;
+    else
+        p= p/len;
+
+    return curvemapping_evaluateF(br->curve, 0, p);
 }
 
 /* TODO: should probably be unified with BrushPainter stuff? */
@@ -915,7 +963,7 @@ unsigned int *brush_gen_texture_cache(Brush *br, int half_side)
 
        memset(&texres, 0, sizeof(TexResult));
        
-       if(mtex && mtex->tex) {
+       if(mtex->tex) {
                float x, y, step = 2.0 / side, co[3];
 
                texcache = MEM_callocN(sizeof(int) * side * side, "Brush texture cache");
@@ -993,9 +1041,9 @@ void brush_radial_control_invoke(wmOperator *op, Brush *br, float size_weight)
        float original_value= 0;
 
        if(mode == WM_RADIALCONTROL_SIZE)
-               original_value = br->size * size_weight;
+               original_value = sculpt_get_brush_size(br) * size_weight;
        else if(mode == WM_RADIALCONTROL_STRENGTH)
-               original_value = br->alpha;
+               original_value = sculpt_get_brush_alpha(br);
        else if(mode == WM_RADIALCONTROL_ANGLE) {
                MTex *mtex = brush_active_texture(br);
                if(mtex)
@@ -1013,9 +1061,15 @@ int brush_radial_control_exec(wmOperator *op, Brush *br, float size_weight)
        const float conv = 0.017453293;
 
        if(mode == WM_RADIALCONTROL_SIZE)
-               br->size = new_value * size_weight;
+               if (sculpt_get_lock_brush_size(br)) {
+                       float initial_value = RNA_float_get(op->ptr, "initial_value");
+                       const float unprojected_radius = sculpt_get_brush_unprojected_radius(br);
+                       sculpt_set_brush_unprojected_radius(br, unprojected_radius * new_value/initial_value * size_weight);
+               }
+               else
+                       sculpt_set_brush_size(br, new_value * size_weight);
        else if(mode == WM_RADIALCONTROL_STRENGTH)
-               br->alpha = new_value;
+               sculpt_set_brush_alpha(br, new_value);
        else if(mode == WM_RADIALCONTROL_ANGLE) {
                MTex *mtex = brush_active_texture(br);
                if(mtex)
index a586ca5..41e3300 100644 (file)
@@ -54,7 +54,7 @@
 
 #include "MEM_guardedalloc.h"
 
-#include "gpu_buffers.h"
+#include "GPU_buffers.h"
 #include "GPU_draw.h"
 #include "GPU_extensions.h"
 #include "GPU_material.h"
index ce5bca1..b9b1c16 100644 (file)
@@ -144,6 +144,9 @@ void cloth_init ( ClothModifierData *clmd )
 
        if(!clmd->sim_parms->effector_weights)
                clmd->sim_parms->effector_weights = BKE_add_effector_weights(NULL);
+
+       if(clmd->point_cache)
+               clmd->point_cache->step = 1;
 }
 
 static BVHTree *bvhselftree_build_from_cloth (ClothModifierData *clmd, float epsilon)
index 9b49ac9..54adc64 100644 (file)
@@ -591,7 +591,7 @@ int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifier
        return result;
 }
 
-//Determines collisions on overlap, collisions are writen to collpair[i] and collision+number_collision_found is returned
+//Determines collisions on overlap, collisions are written to collpair[i] and collision+number_collision_found is returned
 CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, CollPair *collpair )
 {
        ClothModifierData *clmd = ( ClothModifierData * ) md1;
index c8a01b1..a07c18f 100644 (file)
@@ -126,6 +126,9 @@ CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, floa
                cumap->cm[a].curve[1].x= maxx;
                cumap->cm[a].curve[1].y= maxy;
        }       
+
+       cumap->changed_timestamp = 0;
+
        return cumap;
 }
 
@@ -240,10 +243,12 @@ void curvemap_reset(CurveMap *cuma, rctf *clipr, int preset)
 
        switch(preset) {
                case CURVE_PRESET_LINE: cuma->totpoint= 2; break;
-               case CURVE_PRESET_SHARP: cuma->totpoint= 3; break;
+               case CURVE_PRESET_SHARP: cuma->totpoint= 4; break;
                case CURVE_PRESET_SMOOTH: cuma->totpoint= 4; break;
                case CURVE_PRESET_MAX: cuma->totpoint= 2; break;
-               case CURVE_PRESET_MID9: cuma->totpoint= 9;
+               case CURVE_PRESET_MID9: cuma->totpoint= 9; break;
+               case CURVE_PRESET_ROUND: cuma->totpoint= 4; break;
+               case CURVE_PRESET_ROOT: cuma->totpoint= 4; break;
        }
 
        cuma->curve= MEM_callocN(cuma->totpoint*sizeof(CurveMapPoint), "curve points");
@@ -251,27 +256,29 @@ void curvemap_reset(CurveMap *cuma, rctf *clipr, int preset)
        switch(preset) {
                case CURVE_PRESET_LINE:
                        cuma->curve[0].x= clipr->xmin;
-                       cuma->curve[0].y= clipr->ymin;
+                       cuma->curve[0].y= clipr->ymax;
                        cuma->curve[0].flag= 0;
                        cuma->curve[1].x= clipr->xmax;
-                       cuma->curve[1].y= clipr->ymax;
+                       cuma->curve[1].y= clipr->ymin;
                        cuma->curve[1].flag= 0;
                        break;
                case CURVE_PRESET_SHARP:
                        cuma->curve[0].x= 0;
                        cuma->curve[0].y= 1;
-                       cuma->curve[1].x= 0.33;
-                       cuma->curve[1].y= 0.33;
-                       cuma->curve[2].x= 1;
-                       cuma->curve[2].y= 0;
+                       cuma->curve[1].x= 0.25;
+                       cuma->curve[1].y= 0.50;
+                       cuma->curve[2].x= 0.75;
+                       cuma->curve[2].y= 0.04;
+                       cuma->curve[3].x= 1;
+                       cuma->curve[3].y= 0;
                        break;
                case CURVE_PRESET_SMOOTH:
                        cuma->curve[0].x= 0;
                        cuma->curve[0].y= 1;
                        cuma->curve[1].x= 0.25;
-                       cuma->curve[1].y= 0.92;
+                       cuma->curve[1].y= 0.94;
                        cuma->curve[2].x= 0.75;
-                       cuma->curve[2].y= 0.08;
+                       cuma->curve[2].y= 0.06;
                        cuma->curve[3].x= 1;
                        cuma->curve[3].y= 0;
                        break;
@@ -290,8 +297,29 @@ void curvemap_reset(CurveMap *cuma, rctf *clipr, int preset)
                                        cuma->curve[i].y= 0.5;
                                }
                        }
+                       break;
+               case CURVE_PRESET_ROUND:
+                       cuma->curve[0].x= 0;
+                       cuma->curve[0].y= 1;
+                       cuma->curve[1].x= 0.5;
+                       cuma->curve[1].y= 0.90;
+                       cuma->curve[2].x= 0.86;
+                       cuma->curve[2].y= 0.5;
+                       cuma->curve[3].x= 1;
+                       cuma->curve[3].y= 0;
+                       break;
+               case CURVE_PRESET_ROOT:
+                       cuma->curve[0].x= 0;
+                       cuma->curve[0].y= 1;
+                       cuma->curve[1].x= 0.25;
+                       cuma->curve[1].y= 0.95;
+                       cuma->curve[2].x= 0.75;
+                       cuma->curve[2].y= 0.44;
+                       cuma->curve[3].x= 1;
+                       cuma->curve[3].y= 0;
+                       break;
        }
-       
+
        if(cuma->table) {
                MEM_freeN(cuma->table);
                cuma->table= NULL;
@@ -619,7 +647,9 @@ void curvemapping_changed(CurveMapping *cumap, int rem_doubles)
        float thresh= 0.01f*(clipr->xmax - clipr->xmin);
        float dx= 0.0f, dy= 0.0f;
        int a;
-       
+
+       cumap->changed_timestamp++;
+
        /* clamp with clip */
        if(cumap->flag & CUMA_DO_CLIP) {
                for(a=0; a<cuma->totpoint; a++) {
@@ -701,7 +731,7 @@ float curvemapping_evaluateF(CurveMapping *cumap, int cur, float value)
        if(cuma->table==NULL) {
                curvemap_make_table(cuma, &cumap->clipr);
                if(cuma->table==NULL)
-                       return value;
+                       return 1.0f-value;
        }
        return curvemap_evaluateF(cuma, value);
 }
index a01ee15..d355a52 100644 (file)
@@ -138,6 +138,7 @@ Curve *add_curve(char *name, int type)
        cu->fsize= 1.0;
        cu->ulheight = 0.05;    
        cu->texflag= CU_AUTOSPACE;
+       cu->smallcaps_scale= 0.75f;
        cu->twist_mode= CU_TWIST_MINIMUM;       // XXX: this one seems to be the best one in most cases, at least for curve deform...
        
        cu->bb= unit_boundbox();
@@ -147,7 +148,7 @@ Curve *add_curve(char *name, int type)
                cu->vfont->id.us+=4;
                cu->str= MEM_mallocN(12, "str");
                strcpy(cu->str, "Text");
-               cu->pos= 4;
+               cu->len= cu->pos= 4;
                cu->strinfo= MEM_callocN(12*sizeof(CharInfo), "strinfo new");
                cu->totbox= cu->actbox= 1;
                cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "textbox");
@@ -1317,30 +1318,33 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
                short dnr;
                
                /* bevel now in three parts, for proper vertex normals */
-               /* part 1 */
-               dnr= nr= 2+ cu->bevresol;
-               if( (cu->flag & (CU_FRONT|CU_BACK))==0)
-                       nr= 3+ 2*cu->bevresol;
-                  
-               dl= MEM_callocN(sizeof(DispList), "makebevelcurve p1");
-               dl->verts= MEM_mallocN(nr*3*sizeof(float), "makebevelcurve p1");
-               BLI_addtail(disp, dl);
-               dl->type= DL_SEGM;
-               dl->parts= 1;
-               dl->flag= DL_BACK_CURVE;
-               dl->nr= nr;
+               /* part 1, back */
 
-               /* half a circle */
-               fp= dl->verts;
-               dangle= (0.5*M_PI/(dnr-1));
-               angle= -(nr-1)*dangle;
-               
-               for(a=0; a<nr; a++) {
-                       fp[0]= 0.0;
-                       fp[1]= (float)(cos(angle)*(cu->ext2));
-                       fp[2]= (float)(sin(angle)*(cu->ext2)) - cu->ext1;
-                       angle+= dangle;
-                       fp+= 3;
+               if((cu->flag & CU_BACK) || !(cu->flag & CU_FRONT)) {
+                       dnr= nr= 2+ cu->bevresol;
+                       if( (cu->flag & (CU_FRONT|CU_BACK))==0)
+                               nr= 3+ 2*cu->bevresol;
+
+                       dl= MEM_callocN(sizeof(DispList), "makebevelcurve p1");
+                       dl->verts= MEM_mallocN(nr*3*sizeof(float), "makebevelcurve p1");
+                       BLI_addtail(disp, dl);
+                       dl->type= DL_SEGM;
+                       dl->parts= 1;
+                       dl->flag= DL_BACK_CURVE;
+                       dl->nr= nr;
+
+                       /* half a circle */
+                       fp= dl->verts;
+                       dangle= (0.5*M_PI/(dnr-1));
+                       angle= -(nr-1)*dangle;
+
+                       for(a=0; a<nr; a++) {
+                               fp[0]= 0.0;
+                               fp[1]= (float)(cos(angle)*(cu->ext2));
+                               fp[2]= (float)(sin(angle)*(cu->ext2)) - cu->ext1;
+                               angle+= dangle;
+                               fp+= 3;
+                       }
                }
                
                /* part 2, sidefaces */
@@ -1373,30 +1377,32 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
                        }
                }
                
-               /* part 3 */
-               dnr= nr= 2+ cu->bevresol;
-               if( (cu->flag & (CU_FRONT|CU_BACK))==0)
-                       nr= 3+ 2*cu->bevresol;
-               
-               dl= MEM_callocN(sizeof(DispList), "makebevelcurve p3");
-               dl->verts= MEM_mallocN(nr*3*sizeof(float), "makebevelcurve p3");
-               BLI_addtail(disp, dl);
-               dl->type= DL_SEGM;
-               dl->flag= DL_FRONT_CURVE;
-               dl->parts= 1;
-               dl->nr= nr;
-               
-               /* half a circle */
-               fp= dl->verts;
-               angle= 0.0;
-               dangle= (0.5*M_PI/(dnr-1));
-               
-               for(a=0; a<nr; a++) {
-                       fp[0]= 0.0;
-                       fp[1]= (float)(cos(angle)*(cu->ext2));
-                       fp[2]= (float)(sin(angle)*(cu->ext2)) + cu->ext1;
-                       angle+= dangle;
-                       fp+= 3;
+               /* part 3, front */
+               if((cu->flag & CU_FRONT) || !(cu->flag & CU_BACK)) {
+                       dnr= nr= 2+ cu->bevresol;
+                       if( (cu->flag & (CU_FRONT|CU_BACK))==0)
+                               nr= 3+ 2*cu->bevresol;
+
+                       dl= MEM_callocN(sizeof(DispList), "makebevelcurve p3");
+                       dl->verts= MEM_mallocN(nr*3*sizeof(float), "makebevelcurve p3");
+                       BLI_addtail(disp, dl);
+                       dl->type= DL_SEGM;
+                       dl->flag= DL_FRONT_CURVE;
+                       dl->parts= 1;
+                       dl->nr= nr;
+
+                       /* half a circle */
+                       fp= dl->verts;
+                       angle= 0.0;
+                       dangle= (0.5*M_PI/(dnr-1));
+
+                       for(a=0; a<nr; a++) {
+                               fp[0]= 0.0;
+                               fp[1]= (float)(cos(angle)*(cu->ext2));
+                               fp[2]= (float)(sin(angle)*(cu->ext2)) + cu->ext1;
+                               angle+= dangle;
+                               fp+= 3;
+                       }
                }
        }
 }
@@ -3072,7 +3078,7 @@ int clamp_nurb_order_u( struct Nurb *nu )
                nu->orderu= nu->pntsu;
                change= 1;
        }
-       if(((nu->flag & CU_NURB_CYCLIC)==0) && (nu->flagu & CU_NURB_BEZIER)) {
+       if(((nu->flagu & CU_NURB_CYCLIC)==0) && (nu->flagu & CU_NURB_BEZIER)) {
                CLAMP(nu->orderu, 3,4);
                change= 1;
        }
@@ -3086,7 +3092,7 @@ int clamp_nurb_order_v( struct Nurb *nu)
                nu->orderv= nu->pntsv;
                change= 1;
        }
-       if(((nu->flag & CU_NURB_CYCLIC)==0) && (nu->flagv & CU_NURB_BEZIER)) {
+       if(((nu->flagv & CU_NURB_CYCLIC)==0) && (nu->flagv & CU_NURB_BEZIER)) {
                CLAMP(nu->orderv, 3,4);
                change= 1;
        }
index 1a1ca8a..142f80a 100644 (file)
@@ -2217,7 +2217,7 @@ static void dag_current_scene_layers(Main *bmain, Scene **sce, unsigned int *lay
                *sce= bmain->scene.first;
                if(*sce) *lay= (*sce)->lay;
 
-               /* XXX for background mode, we should get the scen
+               /* XXX for background mode, we should get the scene
                   from somewhere, for the -S option, but it's in
                   the context, how to get it here? */
        }
@@ -2248,7 +2248,7 @@ void DAG_on_load_update(void)
 
        dag_current_scene_layers(bmain, &scene, &lay);
 
-       if(scene) {
+       if(scene && scene->theDag) {
                /* derivedmeshes and displists are not saved to file so need to be
                   remade, tag them so they get remade in the scene update loop,
                   note armature poses or object matrices are preserved and do not
index 6fcc49f..3271749 100644 (file)
@@ -1193,7 +1193,7 @@ short list_has_suitable_fmodifier (ListBase *modifiers, int mtype, short acttype
  *     - this step acts as an optimisation to prevent the F-Curve stack being evaluated 
  *       several times by modifiers requesting the time be modified, as the final result
  *       would have required using the modified time
- *     - modifiers only ever recieve the unmodified time, as subsequent modifiers should be
+ *     - modifiers only ever receive the unmodified time, as subsequent modifiers should be
  *       working on the 'global' result of the modified curve, not some localised segment,
  *       so nevaltime gets set to whatever the last time-modifying modifier likes...
  *     - we start from the end of the stack, as only the last one matters for now
index 01f2b57..a99f259 100644 (file)
@@ -1,4 +1,4 @@
-/*  font.c     
+/*  font.c
  *  
  * 
  * $Id$
@@ -34,6 +34,7 @@
 #include <math.h>
 #include <stdlib.h>
 #include <wchar.h>
+#include <wctype.h>
 
 #include "MEM_guardedalloc.h"
 
@@ -426,12 +427,12 @@ VFont *load_vfont(char *name)
 
 static VFont *which_vfont(Curve *cu, CharInfo *info)
 {
-       switch(info->flag & CU_STYLE) {
-               case CU_BOLD:
+       switch(info->flag & (CU_CHINFO_BOLD|CU_CHINFO_ITALIC)) {
+               case CU_CHINFO_BOLD:
                        if (cu->vfontb) return(cu->vfontb); else return(cu->vfont);
-               case CU_ITALIC:
+               case CU_CHINFO_ITALIC:
                        if (cu->vfonti) return(cu->vfonti); else return(cu->vfont);
-               case (CU_BOLD|CU_ITALIC):
+               case (CU_CHINFO_BOLD|CU_CHINFO_ITALIC):
                        if (cu->vfontbi) return(cu->vfontbi); else return(cu->vfont);
                default:
                        return(cu->vfont);
@@ -449,6 +450,17 @@ VFont *get_builtin_font(void)
        return load_vfont("<builtin>");
 }
 
+static VChar *find_vfont_char(VFontData *vfd, intptr_t character)
+{
+       VChar *che= NULL;
+
+       for(che = vfd->characters.first; che; che = che->next) {
+               if(che->index == character)
+                       break;
+       }
+       return che; /* NULL if not found */
+}
+               
 static void build_underline(Curv