Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-10-09 11:31:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-09 11:31:15 +0400
commitaa6d7ebd145ff375a9dc876d33065f80d94accca (patch)
tree4c9562c2575294c94bd55cb4b3bd25a9e7e793b6
parent9d0186fc6a5aa0aab36b9a1f52e3cd5e1ac46767 (diff)
parent8714fb7019e853703ce8b102edac43d84b7bbe14 (diff)
svn merge ^/trunk/blender -r40720:40872
-rw-r--r--CMakeLists.txt177
-rw-r--r--SConstruct14
-rw-r--r--build_files/buildbot/config/user-config-i686.py5
-rw-r--r--build_files/buildbot/config/user-config-player-i686.py5
-rw-r--r--build_files/buildbot/config/user-config-player-x86_64.py5
-rw-r--r--build_files/buildbot/config/user-config-x86_64.py5
-rw-r--r--build_files/cmake/Modules/FindPythonLibsUnix.cmake108
-rw-r--r--build_files/cmake/Modules/FindSamplerate.cmake70
-rw-r--r--build_files/cmake/config/blender_headless.cmake1
-rw-r--r--build_files/cmake/config/blender_lite.cmake1
-rw-r--r--build_files/cmake/config/bpy_module.cmake1
-rw-r--r--build_files/cmake/macros.cmake62
-rw-r--r--build_files/package_spec/debian/control2
-rw-r--r--build_files/package_spec/pacman/PKGBUILD15
-rw-r--r--build_files/scons/config/darwin-config.py5
-rw-r--r--build_files/scons/config/freebsd7-config.py5
-rw-r--r--build_files/scons/config/freebsd8-config.py5
-rw-r--r--build_files/scons/config/freebsd9-config.py5
-rw-r--r--build_files/scons/config/linux-config.py7
-rw-r--r--build_files/scons/config/linuxcross-config.py5
-rw-r--r--build_files/scons/config/openbsd3-config.py5
-rw-r--r--build_files/scons/config/sunos5-config.py5
-rw-r--r--build_files/scons/config/win32-mingw-config.py5
-rw-r--r--build_files/scons/config/win32-vc-config.py7
-rw-r--r--build_files/scons/config/win64-vc-config.py9
-rw-r--r--build_files/scons/tools/Blender.py15
-rw-r--r--build_files/scons/tools/btools.py8
-rw-r--r--doc/python_api/examples/aud.py6
-rw-r--r--doc/python_api/rst/change_log.rst344
-rw-r--r--doc/python_api/sphinx_changelog_gen.py2
-rw-r--r--intern/audaspace/CMakeLists.txt15
-rw-r--r--intern/audaspace/SConscript7
-rw-r--r--intern/container/CTR_List.h20
-rw-r--r--intern/container/CTR_Map.h248
-rw-r--r--intern/ghost/GHOST_Types.h16
-rw-r--r--intern/ghost/SConscript11
-rw-r--r--intern/ghost/intern/GHOST_Buttons.h54
-rw-r--r--intern/ghost/intern/GHOST_ModifierKeys.h76
-rw-r--r--intern/ghost/intern/GHOST_SystemCarbon.h140
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.h122
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsCarbon.h24
-rw-r--r--intern/ghost/intern/GHOST_SystemPathsCocoa.h18
-rw-r--r--intern/ghost/intern/GHOST_TaskbarWin32.h38
-rw-r--r--intern/ghost/intern/GHOST_Window.h10
-rw-r--r--intern/ghost/intern/GHOST_WindowCarbon.h66
-rw-r--r--intern/ghost/test/gears/GHOST_C-Test.c80
-rw-r--r--intern/mikktspace/mikktspace.c98
-rw-r--r--intern/string/STR_String.h10
-rwxr-xr-xpo/clean_po.py16
-rwxr-xr-xpo/merge_po.py9
-rw-r--r--po/update_msg.py72
-rw-r--r--release/bin/.blender/.Blanguages24
-rw-r--r--release/scripts/modules/bpy/ops.py9
-rw-r--r--release/scripts/modules/bpy_extras/keyconfig_utils.py38
-rw-r--r--release/scripts/startup/bl_operators/object_align.py4
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py4
-rw-r--r--release/scripts/startup/bl_operators/screen_play_rendered_anim.py6
-rw-r--r--release/scripts/startup/bl_ui/space_info.py2
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py4
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py2
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py18
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py26
-rw-r--r--release/scripts/startup/keyingsets_builtins.py16
-rw-r--r--release/text/readme.html16
-rw-r--r--source/blender/blenfont/CMakeLists.txt2
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/BKE_font.h5
-rw-r--r--source/blender/blenkernel/BKE_material.h1
-rw-r--r--source/blender/blenkernel/BKE_packedFile.h2
-rw-r--r--source/blender/blenkernel/intern/anim.c2
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c3
-rw-r--r--source/blender/blenkernel/intern/colortools.c6
-rw-r--r--source/blender/blenkernel/intern/curve.c6
-rw-r--r--source/blender/blenkernel/intern/customdata.c4
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c14
-rw-r--r--source/blender/blenkernel/intern/displist.c2
-rw-r--r--source/blender/blenkernel/intern/font.c28
-rw-r--r--source/blender/blenkernel/intern/gpencil.c2
-rw-r--r--source/blender/blenkernel/intern/image.c21
-rw-r--r--source/blender/blenkernel/intern/library.c4
-rw-r--r--source/blender/blenkernel/intern/material.c47
-rw-r--r--source/blender/blenkernel/intern/nla.c8
-rw-r--r--source/blender/blenkernel/intern/object.c9
-rw-r--r--source/blender/blenkernel/intern/packedFile.c10
-rw-r--r--source/blender/blenkernel/intern/seqeffects.c6
-rw-r--r--source/blender/blenkernel/intern/sound.c9
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c21
-rw-r--r--source/blender/blenlib/intern/winstuff.c2
-rw-r--r--source/blender/blenloader/intern/readfile.c13
-rw-r--r--source/blender/editors/animation/anim_draw.c4
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c4
-rw-r--r--source/blender/editors/curve/editfont.c9
-rw-r--r--source/blender/editors/include/UI_interface.h1
-rw-r--r--source/blender/editors/interface/interface.c8
-rw-r--r--source/blender/editors/interface/interface_handlers.c214
-rw-r--r--source/blender/editors/interface/interface_intern.h31
-rw-r--r--source/blender/editors/interface/interface_layout.c4
-rw-r--r--source/blender/editors/interface/interface_regions.c14
-rw-r--r--source/blender/editors/interface/interface_templates.c58
-rw-r--r--source/blender/editors/object/object_add.c8
-rw-r--r--source/blender/editors/object/object_edit.c4
-rw-r--r--source/blender/editors/object/object_relations.c6
-rw-r--r--source/blender/editors/object/object_vgroup.c41
-rw-r--r--source/blender/editors/render/render_preview.c2
-rw-r--r--source/blender/editors/screen/area.c3
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c42
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c170
-rw-r--r--source/blender/editors/sound/sound_ops.c3
-rw-r--r--source/blender/editors/space_action/action_edit.c25
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c10
-rw-r--r--source/blender/editors/space_file/file_draw.c4
-rw-r--r--source/blender/editors/space_file/file_ops.c4
-rw-r--r--source/blender/editors/space_file/filesel.c16
-rw-r--r--source/blender/editors/space_file/space_file.c9
-rw-r--r--source/blender/editors/space_image/image_ops.c3
-rw-r--r--source/blender/editors/space_node/drawnode.c3
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c2
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c46
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c14
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c5
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c7
-rw-r--r--source/blender/editors/transform/transform.c39
-rw-r--r--source/blender/editors/transform/transform_conversions.c12
-rw-r--r--source/blender/editors/transform/transform_generics.c6
-rw-r--r--source/blender/editors/util/ed_util.c2
-rw-r--r--source/blender/gpu/intern/gpu_draw.c11
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp14
-rw-r--r--source/blender/makesdna/DNA_ID.h2
-rw-r--r--source/blender/makesdna/DNA_object_types.h3
-rw-r--r--source/blender/makesdna/DNA_scene_types.h17
-rw-r--r--source/blender/makesdna/intern/CMakeLists.txt2
-rw-r--r--source/blender/makesdna/intern/dna_genfile.c1
-rw-r--r--source/blender/makesrna/RNA_access.h3
-rw-r--r--source/blender/makesrna/RNA_define.h2
-rw-r--r--source/blender/makesrna/RNA_types.h8
-rw-r--r--source/blender/makesrna/intern/makesrna.c2
-rw-r--r--source/blender/makesrna/intern/rna_ID.c10
-rw-r--r--source/blender/makesrna/intern/rna_access.c16
-rw-r--r--source/blender/makesrna/intern/rna_action.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c34
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c44
-rw-r--r--source/blender/makesrna/intern/rna_color.c2
-rw-r--r--source/blender/makesrna/intern/rna_curve.c7
-rw-r--r--source/blender/makesrna/intern/rna_define.c5
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c56
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c6
-rw-r--r--source/blender/makesrna/intern/rna_group.c2
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal.h3
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_key.c2
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c4
-rw-r--r--source/blender/makesrna/intern/rna_main.c2
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_material.c3
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c23
-rw-r--r--source/blender/makesrna/intern/rna_meta.c3
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c4
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c5
-rw-r--r--source/blender/makesrna/intern/rna_object.c14
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c3
-rw-r--r--source/blender/makesrna/intern/rna_particle.c11
-rw-r--r--source/blender/makesrna/intern/rna_pose.c2
-rw-r--r--source/blender/makesrna/intern/rna_render.c6
-rw-r--r--source/blender/makesrna/intern/rna_rna.c24
-rw-r--r--source/blender/makesrna/intern/rna_scene.c7
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c8
-rw-r--r--source/blender/makesrna/intern/rna_space.c4
-rw-r--r--source/blender/makesrna/intern/rna_texture.c10
-rw-r--r--source/blender/makesrna/intern/rna_ui.c4
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_wm.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_idMask.c2
-rw-r--r--source/blender/python/generic/bpy_internal_import.c2
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c2
-rw-r--r--source/blender/python/intern/bpy_driver.c7
-rw-r--r--source/blender/python/intern/bpy_operator.c41
-rw-r--r--source/blender/python/intern/bpy_operator_wrap.c2
-rw-r--r--source/blender/python/intern/bpy_props.c6
-rw-r--r--source/blender/python/intern/bpy_rna.c233
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c2
-rw-r--r--source/blender/python/mathutils/mathutils.c10
-rw-r--r--source/blender/quicktime/SConscript2
-rw-r--r--source/blender/render/intern/source/convertblender.c4
-rw-r--r--source/blender/windowmanager/WM_types.h13
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
-rw-r--r--source/blender/windowmanager/intern/wm_files.c6
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c2
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c1
-rw-r--r--source/creator/CMakeLists.txt44
-rw-r--r--source/gameengine/Converter/BlenderWorldInfo.h20
-rw-r--r--source/gameengine/Expressions/PyObjectPlus.h8
-rw-r--r--source/gameengine/GameLogic/SCA_2DFilterActuator.cpp2
-rw-r--r--source/gameengine/GameLogic/SCA_2DFilterActuator.h2
-rw-r--r--source/gameengine/Ketsji/KX_Dome.cpp18
-rw-r--r--source/gameengine/Ketsji/KX_Dome.h47
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_ObstacleSimulation.cpp4
-rw-r--r--source/gameengine/Ketsji/KX_OrientationInterpolator.h12
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.cpp64
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.h4
-rw-r--r--source/gameengine/Ketsji/KX_VertexProxy.cpp4
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_IRasterizer.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h2
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h4
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h2
-rw-r--r--source/gameengine/SceneGraph/SG_DList.h6
-rw-r--r--source/gameengine/VideoTexture/ImageRender.h46
-rw-r--r--source/gameengine/VideoTexture/ImageViewport.h6
212 files changed, 2413 insertions, 1934 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dddf06431e6..d7e575704b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,8 +26,8 @@
# ***** END GPL LICENSE BLOCK *****
#-----------------------------------------------------------------------------
-# We don't allow in-source builds. This causes no end of troubles because
-# all out-of-source builds will use the CMakeCache.txt file there and even
+# We don't allow in-source builds. This causes no end of troubles because
+# all out-of-source builds will use the CMakeCache.txt file there and even
# build the libs and objects in it.
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
@@ -189,7 +189,6 @@ option(WITH_OPENCOLLADA "Enable OpenCollada Support (http://www.opencollada.org
option(WITH_SDL "Enable SDL for sound and joystick support" ON)
option(WITH_OPENAL "Enable OpenAL Support (http://www.openal.org)" ON)
option(WITH_JACK "Enable Jack Support (http://www.jackaudio.org)" OFF)
-option(WITH_SAMPLERATE "Enable samplerate conversion" ON)
# Compression
option(WITH_LZO "Enable fast LZO compression (used for pointcache)" ON)
@@ -197,7 +196,7 @@ option(WITH_LZMA "Enable best LZMA compression, (used for pointcache)"
# Misc
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
-option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
+option(WITH_RAYOPTIMIZATION "Enable use of SIMD (SSE) optimizations for the raytracer" ON)
if(UNIX AND NOT APPLE)
option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
endif()
@@ -273,7 +272,7 @@ if(WITH_PYTHON_MODULE)
set(WITH_HEADLESS ON)
endif()
-TEST_SSE_SUPPORT()
+TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
# don't store paths to libs for portable distrobution
if(WITH_INSTALL_PORTABLE)
@@ -286,8 +285,8 @@ endif()
# linux only, not cached
set(WITH_BINRELOC OFF)
-# MAXOSX only, set to avoid uninitialized
-set(EXETYPE)
+# MAXOSX only, set to avoid uninitialized
+set(EXETYPE "")
# C/C++ flags
set(PLATFORM_CFLAGS)
@@ -298,26 +297,26 @@ set(CXX_WARNINGS)
# libraries to link the binary with passed to target_link_libraries()
# known as LLIBS to scons
-set(PLATFORM_LINKLIBS)
+set(PLATFORM_LINKLIBS "")
# Added to linker flags in setup_liblinks
# - CMAKE_EXE_LINKER_FLAGS
# - CMAKE_EXE_LINKER_FLAGS_DEBUG
-set(PLATFORM_LINKFLAGS)
-set(PLATFORM_LINKFLAGS_DEBUG)
+set(PLATFORM_LINKFLAGS "")
+set(PLATFORM_LINKFLAGS_DEBUG "")
# disabled for now, not supported
# option(WITH_WEBPLUGIN "Enable Web Plugin (Unix only)" OFF)
# For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
-# On Unix:
+# On Unix:
# cmake ../blender \
# -D PYTHON_VERSION=3.2 \
# -D PYTHON_INCLUDE_DIR=/opt/py32/include/python3.2d \
# -D PYTHON_LIBRARY=/opt/py32/lib/libpython3.2d.so
#
-# On Macs:
+# On Macs:
# cmake ../blender \
# -D PYTHON_INCLUDE_DIR=/System/Library/Frameworks/Python.framework/Versions/3.2/include/python3.2 \
# -D PYTHON_LIBPATH=/System/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/config \
@@ -329,7 +328,7 @@ set(PLATFORM_LINKFLAGS_DEBUG)
#Platform specifics
if(UNIX AND NOT APPLE)
-
+
# needed for ubuntu 11.04
if(EXISTS "/usr/lib/x86_64-linux-gnu")
set(CMAKE_LIBRARY_PATH "/usr/lib/x86_64-linux-gnu;${CMAKE_LIBRARY_PATH}")
@@ -381,10 +380,12 @@ if(UNIX AND NOT APPLE)
if(WITH_SDL)
find_package(SDL)
- mark_as_advanced(SDLMAIN_LIBRARY)
- mark_as_advanced(SDL_INCLUDE_DIR)
- mark_as_advanced(SDL_LIBRARY)
- mark_as_advanced(SDL_LIBRARY_TEMP)
+ mark_as_advanced(
+ SDLMAIN_LIBRARY
+ SDL_INCLUDE_DIR
+ SDL_LIBRARY
+ SDL_LIBRARY_TEMP
+ )
# unset(SDLMAIN_LIBRARY CACHE)
if(NOT SDL_FOUND)
set(WITH_SDL OFF)
@@ -428,11 +429,13 @@ if(UNIX AND NOT APPLE)
PATHS
/sw/lib
)
- mark_as_advanced(ICONV_LIBRARY)
- mark_as_advanced(INTL_LIBRARY)
+ mark_as_advanced(
+ ICONV_LIBRARY
+ INTL_LIBRARY
+ )
if(INTL_LIBRARY AND ICONV_LIBRARY)
- set(GETTEXT_LIB ${INTL_LIBRARY} ${ICONV_LIBRARY})
+ set(GETTEXT_LIBRARIES ${INTL_LIBRARY} ${ICONV_LIBRARY})
endif()
endif()
@@ -443,13 +446,6 @@ if(UNIX AND NOT APPLE)
endif()
endif()
- if(WITH_SAMPLERATE)
- find_package(Samplerate)
- if(NOT SAMPLERATE_FOUND)
- set(WITH_SAMPLERATE OFF)
- endif()
- endif()
-
if(WITH_OPENCOLLADA)
find_package(OpenCOLLADA)
if(OPENCOLLADA_FOUND)
@@ -519,16 +515,16 @@ if(UNIX AND NOT APPLE)
# Intel C++ Compiler
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
# think these next two are broken
- find_program(XIAR xiar)
- if(XIAR)
+ find_program(XIAR xiar)
+ if(XIAR)
set(CMAKE_AR "${XIAR}")
- endif()
+ endif()
mark_as_advanced(XIAR)
- find_program(XILD xild)
- if(XILD)
+ find_program(XILD xild)
+ if(XILD)
set(CMAKE_LINKER "${XILD}")
- endif()
+ endif()
mark_as_advanced(XILD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fp-model precise -prec_div -parallel")
@@ -551,7 +547,7 @@ elseif(WIN32)
message("64 bit compiler detected.")
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
endif()
-
+
add_definitions(-DWIN32)
if(WITH_INTERNATIONAL)
@@ -561,13 +557,6 @@ elseif(WIN32)
set(ICONV_LIBPATH ${ICONV}/lib)
endif()
- if(WITH_SAMPLERATE)
- set(SAMPLERATE ${LIBDIR}/samplerate)
- set(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE}/include)
- set(SAMPLERATE_LIBRARIES libsamplerate)
- set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
- endif()
-
set(PNG "${LIBDIR}/png")
set(PNG_INCLUDE_DIR "${PNG}/include")
set(PNG_LIBPATH ${PNG}/lib) # not cmake defined
@@ -576,7 +565,7 @@ elseif(WIN32)
set(JPEG_INCLUDE_DIR "${JPEG}/include")
set(JPEG_LIBPATH ${JPEG}/lib) # not cmake defined
- set(WINTAB_INC ${LIBDIR}/wintab/include)
+ set(WINTAB_INC ${LIBDIR}/wintab/include)
if(WITH_OPENAL)
set(OPENAL ${LIBDIR}/openal)
@@ -641,9 +630,9 @@ elseif(WIN32)
if(WITH_INTERNATIONAL)
set(GETTEXT ${LIBDIR}/gettext)
- set(GETTEXT_INC ${GETTEXT}/include)
+ set(GETTEXT_INCLUDE_DIRS ${GETTEXT}/include)
set(GETTEXT_LIBPATH ${GETTEXT}/lib)
- set(GETTEXT_LIB gnu_gettext)
+ set(GETTEXT_LIBRARIES gnu_gettext)
endif()
if(CMAKE_CL_64)
@@ -684,7 +673,7 @@ elseif(WIN32)
${LIBDIR}/opencollada/include/COLLADABaseUtils/include
${LIBDIR}/opencollada/include/COLLADAFramework/include
${LIBDIR}/opencollada/include/COLLADASaxFrameworkLoader/include
- ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
+ ${LIBDIR}/opencollada/include/GeneratedSaxParser/include
)
set(OPENCOLLADA_LIBRARIES
@@ -741,7 +730,7 @@ elseif(WIN32)
set(OPENEXR_INCUDE ${OPENEXR}/include${MSVC_INC})
set(OPENEXR_INCLUDE_DIRS
${OPENEXR_INCUDE}
- ${OPENEXR_INCUDE}/IlmImf
+ ${OPENEXR_INCUDE}/IlmImf
${OPENEXR_INCUDE}/Iex
${OPENEXR_INCUDE}/Imath
)
@@ -800,9 +789,9 @@ elseif(WIN32)
if(WITH_INTERNATIONAL)
set(GETTEXT ${LIBDIR}/gcc/gettext)
- set(GETTEXT_INC ${GETTEXT}/include)
+ set(GETTEXT_INCLUDE_DIRS ${GETTEXT}/include)
set(GETTEXT_LIBPATH ${GETTEXT}/lib)
- set(GETTEXT_LIB intl)
+ set(GETTEXT_LIBRARIES intl)
endif()
set(JPEG_LIBRARIES libjpeg)
@@ -817,7 +806,7 @@ elseif(WIN32)
set(PTHREADS_INCLUDE_DIRS ${PTHREADS}/include)
set(PTHREADS_LIBPATH ${PTHREADS}/lib)
set(PTHREADS_LIBRARIES pthreadGC2)
-
+
set(FREETYPE ${LIBDIR}/gcc/freetype)
set(FREETYPE_INCLUDE_DIRS ${FREETYPE}/include ${FREETYPE}/include/freetype2)
set(FREETYPE_LIBPATH ${FREETYPE}/lib)
@@ -837,13 +826,13 @@ elseif(WIN32)
${LIBDIR}/gcc/opencollada/include/COLLADABaseUtils/include
${LIBDIR}/gcc/opencollada/include/COLLADAFramework/include
${LIBDIR}/gcc/opencollada/include/COLLADASaxFrameworkLoader/include
- ${LIBDIR}/gcc/opencollada/include/GeneratedSaxParser/include
+ ${LIBDIR}/gcc/opencollada/include/GeneratedSaxParser/include
)
set(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib ${OPENCOLLADA}/lib)
set(OPENCOLLADA_LIBRARIES OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa)
set(PCRE_LIBRARIES pcre)
endif()
-
+
if(WITH_CODEC_FFMPEG)
set(FFMPEG ${LIBDIR}/ffmpeg)
set(FFMPEG_INCLUDE_DIRS ${FFMPEG}/include ${FFMPEG}/include)
@@ -870,7 +859,7 @@ elseif(WIN32)
set(JACK_INCLUDE_DIRS ${JACK}/include/jack ${JACK}/include)
set(JACK_LIBRARIES jack)
set(JACK_LIBPATH ${JACK}/lib)
-
+
# TODO, gives linking errors, force off
set(WITH_JACK OFF)
endif()
@@ -908,7 +897,7 @@ elseif(APPLE)
set(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-8.0.0-powerpc)
endif()
endif()
-
+
if(WITH_OPENAL)
find_package(OpenAL)
@@ -952,8 +941,8 @@ elseif(APPLE)
if(WITH_INTERNATIONAL)
set(GETTEXT ${LIBDIR}/gettext)
- set(GETTEXT_INC "${GETTEXT}/include")
- set(GETTEXT_LIB intl iconv)
+ set(GETTEXT_INCLUDE_DIRS "${GETTEXT}/include")
+ set(GETTEXT_LIBRARIES intl iconv)
set(GETTEXT_LIBPATH ${GETTEXT}/lib)
endif()
@@ -991,16 +980,9 @@ elseif(APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_CONSTANT_MACROS")
endif()
- if(WITH_SAMPLERATE)
- set(SAMPLERATE ${LIBDIR}/samplerate)
- set(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE}/include)
- set(SAMPLERATE_LIBRARIES samplerate)
- set(SAMPLERATE_LIBPATH ${SAMPLERATE}/lib)
- endif()
-
- find_library(SYSTEMSTUBS_LIBRARY
- NAMES
- SystemStubs
+ find_library(SYSTEMSTUBS_LIBRARY
+ NAMES
+ SystemStubs
PATHS
)
mark_as_advanced(SYSTEMSTUBS_LIBRARY)
@@ -1018,13 +1000,13 @@ elseif(APPLE)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QTKit")
if(CMAKE_OSX_ARCHITECTURES MATCHES i386)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
- #libSDL still needs 32bit carbon quicktime
+ #libSDL still needs 32bit carbon quicktime
endif()
elseif(WITH_CODEC_QUICKTIME)
set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -framework QuickTime")
endif()
- # XXX - SOME MAC DEV PLEASE TEST WITH THE SDK INSTALLED!
+ # XXX - SOME MAC DEV PLEASE TEST WITH THE SDK INSTALLED!
# ALSO SHOULD BE MOVED INTO OWN MODULE WHEN FUNCTIONAL
if(WITH_INPUT_NDOF)
# This thread it *should* work and check the framework - campbell
@@ -1101,11 +1083,11 @@ elseif(APPLE)
set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
set(CMAKE_CXX_FLAGS_DEBUG "-fno-strict-aliasing -g")
if(CMAKE_OSX_ARCHITECTURES MATCHES "i386")
- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
- set(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
+ set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -fvariable-expansion-in-unroller")
elseif(CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
- set(CMAKE_CXX_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
- set(CMAKE_C_FLAGS_RELEASE "-O3 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
+ set(CMAKE_C_FLAGS_RELEASE "-O2 -mdynamic-no-pic -ftree-vectorize -msse -msse2 -msse3 -mssse3 -fvariable-expansion-in-unroller")
else()
set(CMAKE_C_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
set(CMAKE_CXX_FLAGS_RELEASE "-mdynamic-no-pic -fno-strict-aliasing")
@@ -1124,31 +1106,17 @@ endif()
# See TEST_SSE_SUPPORT() for how this is defined.
if(WITH_RAYOPTIMIZATION)
- if(CMAKE_COMPILER_IS_GNUCC)
- set(_sse "-msse")
- set(_sse2 "-msse2")
- elseif(MSVC)
- set(_sse "/arch:SSE")
- set(_sse2 "/arch:SSE2")
- else()
- message(WARNING "SSE flags for this compiler not known")
- set(_sse)
- set(_sse2)
- endif()
-
if(SUPPORT_SSE_BUILD)
- set(PLATFORM_CFLAGS " ${_sse} ${PLATFORM_CFLAGS}")
+ set(PLATFORM_CFLAGS " ${COMPILER_SSE_FLAG} ${PLATFORM_CFLAGS}")
add_definitions(-D__SSE__ -D__MMX__)
endif()
if(SUPPORT_SSE2_BUILD)
- set(PLATFORM_CFLAGS " ${_sse2} ${PLATFORM_CFLAGS}")
+ set(PLATFORM_CFLAGS " ${COMPILER_SSE2_FLAG} ${PLATFORM_CFLAGS}")
add_definitions(-D__SSE2__)
if(NOT SUPPORT_SSE_BUILD) # dont double up
add_definitions(-D__MMX__)
endif()
endif()
- unset(_sse)
- unset(_sse2)
endif()
@@ -1184,7 +1152,7 @@ endif()
#-----------------------------------------------------------------------------
# Blender WebPlugin
-if(WITH_WEBPLUGIN)
+if(WITH_WEBPLUGIN)
set(GECKO_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
set(WEBPLUGIN_SANDBOX_MODE "apparmor" CACHE STRING "WEB Plugin sandbox mode, can be apparmor, privsep, none")
@@ -1196,13 +1164,13 @@ endif()
# Configure OpenGL.
find_package(OpenGL)
blender_include_dirs_sys("${OPENGL_INCLUDE_DIR}")
-# unset(OPENGL_LIBRARIES CACHE) # not compat with older cmake
-# unset(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake
+# unset(OPENGL_LIBRARIES CACHE) # not compat with older cmake
+# unset(OPENGL_xmesa_INCLUDE_DIR CACHE) # not compat with older cmake
#-----------------------------------------------------------------------------
# Configure OpenMP.
if(WITH_OPENMP)
- find_package(OpenMP)
+ find_package(OpenMP)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
@@ -1214,9 +1182,11 @@ if(WITH_OPENMP)
set(WITH_OPENMP OFF)
endif()
- mark_as_advanced(OpenMP_C_FLAGS)
- mark_as_advanced(OpenMP_CXX_FLAGS)
-endif()
+ mark_as_advanced(
+ OpenMP_C_FLAGS
+ OpenMP_CXX_FLAGS
+ )
+endif()
#-----------------------------------------------------------------------------
# Configure GLEW
@@ -1231,8 +1201,10 @@ else()
message(FATAL_ERROR "GLEW is required to build blender, install it or use WITH_BUILTIN_GLEW")
endif()
- mark_as_advanced(GLEW_LIBRARY)
- mark_as_advanced(GLEW_INCLUDE_PATH)
+ mark_as_advanced(
+ GLEW_LIBRARY
+ GLEW_INCLUDE_PATH
+ )
endif()
#-----------------------------------------------------------------------------
@@ -1240,7 +1212,7 @@ endif()
if(WITH_PYTHON_MODULE)
add_definitions(-DPy_ENABLE_SHARED)
-endif()
+endif()
#-----------------------------------------------------------------------------
# Extra compile flags
@@ -1249,7 +1221,7 @@ if((NOT WIN32) AND (NOT MSVC))
# used for internal debug checks
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG")
-
+
# assert() checks for this.
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -DNDEBUG")
@@ -1299,6 +1271,10 @@ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_INVALID_OFFSETOF -Wno-invalid-offsetof)
ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_NO_SIGN_COMPARE -Wno-sign-compare)
+ # disable numbered, false positives
+ set(C_WARNINGS "${C_WARNINGS} -wd188,186,144,913,556")
+ set(CXX_WARNINGS "${CXX_WARNINGS} -wd188,186,144,913,556")
+
endif()
# MSVC2010 fails to links C++ libs right
@@ -1399,8 +1375,8 @@ if(FIRST_RUN)
macro(info_cfg_text
_text)
set(_config_msg "${_config_msg}\n\n ${_text}")
-
-
+
+
endmacro()
info_cfg_text("Build Options:")
@@ -1438,7 +1414,6 @@ if(FIRST_RUN)
info_cfg_option(WITH_JACK)
info_cfg_option(WITH_CODEC_FFMPEG)
info_cfg_option(WITH_CODEC_SNDFILE)
- info_cfg_option(WITH_SAMPLERATE)
info_cfg_text("Compression:")
info_cfg_option(WITH_LZMA)
diff --git a/SConstruct b/SConstruct
index 6de11d8fe4e..738466d389e 100644
--- a/SConstruct
+++ b/SConstruct
@@ -30,6 +30,7 @@
# Then read all SConscripts and build
#
# TODO: fix /FORCE:MULTIPLE on windows to get proper debug builds.
+# TODO: cleanup CCFLAGS / CPPFLAGS use, often both are set when we only need one.
import platform as pltfrm
@@ -283,26 +284,21 @@ if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
env['CCFLAGS'].append('/openmp')
env['CPPFLAGS'].append('/openmp')
- env['CXXFLAGS'].append('/openmp')
else:
if env['CC'].endswith('icc'): # to be able to handle CC=/opt/bla/icc case
env.Append(LINKFLAGS=['-openmp', '-static-intel'])
env['CCFLAGS'].append('-openmp')
env['CPPFLAGS'].append('-openmp')
- env['CXXFLAGS'].append('-openmp')
else:
env.Append(CCFLAGS=['-fopenmp'])
env.Append(CPPFLAGS=['-fopenmp'])
- env.Append(CXXFLAGS=['-fopenmp'])
if env['WITH_GHOST_COCOA'] == True:
env.Append(CFLAGS=['-DGHOST_COCOA'])
- env.Append(CXXFLAGS=['-DGHOST_COCOA'])
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
if env['USE_QTKIT'] == True:
- env.Append(CFLAGS=['-DUSE_QTKIT'])
- env.Append(CXXFLAGS=['-DUSE_QTKIT'])
+ env.Append(CFLAGS=['-DUSE_QTKIT'])
env.Append(CPPFLAGS=['-DUSE_QTKIT'])
#check for additional debug libnames
@@ -334,23 +330,19 @@ if 'blendernogame' in B.targets:
# disable elbeem (fluidsim) compilation?
if env['BF_NO_ELBEEM'] == 1:
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
- env['CXXFLAGS'].append('-DDISABLE_ELBEEM')
env['CCFLAGS'].append('-DDISABLE_ELBEEM')
if btools.ENDIAN == "big":
env['CPPFLAGS'].append('-D__BIG_ENDIAN__')
- env['CXXFLAGS'].append('-D__BIG_ENDIAN__')
env['CCFLAGS'].append('-D__BIG_ENDIAN__')
else:
env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
- env['CXXFLAGS'].append('-D__LITTLE_ENDIAN__')
env['CCFLAGS'].append('-D__LITTLE_ENDIAN__')
# TODO, make optional
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
-env['CXXFLAGS'].append('-DWITH_AUDASPACE')
env['CCFLAGS'].append('-DWITH_AUDASPACE')
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
@@ -523,7 +515,7 @@ if env['OURPLATFORM']!='darwin':
for f in df:
# This files aren't used anymore
- if f in ['.Blanguages', '.bfont.ttf']:
+ if f in (".bfont.ttf", ):
continue
if not env['WITH_BF_INTERNATIONAL']:
diff --git a/build_files/buildbot/config/user-config-i686.py b/build_files/buildbot/config/user-config-i686.py
index facbf493a23..f2197a05501 100644
--- a/build_files/buildbot/config/user-config-i686.py
+++ b/build_files/buildbot/config/user-config-i686.py
@@ -58,8 +58,6 @@ WITH_BF_PNG = True
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '/home/sources/staticlibs/lib32'
-WITH_BF_STATICLIBSAMPLERATE = True
-
WITH_BF_ZLIB = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
@@ -91,6 +89,9 @@ BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib32'
WITH_BF_FFTW3 = True
WITH_BF_STATICFFTW3 = True
+# JACK
+WITH_BF_JACK = True
+
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
diff --git a/build_files/buildbot/config/user-config-player-i686.py b/build_files/buildbot/config/user-config-player-i686.py
index d02779e63e5..99671ecc072 100644
--- a/build_files/buildbot/config/user-config-player-i686.py
+++ b/build_files/buildbot/config/user-config-player-i686.py
@@ -52,8 +52,6 @@ WITH_BF_PNG = True
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '/home/sources/staticlibs/lib32'
-WITH_BF_STATICLIBSAMPLERATE = True
-
WITH_BF_ZLIB = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
@@ -82,6 +80,9 @@ WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/home/sources/staticlibs/spnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib32'
+# JACK
+WITH_BF_JACK = True
+
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
diff --git a/build_files/buildbot/config/user-config-player-x86_64.py b/build_files/buildbot/config/user-config-player-x86_64.py
index 810dcb895de..a1ca38880eb 100644
--- a/build_files/buildbot/config/user-config-player-x86_64.py
+++ b/build_files/buildbot/config/user-config-player-x86_64.py
@@ -52,8 +52,6 @@ WITH_BF_PNG = True
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '/home/sources/staticlibs/lib64'
-WITH_BF_STATICLIBSAMPLERATE = True
-
WITH_BF_ZLIB = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
@@ -82,6 +80,9 @@ WITH_BF_STATIC3DMOUSE = True
BF_3DMOUSE = '/home/sources/staticlibs/spnav'
BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib64'
+# JACK
+WITH_BF_JACK = True
+
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
diff --git a/build_files/buildbot/config/user-config-x86_64.py b/build_files/buildbot/config/user-config-x86_64.py
index 536f8f9e6c1..93fe3ca2e5b 100644
--- a/build_files/buildbot/config/user-config-x86_64.py
+++ b/build_files/buildbot/config/user-config-x86_64.py
@@ -58,8 +58,6 @@ WITH_BF_PNG = True
BF_PNG_LIB = 'libpng'
BF_PNG_LIBPATH = '/home/sources/staticlibs/lib64'
-WITH_BF_STATICLIBSAMPLERATE = True
-
WITH_BF_ZLIB = True
WITH_BF_STATICZLIB = True
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
@@ -91,6 +89,9 @@ BF_3DMOUSE_LIBPATH = '${BF_3DMOUSE}/lib64'
WITH_BF_FFTW3 = True
WITH_BF_STATICFFTW3 = True
+# JACK
+WITH_BF_JACK = True
+
# Compilation and optimization
BF_DEBUG = False
REL_CFLAGS = ['-O2']
diff --git a/build_files/cmake/Modules/FindPythonLibsUnix.cmake b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
index 882f1e2ea77..fd5d20920da 100644
--- a/build_files/cmake/Modules/FindPythonLibsUnix.cmake
+++ b/build_files/cmake/Modules/FindPythonLibsUnix.cmake
@@ -34,67 +34,71 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
ENDIF()
-IF(DEFINED PYTHON_VERSION)
- SET(PYTHON_VERSION "${PYTHON_VERSION}" CACHE STRING "")
-ELSE()
- SET(PYTHON_VERSION 3.2 CACHE STRING "")
-ENDIF()
+SET(PYTHON_VERSION 3.2 CACHE STRING "Python Version (major and minor only)")
MARK_AS_ADVANCED(PYTHON_VERSION)
-SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
+
+# See: http://docs.python.org/extending/embedding.html#linking-requirements
+# for why this is needed
+SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic" CACHE STRING "Linker flags for python")
MARK_AS_ADVANCED(PYTHON_LINKFLAGS)
-SET(_python_ABI_FLAGS
- "m;mu;u; " # release
- "md;mud;ud;d" # debug
-)
-
-STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
-
-SET(_python_SEARCH_DIRS
- ${PYTHON_ROOT_DIR}
- "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
- "/opt/py${_PYTHON_VERSION_NO_DOTS}"
-)
-
-FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
- #IF(CMAKE_BUILD_TYPE STREQUAL Debug)
- # SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
- #ENDIF()
- STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
-
- FIND_PATH(PYTHON_INCLUDE_DIR
- NAMES
- Python.h
- HINTS
- ${_python_SEARCH_DIRS}
- PATH_SUFFIXES
- include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
- )
- FIND_LIBRARY(PYTHON_LIBRARY
- NAMES
- "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}"
- HINTS
- ${_python_SEARCH_DIRS}
- PATH_SUFFIXES
- lib64 lib
+# only search for the dirs if we havn't already
+IF((NOT DEFINED PYTHON_INCLUDE_DIR) OR (NOT DEFINED PYTHON_LIBRARY))
+
+ SET(_python_ABI_FLAGS
+ "m;mu;u; " # release
+ "md;mud;ud;d" # debug
)
- IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
- break()
- ELSE()
- # ensure we dont find values from 2 different ABI versions
- UNSET(PYTHON_INCLUDE_DIR CACHE)
- UNSET(PYTHON_LIBRARY CACHE)
- ENDIF()
-ENDFOREACH()
+ STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
-UNSET(_CURRENT_ABI_FLAGS)
-UNSET(_CURRENT_PATH)
+ SET(_python_SEARCH_DIRS
+ ${PYTHON_ROOT_DIR}
+ "$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
+ "/opt/py${_PYTHON_VERSION_NO_DOTS}"
+ )
-UNSET(_python_ABI_FLAGS)
-UNSET(_python_SEARCH_DIRS)
+ FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
+ #IF(CMAKE_BUILD_TYPE STREQUAL Debug)
+ # SET(_CURRENT_ABI_FLAGS "d${_CURRENT_ABI_FLAGS}")
+ #ENDIF()
+ STRING(REPLACE " " "" _CURRENT_ABI_FLAGS ${_CURRENT_ABI_FLAGS})
+
+ FIND_PATH(PYTHON_INCLUDE_DIR
+ NAMES
+ Python.h
+ HINTS
+ ${_python_SEARCH_DIRS}
+ PATH_SUFFIXES
+ include/python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}
+ )
+
+ FIND_LIBRARY(PYTHON_LIBRARY
+ NAMES
+ "python${PYTHON_VERSION}${_CURRENT_ABI_FLAGS}"
+ HINTS
+ ${_python_SEARCH_DIRS}
+ PATH_SUFFIXES
+ lib64 lib
+ )
+
+ IF(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR)
+ break()
+ ELSE()
+ # ensure we dont find values from 2 different ABI versions
+ UNSET(PYTHON_INCLUDE_DIR CACHE)
+ UNSET(PYTHON_LIBRARY CACHE)
+ ENDIF()
+ ENDFOREACH()
+
+ UNSET(_CURRENT_ABI_FLAGS)
+ UNSET(_CURRENT_PATH)
+
+ UNSET(_python_ABI_FLAGS)
+ UNSET(_python_SEARCH_DIRS)
+ENDIF()
# handle the QUIETLY and REQUIRED arguments and SET PYTHONLIBSUNIX_FOUND to TRUE IF
# all listed variables are TRUE
diff --git a/build_files/cmake/Modules/FindSamplerate.cmake b/build_files/cmake/Modules/FindSamplerate.cmake
deleted file mode 100644
index ea7a0d7a18c..00000000000
--- a/build_files/cmake/Modules/FindSamplerate.cmake
+++ /dev/null
@@ -1,70 +0,0 @@
-# - Find Samplerate library
-# Find the native Samplerate includes and library
-# This module defines
-# SAMPLERATE_INCLUDE_DIRS, where to find samplerate.h, Set when
-# SAMPLERATE_INCLUDE_DIR is found.
-# SAMPLERATE_LIBRARIES, libraries to link against to use Samplerate.
-# SAMPLERATE_ROOT_DIR, The base directory to search for Samplerate.
-# This can also be an environment variable.
-# SAMPLERATE_FOUND, If false, do not try to use Samplerate.
-#
-# also defined, but not for general use are
-# SAMPLERATE_LIBRARY, where to find the Samplerate library.
-
-#=============================================================================
-# Copyright 2011 Blender Foundation.
-#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file Copyright.txt for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-
-# If SAMPLERATE_ROOT_DIR was defined in the environment, use it.
-IF(NOT SAMPLERATE_ROOT_DIR AND NOT $ENV{SAMPLERATE_ROOT_DIR} STREQUAL "")
- SET(SAMPLERATE_ROOT_DIR $ENV{SAMPLERATE_ROOT_DIR})
-ENDIF()
-
-SET(_samplerate_SEARCH_DIRS
- ${SAMPLERATE_ROOT_DIR}
- /usr/local
- /sw # Fink
- /opt/local # DarwinPorts
- /opt/csw # Blastwave
-)
-
-FIND_PATH(SAMPLERATE_INCLUDE_DIR
- NAMES
- samplerate.h
- HINTS
- ${_samplerate_SEARCH_DIRS}
- PATH_SUFFIXES
- include
-)
-
-FIND_LIBRARY(SAMPLERATE_LIBRARY
- NAMES
- samplerate
- HINTS
- ${_samplerate_SEARCH_DIRS}
- PATH_SUFFIXES
- lib64 lib
- )
-
-# handle the QUIETLY and REQUIRED arguments and set SAMPLERATE_FOUND to TRUE if
-# all listed variables are TRUE
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Samplerate DEFAULT_MSG
- SAMPLERATE_LIBRARY SAMPLERATE_INCLUDE_DIR)
-
-IF(SAMPLERATE_FOUND)
- SET(SAMPLERATE_LIBRARIES ${SAMPLERATE_LIBRARY})
- SET(SAMPLERATE_INCLUDE_DIRS ${SAMPLERATE_INCLUDE_DIR})
-ENDIF(SAMPLERATE_FOUND)
-
-MARK_AS_ADVANCED(
- SAMPLERATE_INCLUDE_DIR
- SAMPLERATE_LIBRARY
-)
diff --git a/build_files/cmake/config/blender_headless.cmake b/build_files/cmake/config/blender_headless.cmake
index bd69eed30dd..c4d64125744 100644
--- a/build_files/cmake/config/blender_headless.cmake
+++ b/build_files/cmake/config/blender_headless.cmake
@@ -11,7 +11,6 @@ set(WITH_GAMEENGINE OFF CACHE FORCE BOOL)
# disable audio, its possible some devs may want this but for now disable
# so the python module doesnt hold the audio device and loads quickly.
set(WITH_AUDASPACE OFF CACHE FORCE BOOL)
-set(WITH_SAMPLERATE OFF CACHE FORCE BOOL)
set(WITH_FFTW3 OFF CACHE FORCE BOOL)
set(WITH_JACK OFF CACHE FORCE BOOL)
set(WITH_SDL OFF CACHE FORCE BOOL)
diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake
index f09a8058f14..6791028a888 100644
--- a/build_files/cmake/config/blender_lite.cmake
+++ b/build_files/cmake/config/blender_lite.cmake
@@ -38,6 +38,5 @@ set(WITH_OPENCOLLADA OFF CACHE FORCE BOOL)
set(WITH_OPENMP OFF CACHE FORCE BOOL)
set(WITH_PYTHON_INSTALL OFF CACHE FORCE BOOL)
set(WITH_RAYOPTIMIZATION OFF CACHE FORCE BOOL)
-set(WITH_SAMPLERATE OFF CACHE FORCE BOOL)
set(WITH_SDL OFF CACHE FORCE BOOL)
set(WITH_X11_XINPUT OFF CACHE FORCE BOOL)
diff --git a/build_files/cmake/config/bpy_module.cmake b/build_files/cmake/config/bpy_module.cmake
index 5392705f0dc..6279f06214f 100644
--- a/build_files/cmake/config/bpy_module.cmake
+++ b/build_files/cmake/config/bpy_module.cmake
@@ -18,7 +18,6 @@ set(WITH_GAMEENGINE OFF CACHE FORCE BOOL)
# disable audio, its possible some devs may want this but for now disable
# so the python module doesnt hold the audio device and loads quickly.
set(WITH_AUDASPACE OFF CACHE FORCE BOOL)
-set(WITH_SAMPLERATE OFF CACHE FORCE BOOL)
set(WITH_FFTW3 OFF CACHE FORCE BOOL)
set(WITH_JACK OFF CACHE FORCE BOOL)
set(WITH_SDL OFF CACHE FORCE BOOL)
diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 8a665405e72..e4665124c8f 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -181,9 +181,6 @@ macro(SETUP_LIBDIRS)
if(WITH_CODEC_SNDFILE)
link_directories(${SNDFILE_LIBPATH})
endif()
- if(WITH_SAMPLERATE)
- link_directories(${SAMPLERATE_LIBPATH})
- endif()
if(WITH_FFTW3)
link_directories(${FFTW3_LIBPATH})
endif()
@@ -235,7 +232,7 @@ macro(setup_liblinks
endif()
if(WITH_INTERNATIONAL)
- target_link_libraries(${target} ${GETTEXT_LIB})
+ target_link_libraries(${target} ${GETTEXT_LIBRARIES})
if(WIN32 AND NOT UNIX)
target_link_libraries(${target} ${ICONV_LIBRARIES})
@@ -254,9 +251,6 @@ macro(setup_liblinks
if(WITH_CODEC_SNDFILE)
target_link_libraries(${target} ${SNDFILE_LIBRARIES})
endif()
- if(WITH_SAMPLERATE)
- target_link_libraries(${target} ${SAMPLERATE_LIBRARIES})
- endif()
if(WITH_SDL)
target_link_libraries(${target} ${SDL_LIBRARY})
endif()
@@ -280,6 +274,11 @@ macro(setup_liblinks
target_link_libraries(${target} ${OPENJPEG_LIBRARIES})
endif()
if(WITH_CODEC_FFMPEG)
+
+ # Strange!, without this ffmpeg gives linking errors (on linux)
+ # even though its linked above
+ target_link_libraries(${target} ${OPENGL_glu_LIBRARY})
+
target_link_libraries(${target} ${FFMPEG_LIBRARIES})
endif()
if(WITH_OPENCOLLADA)
@@ -320,44 +319,59 @@ macro(setup_liblinks
endif()
endmacro()
-macro(TEST_SSE_SUPPORT)
+macro(TEST_SSE_SUPPORT
+ _sse_flags
+ _sse2_flags)
+
include(CheckCSourceRuns)
# message(STATUS "Detecting SSE support")
- if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_REQUIRED_FLAGS "-msse -msse2")
+ if(CMAKE_COMPILER_IS_GNUCC OR (CMAKE_C_COMPILER_ID MATCHES "Clang"))
+ set(${_sse_flags} "-msse")
+ set(${_sse2_flags} "-msse2")
elseif(MSVC)
- set(CMAKE_REQUIRED_FLAGS "/arch:SSE2") # TODO, SSE 1 ?
+ set(${_sse_flags} "/arch:SSE")
+ set(${_sse2_flags} "/arch:SSE2")
+ elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
+ set(${_sse_flags} "") # icc defaults to -msse
+ set(${_sse2_flags} "-msse2")
+ else()
+ message(WARNING "SSE flags for this compiler: '${CMAKE_C_COMPILER_ID}' not known")
+ set(${_sse_flags})
+ set(${_sse2_flags})
endif()
- if(NOT DEFINED ${SUPPORT_SSE_BUILD})
+ set(CMAKE_REQUIRED_FLAGS "${${_sse_flags}} ${${_sse2_flags}}")
+
+ if(NOT DEFINED SUPPORT_SSE_BUILD)
+ # result cached
check_c_source_runs("
#include <xmmintrin.h>
- int main() { __m128 v = _mm_setzero_ps(); return 0; }"
+ int main(void) { __m128 v = _mm_setzero_ps(); return 0; }"
SUPPORT_SSE_BUILD)
-
+
if(SUPPORT_SSE_BUILD)
message(STATUS "SSE Support: detected.")
else()
message(STATUS "SSE Support: missing.")
endif()
- set(${SUPPORT_SSE_BUILD} ${SUPPORT_SSE_BUILD} CACHE INTERNAL "SSE Test")
- endif()
+ endif()
- if(NOT DEFINED ${SUPPORT_SSE2_BUILD})
+ if(NOT DEFINED SUPPORT_SSE2_BUILD)
+ # result cached
check_c_source_runs("
#include <emmintrin.h>
- int main() { __m128d v = _mm_setzero_pd(); return 0; }"
+ int main(void) { __m128d v = _mm_setzero_pd(); return 0; }"
SUPPORT_SSE2_BUILD)
if(SUPPORT_SSE2_BUILD)
message(STATUS "SSE2 Support: detected.")
else()
message(STATUS "SSE2 Support: missing.")
- endif()
- set(${SUPPORT_SSE2_BUILD} ${SUPPORT_SSE2_BUILD} CACHE INTERNAL "SSE2 Test")
+ endif()
endif()
+ unset(CMAKE_REQUIRED_FLAGS)
endmacro()
# when we have warnings as errors applied globally this
@@ -493,7 +507,7 @@ endmacro()
# hacks to override initial project settings
-# these macros must be called directly before/after project(Blender)
+# these macros must be called directly before/after project(Blender)
macro(blender_project_hack_pre)
# ----------------
# MINGW HACK START
@@ -535,8 +549,10 @@ macro(blender_project_hack_post)
# have libs we define and that cmake & scons builds match.
set(CMAKE_C_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "" FORCE)
- mark_as_advanced(CMAKE_C_STANDARD_LIBRARIES)
- mark_as_advanced(CMAKE_CXX_STANDARD_LIBRARIES)
+ mark_as_advanced(
+ CMAKE_C_STANDARD_LIBRARIES
+ CMAKE_CXX_STANDARD_LIBRARIES
+ )
endif()
unset(_reset_standard_libraries)
diff --git a/build_files/package_spec/debian/control b/build_files/package_spec/debian/control
index be703e05071..addd71760d8 100644
--- a/build_files/package_spec/debian/control
+++ b/build_files/package_spec/debian/control
@@ -2,7 +2,7 @@ Source: blender
Section: graphics
Priority: extra
Maintainer: Dan Eicher <dan@trollwerks.org>
-Build-Depends: debhelper (>= 7.0.50~), cmake, python3, python, libfreetype6-dev, libglu1-mesa-dev, libilmbase-dev, libopenexr-dev, libjpeg62-dev, libopenal-dev, libpng12-dev, libsamplerate0-dev, libsdl-dev, libtiff4-dev, libx11-dev, libxi-dev, zlib1g-dev, python3.2-dev, libopenjpeg-dev
+Build-Depends: debhelper (>= 7.0.50~), cmake, python3, python, libfreetype6-dev, libglu1-mesa-dev, libilmbase-dev, libopenexr-dev, libjpeg62-dev, libopenal-dev, libpng12-dev, libsdl-dev, libtiff4-dev, libx11-dev, libxi-dev, zlib1g-dev, python3.2-dev, libopenjpeg-dev
Standards-Version: 3.9.1
Homepage: http://blender.org/
X-Python3-Version: >= 3.2, << 3.3
diff --git a/build_files/package_spec/pacman/PKGBUILD b/build_files/package_spec/pacman/PKGBUILD
index 0c4164b1242..e59d1cf31d7 100644
--- a/build_files/package_spec/pacman/PKGBUILD
+++ b/build_files/package_spec/pacman/PKGBUILD
@@ -4,7 +4,7 @@
blender_srcdir=$(dirname $startdir)"/../.."
# value may be formatted: 35042:35051M
blender_revision=$(svnversion $blender_srcdir | cut -d: -f2 | awk '{print $3}')
-blender_version=$(grep BLENDER_VERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
+blender_version=$(grep "BLENDER_VERSION\s" $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
blender_version=$(expr $blender_version / 100).$(expr $blender_version % 100) # 256 -> 2.56
blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blender_srcdir/source/blender/blenkernel/BKE_blender.h)
# blender_subversion=$(grep BLENDER_SUBVERSION $blender_srcdir/source/blender/blenkernel/BKE_blender.h | awk '{print $3}')
@@ -12,10 +12,12 @@ blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blen
# map the version a -> 1
# not to be confused with blender's internal subversions
if [ "$blender_version_char" ]; then
- blender_version=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
+ blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
+else
+ blender_version_full=${blender_version}
fi
-blender_ver_string=$blender_version+svn$blender_revision
+blender_ver_string=$blender_version+svn$blender_version_full
pkgname=blender-snapshot
pkgver=$blender_ver_string
@@ -25,7 +27,7 @@ arch=('i686' 'x86_64')
url="www.blender.org"
license=('GPL')
groups=()
-depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.2' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'libsamplerate' 'ffmpeg')
+depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.2' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
makedepends=('cmake' 'svn')
optdepends=()
provides=()
@@ -61,5 +63,8 @@ build() {
package() {
cd $srcdir/build
make DESTDIR="$pkgdir" install
- python -m compileall $pkgdir/usr/share/blender
+ python -m compileall \
+ $pkgdir/usr/share/blender/$blender_version/scripts/startup \
+ $pkgdir/usr/share/blender/$blender_version/scripts/modules \
+ $pkgdir/usr/share/blender/$blender_version/scripts/addons
}
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index 935827e7237..0c132041d82 100644
--- a/build_files/scons/config/darwin-config.py
+++ b/build_files/scons/config/darwin-config.py
@@ -148,11 +148,6 @@ BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
-BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'samplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
# TODO - set proper paths here (add precompiled to lib/ ? )
WITH_BF_JACK = False
BF_JACK = '/usr'
diff --git a/build_files/scons/config/freebsd7-config.py b/build_files/scons/config/freebsd7-config.py
index a73574abf67..fec7531b3c7 100644
--- a/build_files/scons/config/freebsd7-config.py
+++ b/build_files/scons/config/freebsd7-config.py
@@ -25,11 +25,6 @@ BF_CXX = '/usr/local'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
-BF_LIBSAMPLERATE = '/usr/local'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'samplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_JACK = True
BF_JACK = '/usr/local'
BF_JACK_INC = '${BF_JACK}/include/jack'
diff --git a/build_files/scons/config/freebsd8-config.py b/build_files/scons/config/freebsd8-config.py
index dd7ab5f9ab9..eea89bf24ff 100644
--- a/build_files/scons/config/freebsd8-config.py
+++ b/build_files/scons/config/freebsd8-config.py
@@ -25,11 +25,6 @@ BF_CXX = '/usr/local'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
-BF_LIBSAMPLERATE = '/usr/local'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'samplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_JACK = True
BF_JACK = '/usr/local'
BF_JACK_INC = '${BF_JACK}/include/jack'
diff --git a/build_files/scons/config/freebsd9-config.py b/build_files/scons/config/freebsd9-config.py
index 9c53d52ce71..a63da6e35f9 100644
--- a/build_files/scons/config/freebsd9-config.py
+++ b/build_files/scons/config/freebsd9-config.py
@@ -25,11 +25,6 @@ BF_CXX = '/usr/local'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
-BF_LIBSAMPLERATE = '/usr/local'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'samplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_JACK = True
BF_JACK = '/usr/local'
BF_JACK_INC = '${BF_JACK}/include/jack'
diff --git a/build_files/scons/config/linux-config.py b/build_files/scons/config/linux-config.py
index c6613ec0ac1..a26748cd8dc 100644
--- a/build_files/scons/config/linux-config.py
+++ b/build_files/scons/config/linux-config.py
@@ -23,13 +23,6 @@ BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
-BF_LIBSAMPLERATE = '/usr'
-WITH_BF_STATICLIBSAMPLERATE = False
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'samplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-BF_LIBSAMPLERATE_LIB_STATIC = '${BF_LIBSAMPLERATE}/lib/libsamplerate.a'
-
WITH_BF_JACK = False
BF_JACK = '/usr'
BF_JACK_INC = '${BF_JACK}/include/jack'
diff --git a/build_files/scons/config/linuxcross-config.py b/build_files/scons/config/linuxcross-config.py
index 8057d478c31..070e18a5af0 100644
--- a/build_files/scons/config/linuxcross-config.py
+++ b/build_files/scons/config/linuxcross-config.py
@@ -23,11 +23,6 @@ BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
-BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'samplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
diff --git a/build_files/scons/config/openbsd3-config.py b/build_files/scons/config/openbsd3-config.py
index 67d850ff48d..83c515d52f3 100644
--- a/build_files/scons/config/openbsd3-config.py
+++ b/build_files/scons/config/openbsd3-config.py
@@ -16,11 +16,6 @@ WITH_BF_OPENAL = False
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
-BF_LIBSAMPLERATE = '/usr/local'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'samplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
diff --git a/build_files/scons/config/sunos5-config.py b/build_files/scons/config/sunos5-config.py
index 828e286efee..0cf78c9220f 100644
--- a/build_files/scons/config/sunos5-config.py
+++ b/build_files/scons/config/sunos5-config.py
@@ -22,11 +22,6 @@ BF_CXX = '/usr'
WITH_BF_STATICCXX = False
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
-BF_LIBSAMPLERATE = '/usr/local'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'samplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_SDL = True
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
diff --git a/build_files/scons/config/win32-mingw-config.py b/build_files/scons/config/win32-mingw-config.py
index 37d693db560..167ed502bf6 100644
--- a/build_files/scons/config/win32-mingw-config.py
+++ b/build_files/scons/config/win32-mingw-config.py
@@ -23,11 +23,6 @@ BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
-BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'libsamplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include'
diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py
index 2950ca9380f..9604eb5d320 100644
--- a/build_files/scons/config/win32-vc-config.py
+++ b/build_files/scons/config/win32-vc-config.py
@@ -29,11 +29,6 @@ BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
-BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'libsamplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_JACK = False
BF_JACK = LIBDIR + '/jack'
BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
@@ -152,6 +147,8 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
WITH_BF_3DMOUSE = True
+WITH_BF_OPENMP = True
+
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
diff --git a/build_files/scons/config/win64-vc-config.py b/build_files/scons/config/win64-vc-config.py
index 280ba3dd3f1..049b7eb5d40 100644
--- a/build_files/scons/config/win64-vc-config.py
+++ b/build_files/scons/config/win64-vc-config.py
@@ -17,7 +17,7 @@ BF_PYTHON_LIB = 'python32'
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
-WITH_BF_OPENAL = False
+WITH_BF_OPENAL = True
BF_OPENAL = LIBDIR + '/openal'
BF_OPENAL_INC = '${BF_OPENAL}/include '
BF_OPENAL_LIB = 'wrap_oal'
@@ -40,11 +40,6 @@ BF_ICONV_INC = '${BF_ICONV}/include'
BF_ICONV_LIB = 'iconv'
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
-BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
-BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
-BF_LIBSAMPLERATE_LIB = 'libsamplerate'
-BF_LIBSAMPLERATE_LIBPATH = '${BF_LIBSAMPLERATE}/lib'
-
WITH_BF_SDL = True
BF_SDL = LIBDIR + '/sdl'
BF_SDL_INC = '${BF_SDL}/include'
@@ -156,6 +151,8 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
WITH_BF_3DMOUSE = True
+WITH_BF_OPENMP = True
+
#Ray trace optimization
WITH_BF_RAYOPTIMIZATION = True
BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE','/arch:SSE2']
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 06c3f9d206e..b9632bfffa7 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -131,7 +131,6 @@ def setup_staticlibs(lenv):
lenv['BF_JPEG_LIBPATH'],
lenv['BF_ZLIB_LIBPATH'],
lenv['BF_PNG_LIBPATH'],
- lenv['BF_LIBSAMPLERATE_LIBPATH'],
lenv['BF_ICONV_LIBPATH']
])
@@ -194,9 +193,6 @@ def setup_staticlibs(lenv):
if lenv['OURPLATFORM'] == 'linuxcross':
libincs += Split(lenv['BF_OPENMP_LIBPATH'])
- if lenv['WITH_BF_STATICLIBSAMPLERATE']:
- statlibs += Split(lenv['BF_LIBSAMPLERATE_LIB_STATIC'])
-
# setting this last so any overriding of manually libs could be handled
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
libincs.append('/usr/lib')
@@ -270,9 +266,6 @@ def setup_syslibs(lenv):
syslibs += Split(lenv['BF_OPENCOLLADA_LIB'])
syslibs.append(lenv['BF_EXPAT_LIB'])
- if not lenv['WITH_BF_STATICLIBSAMPLERATE']:
- syslibs += Split(lenv['BF_LIBSAMPLERATE_LIB'])
-
if lenv['WITH_BF_JEMALLOC']:
if not lenv['WITH_BF_STATICJEMALLOC']:
syslibs += Split(lenv['BF_JEMALLOC_LIB'])
@@ -572,8 +565,6 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'cp -R %s/release/bin/.blender/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
- cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
- commands.getoutput(cmd)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
@@ -634,7 +625,11 @@ def UnixPyBundle(target=None, source=None, env=None):
run("rm -rf '%s/distutils'" % py_target)
run("rm -rf '%s/lib2to3'" % py_target)
run("rm -rf '%s/config'" % py_target)
- run("rm -rf '%s/config-*'" % py_target)
+
+ for f in os.listdir(py_target):
+ if f.startswith("config-"):
+ run("rm -rf '%s/%s'" % (py_target, f))
+
run("rm -rf '%s/site-packages'" % py_target)
run("mkdir '%s/site-packages'" % py_target) # python needs it.'
run("rm -rf '%s/idlelib'" % py_target)
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index caa83ea41be..fe56d40ea56 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -99,7 +99,6 @@ def validate_arguments(args, bc):
'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH',
- 'BF_LIBSAMPLERATE', 'BF_LIBSAMPLERATE_INC', 'BF_LIBSAMPLERATE_LIB', 'BF_LIBSAMPLERATE_LIBPATH', 'WITH_BF_STATICLIBSAMPLERATE', 'BF_LIBSAMPLERATE_LIB_STATIC',
'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH',
'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH', 'WITH_BF_STATICSNDFILE', 'BF_SNDFILE_LIB_STATIC',
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
@@ -267,13 +266,6 @@ def read_opts(env, cfg, args):
('BF_SDL_LIB', 'SDL library', ''),
('BF_SDL_LIBPATH', 'SDL library path', ''),
- ('BF_LIBSAMPLERATE', 'libsamplerate aka SRC base path', ''),
- ('BF_LIBSAMPLERATE_INC', 'libsamplerate aka SRC include path', ''),
- ('BF_LIBSAMPLERATE_LIB', 'libsamplerate aka SRC library', ''),
- ('BF_LIBSAMPLERATE_LIBPATH', 'libsamplerate aka SRC library path', ''),
- ('BF_LIBSAMPLERATE_LIB_STATIC', 'Path to libsamplerate static library', ''),
- (BoolVariable('WITH_BF_STATICLIBSAMPLERATE', 'Staticly link to libsamplerate', False)),
-
(BoolVariable('WITH_BF_JACK', 'Enable jack support if true', True)),
('BF_JACK', 'jack base path', ''),
('BF_JACK_INC', 'jack include path', ''),
diff --git a/doc/python_api/examples/aud.py b/doc/python_api/examples/aud.py
index e41e8214cc0..2c74d6a0eb1 100644
--- a/doc/python_api/examples/aud.py
+++ b/doc/python_api/examples/aud.py
@@ -11,10 +11,10 @@ device = aud.device()
factory = aud.Factory('music.ogg')
# play the audio, this return a handle to control play/pause
-handle = device.play(sound)
+handle = device.play(factory)
# if the audio is not too big and will be used often you can buffer it
-factory_buffered = aud.Factory.buffer(sound)
-handle_buffered = device.play(buffered)
+factory_buffered = aud.Factory.buffer(factory)
+handle_buffered = device.play(factory_buffered)
# stop the sounds (otherwise they play until their ends)
handle.stop()
diff --git a/doc/python_api/rst/change_log.rst b/doc/python_api/rst/change_log.rst
index b9c154bb9d0..d332c4faff4 100644
--- a/doc/python_api/rst/change_log.rst
+++ b/doc/python_api/rst/change_log.rst
@@ -909,6 +909,181 @@ Added
* :class:`bpy.types.SceneGameData.use_glsl_color_management`
+
+2.58 to 2.59
+============
+
+bpy.types.Scene
+---------------
+
+Function Arguments
+^^^^^^^^^^^^^^^^^^
+
+* :class:`bpy.types.Scene.collada_export` (filepath, selected), *was (filepath)*
+
+bpy.types.MultiresModifier
+--------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.MultiresModifier.use_subsurf_uv`
+
+bpy.types.KeyMap
+----------------
+
+Removed
+^^^^^^^
+
+* **copy_to_user**
+
+Renamed
+^^^^^^^
+
+* **is_user_defined** -> :class:`bpy.types.KeyMap.is_user_modified`
+
+bpy.types.SceneRenderLayer
+--------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.SceneRenderLayer.use_pass_material_index`
+
+bpy.types.ToolSettings
+----------------------
+
+Renamed
+^^^^^^^
+
+* **use_snap_project_self** -> :class:`bpy.types.ToolSettings.use_snap_self`
+
+bpy.types.UserPreferencesInput
+------------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.UserPreferencesInput.ndof_fly_helicopter`
+* :class:`bpy.types.UserPreferencesInput.ndof_lock_horizon`
+* :class:`bpy.types.UserPreferencesInput.ndof_orbit_invert_axes`
+* :class:`bpy.types.UserPreferencesInput.ndof_sensitivity`
+* :class:`bpy.types.UserPreferencesInput.ndof_show_guide`
+* :class:`bpy.types.UserPreferencesInput.ndof_zoom_invert`
+* :class:`bpy.types.UserPreferencesInput.ndof_zoom_updown`
+
+Removed
+^^^^^^^
+
+* **edited_keymaps**
+* **ndof_pan_speed**
+* **ndof_rotate_speed**
+
+bpy.types.IDMaterials
+---------------------
+
+Function Arguments
+^^^^^^^^^^^^^^^^^^
+
+* :class:`bpy.types.IDMaterials.pop` (index, update_data), *was (index)*
+
+bpy.types.Material
+------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Material.pass_index`
+
+bpy.types.RenderLayer
+---------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.RenderLayer.use_pass_material_index`
+
+bpy.types.Object
+----------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Object.closest_point_on_mesh`
+
+bpy.types.ThemeNodeEditor
+-------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.ThemeNodeEditor.noodle_curving`
+
+bpy.types.ChildOfConstraint
+---------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.ChildOfConstraint.inverse_matrix`
+
+bpy.types.KeyConfigurations
+---------------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.KeyConfigurations.addon`
+* :class:`bpy.types.KeyConfigurations.user`
+
+bpy.types.Image
+---------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Image.use_generated_float`
+
+bpy.types.KeyMapItem
+--------------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.KeyMapItem.is_user_modified`
+
+
+2.59 to 2.60
+============
+
+.. These have been manually added wait until RC to do final changelog!
+
+bpy.types.MeshTextureFace
+-------------------------
+
+Removed
+^^^^^^^
+
+* **use_image**
+* **use_object_color**
+* **use_blend_shared**
+
+Moved
+^^^^^
+
+* **hide** -> :class:`bpy.types.Material.game_settings.invisible`
+* **use_collision** -> :class:`bpy.types.Material.game_settings.physics`
+* **use_light** -> :class:`bpy.types.Material.game_settings.use_shadeless`
+* **use_twoside** -> :class:`bpy.types.Material.game_settings.backface_culling`
+* **use_bitmap_text** -> :class:`bpy.types.Material.game_settings.text`
+* **blend_type** -> :class:`bpy.types.Material.game_settings.alpha_blend`
+* **use_alpha_sort** -> :class:`bpy.types.Material.game_settings.alpha_blend`
+* **use_billboard** -> :class:`bpy.types.Material.game_settings.face_orientation`
+* **use_halo** -> :class:`bpy.types.Material.game_settings.face_orientation`
+* **use_shadow_cast** -> :class:`bpy.types.Material.game_settings.face_orientation`
+
+.. Automatically Generated, 2.59 -> r40804!
+
bpy.types.RenderSettings
------------------------
@@ -937,7 +1112,15 @@ Added
^^^^^
* :class:`bpy.types.Sound.factory`
-* :class:`bpy.types.Sound.mono`
+* :class:`bpy.types.Sound.use_mono`
+
+bpy.types.Camera
+----------------
+
+Added
+^^^^^
+
+* :class:`bpy.types.Camera.view_frame`
bpy.types.Scene
---------------
@@ -961,7 +1144,7 @@ bpy.types.Armature
Added
^^^^^
-* :class:`bpy.types.Armature.vert_deformer`
+* :class:`bpy.types.Armature.deform_method`
bpy.types.GameObjectSettings
----------------------------
@@ -969,8 +1152,8 @@ bpy.types.GameObjectSettings
Added
^^^^^
-* :class:`bpy.types.GameObjectSettings.create_obstacle`
* :class:`bpy.types.GameObjectSettings.obstacle_radius`
+* :class:`bpy.types.GameObjectSettings.use_obstacle_create`
bpy.types.BlendData
-------------------
@@ -997,13 +1180,13 @@ Added
* :class:`bpy.types.ThemeGraphEditor.handle_auto_clamped`
* :class:`bpy.types.ThemeGraphEditor.handle_sel_auto_clamped`
-bpy.types.MultiresModifier
---------------------------
+bpy.types.CompositorNodeIDMask
+------------------------------
Added
^^^^^
-* :class:`bpy.types.MultiresModifier.use_subsurf_uv`
+* :class:`bpy.types.CompositorNodeIDMask.use_smooth_mask`
bpy.types.Node
--------------
@@ -1013,27 +1196,6 @@ Added
* :class:`bpy.types.Node.parent`
-bpy.types.KeyMap
-----------------
-
-Removed
-^^^^^^^
-
-* **copy_to_user**
-
-Renamed
-^^^^^^^
-
-* **is_user_defined** -> :class:`bpy.types.KeyMap.is_user_modified`
-
-bpy.types.SceneRenderLayer
---------------------------
-
-Added
-^^^^^
-
-* :class:`bpy.types.SceneRenderLayer.use_pass_material_index`
-
bpy.types.Texture
-----------------
@@ -1042,26 +1204,21 @@ Added
* :class:`bpy.types.Texture.evaluate`
-bpy.types.ToolSettings
-----------------------
+bpy.types.UILayout
+------------------
Added
^^^^^
-* :class:`bpy.types.ToolSettings.use_multipaint`
-
-Renamed
-^^^^^^^
-
-* **use_snap_project_self** -> :class:`bpy.types.ToolSettings.use_snap_self`
+* :class:`bpy.types.UILayout.template_keymap_item_properties`
-bpy.types.RenderEngine
+bpy.types.ToolSettings
----------------------
Added
^^^^^
-* :class:`bpy.types.RenderEngine.report`
+* :class:`bpy.types.ToolSettings.use_multipaint`
bpy.types.UserPreferencesInput
------------------------------
@@ -1069,26 +1226,12 @@ bpy.types.UserPreferencesInput
Added
^^^^^
-* :class:`bpy.types.UserPreferencesInput.ndof_fly_helicopter`
-* :class:`bpy.types.UserPreferencesInput.ndof_lock_horizon`
-* :class:`bpy.types.UserPreferencesInput.ndof_orbit_invert_axes`
* :class:`bpy.types.UserPreferencesInput.ndof_panx_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_pany_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_panz_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_roll_invert_axis`
* :class:`bpy.types.UserPreferencesInput.ndof_rotate_invert_axis`
-* :class:`bpy.types.UserPreferencesInput.ndof_sensitivity`
-* :class:`bpy.types.UserPreferencesInput.ndof_show_guide`
* :class:`bpy.types.UserPreferencesInput.ndof_tilt_invert_axis`
-* :class:`bpy.types.UserPreferencesInput.ndof_zoom_invert`
-* :class:`bpy.types.UserPreferencesInput.ndof_zoom_updown`
-
-Removed
-^^^^^^^
-
-* **edited_keymaps**
-* **ndof_pan_speed**
-* **ndof_rotate_speed**
bpy.types.LockedTrackConstraint
-------------------------------
@@ -1101,10 +1244,18 @@ Added
bpy.types.SpaceGraphEditor
--------------------------
-Renamed
-^^^^^^^
+Moved
+^^^^^
+
+* use_fancy_drawing -> :class:`bpy.types.SpaceGraphEditor.use_beauty_drawing`
+
+bpy.types.ParticleSystem
+------------------------
+
+Added
+^^^^^
-* **use_fancy_drawing** -> :class:`bpy.types.SpaceGraphEditor.use_beauty_drawing`
+* :class:`bpy.types.ParticleSystem.dt_frac`
bpy.types.Mesh
--------------
@@ -1176,14 +1327,6 @@ Added
* :class:`bpy.types.EnvironmentMap.is_valid`
* :class:`bpy.types.EnvironmentMap.save`
-bpy.types.IDMaterials
----------------------
-
-Function Arguments
-^^^^^^^^^^^^^^^^^^
-
-* :class:`bpy.types.IDMaterials.save` (index, update_data), *was (index)*
-
bpy.types.UserPreferencesSystem
-------------------------------
@@ -1213,7 +1356,7 @@ bpy.types.MovieSequence
Added
^^^^^
-* :class:`bpy.types.MovieSequence.streamindex`
+* :class:`bpy.types.MovieSequence.stream_index`
bpy.types.Material
------------------
@@ -1222,15 +1365,6 @@ Added
^^^^^
* :class:`bpy.types.Material.game_settings`
-* :class:`bpy.types.Material.pass_index`
-
-bpy.types.RenderLayer
----------------------
-
-Added
-^^^^^
-
-* :class:`bpy.types.RenderLayer.use_pass_material_index`
bpy.types.Object
----------------
@@ -1238,17 +1372,8 @@ bpy.types.Object
Added
^^^^^
-* :class:`bpy.types.Object.closest_point_on_mesh`
* :class:`bpy.types.Object.matrix_parent_inverse`
-bpy.types.ThemeNodeEditor
--------------------------
-
-Added
-^^^^^
-
-* :class:`bpy.types.ThemeNodeEditor.noodle_curving`
-
bpy.types.SequenceProxy
-----------------------
@@ -1265,14 +1390,6 @@ Added
* :class:`bpy.types.SequenceProxy.quality`
* :class:`bpy.types.SequenceProxy.timecode`
-bpy.types.SpaceUVEditor
------------------------
-
-Added
-^^^^^
-
-* :class:`bpy.types.SpaceUVEditor.show_faces`
-
bpy.types.Sequence
------------------
@@ -1281,14 +1398,6 @@ Added
* :class:`bpy.types.Sequence.waveform`
-bpy.types.ChildOfConstraint
----------------------------
-
-Added
-^^^^^
-
-* :class:`bpy.types.ChildOfConstraint.inverse_matrix`
-
bpy.types.DopeSheet
-------------------
@@ -1311,15 +1420,6 @@ Added
* :class:`bpy.types.ActionActuator.use_force`
* :class:`bpy.types.ActionActuator.use_local`
-bpy.types.KeyConfigurations
----------------------------
-
-Added
-^^^^^
-
-* :class:`bpy.types.KeyConfigurations.addon`
-* :class:`bpy.types.KeyConfigurations.user`
-
bpy.types.VertexGroup
---------------------
@@ -1344,7 +1444,6 @@ Added
* :class:`bpy.types.Image.pack`
* :class:`bpy.types.Image.unpack`
-* :class:`bpy.types.Image.use_generated_float`
bpy.types.Curve
---------------
@@ -1360,13 +1459,14 @@ Removed
* **use_fill_back**
* **use_fill_front**
-bpy.types.KeyMapItem
---------------------
+bpy.types.ParticleSettings
+--------------------------
Added
^^^^^
-* :class:`bpy.types.KeyMapItem.is_user_modified`
+* :class:`bpy.types.ParticleSettings.adaptive_subframes`
+* :class:`bpy.types.ParticleSettings.courant_target`
bpy.types.SceneGameData
-----------------------
@@ -1380,27 +1480,3 @@ Added
* :class:`bpy.types.SceneGameData.restrict_animation_updates`
* :class:`bpy.types.SceneGameData.show_obstacle_simulation`
-bpy.types.MeshTextureFace
--------------------------
-
-Removed
-^^^^^^^
-
-* **use_image**
-* **use_object_color**
-* **use_blend_shared**
-
-Moved
-^^^^^
-
-* **hide** -> :class:`bpy.types.Material.game_settings.invisible`
-* **use_collision** -> :class:`bpy.types.Material.game_settings.physics`
-* **use_light** -> :class:`bpy.types.Material.game_settings.use_shadeless`
-* **use_twoside** -> :class:`bpy.types.Material.game_settings.backface_culling`
-* **use_bitmap_text** -> :class:`bpy.types.Material.game_settings.text`
-* **blend_type** -> :class:`bpy.types.Material.game_settings.alpha_blend`
-* **use_alpha_sort** -> :class:`bpy.types.Material.game_settings.alpha_blend`
-* **use_billboard** -> :class:`bpy.types.Material.game_settings.face_orientation`
-* **use_halo** -> :class:`bpy.types.Material.game_settings.face_orientation`
-* **use_shadow_cast** -> :class:`bpy.types.Material.game_settings.face_orientation`
-
diff --git a/doc/python_api/sphinx_changelog_gen.py b/doc/python_api/sphinx_changelog_gen.py
index bc1619ba7bb..3ded1035123 100644
--- a/doc/python_api/sphinx_changelog_gen.py
+++ b/doc/python_api/sphinx_changelog_gen.py
@@ -302,7 +302,7 @@ def api_changelog(api_from, api_to, api_out):
for func_id, args_old, args_new in func_args:
args_new = ", ".join(args_new)
args_old = ", ".join(args_old)
- fw("* :class:`%s.%s.%s` (%s), *was (%s)*\n" % (mod_id, class_name, prop_id, args_new, args_old))
+ fw("* :class:`%s.%s.%s` (%s), *was (%s)*\n" % (mod_id, class_name, func_id, args_new, args_old))
fw("\n")
fout.close()
diff --git a/intern/audaspace/CMakeLists.txt b/intern/audaspace/CMakeLists.txt
index b7571adf3d5..e321673b07d 100644
--- a/intern/audaspace/CMakeLists.txt
+++ b/intern/audaspace/CMakeLists.txt
@@ -23,7 +23,6 @@
set(INC
.
FX
- SRC
intern
../ffmpeg
)
@@ -262,20 +261,6 @@ if(WITH_CODEC_SNDFILE)
)
endif()
-if(WITH_SAMPLERATE)
- add_definitions(-DWITH_SAMPLERATE)
- list(APPEND INC_SYS
- ${SAMPLERATE_INCLUDE_DIRS}
- )
- list(APPEND SRC
- SRC/AUD_SRCResampleFactory.cpp
- SRC/AUD_SRCResampleReader.cpp
-
- SRC/AUD_SRCResampleFactory.h
- SRC/AUD_SRCResampleReader.h
- )
-endif()
-
if(WITH_FFTW3 AND FALSE)
add_definitions(-DWITH_FFTW3)
list(APPEND INC
diff --git a/intern/audaspace/SConscript b/intern/audaspace/SConscript
index 67f859b0e5f..b8d5a56a625 100644
--- a/intern/audaspace/SConscript
+++ b/intern/audaspace/SConscript
@@ -2,8 +2,8 @@
Import ('env')
-sources = env.Glob('intern/*.cpp') + env.Glob('FX/*.cpp') + env.Glob('SRC/*.cpp')
-incs = '. intern FX SRC ' + env['BF_PTHREADS_INC'] + ' ' + env['BF_LIBSAMPLERATE_INC']
+sources = env.Glob('intern/*.cpp') + env.Glob('FX/*.cpp')
+incs = '. intern FX ' + env['BF_PTHREADS_INC']
defs = []
if env['WITH_BF_FFMPEG']:
@@ -44,7 +44,4 @@ if env['WITH_BF_PYTHON']:
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
incs += ' ' + env['BF_PTHREADS_INC']
-# not optional with scons yet
-defs.append('WITH_SAMPLERATE')
-
env.BlenderLib ('bf_intern_audaspace', sources, Split(incs), defs, libtype=['intern','player'], priority = [25,215] )
diff --git a/intern/container/CTR_List.h b/intern/container/CTR_List.h
index 83252e05fae..79af9ea5abc 100644
--- a/intern/container/CTR_List.h
+++ b/intern/container/CTR_List.h
@@ -37,18 +37,18 @@
class CTR_Link {
public:
- CTR_Link(
+ CTR_Link(
) ;
- CTR_Link(
+ CTR_Link(
CTR_Link *next,
CTR_Link *prev
) ;
-
+
CTR_Link *
getNext(
) const ;
-
+
CTR_Link *
getPrev(
) const ;
@@ -76,14 +76,14 @@ public:
) ;
private:
- CTR_Link *m_next;
- CTR_Link *m_prev;
+ CTR_Link *m_next;
+ CTR_Link *m_prev;
};
class CTR_List {
public:
- CTR_List(
+ CTR_List(
) ;
CTR_Link *
@@ -103,10 +103,10 @@ public:
addTail(
CTR_Link *link
) ;
-
+
private:
- CTR_Link m_head;
- CTR_Link m_tail;
+ CTR_Link m_head;
+ CTR_Link m_tail;
};
#endif
diff --git a/intern/container/CTR_Map.h b/intern/container/CTR_Map.h
index 1991ec19e3a..08aa26eb9e2 100644
--- a/intern/container/CTR_Map.h
+++ b/intern/container/CTR_Map.h
@@ -37,24 +37,24 @@
template <class Key, class Value>
class CTR_Map {
private:
- struct Entry {
- Entry (Entry *next, Key key, Value value) :
- m_next(next),
- m_key(key),
- m_value(value) {}
-
- Entry *m_next;
- Key m_key;
- Value m_value;
- };
-
+ struct Entry {
+ Entry (Entry *next, Key key, Value value) :
+ m_next(next),
+ m_key(key),
+ m_value(value) {}
+
+ Entry *m_next;
+ Key m_key;
+ Value m_value;
+ };
+
public:
- CTR_Map(int num_buckets = 100) : m_num_buckets(num_buckets) {
- m_buckets = new Entry *[num_buckets];
- for (int i = 0; i < num_buckets; ++i) {
- m_buckets[i] = 0;
- }
- }
+ CTR_Map(int num_buckets = 100) : m_num_buckets(num_buckets) {
+ m_buckets = new Entry *[num_buckets];
+ for (int i = 0; i < num_buckets; ++i) {
+ m_buckets[i] = 0;
+ }
+ }
CTR_Map(const CTR_Map& map)
{
@@ -68,114 +68,114 @@ public:
insert(entry->m_key, entry->m_value);
}
}
-
- int size() {
- int count=0;
- for (int i=0;i<m_num_buckets;i++)
- {
- Entry* bucket = m_buckets[i];
- while(bucket)
- {
- bucket = bucket->m_next;
- count++;
- }
- }
- return count;
- }
-
- Value* at(int index) {
- int count=0;
- for (int i=0;i<m_num_buckets;i++)
- {
- Entry* bucket = m_buckets[i];
- while(bucket)
- {
- if (count==index)
- {
- return &bucket->m_value;
- }
- bucket = bucket->m_next;
- count++;
- }
- }
- return 0;
- }
-
- Key* getKey(int index) {
- int count=0;
- for (int i=0;i<m_num_buckets;i++)
- {
- Entry* bucket = m_buckets[i];
- while(bucket)
- {
- if (count==index)
- {
- return &bucket->m_key;
- }
- bucket = bucket->m_next;
- count++;
- }
- }
- return 0;
- }
-
- void clear() {
- for (int i = 0; i < m_num_buckets; ++i) {
- Entry *entry_ptr = m_buckets[i];
-
- while (entry_ptr != 0) {
- Entry *tmp_ptr = entry_ptr->m_next;
- delete entry_ptr;
- entry_ptr = tmp_ptr;
- }
- m_buckets[i] = 0;
- }
- }
-
- ~CTR_Map() {
- clear();
- delete [] m_buckets;
- }
-
- void insert(const Key& key, const Value& value) {
- Entry *entry_ptr = m_buckets[key.hash() % m_num_buckets];
- while ((entry_ptr != 0) && !(key == entry_ptr->m_key)) {
- entry_ptr = entry_ptr->m_next;
- }
-
- if (entry_ptr != 0) {
- entry_ptr->m_value = value;
- }
- else {
- Entry **bucket = &m_buckets[key.hash() % m_num_buckets];
- *bucket = new Entry(*bucket, key, value);
- }
- }
-
- void remove(const Key& key) {
- Entry **entry_ptr = &m_buckets[key.hash() % m_num_buckets];
- while ((*entry_ptr != 0) && !(key == (*entry_ptr)->m_key)) {
- entry_ptr = &(*entry_ptr)->m_next;
- }
-
- if (*entry_ptr != 0) {
- Entry *tmp_ptr = (*entry_ptr)->m_next;
- delete *entry_ptr;
- *entry_ptr = tmp_ptr;
- }
- }
-
- Value *operator[](Key key) {
- Entry *bucket = m_buckets[key.hash() % m_num_buckets];
- while ((bucket != 0) && !(key == bucket->m_key)) {
- bucket = bucket->m_next;
- }
- return bucket != 0 ? &bucket->m_value : 0;
- }
-
+
+ int size() {
+ int count=0;
+ for (int i=0;i<m_num_buckets;i++)
+ {
+ Entry* bucket = m_buckets[i];
+ while(bucket)
+ {
+ bucket = bucket->m_next;
+ count++;
+ }
+ }
+ return count;
+ }
+
+ Value* at(int index) {
+ int count=0;
+ for (int i=0;i<m_num_buckets;i++)
+ {
+ Entry* bucket = m_buckets[i];
+ while(bucket)
+ {
+ if (count==index)
+ {
+ return &bucket->m_value;
+ }
+ bucket = bucket->m_next;
+ count++;
+ }
+ }
+ return 0;
+ }
+
+ Key* getKey(int index) {
+ int count=0;
+ for (int i=0;i<m_num_buckets;i++)
+ {
+ Entry* bucket = m_buckets[i];
+ while(bucket)
+ {
+ if (count==index)
+ {
+ return &bucket->m_key;
+ }
+ bucket = bucket->m_next;
+ count++;
+ }
+ }
+ return 0;
+ }
+
+ void clear() {
+ for (int i = 0; i < m_num_buckets; ++i) {
+ Entry *entry_ptr = m_buckets[i];
+
+ while (entry_ptr != 0) {
+ Entry *tmp_ptr = entry_ptr->m_next;
+ delete entry_ptr;
+ entry_ptr = tmp_ptr;
+ }
+ m_buckets[i] = 0;
+ }
+ }
+
+ ~CTR_Map() {
+ clear();
+ delete [] m_buckets;
+ }
+
+ void insert(const Key& key, const Value& value) {
+ Entry *entry_ptr = m_buckets[key.hash() % m_num_buckets];
+ while ((entry_ptr != 0) && !(key == entry_ptr->m_key)) {
+ entry_ptr = entry_ptr->m_next;
+ }
+
+ if (entry_ptr != 0) {
+ entry_ptr->m_value = value;
+ }
+ else {
+ Entry **bucket = &m_buckets[key.hash() % m_num_buckets];
+ *bucket = new Entry(*bucket, key, value);
+ }
+ }
+
+ void remove(const Key& key) {
+ Entry **entry_ptr = &m_buckets[key.hash() % m_num_buckets];
+ while ((*entry_ptr != 0) && !(key == (*entry_ptr)->m_key)) {
+ entry_ptr = &(*entry_ptr)->m_next;
+ }
+
+ if (*entry_ptr != 0) {
+ Entry *tmp_ptr = (*entry_ptr)->m_next;
+ delete *entry_ptr;
+ *entry_ptr = tmp_ptr;
+ }
+ }
+
+ Value *operator[](Key key) {
+ Entry *bucket = m_buckets[key.hash() % m_num_buckets];
+ while ((bucket != 0) && !(key == bucket->m_key)) {
+ bucket = bucket->m_next;
+ }
+ return bucket != 0 ? &bucket->m_value : 0;
+ }
+
private:
- int m_num_buckets;
- Entry **m_buckets;
+ int m_num_buckets;
+ Entry **m_buckets;
};
#endif
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h
index f24ab00acd3..dd399a7aa95 100644
--- a/intern/ghost/GHOST_Types.h
+++ b/intern/ghost/GHOST_Types.h
@@ -96,14 +96,14 @@ typedef enum {
} GHOST_TFireTimeConstant;
typedef enum {
- GHOST_kModifierKeyLeftShift = 0,
- GHOST_kModifierKeyRightShift,
- GHOST_kModifierKeyLeftAlt,
- GHOST_kModifierKeyRightAlt,
- GHOST_kModifierKeyLeftControl,
- GHOST_kModifierKeyRightControl,
- GHOST_kModifierKeyOS,
- GHOST_kModifierKeyNumMasks
+ GHOST_kModifierKeyLeftShift = 0,
+ GHOST_kModifierKeyRightShift,
+ GHOST_kModifierKeyLeftAlt,
+ GHOST_kModifierKeyRightAlt,
+ GHOST_kModifierKeyLeftControl,
+ GHOST_kModifierKeyRightControl,
+ GHOST_kModifierKeyOS,
+ GHOST_kModifierKeyNumMasks
} GHOST_TModifierKeyMask;
diff --git a/intern/ghost/SConscript b/intern/ghost/SConscript
index ccf641eaee1..39757c873d8 100644
--- a/intern/ghost/SConscript
+++ b/intern/ghost/SConscript
@@ -34,7 +34,12 @@ elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'f
sources.remove('intern' + os.sep + f + 'SDL.cpp')
except ValueError:
pass
- defs += ['PREFIX=\\"/usr/local/\\"'] # XXX, make an option
+ ## removing because scons does not support system installation
+ ## if this is used for blender.org builds it means our distrobution
+ ## will find any locally installed blender and double up its script path.
+ ## So until this is supported properly as with CMake,
+ ## just dont use the PREFIX.
+ # defs += ['PREFIX=\\"/usr/local/\\"'] # XXX, make an option
defs += ['WITH_X11_XINPUT'] # XXX, make an option
elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
@@ -102,8 +107,8 @@ if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-v
if window_system in ('win32-vc', 'win64-vc'):
env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15]) #, cc_compileflags=env['CCFLAGS'].append('/WX') )
-elif env['OURPLATFORM'] == 'darwin': # always use Apple-gcc-4.2 for objC language, for gnu-compilers do not support it fully yet
- env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15], cc_compilerchange='/usr/bin/gcc-4.2', cxx_compilerchange='/usr/bin/gcc-4.2' )
+elif env['WITH_GHOST_COCOA']: # always use Apple-gcc-4.2 for objC language, for gnu-compilers do not support it fully yet
+ env.BlenderLib ('bf_intern_ghost', sources, Split(incs), defines=defs, libtype=['intern','player'], priority = [40,15], cc_compilerchange='/usr/bin/gcc-4.2', cxx_compilerchange='/usr/bin/g++-4.2' )
print "GHOST COCOA WILL BE COMPILED WITH APPLE GCC"
else:
diff --git a/intern/ghost/intern/GHOST_Buttons.h b/intern/ghost/intern/GHOST_Buttons.h
index bf5bdb19d7f..d231a254596 100644
--- a/intern/ghost/intern/GHOST_Buttons.h
+++ b/intern/ghost/intern/GHOST_Buttons.h
@@ -44,35 +44,35 @@
* @date May 15, 2001
*/
struct GHOST_Buttons {
- /**
- * Constructor.
- */
- GHOST_Buttons();
+ /**
+ * Constructor.
+ */
+ GHOST_Buttons();
virtual ~GHOST_Buttons();
-
- /**
- * Returns the state of a single button.
- * @param mask. Key button to return.
- * @return The state of the button (pressed == true).
- */
- virtual bool get(GHOST_TButtonMask mask) const;
-
- /**
- * Updates the state of a single button.
- * @param mask. Button state to update.
- * @param down. The new state of the button.
- */
- virtual void set(GHOST_TButtonMask mask, bool down);
-
- /**
- * Sets the state of all buttons to up.
- */
- virtual void clear();
-
- GHOST_TUns8 m_ButtonLeft : 1;
- GHOST_TUns8 m_ButtonMiddle : 1;
- GHOST_TUns8 m_ButtonRight : 1;
+
+ /**
+ * Returns the state of a single button.
+ * @param mask. Key button to return.
+ * @return The state of the button (pressed == true).
+ */
+ virtual bool get(GHOST_TButtonMask mask) const;
+
+ /**
+ * Updates the state of a single button.
+ * @param mask. Button state to update.
+ * @param down. The new state of the button.
+ */
+ virtual void set(GHOST_TButtonMask mask, bool down);
+
+ /**
+ * Sets the state of all buttons to up.
+ */
+ virtual void clear();
+
+ GHOST_TUns8 m_ButtonLeft : 1;
+ GHOST_TUns8 m_ButtonMiddle : 1;
+ GHOST_TUns8 m_ButtonRight : 1;
};
#endif // _GHOST_BUTTONS_H_
diff --git a/intern/ghost/intern/GHOST_ModifierKeys.h b/intern/ghost/intern/GHOST_ModifierKeys.h
index 08fe277d55a..0109fe7b7c6 100644
--- a/intern/ghost/intern/GHOST_ModifierKeys.h
+++ b/intern/ghost/intern/GHOST_ModifierKeys.h
@@ -44,10 +44,10 @@
*/
struct GHOST_ModifierKeys
{
- /**
- * Constructor.
- */
- GHOST_ModifierKeys();
+ /**
+ * Constructor.
+ */
+ GHOST_ModifierKeys();
virtual ~GHOST_ModifierKeys();
@@ -58,25 +58,25 @@ struct GHOST_ModifierKeys
*/
static GHOST_TKey getModifierKeyCode(GHOST_TModifierKeyMask mask);
-
- /**
- * Returns the state of a single modifier key.
- * @param mask. Key state to return.
- * @return The state of the key (pressed == true).
- */
- virtual bool get(GHOST_TModifierKeyMask mask) const;
-
- /**
- * Updates the state of a single modifier key.
- * @param mask. Key state to update.
- * @param down. The new state of the key.
- */
- virtual void set(GHOST_TModifierKeyMask mask, bool down);
-
- /**
- * Sets the state of all modifier keys to up.
- */
- virtual void clear();
+
+ /**
+ * Returns the state of a single modifier key.
+ * @param mask. Key state to return.
+ * @return The state of the key (pressed == true).
+ */
+ virtual bool get(GHOST_TModifierKeyMask mask) const;
+
+ /**
+ * Updates the state of a single modifier key.
+ * @param mask. Key state to update.
+ * @param down. The new state of the key.
+ */
+ virtual void set(GHOST_TModifierKeyMask mask, bool down);
+
+ /**
+ * Sets the state of all modifier keys to up.
+ */
+ virtual void clear();
/**
* Determines whether to modifier key states are equal.
@@ -84,21 +84,21 @@ struct GHOST_ModifierKeys
* @return Indication of equality.
*/
virtual bool equals(const GHOST_ModifierKeys& keys) const;
-
- /** Bitfield that stores the appropriate key state. */
- GHOST_TUns8 m_LeftShift : 1;
- /** Bitfield that stores the appropriate key state. */
- GHOST_TUns8 m_RightShift : 1;
- /** Bitfield that stores the appropriate key state. */
- GHOST_TUns8 m_LeftAlt : 1;
- /** Bitfield that stores the appropriate key state. */
- GHOST_TUns8 m_RightAlt : 1;
- /** Bitfield that stores the appropriate key state. */
- GHOST_TUns8 m_LeftControl : 1;
- /** Bitfield that stores the appropriate key state. */
- GHOST_TUns8 m_RightControl : 1;
- /** Bitfield that stores the appropriate key state. */
- GHOST_TUns8 m_OS : 1;
+
+ /** Bitfield that stores the appropriate key state. */
+ GHOST_TUns8 m_LeftShift : 1;
+ /** Bitfield that stores the appropriate key state. */
+ GHOST_TUns8 m_RightShift : 1;
+ /** Bitfield that stores the appropriate key state. */
+ GHOST_TUns8 m_LeftAlt : 1;
+ /** Bitfield that stores the appropriate key state. */
+ GHOST_TUns8 m_RightAlt : 1;
+ /** Bitfield that stores the appropriate key state. */
+ GHOST_TUns8 m_LeftControl : 1;
+ /** Bitfield that stores the appropriate key state. */
+ GHOST_TUns8 m_RightControl : 1;
+ /** Bitfield that stores the appropriate key state. */
+ GHOST_TUns8 m_OS : 1;
};
#endif // _GHOST_MODIFIER_KEYS_H_
diff --git a/intern/ghost/intern/GHOST_SystemCarbon.h b/intern/ghost/intern/GHOST_SystemCarbon.h
index b0cf622f709..dd21d033c6f 100644
--- a/intern/ghost/intern/GHOST_SystemCarbon.h
+++ b/intern/ghost/intern/GHOST_SystemCarbon.h
@@ -55,16 +55,16 @@ class GHOST_EventWindow;
*/
class GHOST_SystemCarbon : public GHOST_System {
public:
- /**
- * Constructor.
- */
- GHOST_SystemCarbon();
-
- /**
- * Destructor.
- */
- ~GHOST_SystemCarbon();
-
+ /**
+ * Constructor.
+ */
+ GHOST_SystemCarbon();
+
+ /**
+ * Destructor.
+ */
+ ~GHOST_SystemCarbon();
+
/***************************************************************************************
** Time(r) functionality
***************************************************************************************/
@@ -211,54 +211,54 @@ protected:
virtual GHOST_TSuccess exit();
- /**
- * Handles a tablet event.
- * @param event A Mac event.
- * @return Indication whether the event was handled.
- */
- OSStatus handleTabletEvent(EventRef event);
- /**
- * Handles a mouse event.
- * @param event A Mac event.
- * @return Indication whether the event was handled.
- */
- OSStatus handleMouseEvent(EventRef event);
-
- /**
- * Handles a key event.
- * @param event A Mac event.
- * @return Indication whether the event was handled.
- */
- OSStatus handleKeyEvent(EventRef event);
-
- /**
- * Handles a window event.
- * @param event A Mac event.
- * @return Indication whether the event was handled.
- */
- OSStatus handleWindowEvent(EventRef event);
-
- /**
- * Handles all basic Mac application stuff for a mouse down event.
- * @param event A Mac event.
- * @return Indication whether the event was handled.
- */
- bool handleMouseDown(EventRef event);
-
- /**
- * Handles a Mac menu command.
- * @param menuResult A Mac menu/item identifier.
- * @return Indication whether the event was handled.
- */
- bool handleMenuCommand(GHOST_TInt32 menuResult);
-
- /* callback for blender generated events */
-// static OSStatus blendEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData);
-
-
- /**
- * Callback for Carbon when it has events.
- */
+ /**
+ * Handles a tablet event.
+ * @param event A Mac event.
+ * @return Indication whether the event was handled.
+ */
+ OSStatus handleTabletEvent(EventRef event);
+ /**
+ * Handles a mouse event.
+ * @param event A Mac event.
+ * @return Indication whether the event was handled.
+ */
+ OSStatus handleMouseEvent(EventRef event);
+
+ /**
+ * Handles a key event.
+ * @param event A Mac event.
+ * @return Indication whether the event was handled.
+ */
+ OSStatus handleKeyEvent(EventRef event);
+
+ /**
+ * Handles a window event.
+ * @param event A Mac event.
+ * @return Indication whether the event was handled.
+ */
+ OSStatus handleWindowEvent(EventRef event);
+
+ /**
+ * Handles all basic Mac application stuff for a mouse down event.
+ * @param event A Mac event.
+ * @return Indication whether the event was handled.
+ */
+ bool handleMouseDown(EventRef event);
+
+ /**
+ * Handles a Mac menu command.
+ * @param menuResult A Mac menu/item identifier.
+ * @return Indication whether the event was handled.
+ */
+ bool handleMenuCommand(GHOST_TInt32 menuResult);
+
+ /* callback for blender generated events */
+ // static OSStatus blendEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData);
+
+
+ /**
+ * Callback for Carbon when it has events.
+ */
static OSStatus sEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData);
/** Apple Event Handlers */
@@ -267,23 +267,23 @@ protected:
static OSErr sAEHandlerPrintDocs(const AppleEvent *event, AppleEvent *reply, SInt32 refCon);
static OSErr sAEHandlerQuit(const AppleEvent *event, AppleEvent *reply, SInt32 refCon);
- /**
- * Callback for Mac Timer tasks that expire.
- * @param tmTask Pointer to the timer task that expired.
- */
- //static void s_timerCallback(TMTaskPtr tmTask);
-
- /** Event handler reference. */
- EventHandlerRef m_handler;
+ /**
+ * Callback for Mac Timer tasks that expire.
+ * @param tmTask Pointer to the timer task that expired.
+ */
+ //static void s_timerCallback(TMTaskPtr tmTask);
+
+ /** Event handler reference. */
+ EventHandlerRef m_handler;
/** Start time at initialization. */
GHOST_TUns64 m_start_time;
- /** State of the modifiers. */
- UInt32 m_modifierMask;
+ /** State of the modifiers. */
+ UInt32 m_modifierMask;
- /** Ignores window size messages (when window is dragged). */
- bool m_ignoreWindowSizedMessages;
+ /** Ignores window size messages (when window is dragged). */
+ bool m_ignoreWindowSizedMessages;
};
#endif // _GHOST_SYSTEM_CARBON_H_
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.h b/intern/ghost/intern/GHOST_SystemCocoa.h
index d20aed63f42..fc4f02e3fd6 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemCocoa.h
@@ -52,16 +52,16 @@ class GHOST_WindowCocoa;
class GHOST_SystemCocoa : public GHOST_System {
public:
- /**
- * Constructor.
- */
- GHOST_SystemCocoa();
-
- /**
- * Destructor.
- */
- ~GHOST_SystemCocoa();
-
+ /**
+ * Constructor.
+ */
+ GHOST_SystemCocoa();
+
+ /**
+ * Destructor.
+ */
+ ~GHOST_SystemCocoa();
+
/***************************************************************************************
** Time(r) functionality
***************************************************************************************/
@@ -92,7 +92,7 @@ public:
/**
* Create a new window.
- * The new window is added to the list of windows managed.
+ * The new window is added to the list of windows managed.
* Never explicitly delete the window, use disposeWindow() instead.
* @param title The name of the window (displayed in the title bar of the window if the OS supports it).
* @param left The coordinate of the left edge of the window.
@@ -107,17 +107,17 @@ public:
* @return The new window (or 0 if creation failed).
*/
virtual GHOST_IWindow* createWindow(
- const STR_String& title,
- GHOST_TInt32 left,
- GHOST_TInt32 top,
- GHOST_TUns32 width,
- GHOST_TUns32 height,
- GHOST_TWindowState state,
- GHOST_TDrawingContextType type,
- const bool stereoVisual = false,
- const GHOST_TUns16 numOfAASamples = 0,
- const GHOST_TEmbedderWindowID parentWindow = 0
- );
+ const STR_String& title,
+ GHOST_TInt32 left,
+ GHOST_TInt32 top,
+ GHOST_TUns32 width,
+ GHOST_TUns32 height,
+ GHOST_TWindowState state,
+ GHOST_TDrawingContextType type,
+ const bool stereoVisual = false,
+ const GHOST_TUns16 numOfAASamples = 0,
+ const GHOST_TEmbedderWindowID parentWindow = 0
+ );
/***************************************************************************************
** Event management functionality
@@ -140,19 +140,19 @@ public:
* Handle Cocoa openFile event
* Display confirmation request panel if changes performed since last save
*/
- bool handleOpenDocumentRequest(void *filepathStr);
+ bool handleOpenDocumentRequest(void *filepathStr);
/**
- * Handles a drag'n'drop destination event. Called by GHOST_WindowCocoa window subclass
- * @param eventType The type of drag'n'drop event
+ * Handles a drag'n'drop destination event. Called by GHOST_WindowCocoa window subclass
+ * @param eventType The type of drag'n'drop event
* @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 occurred
- * @return Indication whether the event was handled.
- */
+ * @return Indication whether the event was handled.
+ */
GHOST_TSuccess handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,
- GHOST_WindowCocoa* window, int mouseX, int mouseY, void* data);
+ GHOST_WindowCocoa* window, int mouseX, int mouseY, void* data);
/***************************************************************************************
** Cursor management functionality
@@ -207,18 +207,18 @@ public:
virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
/**
- * Handles a window event. Called by GHOST_WindowCocoa window delegate
- * @param eventType The type of window event
+ * 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 occurred
- * @return Indication whether the event was handled.
- */
- GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window);
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window);
/**
- * Handles the Cocoa event telling the application has become active (again)
- * @return Indication whether the event was handled.
- */
- GHOST_TSuccess handleApplicationBecomeActiveEvent();
+ * Handles the Cocoa event telling the application has become active (again)
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleApplicationBecomeActiveEvent();
/**
* External objects should call this when they send an event outside processEvents.
@@ -239,28 +239,28 @@ protected:
*/
virtual GHOST_TSuccess init();
- /**
- * Handles a tablet event.
- * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+ /**
+ * Handles a tablet event.
+ * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
* @param eventType The type of the event. It needs to be passed separately as it can be either directly in the event type, or as a subtype if combined with a mouse button event
- * @return Indication whether the event was handled.
- */
- GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType);
-
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType);
+
+ /**
+ * Handles a mouse event.
+ * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleMouseEvent(void *eventPtr);
+
/**
- * Handles a mouse event.
- * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
- * @return Indication whether the event was handled.
- */
- GHOST_TSuccess handleMouseEvent(void *eventPtr);
-
- /**
- * Handles a key event.
- * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
- * @return Indication whether the event was handled.
- */
- GHOST_TSuccess handleKeyEvent(void *eventPtr);
-
+ * Handles a key event.
+ * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+ * @return Indication whether the event was handled.
+ */
+ GHOST_TSuccess handleKeyEvent(void *eventPtr);
+
/**
* Performs the actual cursor position update (location in screen coordinates).
* @param x The x-coordinate of the cursor.
@@ -281,11 +281,11 @@ protected:
/** Mouse buttons state */
GHOST_TUns32 m_pressedMouseButtons;
- /** State of the modifiers. */
- GHOST_TUns32 m_modifierMask;
+ /** State of the modifiers. */
+ GHOST_TUns32 m_modifierMask;
- /** Ignores window size messages (when window is dragged). */
- bool m_ignoreWindowSizedMessages;
+ /** Ignores window size messages (when window is dragged). */
+ bool m_ignoreWindowSizedMessages;
/** Stores the mouse cursor delta due to setting a new cursor position
* Needed because cocoa event delta cursor move takes setCursorPosition changes too.
diff --git a/intern/ghost/intern/GHOST_SystemPathsCarbon.h b/intern/ghost/intern/GHOST_SystemPathsCarbon.h
index b48ab6c033b..957300f6586 100644
--- a/intern/ghost/intern/GHOST_SystemPathsCarbon.h
+++ b/intern/ghost/intern/GHOST_SystemPathsCarbon.h
@@ -50,16 +50,16 @@
*/
class GHOST_SystemPathsCarbon : public GHOST_SystemPaths {
public:
- /**
- * Constructor.
- */
- GHOST_SystemPathsCarbon();
-
- /**
- * Destructor.
- */
- ~GHOST_SystemPathsCarbon();
-
+ /**
+ * Constructor.
+ */
+ GHOST_SystemPathsCarbon();
+
+ /**
+ * Destructor.
+ */
+ ~GHOST_SystemPathsCarbon();
+
/**
* Determine the base dir in which shared resources are located. It will first try to use
* "unpack and run" path, then look for properly installed path, not including versioning.
@@ -78,12 +78,12 @@ public:
* Determine the directory of the current binary
* @return Unsigned char string pointing to the binary dir
*/
- virtual const GHOST_TUns8* getBinaryDir() const;
+ virtual const GHOST_TUns8* getBinaryDir() const;
/**
* Add the file to the operating system most recently used files
*/
- void addToSystemRecentFiles(const char* filename) const;
+ void addToSystemRecentFiles(const char* filename) const;
};
#endif // _GHOST_SYSTEM_CARBON_H_
diff --git a/intern/ghost/intern/GHOST_SystemPathsCocoa.h b/intern/ghost/intern/GHOST_SystemPathsCocoa.h
index b270896a8ca..bfdf92b4274 100644
--- a/intern/ghost/intern/GHOST_SystemPathsCocoa.h
+++ b/intern/ghost/intern/GHOST_SystemPathsCocoa.h
@@ -44,15 +44,15 @@
class GHOST_SystemPathsCocoa : public GHOST_SystemPaths {
public:
- /**
- * Constructor.
- */
- GHOST_SystemPathsCocoa();
-
- /**
- * Destructor.
- */
- ~GHOST_SystemPathsCocoa();
+ /**
+ * Constructor.
+ */
+ GHOST_SystemPathsCocoa();
+
+ /**
+ * Destructor.
+ */
+ ~GHOST_SystemPathsCocoa();
/**
* Determine the base dir in which shared resources are located. It will first try to use
diff --git a/intern/ghost/intern/GHOST_TaskbarWin32.h b/intern/ghost/intern/GHOST_TaskbarWin32.h
index eddff8bb91b..8f301edce31 100644
--- a/intern/ghost/intern/GHOST_TaskbarWin32.h
+++ b/intern/ghost/intern/GHOST_TaskbarWin32.h
@@ -21,25 +21,25 @@
#define __ITaskbarList_INTERFACE_DEFINED__
extern "C" {const GUID CLSID_TaskbarList = {0x56FDF344, 0xFD6D, 0x11D0, {0x95, 0x8A, 0x00, 0x60, 0x97, 0xC9, 0xA0, 0x90} };
const GUID IID_ITaskbarList = {0x56FDF342, 0xFD6D, 0x11D0, {0x95, 0x8A, 0x00, 0x60, 0x97, 0xC9, 0xA0, 0x90} }; }
- class ITaskbarList : public IUnknown
- {
- public:
- virtual HRESULT STDMETHODCALLTYPE HrInit (void) = 0;
- virtual HRESULT STDMETHODCALLTYPE AddTab (HWND hwnd) = 0;
- virtual HRESULT STDMETHODCALLTYPE DeleteTab (HWND hwnd) = 0;
- virtual HRESULT STDMETHODCALLTYPE ActivateTab (HWND hwnd) = 0;
- virtual HRESULT STDMETHODCALLTYPE SetActiveAlt (HWND hwnd) = 0;
- };
+ class ITaskbarList : public IUnknown
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE HrInit (void) = 0;
+ virtual HRESULT STDMETHODCALLTYPE AddTab (HWND hwnd) = 0;
+ virtual HRESULT STDMETHODCALLTYPE DeleteTab (HWND hwnd) = 0;
+ virtual HRESULT STDMETHODCALLTYPE ActivateTab (HWND hwnd) = 0;
+ virtual HRESULT STDMETHODCALLTYPE SetActiveAlt (HWND hwnd) = 0;
+ };
#endif /* ITaskbarList */
#ifndef __ITaskbarList2_INTERFACE_DEFINED__
#define __ITaskbarList2_INTERFACE_DEFINED__
extern "C" {const GUID IID_ITaskbarList2 = {0x602D4995, 0xB13A, 0x429b, {0xA6, 0x6E, 0x19, 0x35, 0xE4, 0x4F, 0x43, 0x17} }; }
- class ITaskbarList2 : public ITaskbarList
- {
- public:
- virtual HRESULT STDMETHODCALLTYPE MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen) = 0;
- };
+ class ITaskbarList2 : public ITaskbarList
+ {
+ public:
+ virtual HRESULT STDMETHODCALLTYPE MarkFullscreenWindow(HWND hwnd, BOOL fFullscreen) = 0;
+ };
#endif /* ITaskbarList2 */
#ifndef __ITaskbarList3_INTERFACE_DEFINED__
@@ -51,9 +51,9 @@ typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMA
#define THBN_CLICKED 0x1800
extern "C" {const GUID IID_ITaskList3 = { 0xEA1AFB91, 0x9E28, 0x4B86, {0x90, 0xE9, 0x9E, 0x9F, 0x8A, 0x5E, 0xEF, 0xAF} };}
- class ITaskbarList3 : public ITaskbarList2
- {
- public:
+ class ITaskbarList3 : public ITaskbarList2
+ {
+ public:
virtual HRESULT STDMETHODCALLTYPE SetProgressValue (HWND hwnd, ULONGLONG ullCompleted, ULONGLONG ullTotal) = 0;
virtual HRESULT STDMETHODCALLTYPE SetProgressState (HWND hwnd, TBPFLAG tbpFlags) = 0;
virtual HRESULT STDMETHODCALLTYPE RegisterTab (HWND hwndTab, HWND hwndMDI) = 0;
@@ -62,11 +62,11 @@ typedef enum TBPFLAG {TBPF_NOPROGRESS = 0, TBPF_INDETERMINATE = 0x1, TBPF_NORMA
virtual HRESULT STDMETHODCALLTYPE SetTabActive (HWND hwndTab, HWND hwndMDI, DWORD dwReserved) = 0;
virtual HRESULT STDMETHODCALLTYPE ThumbBarAddButtons (HWND hwnd, UINT cButtons, THUMBBUTTON * pButton) = 0;
virtual HRESULT STDMETHODCALLTYPE ThumbBarUpdateButtons (HWND hwnd, UINT cButtons, THUMBBUTTON * pButton) = 0;
- virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList (HWND hwnd, HIMAGELIST himl) = 0;
+ virtual HRESULT STDMETHODCALLTYPE ThumbBarSetImageList (HWND hwnd, HIMAGELIST himl) = 0;
virtual HRESULT STDMETHODCALLTYPE SetOverlayIcon (HWND hwnd, HICON hIcon, LPCWSTR pszDescription) = 0;
virtual HRESULT STDMETHODCALLTYPE SetThumbnailTooltip (HWND hwnd, LPCWSTR pszTip) = 0;
virtual HRESULT STDMETHODCALLTYPE SetThumbnailClip (HWND hwnd, RECT *prcClip) = 0;
- };
+ };
#endif /* ITaskbarList3 */
#endif /*GHOST_TASKBARWIN32_H_*/
diff --git a/intern/ghost/intern/GHOST_Window.h b/intern/ghost/intern/GHOST_Window.h
index 66990abb555..341c1e23463 100644
--- a/intern/ghost/intern/GHOST_Window.h
+++ b/intern/ghost/intern/GHOST_Window.h
@@ -339,11 +339,11 @@ protected:
/** Number of samples used in anti-aliasing, set to 0 if no AA **/
GHOST_TUns16 m_numOfAASamples;
-
- /** Full-screen width */
- GHOST_TUns32 m_fullScreenWidth;
- /** Full-screen height */
- GHOST_TUns32 m_fullScreenHeight;
+
+ /** Full-screen width */
+ GHOST_TUns32 m_fullScreenWidth;
+ /** Full-screen height */
+ GHOST_TUns32 m_fullScreenHeight;
};
diff --git a/intern/ghost/intern/GHOST_WindowCarbon.h b/intern/ghost/intern/GHOST_WindowCarbon.h
index 650788d5c70..a4386ce884b 100644
--- a/intern/ghost/intern/GHOST_WindowCarbon.h
+++ b/intern/ghost/intern/GHOST_WindowCarbon.h
@@ -200,12 +200,12 @@ public:
virtual GHOST_TSuccess activateDrawingContext();
virtual void loadCursor(bool visible, GHOST_TStandardCursor cursor) const;
-
- /**
- * Returns the dirty state of the window when in full-screen mode.
- * @return Whether it is dirty.
- */
- virtual bool getFullScreenDirty();
+
+ /**
+ * Returns the dirty state of the window when in full-screen mode.
+ * @return Whether it is dirty.
+ */
+ virtual bool getFullScreenDirty();
/* accessor for fullscreen window */
virtual void setMac_windowState(short value);
@@ -257,24 +257,24 @@ protected:
int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color);
virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY);
-
- /**
- * Converts a string object to a Mac Pascal string.
- * @param in The string object to be converted.
- * @param out The converted string.
- */
- virtual void gen2mac(const STR_String& in, Str255 out) const;
-
- /**
- * Converts a Mac Pascal string to a string object.
- * @param in The string to be converted.
- * @param out The converted string object.
- */
- virtual void mac2gen(const Str255 in, STR_String& out) const;
+
+ /**
+ * Converts a string object to a Mac Pascal string.
+ * @param in The string object to be converted.
+ * @param out The converted string.
+ */
+ virtual void gen2mac(const STR_String& in, Str255 out) const;
+
+ /**
+ * Converts a Mac Pascal string to a string object.
+ * @param in The string to be converted.
+ * @param out The converted string object.
+ */
+ virtual void mac2gen(const Str255 in, STR_String& out) const;
- WindowRef m_windowRef;
- CGrafPtr m_grafPtr;
- AGLContext m_aglCtx;
+ WindowRef m_windowRef;
+ CGrafPtr m_grafPtr;
+ AGLContext m_aglCtx;
/** The first created OpenGL context (for sharing display lists) */
static AGLContext s_firstaglCtx;
@@ -282,9 +282,9 @@ protected:
Cursor* m_customCursor;
GHOST_TabletData m_tablet;
-
- /** When running in full-screen this tells whether to refresh the window. */
- bool m_fullScreenDirty;
+
+ /** When running in full-screen this tells whether to refresh the window. */
+ bool m_fullScreenDirty;
/** specific MacOs X full screen window setting as we use partially system mechanism
values : 0 not maximizable default
@@ -295,17 +295,17 @@ protected:
in order to be unified with GHOST fullscreen/maximised settings
(lukep)
- **/
-
+ **/
+
short mac_windowState;
- /**
- * The width/height of the size rectangle in the lower right corner of a
- * Mac/Carbon window. This is also the height of the gutter area.
- */
+ /**
+ * The width/height of the size rectangle in the lower right corner of a
+ * Mac/Carbon window. This is also the height of the gutter area.
+ */
#ifdef GHOST_DRAW_CARBON_GUTTER
- static const GHOST_TInt32 s_sizeRectSize;
+ static const GHOST_TInt32 s_sizeRectSize;
#endif // GHOST_DRAW_CARBON_GUTTER
};
diff --git a/intern/ghost/test/gears/GHOST_C-Test.c b/intern/ghost/test/gears/GHOST_C-Test.c
index c582d205258..190857403bd 100644
--- a/intern/ghost/test/gears/GHOST_C-Test.c
+++ b/intern/ghost/test/gears/GHOST_C-Test.c
@@ -190,16 +190,16 @@ static void gearGL(GLfloat inner_radius, GLfloat outer_radius, GLfloat width, GL
static void drawGearGL(int id)
{
- static GLfloat pos[4] = { 5.0f, 5.0f, 10.0f, 1.0f };
- static GLfloat ared[4] = { 0.8f, 0.1f, 0.0f, 1.0f };
- static GLfloat agreen[4] = { 0.0f, 0.8f, 0.2f, 1.0f };
- static GLfloat ablue[4] = { 0.2f, 0.2f, 1.0f, 1.0f };
+ static GLfloat pos[4] = { 5.0f, 5.0f, 10.0f, 1.0f };
+ static GLfloat ared[4] = { 0.8f, 0.1f, 0.0f, 1.0f };
+ static GLfloat agreen[4] = { 0.0f, 0.8f, 0.2f, 1.0f };
+ static GLfloat ablue[4] = { 0.2f, 0.2f, 1.0f, 1.0f };
- glLightfv(GL_LIGHT0, GL_POSITION, pos);
- glEnable(GL_CULL_FACE);
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_DEPTH_TEST);
+ glLightfv(GL_LIGHT0, GL_POSITION, pos);
+ glEnable(GL_CULL_FACE);
+ glEnable(GL_LIGHTING);
+ glEnable(GL_LIGHT0);
+ glEnable(GL_DEPTH_TEST);
switch (id)
{
@@ -218,40 +218,40 @@ static void drawGearGL(int id)
default:
break;
}
- glEnable(GL_NORMALIZE);
+ glEnable(GL_NORMALIZE);
}
static void drawGL(void)
{
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glPushMatrix();
+ glPushMatrix();
- glRotatef(view_rotx, 1.0, 0.0, 0.0);
- glRotatef(view_roty, 0.0, 1.0, 0.0);
- glRotatef(view_rotz, 0.0, 0.0, 1.0);
+ glRotatef(view_rotx, 1.0, 0.0, 0.0);
+ glRotatef(view_roty, 0.0, 1.0, 0.0);
+ glRotatef(view_rotz, 0.0, 0.0, 1.0);
- glPushMatrix();
- glTranslatef(-3.0, -2.0, 0.0);
- glRotatef(fAngle, 0.0, 0.0, 1.0);
- drawGearGL(1);
- glPopMatrix();
+ glPushMatrix();
+ glTranslatef(-3.0, -2.0, 0.0);
+ glRotatef(fAngle, 0.0, 0.0, 1.0);
+ drawGearGL(1);
+ glPopMatrix();
- glPushMatrix();
- glTranslatef(3.1f, -2.0f, 0.0f);
- glRotatef((float)(-2.0*fAngle-9.0), 0.0, 0.0, 1.0);
- drawGearGL(2);
- glPopMatrix();
+ glPushMatrix();
+ glTranslatef(3.1f, -2.0f, 0.0f);
+ glRotatef((float)(-2.0*fAngle-9.0), 0.0, 0.0, 1.0);
+ drawGearGL(2);
+ glPopMatrix();
- glPushMatrix();
- glTranslatef(-3.1f, 2.2f, -1.8f);
- glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
- glRotatef((float)(2.0*fAngle-2.0), 0.0, 0.0, 1.0);
- drawGearGL(3);
- glPopMatrix();
+ glPushMatrix();
+ glTranslatef(-3.1f, 2.2f, -1.8f);
+ glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
+ glRotatef((float)(2.0*fAngle-2.0), 0.0, 0.0, 1.0);
+ drawGearGL(3);
+ glPopMatrix();
- glPopMatrix();
+ glPopMatrix();
}
@@ -260,21 +260,21 @@ static void setViewPortGL(GHOST_WindowHandle hWindow)
GHOST_RectangleHandle hRect = NULL;
GLfloat w, h;
- GHOST_ActivateWindowDrawingContext(hWindow);
- hRect = GHOST_GetClientBounds(hWindow);
+ GHOST_ActivateWindowDrawingContext(hWindow);
+ hRect = GHOST_GetClientBounds(hWindow);
- w = (float)GHOST_GetWidthRectangle(hRect) / (float)GHOST_GetHeightRectangle(hRect);
- h = 1.0;
+ w = (float)GHOST_GetWidthRectangle(hRect) / (float)GHOST_GetHeightRectangle(hRect);
+ h = 1.0;
glViewport(0, 0, GHOST_GetWidthRectangle(hRect), GHOST_GetHeightRectangle(hRect));
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
- glFrustum(-w, w, -h, h, 5.0, 60.0);
+ glFrustum(-w, w, -h, h, 5.0, 60.0);
/* glOrtho(0, bnds.getWidth(), 0, bnds.getHeight(), -10, 10); */
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
- glTranslatef(0.0, 0.0, -40.0);
+ glTranslatef(0.0, 0.0, -40.0);
glClearColor(.2f,0.0f,0.0f,0.0f);
glClear(GL_COLOR_BUFFER_BIT);
@@ -541,8 +541,8 @@ int main(int argc, char** argv)
static void gearsTimerProc(GHOST_TimerTaskHandle hTask, GHOST_TUns64 time)
{
GHOST_WindowHandle hWindow = NULL;
- fAngle += 2.0;
- view_roty += 1.0;
+ fAngle += 2.0;
+ view_roty += 1.0;
hWindow = (GHOST_WindowHandle)GHOST_GetTimerTaskUserData(hTask);
if (GHOST_GetFullScreen(shSystem))
{
diff --git a/intern/mikktspace/mikktspace.c b/intern/mikktspace/mikktspace.c
index 1bb73553012..ff857e82d8f 100644
--- a/intern/mikktspace/mikktspace.c
+++ b/intern/mikktspace/mikktspace.c
@@ -166,13 +166,13 @@ typedef struct
tbool bOrient;
} STSpace;
-int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
-void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
-void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
-int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTrianglesBuffer[], const int piTriListIn[], const int iNrTrianglesIn);
-tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
- const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
- const SMikkTSpaceContext * pContext);
+static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
+static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
+static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
+static int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTrianglesBuffer[], const int piTriListIn[], const int iNrTrianglesIn);
+static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
+ const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
+ const SMikkTSpaceContext * pContext);
static int MakeIndex(const int iFace, const int iVert)
{
@@ -216,14 +216,14 @@ static STSpace AvgTSpace(const STSpace * pTS0, const STSpace * pTS1)
-SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index);
-SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index);
-SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index);
+static SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index);
+static SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index);
+static SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index);
// degen triangles
-void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrianglesIn, const int iTotTris);
-void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn, const int iTotTris);
+static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrianglesIn, const int iTotTris);
+static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn, const int iTotTris);
tbool genTangSpaceDefault(const SMikkTSpaceContext * pContext)
@@ -450,11 +450,11 @@ NOINLINE int FindGridCell(const float fMin, const float fMax, const float fVal)
return iIndex<g_iCells?iIndex:(g_iCells-1);
}
-void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in);
-void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int pTable[], const int iEntries);
-void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
+static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in);
+static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int pTable[], const int iEntries);
+static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn);
-void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
+static void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
// Generate bounding box
@@ -579,7 +579,7 @@ void GenerateSharedVerticesIndexList(int piTriList_in_and_out[], const SMikkTSpa
free(piHashOffsets);
}
-void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in)
+static void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikkTSpaceContext * pContext, const int iL_in, const int iR_in)
{
// make bbox
int c=0, l=0, channel=0;
@@ -689,7 +689,7 @@ void MergeVertsFast(int piTriList_in_and_out[], STmpVert pTmpVert[], const SMikk
}
}
-void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int pTable[], const int iEntries)
+static void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int pTable[], const int iEntries)
{
// this can be optimized further using a tree structure or more hashing.
int e=0;
@@ -724,7 +724,7 @@ void MergeVertsSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pCont
}
}
-void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
+static void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
int iNumUniqueVerts = 0, t=0, i=0;
for(t=0; t<iNrTrianglesIn; t++)
@@ -767,7 +767,7 @@ void GenerateSharedVerticesIndexListSlow(int piTriList_in_and_out[], const SMikk
}
}
-int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
+static int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
int iTSpacesOffs = 0, f=0, t=0;
int iDstTriIndex = 0;
@@ -878,7 +878,7 @@ int GenerateInitialVerticesIndexList(STriInfo pTriInfos[], int piTriList_out[],
return iTSpacesOffs;
}
-SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index)
+static SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index)
{
int iF, iI;
SVec3 res; float pos[3];
@@ -888,7 +888,7 @@ SVec3 GetPosition(const SMikkTSpaceContext * pContext, const int index)
return res;
}
-SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index)
+static SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index)
{
int iF, iI;
SVec3 res; float norm[3];
@@ -898,7 +898,7 @@ SVec3 GetNormal(const SMikkTSpaceContext * pContext, const int index)
return res;
}
-SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index)
+static SVec3 GetTexCoord(const SMikkTSpaceContext * pContext, const int index)
{
int iF, iI;
SVec3 res; float texc[2];
@@ -920,8 +920,8 @@ typedef union
int array[3];
} SEdge;
-void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriListIn[], const int iNrTrianglesIn);
-void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn);
+static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriListIn[], const int iNrTrianglesIn);
+static void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn);
// returns the texture area times 2
static float CalcTexArea(const SMikkTSpaceContext * pContext, const int indices[])
@@ -940,7 +940,7 @@ static float CalcTexArea(const SMikkTSpaceContext * pContext, const int indices[
return fSignedAreaSTx2<0 ? (-fSignedAreaSTx2) : fSignedAreaSTx2;
}
-void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
+static void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn)
{
int f=0, i=0, t=0;
// pTriInfos[f].iFlag is cleared in GenerateInitialVerticesIndexList() which is called before this function.
@@ -1062,10 +1062,10 @@ void InitTriInfo(STriInfo pTriInfos[], const int piTriListIn[], const SMikkTSpac
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
-tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[], const int iMyTriIndex, SGroup * pGroup);
-void AddTriToGroup(SGroup * pGroup, const int iTriIndex);
+static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[], const int iMyTriIndex, SGroup * pGroup);
+static void AddTriToGroup(SGroup * pGroup, const int iTriIndex);
-int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTrianglesBuffer[], const int piTriListIn[], const int iNrTrianglesIn)
+static int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTrianglesBuffer[], const int piTriListIn[], const int iNrTrianglesIn)
{
const int iNrMaxGroups = iNrTrianglesIn*3;
int iNrActiveGroups = 0;
@@ -1126,13 +1126,13 @@ int Build4RuleGroups(STriInfo pTriInfos[], SGroup pGroups[], int piGroupTriangle
return iNrActiveGroups;
}
-void AddTriToGroup(SGroup * pGroup, const int iTriIndex)
+static void AddTriToGroup(SGroup * pGroup, const int iTriIndex)
{
pGroup->pFaceIndices[pGroup->iNrFaces] = iTriIndex;
++pGroup->iNrFaces;
}
-tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
+static tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
const int iMyTriIndex, SGroup * pGroup)
{
STriInfo * pMyTriInfo = &psTriInfos[iMyTriIndex];
@@ -1187,13 +1187,13 @@ tbool AssignRecur(const int piTriListIn[], STriInfo psTriInfos[],
/////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////
-tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2);
-void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed);
-STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[], const SMikkTSpaceContext * pContext, const int iVertexRepresentitive);
+static tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2);
+static void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed);
+static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[], const SMikkTSpaceContext * pContext, const int iVertexRepresentitive);
-tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
- const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
- const SMikkTSpaceContext * pContext)
+static tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGroup pGroups[],
+ const int iNrActiveGroups, const int piTriListIn[], const float fThresCos,
+ const SMikkTSpaceContext * pContext)
{
STSpace * pSubGroupTspace = NULL;
SSubGroup * pUniSubGroups = NULL;
@@ -1361,8 +1361,8 @@ tbool GenerateTSpaces(STSpace psTspace[], const STriInfo pTriInfos[], const SGro
return TTRUE;
}
-STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[],
- const SMikkTSpaceContext * pContext, const int iVertexRepresentitive)
+static STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[], const STriInfo pTriInfos[],
+ const SMikkTSpaceContext * pContext, const int iVertexRepresentitive)
{
STSpace res;
float fAngleSum = 0;
@@ -1435,7 +1435,7 @@ STSpace EvalTspace(int face_indices[], const int iFaces, const int piTriListIn[]
return res;
}
-tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2)
+static tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2)
{
tbool bStillSame=TTRUE;
int i=0;
@@ -1448,7 +1448,7 @@ tbool CompareSubGroups(const SSubGroup * pg1, const SSubGroup * pg2)
return bStillSame;
}
-void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed)
+static void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed)
{
int iL, iR, n, index, iMid, iTmp;
@@ -1492,10 +1492,10 @@ void QuickSort(int* pSortBuffer, int iLeft, int iRight, unsigned int uSeed)
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
-void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channel, unsigned int uSeed);
-void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[], const int i0_in, const int i1_in);
+static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channel, unsigned int uSeed);
+static void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[], const int i0_in, const int i1_in);
-void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriListIn[], const int iNrTrianglesIn)
+static void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriListIn[], const int iNrTrianglesIn)
{
// build array of edges
unsigned int uSeed = INTERNAL_RND_SORT_SEED; // could replace with a random seed?
@@ -1590,7 +1590,7 @@ void BuildNeighborsFast(STriInfo pTriInfos[], SEdge * pEdges, const int piTriLis
}
}
-void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn)
+static void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int iNrTrianglesIn)
{
int f=0, i=0;
for(f=0; f<iNrTrianglesIn; f++)
@@ -1639,7 +1639,7 @@ void BuildNeighborsSlow(STriInfo pTriInfos[], const int piTriListIn[], const int
}
}
-void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channel, unsigned int uSeed)
+static void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channel, unsigned int uSeed)
{
unsigned int t;
int iL, iR, n, index, iMid;
@@ -1696,7 +1696,7 @@ void QuickSortEdges(SEdge * pSortBuffer, int iLeft, int iRight, const int channe
}
// resolve ordering and edge number
-void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[], const int i0_in, const int i1_in)
+static void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[], const int i0_in, const int i1_in)
{
*edgenum_out = -1;
@@ -1730,7 +1730,7 @@ void GetEdge(int * i0_out, int * i1_out, int * edgenum_out, const int indices[],
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////// Degenerate triangles ////////////////////////////////////
-void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrianglesIn, const int iTotTris)
+static void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrianglesIn, const int iTotTris)
{
int iNextGoodTriangleSearchIndex=-1;
tbool bStillFindingGoodOnes;
@@ -1813,7 +1813,7 @@ void DegenPrologue(STriInfo pTriInfos[], int piTriList_out[], const int iNrTrian
assert(iNrTrianglesIn == t);
}
-void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn, const int iTotTris)
+static void DegenEpilogue(STSpace psTspace[], STriInfo pTriInfos[], int piTriListIn[], const SMikkTSpaceContext * pContext, const int iNrTrianglesIn, const int iTotTris)
{
int t=0, i=0;
// deal with degenerate triangles
diff --git a/intern/string/STR_String.h b/intern/string/STR_String.h
index 9c687407512..2b5ba449602 100644
--- a/intern/string/STR_String.h
+++ b/intern/string/STR_String.h
@@ -95,11 +95,11 @@ public:
STR_String& Format(const char *fmt, ...); // Set formatted text to string
STR_String& FormatAdd(const char *fmt, ...); // Add formatted text to string
inline void Clear() { Len = pData[0] = 0; }
- inline const STR_String & Reverse()
- {
- for (int i1=0, i2=Len-1; i1<i2; i1++, i2--)
- swap(pData[i1], pData[i2]); return *this;
- }
+ inline const STR_String & Reverse()
+ {
+ for (int i1=0, i2=Len-1; i1<i2; i1++, i2--)
+ swap(pData[i1], pData[i2]); return *this;
+ }
// Properties
bool IsUpper() const;
diff --git a/po/clean_po.py b/po/clean_po.py
index 2cbd2cb33ac..685ec585ffd 100755
--- a/po/clean_po.py
+++ b/po/clean_po.py
@@ -133,12 +133,12 @@ def do_clean(po, pot_messages):
if pot_messages.get(msgid):
t = po_messages.get(msgid)
if not t:
- print(('Reusing full item from commented ' + \
- 'lines for msgid \'%s\'') % (msgid))
+ print("Reusing full item from commented "
+ "lines for msgid '%s'" % msgid)
po_messages[msgid] = commented_messages[msgid]
elif not t['translation']:
- print(('Reusing translation from commented ' + \
- 'lines for msgid \'%s\'') % (msgid))
+ print("Reusing translation from commented "
+ "lines for msgid '%s'" % msgid)
m = commented_messages[msgid]
t['translation'] = m['translation']
t['translation_lines'] = m['translation_lines']
@@ -153,17 +153,17 @@ def do_clean(po, pot_messages):
first = True
for x in item['message_lines']:
if first:
- handle.write("msgid \"%s\"\n" % (x))
+ handle.write("msgid \"%s\"\n" % x)
else:
- handle.write("\"%s\"\n" % (x))
+ handle.write("\"%s\"\n" % x)
first = False
first = True
for x in item['translation_lines']:
if first:
- handle.write("msgstr \"%s\"\n" % (x))
+ handle.write("msgstr \"%s\"\n" % x)
else:
- handle.write("\"%s\"\n" % (x))
+ handle.write("\"%s\"\n" % x)
first = False
handle.write("\n")
diff --git a/po/merge_po.py b/po/merge_po.py
index b4a1ffa399e..b0b29a3ac8e 100755
--- a/po/merge_po.py
+++ b/po/merge_po.py
@@ -23,7 +23,6 @@
# update the pot file according the POTFILES.in
-import os
import sys
import collections
@@ -145,17 +144,17 @@ def main():
first = True
for x in item['message_lines']:
if first:
- handle.write("msgid \"%s\"\n" % (x))
+ handle.write("msgid \"%s\"\n" % x)
else:
- handle.write("\"%s\"\n" % (x))
+ handle.write("\"%s\"\n" % x)
first = False
first = True
for x in item['translation_lines']:
if first:
- handle.write("msgstr \"%s\"\n" % (x))
+ handle.write("msgstr \"%s\"\n" % x)
else:
- handle.write("\"%s\"\n" % (x))
+ handle.write("\"%s\"\n" % x)
first = False
handle.write("\n")
diff --git a/po/update_msg.py b/po/update_msg.py
index 9fc9967146d..ca19e036637 100644
--- a/po/update_msg.py
+++ b/po/update_msg.py
@@ -17,7 +17,7 @@
#
# ***** END GPL LICENSE BLOCK *****
-# <pep8 compliant>
+# <pep8-80 compliant>
# Write out messages.txt from blender
@@ -36,6 +36,72 @@ COMMENT_PREFIX = "#~ "
def dump_messages_rna(messages):
import bpy
+ def classBlackList():
+ blacklist_rna_class = [
+ # core classes
+ "Context", "Event", "Function", "UILayout",
+ "BlendData",
+ # registerable classes
+ "Panel", "Menu", "Header", "RenderEngine",
+ "Operator", "OperatorMacro", "Macro",
+ "KeyingSetInfo", "UnknownType",
+ # window classes
+ "WindowManager", "Window"
+ ]
+
+ # ---------------------------------------------------------------------
+ # Collect internal operators
+
+ # extend with all internal operators
+ # note that this uses internal api introspection functions
+ # all possible operator names
+ op_names = list(sorted(set(
+ [cls.bl_rna.identifier for cls in
+ bpy.types.OperatorProperties.__subclasses__()] +
+ [cls.bl_rna.identifier for cls in
+ bpy.types.Operator.__subclasses__()] +
+ [cls.bl_rna.identifier for cls in
+ bpy.types.OperatorMacro.__subclasses__()]
+ )))
+
+ get_inatance = __import__("_bpy").ops.get_instance
+ path_resolve = type(bpy.context).__base__.path_resolve
+ for idname in op_names:
+ op = get_inatance(idname)
+ if 'INTERNAL' in path_resolve(op, "bl_options"):
+ blacklist_rna_class.append(idname)
+
+ # ---------------------------------------------------------------------
+ # Collect builtin classes we dont need to doc
+ blacklist_rna_class.append("Property")
+ blacklist_rna_class.extend(
+ [cls.__name__ for cls in
+ bpy.types.Property.__subclasses__()])
+
+ # ---------------------------------------------------------------------
+ # Collect classes which are attached to collections, these are api
+ # access only.
+ collection_props = set()
+ for cls_id in dir(bpy.types):
+ cls = getattr(bpy.types, cls_id)
+ for prop in cls.bl_rna.properties:
+ if prop.type == 'COLLECTION':
+ prop_cls = prop.srna
+ if prop_cls is not None:
+ collection_props.add(prop_cls.identifier)
+ blacklist_rna_class.extend(sorted(collection_props))
+
+ return blacklist_rna_class
+
+ blacklist_rna_class = classBlackList()
+
+ def filterRNA(bl_rna):
+ id = bl_rna.identifier
+ if id in blacklist_rna_class:
+ print(" skipping", id)
+ return True
+ return False
+
# -------------------------------------------------------------------------
# Function definitions
@@ -70,6 +136,10 @@ def dump_messages_rna(messages):
messages.setdefault(item.description, []).append(msgsrc)
def walkRNA(bl_rna):
+
+ if filterRNA(bl_rna):
+ return
+
msgsrc = "bpy.types.%s" % bl_rna.identifier
if bl_rna.name and bl_rna.name != bl_rna.identifier:
diff --git a/release/bin/.blender/.Blanguages b/release/bin/.blender/.Blanguages
deleted file mode 100644
index 1a83c46039a..00000000000
--- a/release/bin/.blender/.Blanguages
+++ /dev/null
@@ -1,24 +0,0 @@
-English:en_US
-Japanese:ja_JP
-Dutch:nl_NL
-Italian:it_IT
-German:de_DE
-Finnish:fi_FI
-Swedish:sv_SE
-French:fr_FR
-Spanish:es_ES
-Catalan:ca_ES
-Czech:cs_CZ
-Brazilian Portuguese:pt_BR
-Simplified Chinese:zh_CN
-Traditional Chinese:zh_TW
-Russian:ru_RU
-Croatian:hr_HR
-Serbian:sr_RS
-Ukrainian:uk_UA
-Polish:pl_PL
-Romanian:ro_RO
-Arabic:ar_SA
-Bulgarian:bg_BG
-Greek:el_GR
-Korean:ko_KR
diff --git a/release/scripts/modules/bpy/ops.py b/release/scripts/modules/bpy/ops.py
index 64c5a1a5f5f..ba9f6dafd19 100644
--- a/release/scripts/modules/bpy/ops.py
+++ b/release/scripts/modules/bpy/ops.py
@@ -27,6 +27,7 @@ op_poll = ops_module.poll
op_call = ops_module.call
op_as_string = ops_module.as_string
op_get_rna = ops_module.get_rna
+op_get_instance = ops_module.get_instance
class BPyOps(object):
@@ -184,11 +185,13 @@ class BPyOpsSubModOp(object):
return ret
def get_rna(self):
- '''
- currently only used for 'bl_rna'
- '''
+ """Internal function for introspection"""
return op_get_rna(self.idname())
+ def get_instance(self):
+ """Internal function for introspection"""
+ return op_get_instance(self.idname())
+
def __repr__(self): # useful display, repr(op)
import bpy
idname = self.idname()
diff --git a/release/scripts/modules/bpy_extras/keyconfig_utils.py b/release/scripts/modules/bpy_extras/keyconfig_utils.py
index e87db659918..78f010245a0 100644
--- a/release/scripts/modules/bpy_extras/keyconfig_utils.py
+++ b/release/scripts/modules/bpy_extras/keyconfig_utils.py
@@ -119,14 +119,17 @@ def keyconfig_merge(kc1, kc2):
"""
merged_keymaps = [(km, kc1) for km in kc1.keymaps]
if kc1 != kc2:
- merged_keymaps.extend((km, kc2) for km in kc2.keymaps if not _km_exists_in(km, merged_keymaps))
+ merged_keymaps.extend((km, kc2) for km in kc2.keymaps if not km_exists_in(km, merged_keymaps))
return merged_keymaps
-def keyconfig_export(wm, kc, filepath):
+def _export_properties(prefix, properties, lines=None):
from bpy.types import OperatorProperties
+ if lines is None:
+ lines = []
+
def string_value(value):
if isinstance(value, str) or isinstance(value, bool) or isinstance(value, float) or isinstance(value, int):
result = repr(value)
@@ -137,20 +140,19 @@ def keyconfig_export(wm, kc, filepath):
return result
- def export_properties(prefix, properties, lines=None):
- if lines is None:
- lines = []
-
- for pname in properties.bl_rna.properties.keys():
- if pname != "rna_type" and not properties.is_property_hidden(pname):
- value = getattr(properties, pname)
- if isinstance(value, OperatorProperties):
- export_properties(prefix + "." + pname, value, lines)
- elif properties.is_property_set(pname):
- value = string_value(value)
- if value != "":
- lines.append("%s.%s = %s\n" % (prefix, pname, value))
- return lines
+ for pname in properties.bl_rna.properties.keys():
+ if pname != "rna_type" and not properties.is_property_hidden(pname):
+ value = getattr(properties, pname)
+ if isinstance(value, OperatorProperties):
+ _export_properties(prefix + "." + pname, value, lines)
+ elif properties.is_property_set(pname):
+ value = string_value(value)
+ if value != "":
+ lines.append("%s.%s = %s\n" % (prefix, pname, value))
+ return lines
+
+
+def keyconfig_export(wm, kc, filepath):
f = open(filepath, "w")
@@ -209,7 +211,7 @@ def keyconfig_export(wm, kc, filepath):
props = kmi.properties
if props is not None:
- f.write("".join(export_properties("kmi.properties", props)))
+ f.write("".join(_export_properties("kmi.properties", props)))
f.write("\n")
@@ -246,7 +248,7 @@ def keyconfig_test(kc):
props = kmi.properties
if props is not None:
- export_properties("kmi.properties", props, s)
+ _export_properties("kmi.properties", props, s)
return "".join(s).strip()
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index 50e9bfb5b98..dd052c36ade 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -140,7 +140,7 @@ def align_objects(align_x,
for obj, bb_world in objs:
- if bb_quality:
+ if bb_quality and obj.type == 'MESH':
GBB = GlobalBB_HQ(obj)
else:
GBB = GlobalBB_LQ(bb_world)
@@ -204,7 +204,7 @@ def align_objects(align_x,
matrix_world = obj.matrix_world.copy()
bb_world = [matrix_world * Vector(v[:]) for v in obj.bound_box]
- if bb_quality:
+ if bb_quality and obj.type == 'MESH':
GBB = GlobalBB_HQ(obj)
else:
GBB = GlobalBB_LQ(bb_world)
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index c13a04eb87a..490ee230220 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -462,10 +462,10 @@ class QuickFluid(Operator):
if self.style == 'INFLOW':
mod.settings.type = 'INFLOW'
- mod.settings.inflow_velocity = self.initial_velocity.copy()
+ mod.settings.inflow_velocity = self.initial_velocity
else:
mod.settings.type = 'FLUID'
- mod.settings.initial_velocity = self.initial_velocity.copy()
+ mod.settings.initial_velocity = self.initial_velocity
obj.hide_render = not self.show_flows
if not self.show_flows:
diff --git a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
index 3c5bc68203f..3479a3f9e53 100644
--- a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
+++ b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
@@ -136,7 +136,8 @@ class PlayRenderedAnim(Operator):
del process
# -----------------------------------------------------------------
- opts = ["-a", "-f", str(rd.fps), str(rd.fps_base), "-j", str(scene.frame_step), file]
+ opts = ["-a", "-f", str(rd.fps), str(rd.fps_base),
+ "-j", str(scene.frame_step), file]
cmd.extend(opts)
elif preset == 'DJV':
opts = [file, "-playback_speed", "%d" % int(rd.fps / rd.fps_base)]
@@ -166,9 +167,8 @@ class PlayRenderedAnim(Operator):
print("Executing command:\n %r" % " ".join(cmd))
try:
- process = subprocess.Popen(cmd)
+ subprocess.Popen(cmd)
except Exception as e:
- import traceback
self.report({'ERROR'},
"Couldn't run external animation player with command "
"%r\n%s" % (" ".join(cmd), str(e)))
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 946104e5264..eaf88fbd295 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -362,7 +362,7 @@ class INFO_MT_help(Menu):
layout = self.layout
layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
- layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-259/'
+ layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-260/'
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index c59f9bebb97..b03e7b8c59c 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -408,7 +408,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
return strip.type in {'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'PLUGIN',
- 'WIPE', 'GLOW', 'TRANSFORM', 'SPEED',
+ 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED',
'MULTICAM', 'ADJUSTMENT'}
def draw(self, context):
@@ -547,7 +547,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, Panel):
'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER',
'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
'PLUGIN',
- 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
+ 'WIPE', 'GLOW', 'TRANSFORM',
'MULTICAM', 'SPEED', 'ADJUSTMENT'}
def draw(self, context):
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 5670b912c7b..1ec6cc39164 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -22,8 +22,6 @@ from bpy.types import Header, Menu, Panel
import os
import addon_utils
-from bpy.props import StringProperty, BoolProperty, EnumProperty
-
def ui_items_general(col, context):
""" General UI Theme Settings (User Interface)
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index 79b13e3bec0..c2e3a145f36 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -19,7 +19,6 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, OperatorProperties
-import os
class USERPREF_MT_keyconfigs(Menu):
@@ -122,19 +121,6 @@ class InputKeyMapPanel:
for entry in children:
self.draw_entry(display_keymaps, entry, col, level + 1)
- @staticmethod
- def draw_kmi_properties(box, properties, title=None):
- box.separator()
- if title:
- box.label(text=title)
- flow = box.column_flow(columns=2)
- for pname, value in properties.bl_rna.properties.items():
- if pname != "rna_type" and not properties.is_property_hidden(pname):
- if isinstance(value, OperatorProperties):
- InputKeyMapPanel.draw_kmi_properties(box, value, title=pname)
- else:
- flow.prop(properties, pname)
-
def draw_kmi(self, display_keymaps, kc, km, kmi, layout, level):
map_type = kmi.map_type
@@ -219,9 +205,7 @@ class InputKeyMapPanel:
subrow.prop(kmi, "key_modifier", text="", event=True)
# Operator properties
- props = kmi.properties
- if props is not None:
- InputKeyMapPanel.draw_kmi_properties(box, props)
+ box.template_keymap_item_properties(kmi)
# Modal key maps attached to this operator
if not km.is_modal:
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 1936e35d328..5069449fc5b 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -720,11 +720,14 @@ class VIEW3D_MT_object(Menu):
layout.separator()
+ layout.menu("VIEW3D_MT_object_quick_effects")
+
+ layout.separator()
+
layout.menu("VIEW3D_MT_object_game")
layout.separator()
- layout.operator("object.join_uvs")
layout.operator("object.join")
layout.separator()
@@ -878,8 +881,8 @@ class VIEW3D_MT_object_parent(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.parent_set", text="Set")
- layout.operator("object.parent_clear", text="Clear")
+ layout.operator_menu_enum("object.parent_set", "type", text="Set")
+ layout.operator_menu_enum("object.parent_clear", "type", text="Clear")
class VIEW3D_MT_object_track(Menu):
@@ -888,8 +891,8 @@ class VIEW3D_MT_object_track(Menu):
def draw(self, context):
layout = self.layout
- layout.operator("object.track_set", text="Set")
- layout.operator("object.track_clear", text="Clear")
+ layout.operator_menu_enum("object.track_set", "type", text="Set")
+ layout.operator_menu_enum("object.track_clear", "type", text="Clear")
class VIEW3D_MT_object_group(Menu):
@@ -918,6 +921,18 @@ class VIEW3D_MT_object_constraints(Menu):
layout.operator("object.constraints_clear")
+class VIEW3D_MT_object_quick_effects(Menu):
+ bl_label = "Quick Effects"
+
+ def draw(self, context):
+ layout = self.layout
+
+ layout.operator("object.quick_fur")
+ layout.operator("object.quick_explode")
+ layout.operator("object.quick_smoke")
+ layout.operator("object.quick_fluid")
+
+
class VIEW3D_MT_object_showhide(Menu):
bl_label = "Show/Hide"
@@ -967,6 +982,7 @@ class VIEW3D_MT_make_links(Menu):
layout.operator_enum("object.make_links_data", "type") # inline
+ layout.operator("object.join_uvs") # stupid place to add this!
class VIEW3D_MT_object_game(Menu):
bl_label = "Game"
diff --git a/release/scripts/startup/keyingsets_builtins.py b/release/scripts/startup/keyingsets_builtins.py
index 6b12c95e072..c7922a0dfa1 100644
--- a/release/scripts/startup/keyingsets_builtins.py
+++ b/release/scripts/startup/keyingsets_builtins.py
@@ -353,14 +353,26 @@ class BUILTIN_KSI_WholeCharacter(KeyingSetInfo):
# custom properties
def doCustomProps(ksi, ks, bone):
+
+ prop_type_compat = {bpy.types.BooleanProperty,
+ bpy.types.IntProperty,
+ bpy.types.FloatProperty}
+
# go over all custom properties for bone
- for prop, val in bone.items():
+ for prop in bone.keys():
# ignore special "_RNA_UI" used for UI editing
if prop == "_RNA_UI":
continue
# for now, just add all of 'em
- ksi.addProp(ks, bone, '["%s"]' % (prop))
+ prop_rna = type(bone).bl_rna.properties.get(prop, None)
+ if prop_rna is None:
+ prop_path = '["%s"]' % prop
+ if bone.path_resolve(prop_path, False).rna_type in prop_type_compat:
+ ksi.addProp(ks, bone, prop_path)
+ elif prop_rna.is_animatable:
+ ksi.addProp(ks, bone, prop)
+
###############################
diff --git a/release/text/readme.html b/release/text/readme.html
index 95094b9c0cb..e0bef8a50e1 100644
--- a/release/text/readme.html
+++ b/release/text/readme.html
@@ -12,22 +12,18 @@
</style>
</head>
<body>
-<p class="title"><b>Blender 2.59</b></p>
+<p class="title"><b>Blender 2.60</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 FreeBSD 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.59</b></p>
-<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.59. This release is the third official stable 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-259/">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"> • 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 class="header"><b>2.60</b></p>
+<p class="body">The Blender Foundation and online developer community is proud to present Blender 2.60. This release is the first official stable release of the Blender 2.6 series, in which we will refine the 2.5 series and add exciting new features again.<a href="http://www.blender.org/development/release-logs/blender-260/">More information about this release</a>.</p>
<p><br></p>
<p class="header"><b>Bugs</b></p>
-<p class="body">Although Blender 2.59 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender 2.59. 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">Although Blender 2.60 is considered a stable release, you may encounter a bug. If you do, please help us by posting it in the bug tracker or using Help → Report a Bug from inside Blender. 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>
@@ -43,7 +39,7 @@
<p class="body"><b>Installing Add-ons (all systems)</b> Add-ons can be installed from the user preferences addons section, download an addon as a .py or .zip file, then press the "Install Add-on" button and select the file to install it.</p>
<p><br></p>
<p class="header"><b>Getting Started</b></p>
-<p class="body">When opening Blender, you’ll see large 3D view in the center, a Toolbar on the left, a Properties area on the right and a Timeline at the bottom.</p>
+<p class="body">When opening Blender, you’ll see large 3D view in the center, a Toolbar on the left, a Properties area and an Outliner area on the right and a Timeline at the bottom.</p>
<p class="body">Orbit around in the 3D view by holding the middle mouse button and dragging. Alternatively, hold the alt key and drag the left mouse button. Additionally, hold Shift to pan the view and Ctrl to zoom.</p>
<p class="body">Select objects using the right mouse button. With the object selected, perform actions by clicking any of the tool buttons on the left, or make changes to its properties by altering any of the setting on the right.</p>
<p class="body">For more information on how to use Blender, <a href="http://www.blender.org/education-help/">watch tutorials</a> or <a href="http://wiki.blender.org/index.php/Doc:Manual">read the manual</a>.</p>
@@ -51,7 +47,7 @@
<p class="header"><b>Links</b></p>
<p class="body">Users:</p>
<p class="body"> General information <a href="http://www.blender.org">www.blender.org</a> <br>
- Full release log <a href="http://www.blender.org/development/release-logs/blender-259/">www.blender.org/development/release-logs/blender-259/</a><br>
+ Full release log <a href="http://www.blender.org/development/release-logs/blender-260/">www.blender.org/development/release-logs/blender-260/</a><br>
Tutorials <a href="http://www.blender.org/education-help/">www.blender.org/education-help/</a> <br>
Manual <a href="http://wiki.blender.org/index.php/Doc:Manual">wiki.blender.org/index.php/Doc:Manual</a><br>
User Forum <a href="http://www.blenderartists.org">www.blenderartists.org</a><br>
diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index 838a36d9fe2..49323ec658f 100644
--- a/source/blender/blenfont/CMakeLists.txt
+++ b/source/blender/blenfont/CMakeLists.txt
@@ -53,7 +53,7 @@ set(SRC
if(WITH_INTERNATIONAL)
list(APPEND INC_SYS
- ${GETTEXT_INC}
+ ${GETTEXT_INCLUDE_DIRS}
)
add_definitions(-DWITH_INTERNATIONAL)
endif()
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 4ddd2c74f47..e9226590aa8 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -53,7 +53,7 @@ extern "C" {
/* can be left blank, otherwise a,b,c... etc with no quotes */
#define BLENDER_VERSION_CHAR
/* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE beta
+#define BLENDER_VERSION_CYCLE rc
struct ListBase;
struct MemFile;
diff --git a/source/blender/blenkernel/BKE_font.h b/source/blender/blenkernel/BKE_font.h
index 2195b370a5f..e4e8805164a 100644
--- a/source/blender/blenkernel/BKE_font.h
+++ b/source/blender/blenkernel/BKE_font.h
@@ -46,6 +46,7 @@ struct Curve;
struct objfnt;
struct TmpFont;
struct CharInfo;
+struct Main;
struct chartrans {
float xof, yof;
@@ -77,10 +78,10 @@ void BKE_font_register_builtin(void *mem, int size);
void free_vfont(struct VFont *sc);
void free_ttfont(void);
struct VFont *get_builtin_font(void);
-struct VFont *load_vfont(const char *name);
+struct VFont *load_vfont(struct Main *bmain, const char *name);
struct TmpFont *vfont_find_tmpfont(struct VFont *vfont);
-struct chartrans *BKE_text_to_curve(struct Scene *scene, struct Object *ob, int mode);
+struct chartrans *BKE_text_to_curve(struct Main *bmain, struct Scene *scene, struct Object *ob, int mode);
int BKE_font_getselection(struct Object *ob, int *start, int *end);
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index cb6a0b9ab37..0e0348e78e9 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -71,6 +71,7 @@ short *give_totcolp_id(struct ID *id);
struct Material *give_current_material(struct Object *ob, short act);
struct ID *material_from(struct Object *ob, short act);
+void assign_material_id(struct ID *id, struct Material *ma, short act);
void assign_material(struct Object *ob, struct Material *ma, short act);
void assign_matarar(struct Object *ob, struct Material ***matar, short totcol);
diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h
index 541c581e762..556ff26e621 100644
--- a/source/blender/blenkernel/BKE_packedFile.h
+++ b/source/blender/blenkernel/BKE_packedFile.h
@@ -45,7 +45,7 @@ struct ReportList;
struct VFont;
/* pack */
-struct PackedFile *newPackedFile(struct ReportList *reports, const char *filename);
+struct PackedFile *newPackedFile(struct ReportList *reports, const char *filename, const char *relabase);
struct PackedFile *newPackedFileMemory(void *mem, int memlen);
void packAll(struct Main *bmain, struct ReportList *reports);
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 232194b22b6..a7f3888532e 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -1511,7 +1511,7 @@ static void font_duplilist(ListBase *lb, Scene *scene, Object *par, int level, i
/* in par the family name is stored, use this to find the other objects */
- chartransdata= BKE_text_to_curve(scene, par, FO_DUPLI);
+ chartransdata= BKE_text_to_curve(G.main, scene, par, FO_DUPLI);
if(chartransdata==NULL) return;
cu= par->data;
diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index 5d01db87422..13abf18e20c 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1160,6 +1160,8 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i
return 0;
}
+ /* RNA property update disabled for now - [#28525] [#28690] [#28774] [#28777] */
+#if 0
/* buffer property update for later flushing */
if (RNA_property_update_check(prop)) {
short skip_updates_hack = 0;
@@ -1176,6 +1178,7 @@ static short animsys_write_rna_setting (PointerRNA *ptr, char *path, int array_i
if (skip_updates_hack == 0)
RNA_property_update_cache_add(&new_ptr, prop);
}
+#endif
}
/* successful */
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 7747e4750b7..7e92a09ce99 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -419,12 +419,10 @@ static void calchandle_curvemap(BezTriple *bezt, BezTriple *prev, BezTriple *nex
}
if(bezt->h1==HD_VECT) { /* vector */
- mul_v2_fl(dvec_a, 1.0f/3.0f);
- sub_v2_v2v2(p2-3, p2, dvec_a);
+ madd_v2_v2v2fl(p2-3, p2, dvec_a, -1.0f/3.0f);
}
if(bezt->h2==HD_VECT) {
- mul_v2_fl(dvec_b, 1.0f/3.0f);
- sub_v2_v2v2(p2+3, p2, dvec_b);
+ madd_v2_v2v2fl(p2+3, p2, dvec_b, 1.0f/3.0f);
}
}
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 3bf3c0f9ed8..8177f69c418 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -2596,12 +2596,10 @@ void calchandleNurb(BezTriple *bezt, BezTriple *prev, BezTriple *next, int mode)
}
if(bezt->h1==HD_VECT) { /* vector */
- mul_v3_fl(dvec_a, 1.0f/3.0f);
- sub_v3_v3v3(p2-3, p2, dvec_a);
+ madd_v3_v3v3fl(p2-3, p2, dvec_a, -1.0f/3.0f);
}
if(bezt->h2==HD_VECT) {
- mul_v3_fl(dvec_b, 1.0f/3.0f);
- sub_v3_v3v3(p2+3, p2, dvec_b);
+ madd_v3_v3v3fl(p2+3, p2, dvec_b, 1.0f/3.0f);
}
len_b= len_v3v3(p2, p2+3);
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index 723c73a9ffe..d44edda4b68 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -2850,10 +2850,8 @@ int CustomData_verify_versions(struct CustomData *data, int index)
static void customdata_external_filename(char filename[FILE_MAX], ID *id, CustomDataExternal *external)
{
- char *path = (id->lib)? id->lib->filepath: G.main->name;
-
BLI_strncpy(filename, external->filename, FILE_MAX);
- BLI_path_abs(filename, path);
+ BLI_path_abs(filename, ID_BLEND_PATH(G.main, id));
}
void CustomData_external_reload(CustomData *data, ID *UNUSED(id), CustomDataMask mask, int totelem)
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index 6f27a104144..80a40c0a3a3 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -2028,17 +2028,27 @@ static int object_modifiers_use_time(Object *ob)
/* check whether any modifiers are animated */
if (ob->adt) {
AnimData *adt = ob->adt;
+ FCurve *fcu;
/* action - check for F-Curves with paths containing 'modifiers[' */
if (adt->action) {
- FCurve *fcu;
-
for (fcu = adt->action->curves.first; fcu; fcu = fcu->next) {
if (fcu->rna_path && strstr(fcu->rna_path, "modifiers["))
return 1;
}
}
+ /* This here allows modifier properties to get driven and still update properly
+ *
+ * Workaround to get [#26764] (e.g. subsurf levels not updating when animated/driven)
+ * working, without the updating problems ([#28525] [#28690] [#28774] [#28777]) caused
+ * by the RNA updates cache introduced in r.38649
+ */
+ for (fcu = adt->drivers.first; fcu; fcu = fcu->next) {
+ if (fcu->rna_path && strstr(fcu->rna_path, "modifiers["))
+ return 1;
+ }
+
// XXX: also, should check NLA strips, though for now assume that nobody uses
// that and we can omit that for performance reasons...
}
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index 883230723e4..fd4e3877f60 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1209,7 +1209,7 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
if(cu->path) free_path(cu->path);
cu->path= NULL;
- if(ob->type==OB_FONT) BKE_text_to_curve(scene, ob, 0);
+ if(ob->type==OB_FONT) BKE_text_to_curve(G.main, scene, ob, 0);
if(!forOrco) curve_calc_modifiers_pre(scene, ob, forRender, &originalVerts, &deformedVerts, &numVerts);
diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c
index 6898615c753..c82aa855a7b 100644
--- a/source/blender/blenkernel/intern/font.c
+++ b/source/blender/blenkernel/intern/font.c
@@ -284,7 +284,7 @@ struct TmpFont *vfont_find_tmpfont(VFont *vfont)
return tmpfnt;
}
-static VFontData *vfont_get_data(VFont *vfont)
+static VFontData *vfont_get_data(Main *bmain, VFont *vfont)
{
struct TmpFont *tmpfnt = NULL;
PackedFile *tpf;
@@ -319,11 +319,11 @@ static VFontData *vfont_get_data(VFont *vfont)
BLI_addtail(&ttfdata, tmpfnt);
}
} else {
- pf= newPackedFile(NULL, vfont->name);
+ pf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
if(!tmpfnt)
{
- tpf= newPackedFile(NULL, vfont->name);
+ tpf= newPackedFile(NULL, vfont->name, ID_BLEND_PATH(bmain, &vfont->id));
// Add temporary packed file to globals
tmpfnt= (struct TmpFont *) MEM_callocN(sizeof(struct TmpFont), "temp_font");
@@ -351,7 +351,7 @@ static VFontData *vfont_get_data(VFont *vfont)
return vfont->data;
}
-VFont *load_vfont(const char *name)
+VFont *load_vfont(Main *bmain, const char *name)
{
char filename[FILE_MAXFILE];
VFont *vfont= NULL;
@@ -371,8 +371,8 @@ VFont *load_vfont(const char *name)
BLI_strncpy(dir, name, sizeof(dir));
BLI_splitdirstring(dir, filename);
- pf= newPackedFile(NULL, name);
- tpf= newPackedFile(NULL, name);
+ pf= newPackedFile(NULL, name, bmain->name);
+ tpf= newPackedFile(NULL, name, bmain->name);
is_builtin= 0;
}
@@ -382,7 +382,7 @@ VFont *load_vfont(const char *name)
vfd= BLI_vfontdata_from_freetypefont(pf);
if (vfd) {
- vfont = alloc_libblock(&G.main->vfont, ID_VF, filename);
+ vfont = alloc_libblock(&bmain->vfont, ID_VF, filename);
vfont->data = vfd;
/* if there's a font name, use it for the ID name */
@@ -439,7 +439,7 @@ VFont *get_builtin_font(void)
if (strcmp(vf->name, FO_BUILTIN_NAME)==0)
return vf;
- return load_vfont(FO_BUILTIN_NAME);
+ return load_vfont(G.main, FO_BUILTIN_NAME);
}
static VChar *find_vfont_char(VFontData *vfd, intptr_t character)
@@ -500,7 +500,7 @@ static void build_underline(Curve *cu, float x1, float y1, float x2, float y2, i
}
-static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float ofsx, float ofsy, float rot, int charidx)
+static void buildchar(Main *bmain, Curve *cu, unsigned long character, CharInfo *info, float ofsx, float ofsy, float rot, int charidx)
{
BezTriple *bezt1, *bezt2;
Nurb *nu1 = NULL, *nu2 = NULL;
@@ -509,7 +509,7 @@ static void buildchar(Curve *cu, unsigned long character, CharInfo *info, float
VChar *che = NULL;
int i;
- vfd= vfont_get_data(which_vfont(cu, info));
+ vfd= vfont_get_data(bmain, which_vfont(cu, info));
if (!vfd) return;
/*
@@ -662,7 +662,7 @@ static float char_width(Curve *cu, VChar *che, CharInfo *info)
}
}
-struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
+struct chartrans *BKE_text_to_curve(Main *bmain, Scene *scene, Object *ob, int mode)
{
VFont *vfont, *oldvfont;
VFontData *vfd= NULL;
@@ -714,7 +714,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
if (cu->tb==NULL)
cu->tb= MEM_callocN(MAXTEXTBOX*sizeof(TextBox), "TextBox compat");
- vfd= vfont_get_data(vfont);
+ vfd= vfont_get_data(bmain, vfont);
/* The VFont Data can not be found */
if(!vfd) {
@@ -792,7 +792,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
}
if (vfont != oldvfont) {
- vfd= vfont_get_data(vfont);
+ vfd= vfont_get_data(bmain, vfont);
oldvfont = vfont;
}
@@ -1157,7 +1157,7 @@ struct chartrans *BKE_text_to_curve(Scene *scene, Object *ob, int mode)
}
// We do not want to see any character for \n or \r
if(cha != '\n' && cha != '\r')
- buildchar(cu, cha, info, ct->xof, ct->yof, ct->rot, i);
+ buildchar(bmain, cu, cha, info, ct->xof, ct->yof, ct->rot, i);
if ((info->flag & CU_CHINFO_UNDERLINE) && (cu->textoncurve == NULL) && (cha != '\n') && (cha != '\r')) {
float ulwidth, uloverlap= 0.0f;
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index c2e94cc97db..d56c9a63a91 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -182,7 +182,7 @@ bGPDlayer *gpencil_layer_addnew (bGPdata *gpd)
gpl->thickness = 3;
/* auto-name */
- sprintf(gpl->info, "GP_Layer");
+ strcpy(gpl->info, "GP_Layer");
BLI_uniquename(&gpd->layers, gpl, "GP_Layer", '.', offsetof(bGPDlayer, info[0]), sizeof(gpl->info));
/* make this one the active one */
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index d764826cd47..f6210d3a516 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1480,7 +1480,7 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
/* try to repack file */
if(ima->packedfile) {
PackedFile *pf;
- pf = newPackedFile(NULL, ima->name);
+ pf = newPackedFile(NULL, ima->name, ID_BLEND_PATH(G.main, &ima->id));
if (pf) {
freePackedFile(ima->packedfile);
ima->packedfile = pf;
@@ -1653,10 +1653,7 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
BLI_stringdec(name, head, tail, &numlen);
BLI_stringenc(name, head, tail, numlen, frame);
- if(ima->id.lib)
- BLI_path_abs(name, ima->id.lib->filepath);
- else
- BLI_path_abs(name, G.main->name);
+ BLI_path_abs(name, ID_BLEND_PATH(G.main, &ima->id));
flag= IB_rect|IB_multilayer;
if(ima->flag & IMA_DO_PREMUL)
@@ -1768,11 +1765,8 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
char str[FILE_MAX];
BLI_strncpy(str, ima->name, FILE_MAX);
- if(ima->id.lib)
- BLI_path_abs(str, ima->id.lib->filepath);
- else
- BLI_path_abs(str, G.main->name);
-
+ BLI_path_abs(str, ID_BLEND_PATH(G.main, &ima->id));
+
/* FIXME: make several stream accessible in image editor, too*/
ima->anim = openanim(str, IB_rect, 0);
@@ -1834,10 +1828,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
/* get the right string */
BLI_strncpy(str, ima->name, sizeof(str));
- if(ima->id.lib)
- BLI_path_abs(str, ima->id.lib->filepath);
- else
- BLI_path_abs(str, G.main->name);
+ BLI_path_abs(str, ID_BLEND_PATH(G.main, &ima->id));
/* read ibuf */
ibuf = IMB_loadiffname(str, flag);
@@ -1860,7 +1851,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
/* make packed file for autopack */
if ((ima->packedfile == NULL) && (G.fileflags & G_AUTOPACK))
- ima->packedfile = newPackedFile(NULL, str);
+ ima->packedfile = newPackedFile(NULL, str, ID_BLEND_PATH(G.main, &ima->id));
}
}
else
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index de285e45637..be1a6609db0 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -941,9 +941,9 @@ static void get_flags_for_id(ID *id, char *buf)
isnode= ((Tex *)id)->use_nodes;
if (id->us<0)
- sprintf(buf, "-1W ");
+ strcpy(buf, "-1W ");
else if (!id->lib && !isfake && id->us && !isnode)
- sprintf(buf, " ");
+ strcpy(buf, " ");
else if(isnode)
sprintf(buf, "%c%cN%c ", id->lib?'L':' ', isfake?'F':' ', (id->us==0)?'O':' ');
else
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index a25da56d573..a763941cfe9 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -723,6 +723,48 @@ void test_object_materials(ID *id)
}
}
+void assign_material_id(ID *id, Material *ma, short act)
+{
+ Material *mao, **matar, ***matarar;
+ short *totcolp;
+
+ if(act>MAXMAT) return;
+ if(act<1) act= 1;
+
+ /* prevent crashing when using accidentally */
+ BLI_assert(id->lib == NULL);
+ if(id->lib) return;
+
+ /* test arraylens */
+
+ totcolp= give_totcolp_id(id);
+ matarar= give_matarar_id(id);
+
+ if(totcolp==NULL || matarar==NULL) return;
+
+ if(act > *totcolp) {
+ matar= MEM_callocN(sizeof(void *)*act, "matarray1");
+
+ if(*totcolp) {
+ memcpy(matar, *matarar, sizeof(void *)*(*totcolp));
+ MEM_freeN(*matarar);
+ }
+
+ *matarar= matar;
+ *totcolp= act;
+ }
+
+ /* in data */
+ mao= (*matarar)[act-1];
+ if(mao) mao->id.us--;
+ (*matarar)[act-1]= ma;
+
+ if(ma)
+ id_us_plus((ID *)ma);
+
+ test_object_materials(id);
+}
+
void assign_material(Object *ob, Material *ma, short act)
{
Material *mao, **matar, ***matarar;
@@ -1953,6 +1995,11 @@ int do_version_tface(Main *main, int fileload)
}
}
}
+ /* material is not used by faces with texface
+ * set the default flag - do it only once */
+ else
+ if (fileload)
+ ma->game.flag = GEMAT_BACKCULL;
}
return nowarning;
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 6ce80342dd6..9c5cf9f05fa 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -1284,16 +1284,16 @@ void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
if (strip->name[0]==0) {
switch (strip->type) {
case NLASTRIP_TYPE_CLIP: /* act-clip */
- sprintf(strip->name, "%s", (strip->act)?(strip->act->id.name+2):("<No Action>"));
+ BLI_strncpy(strip->name, (strip->act)?(strip->act->id.name+2):("<No Action>"), sizeof(strip->name));
break;
case NLASTRIP_TYPE_TRANSITION: /* transition */
- sprintf(strip->name, "Transition");
+ BLI_strncpy(strip->name, "Transition", sizeof(strip->name));
break;
case NLASTRIP_TYPE_META: /* meta */
- sprintf(strip->name, "Meta");
+ BLI_strncpy(strip->name, "Meta", sizeof(strip->name));
break;
default:
- sprintf(strip->name, "NLA Strip");
+ BLI_strncpy(strip->name, "NLA Strip", sizeof(strip->name));
break;
}
}
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 13d891dcd64..311cb0a5d8a 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1650,7 +1650,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
if(ob->matbits) MEM_freeN(ob->matbits);
ob->mat = NULL;
ob->matbits= NULL;
- if ((target->totcol) && (target->mat) && ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL)) { //XXX OB_SUPPORT_MATERIAL
+ if ((target->totcol) && (target->mat) && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
int i;
ob->colbits = target->colbits;
@@ -3070,14 +3070,13 @@ void object_camera_matrix(
void camera_view_frame_ex(Scene *scene, Camera *camera, float drawsize, const short do_clip, const float scale[3],
float r_asp[2], float r_shift[2], float *r_drawsize, float r_vec[4][3])
{
- float aspx, aspy;
float facx, facy;
float depth;
/* aspect correcton */
if (scene) {
- aspx= (float) scene->r.xsch*scene->r.xasp;
- aspy= (float) scene->r.ysch*scene->r.yasp;
+ float aspx= (float) scene->r.xsch*scene->r.xasp;
+ float aspy= (float) scene->r.ysch*scene->r.yasp;
if(aspx < aspy) {
r_asp[0]= aspx / aspy;
@@ -3089,8 +3088,6 @@ void camera_view_frame_ex(Scene *scene, Camera *camera, float drawsize, const sh
}
}
else {
- aspx= 1.0f;
- aspy= 1.0f;
r_asp[0]= 1.0f;
r_asp[1]= 1.0f;
}
diff --git a/source/blender/blenkernel/intern/packedFile.c b/source/blender/blenkernel/intern/packedFile.c
index ed729d819b7..4bc40bde949 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -168,7 +168,7 @@ PackedFile *newPackedFileMemory(void *mem, int memlen)
return pf;
}
-PackedFile *newPackedFile(ReportList *reports, const char *filename)
+PackedFile *newPackedFile(ReportList *reports, const char *filename, const char *basepath)
{
PackedFile *pf = NULL;
int file, filelen;
@@ -185,7 +185,7 @@ PackedFile *newPackedFile(ReportList *reports, const char *filename)
// convert relative filenames to absolute filenames
strcpy(name, filename);
- BLI_path_abs(name, G.main->name);
+ BLI_path_abs(name, basepath);
// open the file
// and create a PackedFile structure
@@ -224,7 +224,7 @@ void packAll(Main *bmain, ReportList *reports)
for(ima=bmain->image.first; ima; ima=ima->id.next) {
if(ima->packedfile == NULL && ima->id.lib==NULL) {
if(ima->source==IMA_SRC_FILE) {
- ima->packedfile = newPackedFile(reports, ima->name);
+ ima->packedfile = newPackedFile(reports, ima->name, ID_BLEND_PATH(bmain, &ima->id));
}
else if(ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
BKE_reportf(reports, RPT_WARNING, "Image '%s' skipped, movies and image sequences not supported.", ima->id.name+2);
@@ -234,11 +234,11 @@ void packAll(Main *bmain, ReportList *reports)
for(vf=bmain->vfont.first; vf; vf=vf->id.next)
if(vf->packedfile == NULL && vf->id.lib==NULL && strcmp(vf->name, FO_BUILTIN_NAME) != 0)
- vf->packedfile = newPackedFile(reports, vf->name);
+ vf->packedfile = newPackedFile(reports, vf->name, bmain->name);
for(sound=bmain->sound.first; sound; sound=sound->id.next)
if(sound->packedfile == NULL && sound->id.lib==NULL)
- sound->packedfile = newPackedFile(reports, sound->name);
+ sound->packedfile = newPackedFile(reports, sound->name, bmain->name);
}
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c
index 70b44792b30..d8d6ed6ea6d 100644
--- a/source/blender/blenkernel/intern/seqeffects.c
+++ b/source/blender/blenkernel/intern/seqeffects.c
@@ -1639,8 +1639,6 @@ float hyp3,hyp4,b4,b5
if(wipezone->flip) x = xo - x;
angle = wipezone->angle;
- posy = facf0 * yo;
-
if(wipe->forward){
posx = facf0 * xo;
posy = facf0 * yo;
@@ -2320,7 +2318,7 @@ static void RVBlurBitmap2_byte ( unsigned char* map, int width,int height,
/* Swap buffers */
- swap=temp;temp=map;map=swap;
+ swap=temp;temp=map; /* map=swap; */ /* UNUSED */
/* Tidy up */
MEM_freeN (filter);
@@ -2490,7 +2488,7 @@ static void RVBlurBitmap2_float ( float* map, int width,int height,
/* Swap buffers */
- swap=temp;temp=map;map=swap;
+ swap=temp;temp=map; /* map=swap; */ /* UNUSED */
/* Tidy up */
MEM_freeN (filter);
diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c
index 73d0d70778f..f2d92154c66 100644
--- a/source/blender/blenkernel/intern/sound.c
+++ b/source/blender/blenkernel/intern/sound.c
@@ -340,20 +340,13 @@ void sound_load(struct Main *bmain, struct bSound* sound)
#endif
{
char fullpath[FILE_MAX];
- char *path;
/* load sound */
PackedFile* pf = sound->packedfile;
/* dont modify soundact->sound->name, only change a copy */
BLI_strncpy(fullpath, sound->name, sizeof(fullpath));
-
- if(sound->id.lib)
- path = sound->id.lib->filepath;
- else
- path = bmain->name;
-
- BLI_path_abs(fullpath, path);
+ BLI_path_abs(fullpath, ID_BLEND_PATH(bmain, &sound->id));
/* but we need a packed file then */
if (pf)
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 3cb32f9ad12..425af0272a3 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -489,6 +489,12 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
c->qmax=51;
}
+ // Keep lossless encodes in the RGB domain.
+ if (codec_id == CODEC_ID_HUFFYUV || codec_id == CODEC_ID_FFV1) {
+ /* HUFFYUV was PIX_FMT_YUV422P before */
+ c->pix_fmt = PIX_FMT_RGB32;
+ }
+
if ((of->oformat->flags & AVFMT_GLOBALHEADER)
// || !strcmp(of->oformat->name, "mp4")
// || !strcmp(of->oformat->name, "mov")
@@ -518,8 +524,8 @@ static AVStream* alloc_video_stream(RenderData *rd, int codec_id, AVFormatContex
return NULL;
}
- video_buffersize = 2000000;
- video_buffer = (uint8_t*)MEM_mallocN(video_buffersize,
+ video_buffersize = avpicture_get_size(c->pix_fmt, c->width, c->height);
+ video_buffer = (uint8_t*)MEM_mallocN(video_buffersize*sizeof(uint8_t),
"FFMPEG video buffer");
current_frame = alloc_picture(c->pix_fmt, c->width, c->height);
@@ -565,6 +571,11 @@ static AVStream* alloc_audio_stream(RenderData *rd, int codec_id, AVFormatContex
return NULL;
}
+ /* need to prevent floating point exception when using vorbis audio codec,
+ initialize this value in the same way as it's done in FFmpeg iteslf (sergey) */
+ st->codec->time_base.num= 1;
+ st->codec->time_base.den= st->codec->sample_rate;
+
audio_outbuf_size = FF_MIN_BUFFER_SIZE;
if((c->codec_id >= CODEC_ID_PCM_S16LE) && (c->codec_id <= CODEC_ID_PCM_DVD))
@@ -737,7 +748,11 @@ static int start_ffmpeg_impl(struct RenderData *rd, int rectx, int recty, Report
}
}
- av_write_header(of);
+ if (av_write_header(of) < 0) {
+ BKE_report(reports, RPT_ERROR, "Could not initialize streams. Probably unsupported codec combination.");
+ return 0;
+ }
+
outfile = of;
av_dump_format(of, 0, name, 1);
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c
index bf816a91fb3..3b14abb0bee 100644
--- a/source/blender/blenlib/intern/winstuff.c
+++ b/source/blender/blenlib/intern/winstuff.c
@@ -109,7 +109,7 @@ void RegisterBlendExtension(void) {
lresult = RegCreateKeyEx(root, "blendfile", 0,
NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hkey, &dwd);
if (lresult == ERROR_SUCCESS) {
- sprintf(buffer,"%s","Blender File");
+ strcpy(buffer,"Blender File");
lresult = RegSetValueEx(hkey, NULL, 0, REG_SZ, (BYTE*)buffer, strlen(buffer) + 1);
RegCloseKey(hkey);
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 4ecfc648ebf..6530f25f349 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -10450,7 +10450,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
ma->mode |= MA_TRANSP;
}
else {
- ma->mode |= MA_ZTRANSP;
+ /* ma->mode |= MA_ZTRANSP; */ /* leave ztransp as is even if its not used [#28113] */
ma->mode &= ~MA_TRANSP;
}
@@ -11821,7 +11821,8 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if(!mat->mtex[tex_nr]) continue;
if(mat->mtex[tex_nr]->mapto & MAP_ALPHA) transp_tex= 1;
}
-
+
+ /* weak! material alpha could be animated */
if(mat->alpha < 1.0f || mat->fresnel_tra > 0.0f || transp_tex){
mat->mode |= MA_TRANSP;
mat->mode &= ~(MA_ZTRANSP|MA_RAYTRANSP);
@@ -12187,8 +12188,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if(mtex) {
if((mtex->texflag&MTEX_BUMP_FLIPPED)==0) {
if((mtex->mapto&MAP_NORM) && mtex->texflag&(MTEX_COMPAT_BUMP|MTEX_3TAP_BUMP|MTEX_5TAP_BUMP)) {
- mtex->norfac= -mtex->norfac;
- mtex->texflag|= MTEX_BUMP_FLIPPED;
+ Tex *tex= newlibadr(fd, lib, mtex->tex);
+
+ if(!tex || (tex->imaflag&TEX_NORMALMAP)==0) {
+ mtex->norfac= -mtex->norfac;
+ mtex->texflag|= MTEX_BUMP_FLIPPED;
+ }
}
}
}
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c
index d2b1fcc4abd..2774bd2cda4 100644
--- a/source/blender/editors/animation/anim_draw.c
+++ b/source/blender/editors/animation/anim_draw.c
@@ -71,12 +71,12 @@ void ANIM_timecode_string_from_frame (char *str, Scene *scene, int power, short
if (timecodes) {
int hours=0, minutes=0, seconds=0, frames=0;
float raw_seconds= cfra;
- char neg[2]= "";
+ char neg[2]= {'\0'};
/* get cframes */
if (cfra < 0) {
/* correction for negative cfraues */
- sprintf(neg, "-");
+ neg[0]= '-';
cfra = -cfra;
}
if (cfra >= 3600) {
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 9c43671cdf4..383e0bac796 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -63,9 +63,9 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
return icon;
else if ELEM3(NULL, id, fcu, fcu->rna_path) {
if (fcu == NULL)
- sprintf(name, "<invalid>");
+ strcpy(name, "<invalid>");
else if (fcu->rna_path == NULL)
- sprintf(name, "<no path>");
+ strcpy(name, "<no path>");
else /* id == NULL */
BLI_snprintf(name, 256, "%s[%d]", fcu->rna_path, fcu->array_index);
}
diff --git a/source/blender/editors/curve/editfont.c b/source/blender/editors/curve/editfont.c
index 2d0d3c994b9..b617565dba3 100644
--- a/source/blender/editors/curve/editfont.c
+++ b/source/blender/editors/curve/editfont.c
@@ -259,6 +259,7 @@ static int insert_into_textbuf(Object *obedit, uintptr_t c)
static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int recalc, int mode)
{
+ struct Main *bmain= CTX_data_main(C);
Curve *cu= obedit->data;
EditFont *ef= cu->editfont;
cu->curinfo = ef->textbufinfo[cu->pos?cu->pos-1:0];
@@ -269,7 +270,7 @@ static void text_update_edited(bContext *C, Scene *scene, Object *obedit, int re
if(mode == FO_EDIT)
update_string(cu);
- BKE_text_to_curve(scene, obedit, mode);
+ BKE_text_to_curve(bmain, scene, obedit, mode);
if(recalc)
DAG_id_tag_update(obedit->data, 0);
@@ -928,9 +929,10 @@ static int move_cursor(bContext *C, int type, int select)
if(select == 0) {
if(cu->selstart) {
+ struct Main *bmain= CTX_data_main(C);
cu->selstart = cu->selend = 0;
update_string(cu);
- BKE_text_to_curve(scene, obedit, FO_SELCHANGE);
+ BKE_text_to_curve(bmain, scene, obedit, FO_SELCHANGE);
}
}
@@ -1644,13 +1646,14 @@ static int open_cancel(bContext *UNUSED(C), wmOperator *op)
static int open_exec(bContext *C, wmOperator *op)
{
+ struct Main *bmain= CTX_data_main(C);
VFont *font;
PropertyPointerRNA *pprop;
PointerRNA idptr;
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
- font= load_vfont(filepath);
+ font= load_vfont(bmain, filepath);
if(!font) {
if(op->customdata) MEM_freeN(op->customdata);
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index a5781ab7267..a06497889d9 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -749,6 +749,7 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C);
void uiTemplateEditModeSelection(uiLayout *layout, struct bContext *C);
void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *tex);
void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C);
+void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr);
void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *activeptr, const char *activeprop, int rows, int maxrows, int type);
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index a3ae39c8440..a816c1612a1 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2049,7 +2049,7 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, const char *name, shor
wm_subwindow_getsize(window, window->screen->mainwin, &getsizex, &getsizey);
block->aspect= 2.0/fabs(getsizex*block->winmat[0][0]);
- block->auto_open= 2;
+ block->auto_open= TRUE;
block->flag |= UI_BLOCK_LOOP; /* tag as menu */
}
@@ -2291,7 +2291,7 @@ int ui_but_can_align(uiBut *but)
return !ELEM3(but->type, LABEL, OPTION, OPTIONN);
}
-static void ui_block_do_align_but(uiBut *first, int nr)
+static void ui_block_do_align_but(uiBut *first, short nr)
{
uiBut *prev, *but=NULL, *next;
int flag= 0, cols=0, rows=0;
@@ -2428,7 +2428,7 @@ static void ui_block_do_align_but(uiBut *first, int nr)
void ui_block_do_align(uiBlock *block)
{
uiBut *but;
- int nr;
+ short nr;
/* align buttons with same align nr */
for(but=block->buttons.first; but;) {
@@ -2519,7 +2519,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, const char *str,
but->pos= -1; /* cursor invisible */
if(ELEM4(but->type, NUM, NUMABS, NUMSLI, HSVSLI)) { /* add a space to name */
- slen= strlen(but->str);
+ /* slen remains unchanged from previous assignment, ensure this stays true */
if(slen>0 && slen<UI_MAX_NAME_STR-2) {
if(but->str[slen-1]!=' ') {
but->str[slen]= ' ';
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 929a8bf1dc6..9ad828f91c1 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1307,12 +1307,12 @@ static void ui_textedit_set_cursor_pos(uiBut *but, uiHandleButtonData *data, sho
}
/* mouse inside the widget */
else if (x >= startx) {
- float aspect= (but->block->aspect);
+ const float aspect_sqrt= sqrtf(but->block->aspect);
but->pos= strlen(origstr)-but->ofs;
/* XXX does not take zoom level into account */
- while (startx + aspect*BLF_width(fstyle->uifont_id, origstr+but->ofs) > x) {
+ while (startx + aspect_sqrt * BLF_width(fstyle->uifont_id, origstr+but->ofs) > x) {
if (but->pos <= 0) break;
but->pos--;
origstr[but->pos+but->ofs] = 0;
@@ -1368,133 +1368,115 @@ static int ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char asc
return changed;
}
-static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump)
+static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump, int jump_all)
{
- char *str;
- int len;
+ const char *str= data->str;
+ const int len= strlen(str);
+ const int pos_prev= but->pos;
+ const int has_sel= (but->selend - but->selsta) > 0;
- str= data->str;
- len= strlen(str);
-
- if(direction) { /* right*/
- /* if there's a selection */
- if ((but->selend - but->selsta) > 0) {
- /* extend the selection based on the first direction taken */
- if(select) {
- if (!data->selextend) {
- data->selextend = EXTEND_RIGHT;
- }
- if (data->selextend == EXTEND_RIGHT) {
- but->selend++;
- if (but->selend > len) but->selend = len;
- } else if (data->selextend == EXTEND_LEFT) {
- but->selsta++;
- /* if the selection start has gone past the end,
- * flip them so they're in sync again */
- if (but->selsta == but->selend) {
- but->pos = but->selsta;
- data->selextend = EXTEND_RIGHT;
- }
- }
- } else {
+ /* special case, quit selection and set cursor */
+ if (has_sel && !select) {
+ if (jump_all) {
+ but->selsta = but->selend= but->pos = direction ? len : 0;
+ }
+ else {
+ if (direction) {
but->selsta = but->pos = but->selend;
- data->selextend = 0;
}
- } else {
- if(select) {
- /* make a selection, starting from the cursor position */
- int tlen;
- but->selsta = but->pos;
-
- but->pos++;
- if(but->pos > (tlen= strlen(str))) but->pos= tlen;
-
- but->selend = but->pos;
- } else if(jump) {
- /* jump betweenn special characters (/,\,_,-, etc.),
+ else {
+ but->pos = but->selend = but->selsta;
+ }
+ }
+ data->selextend = 0;
+ }
+ else {
+ if(direction) { /* right*/
+ if(jump) {
+ /* jump between special characters (/,\,_,-, etc.),
* look at function test_special_char() for complete
* list of special character, ctr -> */
while(but->pos < len) {
but->pos++;
- if(test_special_char(str[but->pos])) break;
+ if(!jump_all && test_special_char(str[but->pos])) break;
}
- } else {
- int tlen;
+ }
+ else {
but->pos++;
- if(but->pos > (tlen= strlen(str))) but->pos= tlen;
+ if(but->pos > len) but->pos= len;
}
}
- }
- else { /* left */
- /* if there's a selection */
- if ((but->selend - but->selsta) > 0) {
- /* extend the selection based on the first direction taken */
- if(select) {
- if (!data->selextend) {
- data->selextend = EXTEND_LEFT;
- }
- if (data->selextend == EXTEND_LEFT) {
- but->selsta--;
- if (but->selsta < 0) but->selsta = 0;
- } else if (data->selextend == EXTEND_RIGHT) {
- but->selend--;
- /* if the selection start has gone past the end,
- * flip them so they're in sync again */
- if (but->selsta == but->selend) {
- but->pos = but->selsta;
- data->selextend = EXTEND_LEFT;
- }
+ else { /* left */
+ if(jump) {
+
+ /* left only: compensate for index/change in direction */
+ if(but->pos > 0) {
+ but->pos--;
}
- } else {
- but->pos = but->selend = but->selsta;
- data->selextend = 0;
- }
- } else {
- if(select) {
- /* make a selection, starting from the cursor position */
- but->selend = but->pos;
-
- but->pos--;
- if(but->pos<0) but->pos= 0;
-
- but->selsta = but->pos;
- } else if(jump) {
- /* jump betweenn special characters (/,\,_,-, etc.),
+
+ /* jump between special characters (/,\,_,-, etc.),
* look at function test_special_char() for complete
* list of special character, ctr -> */
while(but->pos > 0){
but->pos--;
- if(test_special_char(str[but->pos])) break;
+ if(!jump_all && test_special_char(str[but->pos])) break;
}
- } else {
+
+ /* left only: compensate for index/change in direction */
+ if((but->pos != 0) && ABS(pos_prev - but->pos) > 1) {
+ but->pos++;
+ }
+
+ }
+ else {
if(but->pos>0) but->pos--;
}
}
- }
-}
-
-static void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select)
-{
- char *str;
- str= data->str;
- if(direction) { /* right */
- if(select) {
- but->selsta = but->pos;
- but->selend = strlen(str);
- data->selextend = EXTEND_RIGHT;
- } else {
- but->selsta = but->selend = but->pos= strlen(str);
- }
- }
- else { /* left */
if(select) {
- but->selend = but->pos;
- but->selsta = 0;
- data->selextend = EXTEND_LEFT;
- } else {
- but->selsta = but->selend = but->pos= 0;
+ /* existing selection */
+ if (has_sel) {
+
+ if(data->selextend == 0) {
+ data->selextend= EXTEND_RIGHT;
+ }
+
+ if (direction) {
+ if (data->selextend == EXTEND_RIGHT) {
+ but->selend= but->pos;
+ }
+ else {
+ but->selsta= but->pos;
+ }
+ }
+ else {
+ if (data->selextend == EXTEND_LEFT) {
+ but->selsta= but->pos;
+ }
+ else {
+ but->selend= but->pos;
+ }
+ }
+
+ if (but->selend < but->selsta) {
+ SWAP(short, but->selsta, but->selend);
+ data->selextend= (data->selextend == EXTEND_RIGHT) ? EXTEND_LEFT : EXTEND_RIGHT;
+ }
+
+ } /* new selection */
+ else {
+ if (direction) {
+ data->selextend= EXTEND_RIGHT;
+ but->selend= but->pos;
+ but->selsta= pos_prev;
+ }
+ else {
+ data->selextend= EXTEND_LEFT;
+ but->selend= pos_prev;
+ but->selsta= but->pos;
+ }
+ }
}
}
}
@@ -1831,11 +1813,11 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
break;
case RIGHTARROWKEY:
- ui_textedit_move(but, data, 1, event->shift, event->ctrl);
+ ui_textedit_move(but, data, 1, event->shift, event->ctrl, FALSE);
retval= WM_UI_HANDLER_BREAK;
break;
case LEFTARROWKEY:
- ui_textedit_move(but, data, 0, event->shift, event->ctrl);
+ ui_textedit_move(but, data, 0, event->shift, event->ctrl, FALSE);
retval= WM_UI_HANDLER_BREAK;
break;
case DOWNARROWKEY:
@@ -1845,7 +1827,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
/* pass on purposedly */
case ENDKEY:
- ui_textedit_move_end(but, data, 1, event->shift);
+ ui_textedit_move(but, data, 1, event->shift, TRUE, TRUE);
retval= WM_UI_HANDLER_BREAK;
break;
case UPARROWKEY:
@@ -1855,7 +1837,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
}
/* pass on purposedly */
case HOMEKEY:
- ui_textedit_move_end(but, data, 0, event->shift);
+ ui_textedit_move(but, data, 0, event->shift, TRUE, TRUE);
retval= WM_UI_HANDLER_BREAK;
break;
case PADENTER:
@@ -4681,7 +4663,7 @@ static int ui_mouse_inside_region(ARegion *ar, int x, int y)
/* check if the mouse is in the region */
if(!BLI_in_rcti(&ar->winrct, x, y)) {
for(block=ar->uiblocks.first; block; block=block->next)
- block->auto_open= 0;
+ block->auto_open= FALSE;
return 0;
}
@@ -4868,8 +4850,8 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
if(data->used_mouse && !data->autoopentimer) {
int time;
- if(but->block->auto_open==2) time= 1; // test for toolbox
- else if((but->block->flag & UI_BLOCK_LOOP && but->type != BLOCK) || but->block->auto_open) time= 5*U.menuthreshold2;
+ if(but->block->auto_open==TRUE) time= 1; // test for toolbox
+ else if((but->block->flag & UI_BLOCK_LOOP && but->type != BLOCK) || but->block->auto_open==TRUE) time= 5*U.menuthreshold2;
else if(U.uiflag & USER_MENUOPENAUTO) time= 5*U.menuthreshold1;
else time= -1;
@@ -4967,9 +4949,9 @@ static void button_activate_init(bContext *C, ARegion *ar, uiBut *but, uiButtonA
/* we disable auto_open in the block after a threshold, because we still
* want to allow auto opening adjacent menus even if no button is activated
* in between going over to the other button, but only for a short while */
- if(type == BUTTON_ACTIVATE_OVER && but->block->auto_open)
+ if(type == BUTTON_ACTIVATE_OVER && but->block->auto_open==TRUE)
if(but->block->auto_open_last+BUTTON_AUTO_OPEN_THRESH < PIL_check_seconds_timer())
- but->block->auto_open= 0;
+ but->block->auto_open= FALSE;
if(type == BUTTON_ACTIVATE_OVER) {
data->used_mouse= 1;
@@ -5157,7 +5139,9 @@ void uiContextActivePropertyHandle(bContext *C)
* currently this is mainly so reset defaults works for the
* operator redo panel - campbell */
uiBlock *block= activebut->block;
- block->handle_func(C, block->handle_func_arg, 0);
+ if (block->handle_func) {
+ block->handle_func(C, block->handle_func_arg, 0);
+ }
}
}
diff --git a/source/blender/editors/interface/interface_intern.h b/source/blender/editors/interface/interface_intern.h
index 94eb180bd06..6fb7677da6e 100644
--- a/source/blender/editors/interface/interface_intern.h
+++ b/source/blender/editors/interface/interface_intern.h
@@ -136,19 +136,10 @@ typedef enum {
/* for scope resize zone */
#define SCOPE_RESIZE_PAD 9
-typedef struct {
- short xim, yim;
- unsigned int *rect;
- short xofs, yofs;
-} uiIconImage;
-
-
typedef struct uiLinkLine { /* only for draw/edit */
struct uiLinkLine *next, *prev;
-
+ struct uiBut *from, *to;
short flag, pad;
-
- struct uiBut *from, *to;
} uiLinkLine;
typedef struct {
@@ -164,10 +155,10 @@ typedef struct {
struct uiBut {
struct uiBut *next, *prev;
- short type, pointype, bit, bitnr, retval, strwidth, ofs, pos, selsta, selend;
- short alignnr;
int flag;
-
+ short type, pointype, bit, bitnr, retval, strwidth, ofs, pos, selsta, selend, alignnr;
+ short pad1;
+
char *str;
char strdata[UI_MAX_NAME_STR];
char drawstr[UI_MAX_DRAW_STR];
@@ -282,7 +273,7 @@ struct uiBlock {
float minx, miny, maxx, maxy;
float aspect;
- short alignnr;
+ int puphash; // popup menu hash for memory
uiButHandleFunc func;
void *func_arg1;
@@ -306,9 +297,12 @@ struct uiBlock {
void *drawextra_arg2;
int flag;
+ short alignnr;
+
char direction;
char dt; /* drawtype: UI_EMBOSS, UI_EMBOSSN ... etc, copied to buttons */
- short auto_open;
+ char auto_open;
+ char _pad[7];
double auto_open_last;
const char *lockstr;
@@ -326,15 +320,12 @@ struct uiBlock {
ListBase saferct; // uiSafetyRct list
uiPopupBlockHandle *handle; // handle
-
- int puphash; // popup menu hash for memory
void *evil_C; // XXX hack for dynamic operator enums
+ struct UnitSettings *unit; // unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time.
float _hsv[3]; // XXX, only access via ui_block_hsv_get()
char color_profile; // color profile for correcting linear colors for display
- struct UnitSettings *unit; // unit system, used a lot for numeric buttons so include here rather then fetching through the scene every time.
-
};
typedef struct uiSafetyRct {
@@ -400,9 +391,9 @@ struct uiPopupBlockHandle {
/* for operator popups */
struct wmOperatorType *optype;
- int opcontext;
ScrArea *ctx_area;
ARegion *ctx_region;
+ int opcontext;
/* return values */
int butretval;
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index ab07cb4bbf6..ba612fc8727 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -768,7 +768,7 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
if(properties) {
PointerRNA tptr;
- WM_operator_properties_create(&tptr, opname);
+ WM_operator_properties_create_ptr(&tptr, ot);
if(tptr.data) {
IDP_FreeProperty(tptr.data);
MEM_freeN(tptr.data);
@@ -2432,7 +2432,7 @@ static void ui_item_estimate(uiItem *item)
}
}
-static void ui_item_align(uiLayout *litem, int nr)
+static void ui_item_align(uiLayout *litem, short nr)
{
uiItem *item;
uiButtonItem *bitem;
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index c898ba983c7..622d50752fa 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -2308,7 +2308,6 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
uiStyle *style= UI_GetStyle();
uiPopupBlockHandle *handle;
uiPopupMenu *pup;
-
pup= MEM_callocN(sizeof(uiPopupMenu), "menu dummy");
pup->block= uiBeginBlock(C, NULL, "ui_button_menu_create", UI_EMBOSSP);
pup->layout= uiBlockLayout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, style);
@@ -2323,6 +2322,19 @@ uiPopupBlockHandle *ui_popup_menu_create(bContext *C, ARegion *butregion, uiBut
pup->popup= 1;
pup->block->flag |= UI_BLOCK_NO_FLIP;
}
+ /* some enums reversing is strange, currently we have no good way to
+ * reverse some enum's but not others, so reverse all so the first menu
+ * items are always close to the mouse cursor */
+#if 0
+ else {
+ /* if this is an rna button then we can assume its an enum
+ * flipping enums is generally not good since the order can be
+ * important [#28786] */
+ if(but->rnaprop && RNA_property_type(but->rnaprop) == PROP_ENUM) {
+ pup->block->flag |= UI_BLOCK_NO_FLIP;
+ }
+ }
+#endif
if(str) {
/* menu is created from a string */
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index ff6ef41bfb0..4dcdeab2169 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -2542,3 +2542,61 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
uiDefBut(block, LABEL, 0, report->message, UI_UNIT_X+10, 0, UI_UNIT_X+width, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
}
+/********************************* Keymap *************************************/
+
+static void keymap_item_modified(bContext *UNUSED(C), void *kmi_p, void *UNUSED(unused))
+{
+ wmKeyMapItem *kmi= (wmKeyMapItem*)kmi_p;
+ WM_keyconfig_update_tag(NULL, kmi);
+}
+
+static void template_keymap_item_properties(uiLayout *layout, const char *title, PointerRNA *ptr)
+{
+ uiLayout *flow;
+
+ uiItemS(layout);
+
+ if(title)
+ uiItemL(layout, title, ICON_NONE);
+
+ flow= uiLayoutColumnFlow(layout, 2, 0);
+
+ RNA_STRUCT_BEGIN(ptr, prop) {
+ int flag= RNA_property_flag(prop);
+
+ if(flag & PROP_HIDDEN)
+ continue;
+
+ /* recurse for nested properties */
+ if(RNA_property_type(prop) == PROP_POINTER) {
+ PointerRNA propptr= RNA_property_pointer_get(ptr, prop);
+ const char *name= RNA_property_ui_name(prop);
+
+ if(propptr.data && RNA_struct_is_a(propptr.type, &RNA_OperatorProperties)) {
+ template_keymap_item_properties(layout, name, &propptr);
+ continue;
+ }
+ }
+
+ /* add property */
+ uiItemR(flow, ptr, RNA_property_identifier(prop), 0, NULL, ICON_NONE);
+ }
+ RNA_STRUCT_END;
+}
+
+void uiTemplateKeymapItemProperties(uiLayout *layout, PointerRNA *ptr)
+{
+ PointerRNA propptr= RNA_pointer_get(ptr, "properties");
+
+ if(propptr.data) {
+ uiBut *but= uiLayoutGetBlock(layout)->buttons.last;
+
+ template_keymap_item_properties(layout, NULL, &propptr);
+
+ /* attach callbacks to compensate for missing properties update,
+ we don't know which keymap (item) is being modified there */
+ for(; but; but=but->next)
+ uiButSetFunc(but, keymap_item_modified, ptr->data, NULL);
+ }
+}
+
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 152fcae4d57..6eeaaf838e0 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -175,12 +175,18 @@ float ED_object_new_primitive_matrix(bContext *C, Object *obedit, float *loc, fl
/********************* Add Object Operator ********************/
+void view_align_update(struct Main *UNUSED(main), struct Scene *UNUSED(scene), struct PointerRNA *ptr)
+{
+ RNA_struct_idprops_unset(ptr, "rotation");
+}
+
void ED_object_add_generic_props(wmOperatorType *ot, int do_editmode)
{
PropertyRNA *prop;
/* note: this property gets hidden for add-camera operator */
- RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view");
+ prop= RNA_def_boolean(ot->srna, "view_align", 0, "Align to View", "Align the new object to the view");
+ RNA_def_property_update_runtime(prop, view_align_update);
if(do_editmode) {
prop= RNA_def_boolean(ot->srna, "enter_editmode", 0, "Enter Editmode", "Enter editmode when adding this object");
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 2c068bab86d..7eaa1e1de38 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1224,7 +1224,7 @@ static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
cu1->vfontbi= cu->vfontbi;
id_us_plus((ID *)cu1->vfontbi);
- BKE_text_to_curve(scene, base->object, 0); /* needed? */
+ BKE_text_to_curve(bmain, scene, base->object, 0); /* needed? */
BLI_strncpy(cu1->family, cu->family, sizeof(cu1->family));
@@ -1371,7 +1371,7 @@ static void UNUSED_FUNCTION(copy_attr_menu)(Main *bmain, Scene *scene, View3D *v
strcat (str, "|Object Constraints%x22");
strcat (str, "|NLA Strips%x26");
-// XXX if (OB_SUPPORT_MATERIAL(ob)) {
+// XXX if (OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
// strcat(str, "|Texture Space%x17");
// }
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 77a1ee1047e..16b7686f269 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1243,9 +1243,11 @@ static int allow_make_links_data(int ev, Object *ob, Object *obt)
return 1;
break;
case MAKE_LINKS_MATERIALS:
- if (ELEM5(ob->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_MBALL) &&
- ELEM5(obt->type, OB_MESH, OB_CURVE, OB_FONT, OB_SURF, OB_MBALL))
+ if (OB_TYPE_SUPPORT_MATERIAL(ob->type) &&
+ OB_TYPE_SUPPORT_MATERIAL(obt->type))
+ {
return 1;
+ }
break;
case MAKE_LINKS_ANIMDATA:
case MAKE_LINKS_DUPLIGROUP:
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index 4bee89ef3ba..72a5a944809 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -894,7 +894,8 @@ static float distance(float* a, float *b, int length)
compute the amount of vertical distance relative to the plane and store it in dists,
then get the horizontal and vertical change and store them in changes
*/
-static void getVerticalAndHorizontalChange(float *norm, float d, float *coord, float *start, float distToStart, float *end, float (*changes)[2], float *dists, int index)
+static void getVerticalAndHorizontalChange(float *norm, float d, float *coord, float *start, float distToStart,
+ float *end, float (*changes)[2], float *dists, int index)
{
// A=Q-((Q-P).N)N
// D = (a*x0 + b*y0 +c*z0 +d)
@@ -932,15 +933,17 @@ static DerivedMesh* dm_deform_recalc(Scene *scene, Object *ob)
return mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
}
-/* by changing nonzero weights, try to move a vertex in me->mverts with index 'index' to distToBe distance away from the provided plane
-strength can change distToBe so that it moves towards distToBe by that percentage
-cp changes how much the weights are adjusted to check the distance
+/* by changing nonzero weights, try to move a vertex in me->mverts with index 'index' to
+distToBe distance away from the provided plane strength can change distToBe so that it moves
+towards distToBe by that percentage cp changes how much the weights are adjusted
+to check the distance
index is the index of the vertex being moved
norm and d are the plane's properties for the equation: ax + by + cz + d = 0
coord is a point on the plane
*/
-static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, int index, float norm[3], float coord[3], float d, float distToBe, float strength, float cp)
+static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, int index, float norm[3],
+ float coord[3], float d, float distToBe, float strength, float cp)
{
DerivedMesh *dm;
MDeformWeight *dw;
@@ -1096,7 +1099,8 @@ static void moveCloserToDistanceFromPlane(Scene *scene, Object *ob, Mesh *me, in
dm_deform_clear(dm, ob); dm = NULL;
}
}
- }while(wasChange && (distToStart-distToBe)/fabs(distToStart-distToBe) == (dists[bestIndex]-distToBe)/fabs(dists[bestIndex]-distToBe));
+ } while(wasChange && (distToStart-distToBe)/fabs(distToStart-distToBe) ==
+ (dists[bestIndex]-distToBe)/fabs(dists[bestIndex]-distToBe));
MEM_freeN(upDown);
MEM_freeN(changes);
MEM_freeN(dists);
@@ -2331,7 +2335,8 @@ void OBJECT_OT_vertex_group_normalize_all(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "lock_active", TRUE, "Lock Active", "Keep the values of the active group while normalizing others");
+ RNA_def_boolean(ot->srna, "lock_active", TRUE, "Lock Active",
+ "Keep the values of the active group while normalizing others");
}
static int vertex_group_fix_exec(bContext *C, wmOperator *op)
@@ -2369,7 +2374,8 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
/* identifiers */
ot->name= "Fix Vertex Group Deform";
ot->idname= "OBJECT_OT_vertex_group_fix";
- ot->description= "Modify the position of selected vertices by changing only their respective groups' weights (this tool may be slow for many vertices)";
+ ot->description= "Modify the position of selected vertices by changing only their respective "
+ "groups' weights (this tool may be slow for many vertices)";
/* api callbacks */
ot->poll= vertex_group_poll;
@@ -2378,8 +2384,10 @@ void OBJECT_OT_vertex_group_fix(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
RNA_def_float(ot->srna, "dist", 0.0f, -FLT_MAX, FLT_MAX, "Distance", "The distance to move to", -10.0f, 10.0f);
- RNA_def_float(ot->srna, "strength", 1.f, -2.0f, FLT_MAX, "Strength", "The distance moved can be changed by this multiplier", -2.0f, 2.0f);
- RNA_def_float(ot->srna, "accuracy", 1.0f, 0.05f, FLT_MAX, "Change Sensitivity", "Changes the amount weights are altered with each iteration: lower values are slower", 0.05f, 1.f);
+ RNA_def_float(ot->srna, "strength", 1.f, -2.0f, FLT_MAX, "Strength",
+ "The distance moved can be changed by this multiplier", -2.0f, 2.0f);
+ RNA_def_float(ot->srna, "accuracy", 1.0f, 0.05f, FLT_MAX, "Change Sensitivity",
+ "Change the amount weights are altered with each iteration: lower values are slower", 0.05f, 1.f);
}
@@ -2437,8 +2445,10 @@ void OBJECT_OT_vertex_group_invert(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_boolean(ot->srna, "auto_assign", TRUE, "Add Weights", "Add verts from groups that have zero weight before inverting");
- RNA_def_boolean(ot->srna, "auto_remove", TRUE, "Remove Weights", "Remove verts from groups that have zero weight after inverting");
+ RNA_def_boolean(ot->srna, "auto_assign", TRUE, "Add Weights",
+ "Add verts from groups that have zero weight before inverting");
+ RNA_def_boolean(ot->srna, "auto_remove", TRUE, "Remove Weights",
+ "Remove verts from groups that have zero weight after inverting");
}
@@ -2527,7 +2537,8 @@ void OBJECT_OT_vertex_group_mirror(wmOperatorType *ot)
/* identifiers */
ot->name= "Mirror Vertex Group";
ot->idname= "OBJECT_OT_vertex_group_mirror";
- ot->description= "Mirror all vertex groups, flip weights and/or names, editing only selected vertices, flipping when both sides are selected otherwise copy from unselected";
+ ot->description= "Mirror all vertex groups, flip weights and/or names, editing only selected vertices, "
+ "flipping when both sides are selected otherwise copy from unselected";
/* api callbacks */
ot->poll= vertex_group_poll_edit;
@@ -2599,7 +2610,9 @@ static int vertex_group_copy_to_selected_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
if((change == 0 && fail == 0) || fail) {
- BKE_reportf(op->reports, RPT_ERROR, "Copy to VGroups to Selected warning done %d, failed %d, object data must have matching indicies", change, fail);
+ BKE_reportf(op->reports, RPT_ERROR,
+ "Copy to VGroups to Selected warning done %d, failed %d, object data must have matching indicies",
+ change, fail);
}
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index b937f9a4104..70709a22d3d 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -344,7 +344,7 @@ static Scene *preview_prepare_scene(Scene *scene, ID *id, int id_type, ShaderPre
/* copy over object color, in case material uses it */
copy_v4_v4(base->object->col, sp->col);
- if(ELEM4(base->object->type, OB_MESH, OB_CURVE, OB_SURF, OB_MBALL)) {
+ if(OB_TYPE_SUPPORT_MATERIAL(base->object->type)) {
/* don't use assign_material, it changed mat->id.us, which shows in the UI */
Material ***matar= give_matarar(base->object);
int actcol= MAX2(base->object->actcol > 0, 1) - 1;
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 041cb9091d9..28f486117b7 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -831,6 +831,9 @@ static void region_rect_recursive(ScrArea *sa, ARegion *ar, rcti *remainder, int
prefsizex= ar->sizex?ar->sizex:ar->type->prefsizex;
if(ar->regiontype==RGN_TYPE_HEADER)
prefsizey= ar->type->prefsizey;
+ else if(ar->regiontype==RGN_TYPE_UI && sa->spacetype == SPACE_FILE) {
+ prefsizey= UI_UNIT_Y * 2 + (UI_UNIT_Y/2);
+ }
else
prefsizey= ar->sizey?ar->sizey:ar->type->prefsizey;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 45724f0f32f..556876c4d8d 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -356,9 +356,13 @@ typedef struct UndoImageTile {
struct UndoImageTile *next, *prev;
char idname[MAX_ID_NAME]; /* name instead of pointer*/
+ char ibufname[IB_FILENAME_SIZE];
void *rect;
int x, y;
+
+ short source;
+ char gen_type;
} UndoImageTile;
static ImagePaintPartialRedraw imapaintpartial = {0, 0, 0, 0, 0};
@@ -389,8 +393,9 @@ static void *image_undo_push_tile(Image *ima, ImBuf *ibuf, ImBuf **tmpibuf, int
int allocsize;
for(tile=lb->first; tile; tile=tile->next)
- if(tile->x == x_tile && tile->y == y_tile && strcmp(tile->idname, ima->id.name)==0)
- return tile->rect;
+ if(tile->x == x_tile && tile->y == y_tile && ima->gen_type == tile->gen_type && ima->source == tile->source)
+ if(strcmp(tile->idname, ima->id.name)==0 && strcmp(tile->ibufname, ibuf->name)==0)
+ return tile->rect;
if (*tmpibuf==NULL)
*tmpibuf = IMB_allocImBuf(IMAPAINT_TILE_SIZE, IMAPAINT_TILE_SIZE, 32, IB_rectfloat|IB_rect);
@@ -404,6 +409,11 @@ static void *image_undo_push_tile(Image *ima, ImBuf *ibuf, ImBuf **tmpibuf, int
allocsize *= (ibuf->rect_float)? sizeof(float): sizeof(char);
tile->rect= MEM_mapallocN(allocsize, "UndeImageTile.rect");
+ strcpy(tile->ibufname, ibuf->name);
+
+ tile->gen_type= ima->gen_type;
+ tile->source= ima->source;
+
undo_copy_tile(tile, *tmpibuf, ibuf, 0);
undo_paint_push_count_alloc(UNDO_PAINT_IMAGE, allocsize);
@@ -424,18 +434,30 @@ static void image_undo_restore(bContext *C, ListBase *lb)
for(tile=lb->first; tile; tile=tile->next) {
/* find image based on name, pointer becomes invalid with global undo */
- if(ima && strcmp(tile->idname, ima->id.name)==0);
+ if(ima && strcmp(tile->idname, ima->id.name)==0) {
+ /* ima is valid */
+ }
else {
- for(ima=bmain->image.first; ima; ima=ima->id.next)
- if(strcmp(tile->idname, ima->id.name)==0)
- break;
+ ima= BLI_findstring(&bmain->image, tile->idname, offsetof(ID, name));
}
ibuf= BKE_image_get_ibuf(ima, NULL);
+ if(ima && ibuf && strcmp(tile->ibufname, ibuf->name)!=0) {
+ /* current ImBuf filename was changed, probably current frame
+ was changed when paiting on image sequence, rather than storing
+ full image user (which isn't so obvious, btw) try to find ImBuf with
+ matched file name in list of already loaded images */
+
+ ibuf= BLI_findstring(&ima->ibufs, tile->ibufname, offsetof(ImBuf, name));
+ }
+
if (!ima || !ibuf || !(ibuf->rect || ibuf->rect_float))
continue;
+ if (ima->gen_type != tile->gen_type || ima->source != tile->source)
+ continue;
+
undo_copy_tile(tile, tmpibuf, ibuf, 1);
GPU_free_image(ima); /* force OpenGL reload */
@@ -2668,9 +2690,7 @@ static void project_bucket_init(const ProjPaintState *ps, const int thread_index
tf = ps->dm_mtface+face_index;
if (tpage_last != tf->tpage) {
tpage_last = tf->tpage;
-
- image_index = -1; /* sanity check */
-
+
for (image_index=0; image_index < ps->image_tot; image_index++) {
if (ps->projImages[image_index].ima == tpage_last) {
ibuf = ps->projImages[image_index].ibuf;
@@ -4902,7 +4922,6 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
time= PIL_check_seconds_timer();
tablet= 0;
- pressure= 0;
pop->s.blend= pop->s.brush->blend;
if(event->custom == EVT_DATA_TABLET) {
@@ -4913,8 +4932,9 @@ static void paint_apply_event(bContext *C, wmOperator *op, wmEvent *event)
if(wmtab->Active == EVT_TABLET_ERASER)
pop->s.blend= IMB_BLEND_ERASE_ALPHA;
}
- else /* otherwise airbrush becomes 1.0 pressure instantly */
+ else { /* otherwise airbrush becomes 1.0 pressure instantly */
pressure= pop->prev_pressure ? pop->prev_pressure : 1.0f;
+ }
if(pop->first) {
pop->prevmouse[0]= event->mval[0];
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 1c453e3dd1f..ecab180822b 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -350,7 +350,7 @@ static void make_vertexcol(Object *ob) /* single ob */
}
/* mirror_vgroup is set to -1 when invalid */
-static void wpaint_mirror_vgroup_ensure(Object *ob, int *vgroup_mirror)
+static int wpaint_mirror_vgroup_ensure(Object *ob)
{
bDeformGroup *defgroup= BLI_findlink(&ob->defbase, ob->actdef - 1);
@@ -377,13 +377,12 @@ static void wpaint_mirror_vgroup_ensure(Object *ob, int *vgroup_mirror)
/* curdef should never be NULL unless this is
* a lamp and ED_vgroup_add_name fails */
if(curdef) {
- *vgroup_mirror= mirrdef;
- return;
+ return mirrdef;
}
}
}
- *vgroup_mirror= -1;
+ return -1;
}
static void copy_vpaint_prev(VPaint *vp, unsigned int *lcol, int tot)
@@ -498,9 +497,9 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
vgroup= ob->actdef-1;
- /* if mirror painting, find the other group */
+ /* if mirror painting, find the other group */
if(me->editflag & ME_EDIT_MIRROR_X) {
- wpaint_mirror_vgroup_ensure(ob, &vgroup_mirror);
+ vgroup_mirror= wpaint_mirror_vgroup_ensure(ob);
}
copy_wpaint_prev(wp, me->dvert, me->totvert);
@@ -1194,31 +1193,33 @@ static void do_weight_paint_auto_normalize(MDeformVert *dvert,
}
/* the active group should be involved in auto normalize */
-static void do_weight_paint_auto_normalize_all_groups(MDeformVert *dvert, char *map, char do_auto_normalize)
+static void do_weight_paint_auto_normalize_all_groups(MDeformVert *dvert, const char *vgroup_validmap, char do_auto_normalize)
{
-// MDeformWeight *dw = dvert->dw;
- float sum=0.0f, fac=0.0f;
- int i, tot=0;
-
- if (do_auto_normalize == FALSE)
+ if (do_auto_normalize == FALSE) {
return;
+ }
+ else {
+ float sum= 0.0f, fac;
+ unsigned int i, tot=0;
+ MDeformWeight *dw;
+
+ for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ if (vgroup_validmap[dw->def_nr]) {
+ tot++;
+ sum += dw->weight;
+ }
+ }
- for (i=0; i<dvert->totweight; i++) {
- if (map[dvert->dw[i].def_nr]) {
- tot += 1;
- sum += dvert->dw[i].weight;
+ if ((tot == 0) || (sum == 1.0f) || (sum == 0.0f)) {
+ return;
}
- }
-
- if (!tot || sum == 1.0f)
- return;
- fac = sum;
- fac = fac==0.0f ? 1.0f : 1.0f / fac;
+ fac= 1.0f / sum;
- for (i=0; i<dvert->totweight; i++) {
- if (map[dvert->dw[i].def_nr]) {
- dvert->dw[i].weight *= fac;
+ for (i= dvert->totweight, dw= dvert->dw; i != 0; i--, dw++) {
+ if (vgroup_validmap[dw->def_nr]) {
+ dw->weight *= fac;
+ }
}
}
}
@@ -1660,43 +1661,49 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
)
{
Mesh *me= ob->data;
+ MDeformVert *dv= &me->dvert[index];
MDeformWeight *dw, *uw;
int vgroup= ob->actdef-1;
if(wp->flag & VP_ONLYVGROUP) {
- dw= defvert_find_index(&me->dvert[index], vgroup);
+ dw= defvert_find_index(dv, vgroup);
uw= defvert_find_index(wp->wpaint_prev+index, vgroup);
}
else {
- dw= defvert_verify_index(&me->dvert[index], vgroup);
+ dw= defvert_verify_index(dv, vgroup);
uw= defvert_verify_index(wp->wpaint_prev+index, vgroup);
}
- if(dw==NULL || uw==NULL)
+
+ if(dw==NULL || uw==NULL) {
return;
+ }
/* TODO: De-duplicate the simple weight paint - jason */
/* ... or not, since its <10 SLOC - campbell */
/* If there are no locks or multipaint,
* then there is no need to run the more complicated checks */
- if( (wpi->do_multipaint == FALSE || wpi->defbase_tot_sel <= 1) &&
- (wpi->lock_flags == NULL || has_locked_group(&me->dvert[index], wpi->lock_flags) == FALSE))
+ if( (wpi->do_multipaint == FALSE || wpi->defbase_tot_sel <= 1) &&
+ (wpi->lock_flags == NULL || has_locked_group(dv, wpi->lock_flags) == FALSE))
{
wpaint_blend(wp, dw, uw, alpha, paintweight, wpi->do_flip, FALSE);
- do_weight_paint_auto_normalize_all_groups(&me->dvert[index], wpi->vgroup_validmap, wpi->do_auto_normalize);
if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */
- int j= mesh_get_x_mirror_vert(ob, index);
- if(j>=0) {
+ int index_mirr= mesh_get_x_mirror_vert(ob, index);
+ if(index_mirr != -1) {
+ MDeformVert *dv_mirr= &me->dvert[index_mirr];
/* copy, not paint again */
- uw= defvert_verify_index(me->dvert+j, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
-
+ uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
uw->weight= dw->weight;
-
- do_weight_paint_auto_normalize_all_groups(me->dvert+j, wpi->vgroup_validmap, wpi->do_auto_normalize);
}
}
+
+ /* important to normalize after mirror, otherwise mirror gets wight
+ * which has already been scaled down in relation to other weights,
+ * then scales a second time [#26193]. Tricky multi-paint code doesn't
+ * suffer from this problem - campbell */
+ do_weight_paint_auto_normalize_all_groups(dv, wpi->vgroup_validmap, wpi->do_auto_normalize);
}
else {
/* use locks and/or multipaint */
@@ -1707,7 +1714,7 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
float oldChange = 0;
int i;
MDeformWeight *tdw = NULL, *tuw;
- MDeformVert dv= {NULL};
+ MDeformVert dv_copy= {NULL};
oldw = dw->weight;
wpaint_blend(wp, dw, uw, alpha, paintweight, wpi->do_flip, wpi->do_multipaint && wpi->defbase_tot_sel >1);
@@ -1716,17 +1723,17 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
/* setup multi-paint */
if(wpi->defbase_tot_sel > 1 && wpi->do_multipaint) {
- dv.dw= MEM_dupallocN(me->dvert[index].dw);
- dv.flag = me->dvert[index].flag;
- dv.totweight = me->dvert[index].totweight;
+ dv_copy.dw= MEM_dupallocN(dv->dw);
+ dv_copy.flag = dv->flag;
+ dv_copy.totweight = dv->totweight;
tdw = dw;
tuw = uw;
change = get_mp_change(wp->wpaint_prev+index, wpi->defbase_sel, neww - oldw);
if(change) {
if(!tdw->weight) {
- i = get_first_selected_nonzero_weight(&me->dvert[index], wpi->defbase_sel);
+ i = get_first_selected_nonzero_weight(dv, wpi->defbase_sel);
if(i>=0) {
- tdw = &(me->dvert[index].dw[i]);
+ tdw = &(dv->dw[i]);
tuw = defvert_verify_index(wp->wpaint_prev+index, tdw->def_nr);
}
else {
@@ -1740,7 +1747,7 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
if( testw > tuw->weight ) {
if(change > oldChange) {
/* reset the weights and use the new change */
- reset_to_prev(wp->wpaint_prev+index, &me->dvert[index]);
+ reset_to_prev(wp->wpaint_prev+index, dv);
}
else {
/* the old change was more significant, so set
@@ -1750,7 +1757,7 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
}
else {
if(change < oldChange) {
- reset_to_prev(wp->wpaint_prev+index, &me->dvert[index]);
+ reset_to_prev(wp->wpaint_prev+index, dv);
}
else {
change = 0;
@@ -1765,25 +1772,24 @@ static void do_weight_paint_vertex( /* vars which remain the same for every vert
}
if(apply_mp_locks_normalize(me, wpi, index, dw, tdw, change, oldChange, oldw, neww)) {
- reset_to_prev(&dv, &me->dvert[index]);
+ reset_to_prev(&dv_copy, dv);
change = 0;
oldChange = 0;
}
- if(dv.dw) {
- MEM_freeN(dv.dw);
+ if(dv_copy.dw) {
+ MEM_freeN(dv_copy.dw);
}
- /* dvert may have been altered greatly */
- dw = defvert_find_index(&me->dvert[index], vgroup);
+ /* dv may have been altered greatly */
+ dw = defvert_find_index(dv, vgroup);
if(me->editflag & ME_EDIT_MIRROR_X) { /* x mirror painting */
- int j= mesh_get_x_mirror_vert(ob, index);
- if(j>=0) {
+ int index_mirr= mesh_get_x_mirror_vert(ob, index);
+ if(index_mirr != -1) {
+ MDeformVert *dv_mirr= &me->dvert[index_mirr];
/* copy, not paint again */
- uw= defvert_verify_index(me->dvert+j, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
-
+ uw= defvert_verify_index(dv_mirr, (wpi->vgroup_mirror != -1) ? wpi->vgroup_mirror : vgroup);
//uw->weight= dw->weight;
-
- apply_mp_locks_normalize(me, wpi, j, uw, tdw, change, oldChange, oldw, neww);
+ apply_mp_locks_normalize(me, wpi, index_mirr, uw, tdw, change, oldChange, oldw, neww);
}
}
}
@@ -1879,7 +1885,6 @@ struct WPaintData {
float wpimat[3][3];
/*variables for auto normalize*/
- int auto_normalize;
char *vgroup_validmap; /*stores if vgroups tie to deforming bones or not*/
char *lock_flags;
int defbase_tot;
@@ -1890,26 +1895,26 @@ static char *wpaint_make_validmap(Object *ob)
bDeformGroup *dg;
ModifierData *md;
char *vgroup_validmap;
- GHash *gh = BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "wpaint_make_validmap gh");
- int i = 0, step1=1;
+ GHash *gh;
+ int i, step1=1;
- /*add all names to a hash table*/
- for (dg=ob->defbase.first, i=0; dg; dg=dg->next, i++) {
- BLI_ghash_insert(gh, dg->name, NULL);
+ if(ob->defbase.first == NULL) {
+ return NULL;
}
- if (!i)
- return NULL;
+ gh= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "wpaint_make_validmap gh");
- vgroup_validmap= MEM_callocN(i, "wpaint valid map");
+ /*add all names to a hash table*/
+ for (dg=ob->defbase.first; dg; dg=dg->next) {
+ BLI_ghash_insert(gh, dg->name, NULL);
+ }
/*now loop through the armature modifiers and identify deform bones*/
for (md = ob->modifiers.first; md; md= !md->next && step1 ? (step1=0), modifiers_getVirtualModifierList(ob) : md->next) {
if (!(md->mode & (eModifierMode_Realtime|eModifierMode_Virtual)))
continue;
- if (md->type == eModifierType_Armature)
- {
+ if (md->type == eModifierType_Armature) {
ArmatureModifierData *amd= (ArmatureModifierData*) md;
if(amd->object && amd->object->pose) {
@@ -1928,12 +1933,12 @@ static char *wpaint_make_validmap(Object *ob)
}
}
}
-
+
+ vgroup_validmap= MEM_mallocN(BLI_ghash_size(gh), "wpaint valid map");
+
/*add all names to a hash table*/
for (dg=ob->defbase.first, i=0; dg; dg=dg->next, i++) {
- if (BLI_ghash_lookup(gh, dg->name) != NULL) {
- vgroup_validmap[i] = TRUE;
- }
+ vgroup_validmap[i]= (BLI_ghash_lookup(gh, dg->name) != NULL);
}
BLI_ghash_free(gh, NULL, NULL);
@@ -1978,21 +1983,12 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
/*set up auto-normalize, and generate map for detecting which
vgroups affect deform bones*/
- wpd->auto_normalize = ts->auto_normalize;
wpd->defbase_tot = BLI_countlist(&ob->defbase);
wpd->lock_flags = gen_lock_flags(ob, wpd->defbase_tot);
- if (wpd->auto_normalize || ts->multipaint || wpd->lock_flags)
+ if (ts->auto_normalize || ts->multipaint || wpd->lock_flags) {
wpd->vgroup_validmap = wpaint_make_validmap(ob);
-
- // if(qual & LR_CTRLKEY) {
- // sample_wpaint(scene, ar, v3d, 0);
- // return;
- // }
- // if(qual & LR_SHIFTKEY) {
- // sample_wpaint(scene, ar, v3d, 1);
- // return;
- // }
-
+ }
+
/* ALLOCATIONS! no return after this line */
/* painting on subsurfs should give correct points too, this returns me->totvert amount */
wpd->vertexcosnos= mesh_get_mapped_verts_nors(scene, ob);
@@ -2020,9 +2016,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
if(ob->defbase.first==NULL) {
ED_vgroup_add(ob);
}
-
- // if(ob->lay & v3d->lay); else error("Active object is not in this layer");
-
+
/* imat for normals */
mul_m4_m4m4(mat, ob->obmat, wpd->vc.rv3d->viewmat);
invert_m4_m4(imat, mat);
@@ -2030,7 +2024,7 @@ static int wpaint_stroke_test_start(bContext *C, wmOperator *op, wmEvent *UNUSED
/* if mirror painting, find the other group */
if(me->editflag & ME_EDIT_MIRROR_X) {
- wpaint_mirror_vgroup_ensure(ob, &wpd->vgroup_mirror);
+ wpd->vgroup_mirror= wpaint_mirror_vgroup_ensure(ob);
}
return 1;
@@ -2093,7 +2087,7 @@ static void wpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P
wpi.vgroup_validmap= wpd->vgroup_validmap;
wpi.do_flip= RNA_boolean_get(itemptr, "pen_flip");
wpi.do_multipaint= (ts->multipaint != 0);
- wpi.do_auto_normalize= (ts->auto_normalize != 0);
+ wpi.do_auto_normalize= ((ts->auto_normalize != 0) && (wpi.vgroup_validmap != NULL));
/* *** done setting up WeightPaintInfo *** */
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 5b72e87f95a..d03c2b19300 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -519,6 +519,7 @@ static int sound_poll(bContext *C)
static int pack_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Editing* ed = CTX_data_scene(C)->ed;
bSound* sound;
@@ -530,7 +531,7 @@ static int pack_exec(bContext *C, wmOperator *op)
if(!sound || sound->packedfile)
return OPERATOR_CANCELLED;
- sound->packedfile= newPackedFile(op->reports, sound->name);
+ sound->packedfile= newPackedFile(op->reports, sound->name, ID_BLEND_PATH(bmain, &sound->id));
sound_load(CTX_data_main(C), sound);
return OPERATOR_FINISHED;
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index fdf9209c813..a05053a2d9d 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -459,6 +459,8 @@ static int actkeys_copy_exec(bContext *C, wmOperator *op)
/* copy keyframes */
if (ac.datatype == ANIMCONT_GPENCIL) {
// FIXME...
+ BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for Grease Pencil mode");
+ return OPERATOR_CANCELLED;
}
else {
if (copy_action_keys(&ac)) {
@@ -497,13 +499,15 @@ static int actkeys_paste_exec(bContext *C, wmOperator *op)
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
- if(ac.reports==NULL) {
+ if (ac.reports==NULL) {
ac.reports= op->reports;
}
/* paste keyframes */
if (ac.datatype == ANIMCONT_GPENCIL) {
// FIXME...
+ BKE_report(op->reports, RPT_ERROR, "Keyframe pasting is not available for Grease Pencil mode");
+ return OPERATOR_CANCELLED;
}
else {
if (paste_action_keys(&ac, offset_mode, merge_mode)) {
@@ -680,12 +684,13 @@ static int actkeys_duplicate_exec(bContext *C, wmOperator *UNUSED(op))
duplicate_action_keys(&ac);
/* validate keyframes after editing */
- ANIM_editkeyframes_refresh(&ac);
+ if (ac.datatype != ANIMCONT_GPENCIL)
+ ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
- return OPERATOR_FINISHED; // xxx - start transform
+ return OPERATOR_FINISHED;
}
static int actkeys_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
@@ -709,9 +714,6 @@ void ACTION_OT_duplicate (wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-
- /* to give to transform */
- RNA_def_enum(ot->srna, "mode", transform_mode_types, TFM_TRANSLATION, "Mode", "");
}
/* ******************** Delete Keyframes Operator ************************* */
@@ -764,7 +766,8 @@ static int actkeys_delete_exec(bContext *C, wmOperator *UNUSED(op))
delete_action_keys(&ac);
/* validate keyframes after editing */
- ANIM_editkeyframes_refresh(&ac);
+ if (ac.datatype != ANIMCONT_GPENCIL)
+ ANIM_editkeyframes_refresh(&ac);
/* set notifier that keyframes have changed */
WM_event_add_notifier(C, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
@@ -1381,6 +1384,10 @@ static int actkeys_snap_exec(bContext *C, wmOperator *op)
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
+ // XXX...
+ if (ac.datatype == ANIMCONT_GPENCIL)
+ return OPERATOR_PASS_THROUGH;
+
/* get snapping mode */
mode= RNA_enum_get(op->ptr, "type");
@@ -1491,6 +1498,10 @@ static int actkeys_mirror_exec(bContext *C, wmOperator *op)
if (ANIM_animdata_get_context(C, &ac) == 0)
return OPERATOR_CANCELLED;
+ // XXX...
+ if (ac.datatype == ANIMCONT_GPENCIL)
+ return OPERATOR_PASS_THROUGH;
+
/* get mirroring mode */
mode= RNA_enum_get(op->ptr, "type");
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 9d2ac3fd8e2..4a2860335fe 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -234,7 +234,7 @@ static int buttons_context_path_material(ButsContextPath *path, int for_texture)
else if(buttons_context_path_object(path)) {
ob= path->ptr[path->len-1].data;
- if(ob && ob->type && (ob->type<OB_LAMP)) {
+ if(ob && OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
ma= give_current_material(ob, ob->actcol);
RNA_id_pointer_create(&ma->id, &path->ptr[path->len]);
path->len++;
@@ -721,8 +721,12 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r
if(ptr) {
Object *ob= ptr->data;
- if(ob && ob->type && (ob->type<OB_LAMP) && ob->totcol)
- CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, ob->mat+ob->actcol-1);
+ if(ob && OB_TYPE_SUPPORT_MATERIAL(ob->type) && ob->totcol) {
+ /* a valid actcol isn't ensured [#27526] */
+ int matnr= ob->actcol-1;
+ if(matnr < 0) matnr= 0;
+ CTX_data_pointer_set(result, &ob->id, &RNA_MaterialSlot, &ob->mat[matnr]);
+ }
}
return 1;
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c
index f7abb01546f..611bf79603e 100644
--- a/source/blender/editors/space_file/file_draw.c
+++ b/source/blender/editors/space_file/file_draw.c
@@ -111,8 +111,8 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
{
/* Button layout. */
const int max_x = ar->winx - 10;
- const int line1_y = IMASEL_BUTTONS_HEIGHT/2 + IMASEL_BUTTONS_MARGIN*2;
- const int line2_y = IMASEL_BUTTONS_MARGIN;
+ const int line1_y = ar->winy - (IMASEL_BUTTONS_HEIGHT/2 + IMASEL_BUTTONS_MARGIN);
+ const int line2_y = line1_y - (IMASEL_BUTTONS_HEIGHT/2 + IMASEL_BUTTONS_MARGIN);
const int input_minw = 20;
const int btn_h = UI_UNIT_Y;
const int btn_fn_w = UI_UNIT_X;
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index fd52c3c4199..0955d264ca8 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1176,7 +1176,9 @@ int file_filename_exec(bContext *C, wmOperator *UNUSED(unused))
* until this is properly supported just disable it. */
static int file_directory_poll(bContext *C)
{
- return ED_operator_file_active(C) && filelist_lib(CTX_wm_space_file(C)->files) == NULL;
+ /* sfile->files can be NULL on file load */
+ SpaceFile *sfile= CTX_wm_space_file(C);
+ return ED_operator_file_active(C) && (sfile->files==NULL || filelist_lib(sfile->files)==NULL);
}
void FILE_OT_directory(struct wmOperatorType *ot)
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c
index 1e113abfcd2..e3571886cf4 100644
--- a/source/blender/editors/space_file/filesel.c
+++ b/source/blender/editors/space_file/filesel.c
@@ -246,6 +246,11 @@ short ED_fileselect_set_params(SpaceFile *sfile)
sfile->folders_prev = folderlist_new();
folderlist_pushdir(sfile->folders_prev, sfile->params->dir);
+ /* switching thumbnails needs to recalc layout [#28809] */
+ if (sfile->layout) {
+ sfile->layout->dirty= TRUE;
+ }
+
return 1;
}
@@ -466,12 +471,13 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
int maxlen = 0;
int numfiles;
int textheight;
+
if (sfile->layout == NULL) {
sfile->layout = MEM_callocN(sizeof(struct FileLayout), "file_layout");
- sfile->layout->dirty = 1;
- }
-
- if (!sfile->layout->dirty) return;
+ sfile->layout->dirty = TRUE;
+ } else if (sfile->layout->dirty == FALSE) {
+ return;
+ }
numfiles = filelist_numfiles(sfile->files);
textheight = (int)file_font_pointsize();
@@ -538,7 +544,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
layout->width = sfile->layout->columns * (layout->tile_w + 2*layout->tile_border_x) + layout->tile_border_x*2;
layout->flag = FILE_LAYOUT_HOR;
}
- layout->dirty= 0;
+ layout->dirty= FALSE;
}
FileLayout* ED_fileselect_get_layout(struct SpaceFile *sfile, struct ARegion *ar)
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 18270bfaa26..7a70ed9c0a0 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -154,7 +154,7 @@ static void file_init(struct wmWindowManager *UNUSED(wm), ScrArea *sa)
SpaceFile *sfile= (SpaceFile*)sa->spacedata.first;
//printf("file_init\n");
- if(sfile->layout) sfile->layout->dirty= 1;
+ if(sfile->layout) sfile->layout->dirty= TRUE;
}
@@ -242,7 +242,7 @@ static void file_refresh(const bContext *C, ScrArea *UNUSED(sa))
BLI_strncpy(sfile->params->renameedit, sfile->params->renamefile, sizeof(sfile->params->renameedit));
params->renamefile[0] = '\0';
}
- if (sfile->layout) sfile->layout->dirty= 1;
+ if (sfile->layout) sfile->layout->dirty= TRUE;
}
@@ -520,9 +520,14 @@ static void file_ui_area_draw(const bContext *C, ARegion *ar)
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
+ /* scrolling here is just annoying, disable it */
+ ar->v2d.cur.ymax= ar->v2d.cur.ymax - ar->v2d.cur.ymin;
+ ar->v2d.cur.ymin= 0;
+
/* set view2d view matrix for scrolling (without scrollers) */
UI_view2d_view_ortho(&ar->v2d);
+
file_draw_buttons(C, ar);
UI_view2d_view_restore(C);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 45bd1d58a53..33c3ae45a58 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1567,6 +1567,7 @@ static int pack_test(bContext *C, wmOperator *op)
static int pack_exec(bContext *C, wmOperator *op)
{
+ struct Main *bmain= CTX_data_main(C);
Image *ima= CTX_data_edit_image(C);
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
int as_png= RNA_boolean_get(op->ptr, "as_png");
@@ -1582,7 +1583,7 @@ static int pack_exec(bContext *C, wmOperator *op)
if(as_png)
BKE_image_memorypack(ima);
else
- ima->packedfile= newPackedFile(op->reports, ima->name);
+ ima->packedfile= newPackedFile(op->reports, ima->name, ID_BLEND_PATH(bmain, &ima->id));
WM_event_add_notifier(C, NC_IMAGE|NA_EDITED, ima);
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 970eccb8be3..150847ce825 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1538,6 +1538,7 @@ static void node_composit_buts_map_uv(uiLayout *layout, bContext *UNUSED(C), Poi
static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
uiItemR(layout, ptr, "index", 0, NULL, ICON_NONE);
+ uiItemR(layout, ptr, "use_smooth_mask", 0, NULL, ICON_NONE);
}
static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
@@ -1938,7 +1939,7 @@ static void node_texture_buts_output(uiLayout *layout, bContext *UNUSED(C), Poin
/* only once called */
static void node_texture_set_butfunc(bNodeType *ntype)
{
- ntype->uifuncbut = NULL;
+ ntype->uifuncbut = NULL;
if( ntype->type >= TEX_NODE_PROC && ntype->type < TEX_NODE_PROC_MAX ) {
ntype->uifunc = node_texture_buts_proc;
}
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 45dd08e3ece..7e718dc176a 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -1048,7 +1048,7 @@ static short select_grouped_effect_link(Editing *ed, Sequence *actseq)
}
SEQ_END;
- seq->tmp= SET_INT_IN_POINTER(TRUE);
+ actseq->tmp= SET_INT_IN_POINTER(TRUE);
for(seq_begin(ed, &iter, 1); iter.valid; seq_next(&iter)) {
seq = iter.seq;
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index 3f45e32937d..83a695ba72a 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -438,39 +438,39 @@ static void draw_bonevert_solid(void)
}
static float bone_octahedral_verts[6][3]= {
- { 0.0f, 0.0f, 0.0f},
- { 0.1f, 0.1f, 0.1f},
- { 0.1f, 0.1f, -0.1f},
- {-0.1f, 0.1f, -0.1f},
- {-0.1f, 0.1f, 0.1f},
- { 0.0f, 1.0f, 0.0f}
+ { 0.0f, 0.0f, 0.0f},
+ { 0.1f, 0.1f, 0.1f},
+ { 0.1f, 0.1f, -0.1f},
+ {-0.1f, 0.1f, -0.1f},
+ {-0.1f, 0.1f, 0.1f},
+ { 0.0f, 1.0f, 0.0f}
};
static unsigned int bone_octahedral_wire_sides[8]= {0, 1, 5, 3, 0, 4, 5, 2};
static unsigned int bone_octahedral_wire_square[8]= {1, 2, 3, 4, 1};
static unsigned int bone_octahedral_solid_tris[8][3]= {
- {2, 1, 0}, /* bottom */
- {3, 2, 0},
- {4, 3, 0},
- {1, 4, 0},
-
- {5, 1, 2}, /* top */
- {5, 2, 3},
- {5, 3, 4},
- {5, 4, 1}
+ {2, 1, 0}, /* bottom */
+ {3, 2, 0},
+ {4, 3, 0},
+ {1, 4, 0},
+
+ {5, 1, 2}, /* top */
+ {5, 2, 3},
+ {5, 3, 4},
+ {5, 4, 1}
};
/* aligned with bone_octahedral_solid_tris */
static float bone_octahedral_solid_normals[8][3]= {
- { 0.70710683f, -0.70710683f, 0.00000000f},
- {-0.00000000f, -0.70710683f, -0.70710683f},
- {-0.70710683f, -0.70710683f, 0.00000000f},
- { 0.00000000f, -0.70710683f, 0.70710683f},
- { 0.99388373f, 0.11043154f, -0.00000000f},
- { 0.00000000f, 0.11043154f, -0.99388373f},
- {-0.99388373f, 0.11043154f, 0.00000000f},
- { 0.00000000f, 0.11043154f, 0.99388373f}
+ { 0.70710683f, -0.70710683f, 0.00000000f},
+ {-0.00000000f, -0.70710683f, -0.70710683f},
+ {-0.70710683f, -0.70710683f, 0.00000000f},
+ { 0.00000000f, -0.70710683f, 0.70710683f},
+ { 0.99388373f, 0.11043154f, -0.00000000f},
+ { 0.00000000f, 0.11043154f, -0.99388373f},
+ {-0.99388373f, 0.11043154f, 0.00000000f},
+ { 0.00000000f, 0.11043154f, 0.99388373f}
};
static void draw_bone_octahedral(void)
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 877bd4bc939..7e8448917b1 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -312,16 +312,24 @@ static int set_draw_settings_cached(int clearcache, MTFace *texface, Material *m
static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object *ob)
{
unsigned char obcol[4];
- int istex, solidtex= 0;
+ int istex, solidtex;
// XXX scene->obedit warning
- if(v3d->drawtype==OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype!=OB_TEXTURE)) {
+
+ /* texture draw is abused for mask selection mode, do this so wire draw
+ * with face selection in weight paint is not lit. */
+ if((v3d->drawtype <= OB_WIRE) && (ob->mode & OB_MODE_WEIGHT_PAINT)) {
+ solidtex= FALSE;
+ Gtexdraw.islit= 0;
+ }
+ else if(v3d->drawtype==OB_SOLID || ((ob->mode & OB_MODE_EDIT) && v3d->drawtype!=OB_TEXTURE)) {
/* draw with default lights in solid draw mode and edit mode */
- solidtex= 1;
+ solidtex= TRUE;
Gtexdraw.islit= -1;
}
else {
/* draw with lights in the scene otherwise */
+ solidtex= FALSE;
Gtexdraw.islit= GPU_scene_object_lights(scene, ob, v3d->lay, rv3d->viewmat, !rv3d->is_persp);
}
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index b8fb8934dd9..b38071c29da 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5188,8 +5188,6 @@ static void drawspiral(const float cent[3], float rad, float tmat[][4], int star
}
}
else {
- a= 0;
-
fac= (float)(CIRCLE_RESOL-1) * tot_inv;
x= sinval[start] * fac;
y= cosval[start] * fac;
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 7fefc4ae0fe..05d6128b34f 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -912,8 +912,11 @@ static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
if (ptr->type == &RNA_Object) {
Object *ob = ptr->data;
- if (ELEM5(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL))
+ /* dimensions and material support just happen to be the same checks
+ * later we may want to add dimensions for lattice, armature etc too */
+ if (OB_TYPE_SUPPORT_MATERIAL(ob->type)) {
uiItemR(layout, ptr, "dimensions", 0, "Dimensions", ICON_NONE);
+ }
}
}
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index d3d7b1b1505..0854f9f3685 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -3226,7 +3226,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve
else
WM_event_add_notifier(C, NC_SCENE|NA_EDITED, scene);
- return OPERATOR_PASS_THROUGH;
+ return OPERATOR_FINISHED;
}
void VIEW3D_OT_cursor3d(wmOperatorType *ot)
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index b0a77843421..d223896924d 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -530,7 +530,12 @@ void uiTemplateHeader3D(uiLayout *layout, struct bContext *C)
row= uiLayoutRow(layout, 1);
uiItemR(row, &v3dptr, "pivot_point", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
- uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+
+ /* pose/object only however we want to allow in weight paint mode too
+ * so dont be totally strict and just check not-editmode for now */
+ if (obedit == NULL) {
+ uiItemR(row, &v3dptr, "use_pivot_point_align", UI_ITEM_R_ICON_ONLY, "", ICON_NONE);
+ }
/* Transform widget / manipulators */
row= uiLayoutRow(layout, 1);
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 79d6f279f0f..5c7b9a31a26 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2610,27 +2610,18 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
}
/* local constraint shouldn't alter center */
- if (t->around == V3D_LOCAL) {
- if (t->flag & T_OBJECT) {
- copy_v3_v3(center, td->center);
- }
- else if (t->flag & T_EDIT) {
-
- if(t->around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
- copy_v3_v3(center, td->center);
- }
- else {
- copy_v3_v3(center, t->center);
- }
- }
- else {
- copy_v3_v3(center, t->center);
- }
+ if ((t->around == V3D_LOCAL) &&
+ ( (t->flag & (T_OBJECT|T_POSE)) ||
+ ((t->flag & T_EDIT) && (t->settings->selectmode & SCE_SELECT_FACE)) ||
+ (t->obedit && t->obedit->type == OB_ARMATURE))
+ )
+ {
+ copy_v3_v3(center, td->center);
}
else {
copy_v3_v3(center, t->center);
}
-
+
if (td->ext) {
float fsize[3];
@@ -2903,19 +2894,17 @@ static void ElementRotation(TransInfo *t, TransData *td, float mat[3][3], short
float vec[3], totmat[3][3], smat[3][3];
float eul[3], fmat[3][3], quat[4];
float *center = t->center;
-
+
/* local constraint shouldn't alter center */
if (around == V3D_LOCAL) {
- if (t->flag & (T_OBJECT|T_POSE)) {
+ if ( (t->flag & (T_OBJECT|T_POSE)) ||
+ (t->settings->selectmode & SCE_SELECT_FACE) ||
+ (t->obedit && t->obedit->type == OB_ARMATURE))
+ {
center = td->center;
}
- else {
- if(around==V3D_LOCAL && (t->settings->selectmode & SCE_SELECT_FACE)) {
- center = td->center;
- }
- }
}
-
+
if (t->flag & T_POINTS) {
mul_m3_m3m3(totmat, mat, td->mtx);
mul_m3_m3m3(smat, td->smtx, totmat);
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index ea71e89f883..f53151ccc5f 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -1203,7 +1203,7 @@ static void createTransArmatureVerts(TransInfo *t)
if (ebo->flag & BONE_TIPSEL)
{
copy_v3_v3(td->iloc, ebo->tail);
- copy_v3_v3(td->center, td->iloc);
+ copy_v3_v3(td->center, (t->around==V3D_LOCAL) ? ebo->head : td->iloc);
td->loc= ebo->tail;
td->flag= TD_SELECTED;
if (ebo->flag & BONE_EDITMODE_LOCKED)
@@ -4911,10 +4911,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
if(t->mode == TFM_SEQ_SLIDE) {
if(t->frame_side == 'B')
- ED_markers_post_apply_transform(&t->scene->markers, t->scene, TFM_TIME_TRANSLATE, t->vec[0], t->frame_side);
+ ED_markers_post_apply_transform(&t->scene->markers, t->scene, TFM_TIME_TRANSLATE, t->values[0], t->frame_side);
}
else if (ELEM(t->frame_side, 'L', 'R')) {
- ED_markers_post_apply_transform(&t->scene->markers, t->scene, TFM_TIME_EXTEND, t->vec[0], t->frame_side);
+ ED_markers_post_apply_transform(&t->scene->markers, t->scene, TFM_TIME_EXTEND, t->values[0], t->frame_side);
}
}
@@ -5023,16 +5023,16 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
#if 0
if (ELEM(t->frame_side, 'L', 'R')) { /* TFM_TIME_EXTEND */
/* same as below */
- ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side);
+ ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->values[0], t->frame_side);
}
else /* TFM_TIME_TRANSLATE */
#endif
{
- ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side);
+ ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->values[0], t->frame_side);
}
}
else if (t->mode == TFM_TIME_SCALE) {
- ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->vec[0], t->frame_side);
+ ED_markers_post_apply_transform(ED_context_get_markers(C), t->scene, t->mode, t->values[0], t->frame_side);
}
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index c633efd7486..a08cadbf037 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -1189,6 +1189,12 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
t->options |= CTX_NO_PET;
}
+ // Mirror is not supported with PET, turn it off.
+ if (t->flag & T_PROP_EDIT)
+ {
+ t->flag &= ~T_MIRROR;
+ }
+
setTransformViewMatrices(t);
initNumInput(&t->num);
diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c
index d22751dc9aa..0c48db232f1 100644
--- a/source/blender/editors/util/ed_util.c
+++ b/source/blender/editors/util/ed_util.c
@@ -171,7 +171,7 @@ void unpack_menu(bContext *C, const char *opname, const char *id_name, const cha
pup= uiPupMenuBegin(C, "Unpack file", ICON_NONE);
layout= uiPupMenuLayout(pup);
- sprintf(line, "Remove Pack");
+ strcpy(line, "Remove Pack");
props_ptr= uiItemFullO(layout, opname, line, ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS);
RNA_enum_set(&props_ptr, "method", PF_REMOVE);
RNA_string_set(&props_ptr, "id", id_name);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index 120c203e7bd..c5d62559056 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -1136,6 +1136,9 @@ int GPU_enable_material(int nr, void *attribs)
GMS.lastretval = !GMS.lastretval;
if(GMS.lastretval) {
+ /* for alpha pass, use alpha blend */
+ alphablend = (GMS.alphapass)? GPU_BLEND_ALPHA: GPU_BLEND_SOLID;
+
if(gattribs && GMS.gmatbuf[nr]) {
/* bind glsl material and get attributes */
Material *mat = GMS.gmatbuf[nr];
@@ -1145,7 +1148,11 @@ int GPU_enable_material(int nr, void *attribs)
GPU_material_bind(gpumat, GMS.gob->lay, GMS.glay, 1.0, !(GMS.gob->mode & OB_MODE_TEXTURE_PAINT));
GPU_material_bind_uniforms(gpumat, GMS.gob->obmat, GMS.gviewmat, GMS.gviewinv, GMS.gob->col);
GMS.gboundmat= mat;
- alphablend= mat->game.alpha_blend;
+
+ /* for glsl use alpha blend mode, unless it's set to solid and
+ we are already drawing in an alpha pass */
+ if(mat->game.alpha_blend != GPU_BLEND_SOLID)
+ alphablend= mat->game.alpha_blend;
if(GMS.alphapass) glDepthMask(1);
}
@@ -1154,11 +1161,9 @@ int GPU_enable_material(int nr, void *attribs)
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, GMS.matbuf[nr].diff);
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, GMS.matbuf[nr].spec);
glMateriali(GL_FRONT_AND_BACK, GL_SHININESS, GMS.matbuf[nr].hard);
- alphablend= GPU_BLEND_SOLID;
}
/* set (alpha) blending mode */
- if(!GMS.alphapass) alphablend= GPU_BLEND_SOLID;
GPU_set_material_alpha_blend(alphablend);
}
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 88f6508d356..e064d7f760d 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -98,7 +98,7 @@ class Mem_IStream: public IStream
public:
Mem_IStream (unsigned char *exrbuf, size_t exrsize):
- IStream("dummy"), _exrpos (0), _exrsize(exrsize) { _exrbuf = exrbuf; }
+ IStream("dummy"), _exrpos (0), _exrsize(exrsize) { _exrbuf = exrbuf; }
virtual bool read (char c[], int n);
virtual Int64 tellg ();
@@ -107,8 +107,8 @@ public:
//virtual ~Mem_IStream() {}; // unused
private:
-
- Int64 _exrpos;
+
+ Int64 _exrpos;
Int64 _exrsize;
unsigned char *_exrbuf;
};
@@ -116,11 +116,11 @@ private:
bool Mem_IStream::read (char c[], int n)
{
if (n + _exrpos <= _exrsize)
- {
+ {
memcpy(c, (void *)(&_exrbuf[_exrpos]), n);
_exrpos += n;
return true;
- }
+ }
else
return false;
}
@@ -308,7 +308,7 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags
delete [] pixels;
}
catch (const std::exception &exc)
- {
+ {
printf("OpenEXR-save: ERROR: %s\n", exc.what());
if (ibuf) IMB_freeImBuf(ibuf);
@@ -365,7 +365,7 @@ static int imb_save_openexr_float(struct ImBuf *ibuf, const char *name, int flag
delete file;
}
catch (const std::exception &exc)
- {
+ {
printf("OpenEXR-save: ERROR: %s\n", exc.what());
if (ibuf) IMB_freeImBuf(ibuf);
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h
index f81a05f5625..9c8a0231907 100644
--- a/source/blender/makesdna/DNA_ID.h
+++ b/source/blender/makesdna/DNA_ID.h
@@ -206,6 +206,8 @@ typedef struct PreviewImage {
#define ID_CHECK_UNDO(id) ((GS((id)->name) != ID_SCR) && (GS((id)->name) != ID_WM))
+#define ID_BLEND_PATH(_bmain, _id) ((_id)->lib ? (_id)->lib->filepath : (_bmain)->name)
+
#ifdef GS
#undef GS
#endif
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index d230ff37098..3a29516a0e6 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -321,6 +321,9 @@ typedef struct DupliObject {
/* 23 and 24 are for life and sector (old file compat.) */
#define OB_ARMATURE 25
+/* check if the object type supports materials */
+#define OB_TYPE_SUPPORT_MATERIAL(_type) ((_type) >= OB_MESH && (_type) <= OB_MBALL)
+
/* partype: first 4 bits: type */
#define PARTYPE 15
#define PAROBJECT 0
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index f0f346fb759..cb70a8274bd 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -426,8 +426,7 @@ typedef struct GameFraming {
#define SCE_GAMEFRAMING_EXTEND 1
#define SCE_GAMEFRAMING_SCALE 2
-typedef struct RecastData
-{
+typedef struct RecastData {
float cellsize;
float cellheight;
float agentmaxslope;
@@ -441,6 +440,7 @@ typedef struct RecastData
int vertsperpoly;
float detailsampledist;
float detailsamplemaxerror;
+ short pad1, pad2;
} RecastData;
typedef struct GameData {
@@ -453,8 +453,7 @@ typedef struct GameData {
/* stereo/dome mode */
struct GameDome dome;
short stereoflag, stereomode;
- short pad2, pad3;
- float eyeseparation, pad1;
+ float eyeseparation;
RecastData recastData;
@@ -470,11 +469,13 @@ typedef struct GameData {
* bit 3: (gameengine): Activity culling is enabled.
* bit 5: (gameengine) : enable Bullet DBVT tree for view frustrum culling
*/
- short mode, flag, matmode, pad[2];
+ int flag;
+ short mode, matmode;
short occlusionRes; /* resolution of occlusion Z buffer in pixel */
short physicsEngine;
+ short pad[2];
short ticrate, maxlogicstep, physubstep, maxphystep;
- short obstacleSimulation;
+ short obstacleSimulation, pad1;
float levelHeight;
} GameData;
@@ -520,9 +521,9 @@ typedef struct GameData {
#define GAME_IGNORE_DEPRECATION_WARNINGS (1 << 12)
#define GAME_ENABLE_ANIMATION_RECORD (1 << 13)
#define GAME_SHOW_MOUSE (1 << 14)
-#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 15)
#define GAME_GLSL_NO_COLOR_MANAGEMENT (1 << 15)
-/* Note: GameData.flag is a short (max 16 flags). To add more flags, GameData.flag needs to be an int */
+#define GAME_SHOW_OBSTACLE_SIMULATION (1 << 16)
+/* Note: GameData.flag is now an int (max 32 flags). A short could only take 16 flags */
/* GameData.matmode */
#define GAME_MAT_TEXFACE 0
diff --git a/source/blender/makesdna/intern/CMakeLists.txt b/source/blender/makesdna/intern/CMakeLists.txt
index 5edebfe3903..e9fd2b2baa2 100644
--- a/source/blender/makesdna/intern/CMakeLists.txt
+++ b/source/blender/makesdna/intern/CMakeLists.txt
@@ -27,7 +27,7 @@
# message(STATUS "Configuring makesdna")
-# add_definitions(-DWITH_DNA_GHASH)
+add_definitions(-DWITH_DNA_GHASH)
blender_include_dirs(
../../../../intern/guardedalloc
diff --git a/source/blender/makesdna/intern/dna_genfile.c b/source/blender/makesdna/intern/dna_genfile.c
index ebcfce84e37..e5c3fe39e1a 100644
--- a/source/blender/makesdna/intern/dna_genfile.c
+++ b/source/blender/makesdna/intern/dna_genfile.c
@@ -43,6 +43,7 @@
#include "MEM_guardedalloc.h" // for MEM_freeN MEM_mallocN MEM_callocN
#ifdef WITH_DNA_GHASH
+# include "BLI_utildefines.h"
# include "BLI_ghash.h"
#endif
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 2314a939e2a..e3cc6045b3b 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -352,7 +352,7 @@ extern StructRNA RNA_OperatorFileListElement;
extern StructRNA RNA_OperatorMousePath;
extern StructRNA RNA_OperatorProperties;
extern StructRNA RNA_OperatorStrokeElement;
-extern StructRNA RNA_OperatorTypeMacro;
+extern StructRNA RNA_OperatorMacro;
extern StructRNA RNA_OrController;
extern StructRNA RNA_OutflowFluidSettings;
extern StructRNA RNA_PackedFile;
@@ -780,6 +780,7 @@ int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop);
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *t_ptr);
int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr);
int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr);
+int RNA_property_collection_assign_int(PointerRNA *ptr, PropertyRNA *prop, const int key, const PointerRNA *assign_ptr);
int RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr);
/* efficient functions to set properties for arrays */
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index e003b7198b8..9b87bbc2f4e 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -173,7 +173,7 @@ void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item);
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set);
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *typef, const char *poll);
-void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring);
+void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint);
void RNA_def_property_srna(PropertyRNA *prop, const char *type);
void RNA_def_py_data(PropertyRNA *prop, void *py_data);
diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h
index 8e8a2133b89..4e1177996ef 100644
--- a/source/blender/makesrna/RNA_types.h
+++ b/source/blender/makesrna/RNA_types.h
@@ -230,8 +230,8 @@ typedef struct CollectionPropertyIterator {
int level;
/* external */
- int valid;
PointerRNA ptr;
+ int valid;
} CollectionPropertyIterator;
typedef struct CollectionPointerLink {
@@ -274,13 +274,13 @@ typedef struct ParameterList {
/* storage for parameters */
void *data;
+ /* function passed at creation time */
+ struct FunctionRNA *func;
+
/* store the parameter size */
int alloc_size;
int arg_count, ret_count;
-
- /* function passed at creation time */
- struct FunctionRNA *func;
} ParameterList;
typedef struct ParameterIterator {
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index bc45ea4deed..bb4d6d3a330 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -2279,7 +2279,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
}
case PROP_COLLECTION: {
CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
- fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, ", rna_function_string(cprop->begin), rna_function_string(cprop->next), rna_function_string(cprop->end), rna_function_string(cprop->get), rna_function_string(cprop->length), rna_function_string(cprop->lookupint), rna_function_string(cprop->lookupstring));
+ fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ", rna_function_string(cprop->begin), rna_function_string(cprop->next), rna_function_string(cprop->end), rna_function_string(cprop->get), rna_function_string(cprop->length), rna_function_string(cprop->lookupint), rna_function_string(cprop->lookupstring), rna_function_string(cprop->assignint));
if(cprop->item_type) fprintf(f, "&RNA_%s\n", (char*)cprop->item_type);
else fprintf(f, "NULL\n");
break;
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index bf83d33a0a3..ddd0fcc1007 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -314,6 +314,14 @@ static int rna_IDPArray_length(PointerRNA *ptr)
return prop->len;
}
+int rna_IDMaterials_assign_int(PointerRNA *ptr, int key, const PointerRNA *assign_ptr)
+{
+ ID *id= ptr->id.data;
+ Material *mat_id= assign_ptr->id.data;
+ assign_material_id(id, mat_id, key + 1);
+ return 1;
+}
+
#else
static void rna_def_ID_properties(BlenderRNA *brna)
@@ -367,7 +375,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
prop= RNA_def_property(srna, "idp_array", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "PropertyGroup");
- RNA_def_property_collection_funcs(prop, "rna_IDPArray_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_IDPArray_length", NULL, NULL);
+ RNA_def_property_collection_funcs(prop, "rna_IDPArray_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_IDPArray_length", NULL, NULL, NULL);
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
// never tested, maybe its useful to have this?
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index b995b5ab731..8047b2df226 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1095,6 +1095,7 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
if(cprop->item_type)
return cprop->item_type;
}
+ /* ignore other types, RNA_struct_find_nested calls with unchecked props */
return &RNA_UnknownType;
}
@@ -2864,6 +2865,21 @@ int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, co
}
}
+/* zero return is an assignment error */
+int RNA_property_collection_assign_int(PointerRNA *ptr, PropertyRNA *prop, const int key, const PointerRNA *assign_ptr)
+{
+ CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)rna_ensure_property(prop);
+
+ BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
+
+ if(cprop->assignint) {
+ /* we have a callback defined, use it */
+ return cprop->assignint(ptr, key, assign_ptr);
+ }
+
+ return 0;
+}
+
int RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr)
{
BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 718f70cea1e..44c37f93b5e 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -451,7 +451,7 @@ static void rna_def_action_group(BlenderRNA *brna)
prop= RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
RNA_def_property_struct_type(prop, "FCurve");
- RNA_def_property_collection_funcs(prop, 0, "rna_ActionGroup_channels_next", 0, 0, 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, 0, "rna_ActionGroup_channels_next", NULL, NULL, NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Channels", "F-Curves in this group");
prop= RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 75c21e3f47e..e67ab012dc9 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -448,7 +448,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_CONNECTED);
if(editbone) RNA_def_property_boolean_funcs(prop, NULL, "rna_EditBone_connected_set");
else RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Connected", "When bone has a parent, bone's head is struck to the parent's tail");
+ RNA_def_property_ui_text(prop, "Connected", "When bone has a parent, bone's head is stuck to the parent's tail");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "use_inherit_rotation", PROP_BOOLEAN, PROP_NONE);
@@ -458,7 +458,8 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
prop= RNA_def_property(srna, "use_envelope_multiply", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_MULT_VG_ENV);
- RNA_def_property_ui_text(prop, "Multiply Vertex Group with Envelope", "When deforming bone, multiply effects of Vertex Group weights with Envelope influence");
+ RNA_def_property_ui_text(prop, "Multiply Vertex Group with Envelope",
+ "When deforming bone, multiply effects of Vertex Group weights with Envelope influence");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "use_deform", PROP_BOOLEAN, PROP_NONE);
@@ -478,7 +479,9 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
prop= RNA_def_property(srna, "show_wire", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BONE_DRAWWIRE);
- RNA_def_property_ui_text(prop, "Draw Wire", "Bone is always drawn as Wireframe regardless of viewport draw mode. Useful for non-obstructive custom bone shapes");
+ RNA_def_property_ui_text(prop, "Draw Wire",
+ "Bone is always drawn as Wireframe regardless of viewport draw mode "
+ "(useful for non-obstructive custom bone shapes)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
prop= RNA_def_property(srna, "use_cyclic_offset", PROP_BOOLEAN, PROP_NONE);
@@ -821,7 +824,8 @@ static void rna_def_armature(BlenderRNA *brna)
{ARM_VDEF_BGE_CPU, "BGE_CPU", 0, "BGE", "Uses vertex deformation code optimized for the BGE"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ghost_type_items[] = {
- {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame", "Display Ghosts of poses within a fixed number of frames around the current frame"},
+ {ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame",
+ "Display Ghosts of poses within a fixed number of frames around the current frame"},
{ARM_GHOST_RANGE, "RANGE", 0, "In Range", "Display Ghosts of poses within specified range"},
{ARM_GHOST_KEYS, "KEYS", 0, "On Keyframes", "Display Ghosts of poses on Keyframes"},
{0, NULL, 0, NULL, NULL}};
@@ -831,7 +835,8 @@ static void rna_def_armature(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Armature", "ID");
- RNA_def_struct_ui_text(srna, "Armature", "Armature datablock containing a hierarchy of bones, usually used for rigging characters");
+ RNA_def_struct_ui_text(srna, "Armature",
+ "Armature datablock containing a hierarchy of bones, usually used for rigging characters");
RNA_def_struct_ui_icon(srna, ICON_ARMATURE_DATA);
RNA_def_struct_sdna(srna, "bArmature");
@@ -841,7 +846,7 @@ static void rna_def_armature(BlenderRNA *brna)
/* Collections */
prop= RNA_def_property(srna, "bones", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bonebase", NULL);
- RNA_def_property_collection_funcs(prop, 0, "rna_Armature_bones_next", 0, 0, 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, 0, "rna_Armature_bones_next", NULL, NULL, NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "Bone");
RNA_def_property_ui_text(prop, "Bones", "");
rna_def_armature_bones(brna, prop);
@@ -897,7 +902,8 @@ static void rna_def_armature(BlenderRNA *brna)
prop= RNA_def_property(srna, "layers_protected", PROP_BOOLEAN, PROP_LAYER);
RNA_def_property_boolean_sdna(prop, NULL, "layer_protected", 1);
RNA_def_property_array(prop, 32);
- RNA_def_property_ui_text(prop, "Layer Proxy Protection", "Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo");
+ RNA_def_property_ui_text(prop, "Layer Proxy Protection",
+ "Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flag */
@@ -975,28 +981,34 @@ static void rna_def_armature(BlenderRNA *brna)
prop= RNA_def_property(srna, "ghost_step", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ghostep");
RNA_def_property_range(prop, 0, 30);
- RNA_def_property_ui_text(prop, "Ghosting Step", "Number of frame steps on either side of current frame to show as ghosts (only for 'Around Current Frame' Onion-skinning method)");
+ RNA_def_property_ui_text(prop, "Ghosting Step",
+ "Number of frame steps on either side of current frame to show as ghosts "
+ "(only for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "ghost_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ghostsize");
RNA_def_property_range(prop, 1, 20);
- RNA_def_property_ui_text(prop, "Ghosting Frame Step", "Frame step for Ghosts (not for 'On Keyframes' Onion-skinning method)");
+ RNA_def_property_ui_text(prop, "Ghosting Frame Step",
+ "Frame step for Ghosts (not for 'On Keyframes' Onion-skinning method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "ghost_frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghostsf");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_start_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Ghosting Start Frame", "Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
+ RNA_def_property_ui_text(prop, "Ghosting Start Frame",
+ "Starting frame of range of Ghosts to display (not for "
+ "'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
prop= RNA_def_property(srna, "ghost_frame_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghostef");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_end_frame_set", NULL);
- RNA_def_property_ui_text(prop, "Ghosting End Frame", "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
+ RNA_def_property_ui_text(prop, "Ghosting End Frame",
+ "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method)");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
// XXX depreceated ....... old animviz for armatures only
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 1b2396a4215..934a42cfcef 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -271,7 +271,8 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "vertex_group_mass", PROP_STRING, PROP_NONE);
- RNA_def_property_string_funcs(prop, "rna_ClothSettings_mass_vgroup_get", "rna_ClothSettings_mass_vgroup_length", "rna_ClothSettings_mass_vgroup_set");
+ RNA_def_property_string_funcs(prop, "rna_ClothSettings_mass_vgroup_get", "rna_ClothSettings_mass_vgroup_length",
+ "rna_ClothSettings_mass_vgroup_set");
RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices");
RNA_def_property_update(prop, 0, "rna_cloth_pinning_changed");
@@ -305,21 +306,23 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "stepsPerFrame");
RNA_def_property_range(prop, 4, 80);
- RNA_def_property_ui_text(prop, "Quality", "Quality of the simulation in steps per frame. (higher is better quality but slower)");
+ RNA_def_property_ui_text(prop, "Quality",
+ "Quality of the simulation in steps per frame (higher is better quality but slower)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
/* springs */
prop= RNA_def_property(srna, "use_stiffness_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", CLOTH_SIMSETTINGS_FLAG_SCALING);
- RNA_def_property_ui_text(prop, "Stiffness Scaling", "If enabled, stiffness can be scaled along a weight painted vertex group");
+ RNA_def_property_ui_text(prop, "Stiffness Scaling",
+ "If enabled, stiffness can be scaled along a weight painted vertex group");
RNA_def_property_update(prop, 0, "rna_cloth_update");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
prop= RNA_def_property(srna, "spring_damping", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "Cdis");
RNA_def_property_range(prop, 0.0f, 50.0f);
- RNA_def_property_ui_text(prop, "Spring Damping", "Damping of cloth velocity. (higher = more smooth, less jiggling)");
+ RNA_def_property_ui_text(prop, "Spring Damping", "Damping of cloth velocity (higher = more smooth, less jiggling)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "structural_stiffness", PROP_FLOAT, PROP_NONE);
@@ -336,14 +339,16 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "vertex_group_structural_stiffness", PROP_STRING, PROP_NONE);
- RNA_def_property_string_funcs(prop, "rna_ClothSettings_struct_vgroup_get", "rna_ClothSettings_struct_vgroup_length", "rna_ClothSettings_struct_vgroup_set");
- RNA_def_property_ui_text(prop, "Structural Stiffness Vertex Group", "Vertex group for fine control over structural stiffness");
+ RNA_def_property_string_funcs(prop, "rna_ClothSettings_struct_vgroup_get", "rna_ClothSettings_struct_vgroup_length",
+ "rna_ClothSettings_struct_vgroup_set");
+ RNA_def_property_ui_text(prop, "Structural Stiffness Vertex Group",
+ "Vertex group for fine control over structural stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "bending");
RNA_def_property_range(prop, 0.0f, 10000.0f);
- RNA_def_property_ui_text(prop, "Bending Stiffness", "Wrinkle coefficient. (higher = less smaller but more big wrinkles)");
+ RNA_def_property_ui_text(prop, "Bending Stiffness", "Wrinkle coefficient (higher = less smaller but more big wrinkles)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "bending_stiffness_max", PROP_FLOAT, PROP_NONE);
@@ -354,7 +359,8 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "vertex_group_bending", PROP_STRING, PROP_NONE);
- RNA_def_property_string_funcs(prop, "rna_ClothSettings_bend_vgroup_get", "rna_ClothSettings_bend_vgroup_length", "rna_ClothSettings_bend_vgroup_set");
+ RNA_def_property_string_funcs(prop, "rna_ClothSettings_bend_vgroup_get", "rna_ClothSettings_bend_vgroup_length",
+ "rna_ClothSettings_bend_vgroup_set");
RNA_def_property_ui_text(prop, "Bending Stiffness Vertex Group", "Vertex group for fine control over bending stiffness");
RNA_def_property_update(prop, 0, "rna_cloth_update");
@@ -372,8 +378,9 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "rest_shape_key", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "ShapeKey");
- RNA_def_property_pointer_funcs(prop, "rna_ClothSettings_rest_shape_key_get", "rna_ClothSettings_rest_shape_key_set", NULL, NULL);
- RNA_def_property_ui_text(prop, "Rest Shade Key", "Shape key to use the rest spring lengths from");
+ RNA_def_property_pointer_funcs(prop, "rna_ClothSettings_rest_shape_key_get",
+ "rna_ClothSettings_rest_shape_key_set", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Rest Shape Key", "Shape key to use the rest spring lengths from");
RNA_def_property_update(prop, 0, "rna_cloth_update");
/* unused */
@@ -420,7 +427,8 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ClothCollisionSettings", NULL);
- RNA_def_struct_ui_text(srna, "Cloth Collision Settings", "Cloth simulation settings for self collision and collision with other objects");
+ RNA_def_struct_ui_text(srna, "Cloth Collision Settings",
+ "Cloth simulation settings for self collision and collision with other objects");
RNA_def_struct_sdna(srna, "ClothCollSettings");
RNA_def_struct_path_func(srna, "rna_ClothCollisionSettings_path");
@@ -442,24 +450,27 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "distance_repel");
RNA_def_property_range(prop, 0.001f, 10.0f);
RNA_def_property_float_default(prop, 0.005f);
- RNA_def_property_ui_text(prop, "Repulsion Distance", "Maximum distance to apply repulsion force, must be greater then minimum distance");
+ RNA_def_property_ui_text(prop, "Repulsion Distance",
+ "Maximum distance to apply repulsion force, must be greater than minimum distance");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "distance_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "epsilon");
RNA_def_property_range(prop, 0.001f, 1.0f);
- RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance between collision objects before collision response takes in");
+ RNA_def_property_ui_text(prop, "Minimum Distance",
+ "Minimum distance between collision objects before collision response takes in");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 80.0f);
- RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened. (higher = less movement)");
+ RNA_def_property_ui_text(prop, "Friction", "Friction force if a collision happened (higher = less movement)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "loop_count");
RNA_def_property_range(prop, 1, 20);
- RNA_def_property_ui_text(prop, "Collision Quality", "How many collision iterations should be done. (higher is better quality but slower)");
+ RNA_def_property_ui_text(prop, "Collision Quality",
+ "How many collision iterations should be done. (higher is better quality but slower)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
/* self collision */
@@ -483,7 +494,8 @@ static void rna_def_cloth_collision_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "self_collision_quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "self_loop_count");
RNA_def_property_range(prop, 1, 10);
- RNA_def_property_ui_text(prop, "Self Collision Quality", "How many self collision iterations should be done. (higher is better quality but slower)");
+ RNA_def_property_ui_text(prop, "Self Collision Quality",
+ "How many self collision iterations should be done (higher is better quality but slower)");
RNA_def_property_update(prop, 0, "rna_cloth_update");
prop= RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 4ef6e9f4af7..65745ca2afd 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -405,7 +405,7 @@ static void rna_def_curvemapping(BlenderRNA *brna)
RNA_def_property_float_funcs(prop, NULL, NULL, "rna_CurveMapping_clipmaxy_range");
prop= RNA_def_property(srna, "curves", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_CurveMapping_curves_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_CurveMapping_curves_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_CurveMapping_curves_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_CurveMapping_curves_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "CurveMap");
RNA_def_property_ui_text(prop, "Curves", "");
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 488e61d0e25..52067d40dd3 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -1262,7 +1262,7 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "nurb", NULL);
#else
/* this way we get editmode nurbs too, keyframe in editmode */
- RNA_def_property_collection_funcs(prop, "rna_Curve_splines_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Curve_splines_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
#endif
RNA_def_property_struct_type(prop, "Spline");
RNA_def_property_ui_text(prop, "Splines", "Collection of splines in this curve data object");
@@ -1428,7 +1428,8 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
- RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
+ RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
+ RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
}
static void rna_def_curve_nurb(BlenderRNA *brna)
@@ -1450,7 +1451,7 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "bp", NULL);
RNA_def_property_struct_type(prop, "SplinePoint");
- RNA_def_property_collection_funcs(prop, "rna_BPoint_array_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_Nurb_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_BPoint_array_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_Nurb_length", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Points", "Collection of points that make up this poly or nurbs spline");
rna_def_curve_spline_points(brna, prop);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 63a41762f4c..ab469c19e15 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -689,7 +689,7 @@ StructRNA *RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *
if(DefRNA.preprocess) {
RNA_def_property_struct_type(prop, "Property");
- RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", NULL, NULL, "rna_builtin_properties_lookup_string");
+ RNA_def_property_collection_funcs(prop, "rna_builtin_properties_begin", "rna_builtin_properties_next", "rna_iterator_listbase_end", "rna_builtin_properties_get", NULL, NULL, "rna_builtin_properties_lookup_string", NULL);
}
else {
#ifdef RNA_RUNTIME
@@ -2047,7 +2047,7 @@ void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const ch
}
}
-void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring)
+void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
{
StructRNA *srna= DefRNA.laststruct;
@@ -2067,6 +2067,7 @@ void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, con
if(length) cprop->length= (PropCollectionLengthFunc)length;
if(lookupint) cprop->lookupint= (PropCollectionLookupIntFunc)lookupint;
if(lookupstring) cprop->lookupstring= (PropCollectionLookupStringFunc)lookupstring;
+ if(assignint) cprop->assignint= (PropCollectionAssignIntFunc)assignint;
break;
}
default:
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index a08e030215c..43812ad4a01 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -643,7 +643,9 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
/* define common props */
prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
- RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them");
+ RNA_def_property_ui_text(prop, "Additive",
+ "Values generated by this modifier are applied on top of "
+ "the existing values instead of overwriting them");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
// XXX this has a special validation func
@@ -656,7 +658,8 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
/* order of the polynomial */
// XXX this has a special validation func
prop= RNA_def_property(srna, "poly_order", PROP_INT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Polynomial Order", "The highest power of 'x' for this polynomial. (number of coefficients - 1)");
+ RNA_def_property_ui_text(prop, "Polynomial Order",
+ "The highest power of 'x' for this polynomial. (number of coefficients - 1)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* coefficients array */
@@ -664,7 +667,8 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
RNA_def_property_array(prop, 32);
RNA_def_property_flag(prop, PROP_DYNAMIC);
RNA_def_property_dynamic_array_funcs(prop, "rna_FModifierGenerator_coefficients_get_length");
- RNA_def_property_float_funcs(prop, "rna_FModifierGenerator_coefficients_get", "rna_FModifierGenerator_coefficients_set", NULL);
+ RNA_def_property_float_funcs(prop, "rna_FModifierGenerator_coefficients_get",
+ "rna_FModifierGenerator_coefficients_set", NULL);
RNA_def_property_ui_text(prop, "Coefficients", "Coefficients for 'x' (starting from lowest power of x^0)");
}
@@ -708,7 +712,9 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
/* flags */
prop= RNA_def_property(srna, "use_additive", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FCM_GENERATOR_ADDITIVE);
- RNA_def_property_ui_text(prop, "Additive", "Values generated by this modifier are applied on top of the existing values instead of overwriting them");
+ RNA_def_property_ui_text(prop, "Additive",
+ "Values generated by this modifier are applied on top of "
+ "the existing values instead of overwriting them");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
prop= RNA_def_property(srna, "function_type", PROP_ENUM, PROP_NONE);
@@ -795,8 +801,10 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
static EnumPropertyItem prop_type_items[] = {
{FCM_EXTRAPOLATE_NONE, "NONE", 0, "No Cycles", "Don't do anything"},
{FCM_EXTRAPOLATE_CYCLIC, "REPEAT", 0, "Repeat Motion", "Repeat keyframe range as-is"},
- {FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", 0, "Repeat with Offset", "Repeat keyframe range, but with offset based on gradient between values"},
- {FCM_EXTRAPOLATE_MIRROR, "MIRROR", 0, "Repeat Mirrored", "Alternate between forward and reverse playback of keyframe range"},
+ {FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", 0, "Repeat with Offset",
+ "Repeat keyframe range, but with offset based on gradient between values"},
+ {FCM_EXTRAPOLATE_MIRROR, "MIRROR", 0, "Repeat Mirrored",
+ "Alternate between forward and reverse playback of keyframe range"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierCycles", "FModifier");
@@ -950,7 +958,8 @@ static void rna_def_fmodifier_stepped(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierStepped", "FModifier");
- RNA_def_struct_ui_text(srna, "Stepped Interpolation F-Modifier", "Holds each interpolated value from the F-Curve for several frames without changing the timing");
+ RNA_def_struct_ui_text(srna, "Stepped Interpolation F-Modifier",
+ "Hold each interpolated value from the F-Curve for several frames without changing the timing");
RNA_def_struct_sdna_from(srna, "FMod_Stepped", "data");
/* properties */
@@ -961,7 +970,9 @@ static void rna_def_fmodifier_stepped(BlenderRNA *brna)
prop= RNA_def_property(srna, "frame_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "offset");
- RNA_def_property_ui_text(prop, "Offset", "Reference number of frames before frames get held. Use to get hold for '1-3' vs '5-7' holding patterns");
+ RNA_def_property_ui_text(prop, "Offset",
+ "Reference number of frames before frames get held "
+ "(use to get hold for '1-3' vs '5-7' holding patterns)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
prop= RNA_def_property(srna, "use_frame_start", PROP_BOOLEAN, PROP_NONE);
@@ -1042,7 +1053,9 @@ static void rna_def_fmodifier(BlenderRNA *brna)
/* restricted range */
prop= RNA_def_property(srna, "use_restricted_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", FMODIFIER_FLAG_RANGERESTRICT);
- RNA_def_property_ui_text(prop, "Restrict Frame Range", "F-Curve Modifier is only applied for the specified frame range to help mask off effects in order to chain them");
+ RNA_def_property_ui_text(prop, "Restrict Frame Range",
+ "F-Curve Modifier is only applied for the specified frame range to help "
+ "mask off effects in order to chain them");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); // XXX: depends on UI implementation
@@ -1106,8 +1119,10 @@ static void rna_def_drivertarget(BlenderRNA *brna)
static EnumPropertyItem prop_local_space_items[] = {
{0, "WORLD_SPACE", 0, "World Space", "Transforms include effects of parenting/restpose and constraints"},
- {DTAR_FLAG_LOCALSPACE, "TRANSFORM_SPACE", 0, "Transform Space", "Transforms don't include parenting/restpose or constraints"},
- {DTAR_FLAG_LOCALSPACE|DTAR_FLAG_LOCAL_CONSTS, "LOCAL_SPACE", 0, "Local Space", "Transforms include effects of constraints but not parenting/restpose"},
+ {DTAR_FLAG_LOCALSPACE, "TRANSFORM_SPACE", 0, "Transform Space",
+ "Transforms don't include parenting/restpose or constraints"},
+ {DTAR_FLAG_LOCALSPACE|DTAR_FLAG_LOCAL_CONSTS, "LOCAL_SPACE", 0, "Local Space",
+ "Transforms include effects of constraints but not parenting/restpose"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "DriverTarget", NULL);
@@ -1120,7 +1135,8 @@ static void rna_def_drivertarget(BlenderRNA *brna)
RNA_def_property_editable_func(prop, "rna_DriverTarget_id_editable");
/* note: custom set function is ONLY to avoid rna setting a user for this. */
RNA_def_property_pointer_funcs(prop, NULL, "rna_DriverTarget_id_set", "rna_DriverTarget_id_typef", NULL);
- RNA_def_property_ui_text(prop, "ID", "ID-block that the specific property used can be found from (id_type property must be set first)");
+ RNA_def_property_ui_text(prop, "ID",
+ "ID-block that the specific property used can be found from (id_type property must be set first)");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
prop= RNA_def_property(srna, "id_type", PROP_ENUM, PROP_NONE);
@@ -1134,7 +1150,8 @@ static void rna_def_drivertarget(BlenderRNA *brna)
/* Target Properties - Property to Drive */
prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
- RNA_def_property_string_funcs(prop, "rna_DriverTarget_RnaPath_get", "rna_DriverTarget_RnaPath_length", "rna_DriverTarget_RnaPath_set");
+ RNA_def_property_string_funcs(prop, "rna_DriverTarget_RnaPath_get", "rna_DriverTarget_RnaPath_length",
+ "rna_DriverTarget_RnaPath_set");
RNA_def_property_ui_text(prop, "Data Path", "RNA Path (from ID-block) to property used");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
@@ -1176,7 +1193,9 @@ static void rna_def_drivervar(BlenderRNA *brna)
/* Variable Name */
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
- RNA_def_property_ui_text(prop, "Name", "Name to use in scripted expressions/functions. (No spaces or dots are allowed. Also, must not start with a symbol or digit)");
+ RNA_def_property_ui_text(prop, "Name",
+ "Name to use in scripted expressions/functions (no spaces or dots are allowed, "
+ "and must start with a letter)");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_name"); // XXX
/* Enums */
@@ -1265,7 +1284,8 @@ static void rna_def_channeldriver(BlenderRNA *brna)
/* Settings */
prop= RNA_def_property(srna, "show_debug_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", DRIVER_FLAG_SHOWDEBUG);
- RNA_def_property_ui_text(prop, "Show Debug Info", "Show intermediate values for the driver calculations to allow debugging of drivers");
+ RNA_def_property_ui_text(prop, "Show Debug Info",
+ "Show intermediate values for the driver calculations to allow debugging of drivers");
/* State Info (for Debugging) */
prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
@@ -1347,7 +1367,8 @@ static void rna_def_fkeyframe(BlenderRNA *brna)
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipo");
RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
- RNA_def_property_ui_text(prop, "Interpolation", "Interpolation method to use for segment of the curve from this Keyframe until the next Keyframe");
+ RNA_def_property_ui_text(prop, "Interpolation",
+ "Interpolation method to use for segment of the curve from this Keyframe until the next Keyframe");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
@@ -1547,7 +1568,8 @@ static void rna_def_fcurve(BlenderRNA *brna)
/* State Info (for Debugging) */
prop= RNA_def_property(srna, "is_valid", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", FCURVE_DISABLED);
- RNA_def_property_ui_text(prop, "Valid", "False when F-Curve could not be evaluated in past, so should be skipped when evaluating");
+ RNA_def_property_ui_text(prop, "Valid",
+ "False when F-Curve could not be evaluated in past, so should be skipped when evaluating");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME_PROP, NULL);
/* Collections */
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index ccb24d7dd9b..ba90aca47a3 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -141,12 +141,12 @@ static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA
psys->part= part;
psys->pointcache= BKE_ptcache_add(&psys->ptcaches);
psys->flag |= PSYS_ENABLED;
- sprintf(psys->name, "FluidParticles");
+ BLI_strncpy(psys->name, "FluidParticles", sizeof(psys->name));
BLI_addtail(&ob->particlesystem,psys);
/* add modifier */
psmd= (ParticleSystemModifierData*)modifier_new(eModifierType_ParticleSystem);
- sprintf(psmd->modifier.name, "FluidParticleSystem" );
+ BLI_strncpy(psmd->modifier.name, "FluidParticleSystem", sizeof(psmd->modifier.name));
psmd->psys= psys;
BLI_addtail(&ob->modifiers, psmd);
modifier_unique_name(&ob->modifiers, (ModifierData *)psmd);
@@ -412,7 +412,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
prop= RNA_def_property(srna, "fluid_mesh_vertices", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "FluidMeshVertex");
RNA_def_property_ui_text(prop, "Fluid Mesh Vertices", "Vertices of the fluid mesh generated by simulation");
- RNA_def_property_collection_funcs(prop, "rna_FluidMeshVertex_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_FluidMeshVertex_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_FluidMeshVertex_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_FluidMeshVertex_data_length", NULL, NULL, NULL);
rna_def_fluid_mesh_vertices(brna);
}
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 597f05ed9f6..0a66ff9fa99 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -132,7 +132,7 @@ void RNA_def_group(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "gobject", NULL);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_ui_text(prop, "Objects", "A collection of this groups objects");
- RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Group_objects_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_Group_objects_get", NULL, NULL, NULL, NULL);
rna_def_group_objects(brna, prop);
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index c90f3fe7e88..b2b9f7a4542 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -142,7 +142,7 @@ static void rna_Image_pack(Image *image, ReportList *reports, int as_png)
BKE_image_memorypack(image);
}
else {
- image->packedfile= newPackedFile(reports, image->name);
+ image->packedfile= newPackedFile(reports, image->name, ID_BLEND_PATH(G.main, &image->id));
}
}
}
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index cf1be39124e..4cd4a2f11f9 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -382,6 +382,9 @@ struct MTex *rna_mtex_texture_slots_add(struct ID *self, struct bContext *C, str
struct MTex *rna_mtex_texture_slots_create(struct ID *self, struct bContext *C, struct ReportList *reports, int index);
void rna_mtex_texture_slots_clear(struct ID *self, struct bContext *C, struct ReportList *reports, int index);
+
+int rna_IDMaterials_assign_int(struct PointerRNA *ptr, int key, const struct PointerRNA *assign_ptr);
+
#endif /* RNA_INTERNAL_H */
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 249833ae94b..50790a0077f 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -102,6 +102,7 @@ typedef PointerRNA (*PropCollectionGetFunc)(struct CollectionPropertyIterator *i
typedef int (*PropCollectionLengthFunc)(struct PointerRNA *ptr);
typedef int (*PropCollectionLookupIntFunc)(struct PointerRNA *ptr, int key, struct PointerRNA *r_ptr);
typedef int (*PropCollectionLookupStringFunc)(struct PointerRNA *ptr, const char *key, struct PointerRNA *r_ptr);
+typedef int (*PropCollectionAssignIntFunc)(struct PointerRNA *ptr, int key, const struct PointerRNA *assign_ptr);
/* Container - generic abstracted container of RNA properties */
typedef struct ContainerRNA {
@@ -285,6 +286,7 @@ typedef struct CollectionPropertyRNA {
PropCollectionLengthFunc length; /* optional */
PropCollectionLookupIntFunc lookupint; /* optional */
PropCollectionLookupStringFunc lookupstring; /* optional */
+ PropCollectionAssignIntFunc assignint; /* optional */
struct StructRNA *item_type; /* the type of this item */
} CollectionPropertyRNA;
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index ad6f67cddaf..353da196e89 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -581,7 +581,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "data", "totelem");
RNA_def_property_struct_type(prop, "UnknownType");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", 0, 0, "rna_ShapeKey_data_get", "rna_ShapeKey_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_ShapeKey_data_begin", NULL, NULL, "rna_ShapeKey_data_get", "rna_ShapeKey_data_length", NULL, NULL, NULL);
}
static void rna_def_key(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 8387b3286d6..2a81c4f0a2c 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -237,7 +237,7 @@ static void rna_def_latticepoint(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Lattice_update_data");
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_LatticePoint_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_LatticePoint_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "VertexGroupElement");
RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this point is member of");
}
@@ -317,7 +317,7 @@ static void rna_def_lattice(BlenderRNA *brna)
prop= RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "LatticePoint");
- RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Lattice_points_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Points", "Points of the lattice");
/* pointers */
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 352aaa890a5..0b44f7c98d0 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -337,7 +337,7 @@ void RNA_def_main(BlenderRNA *brna)
{
prop= RNA_def_property(srna, lists[i].identifier, PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, lists[i].type);
- RNA_def_property_collection_funcs(prop, lists[i].iter_begin, "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, lists[i].iter_begin, "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, lists[i].name, lists[i].description);
/* collection functions */
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index 21e816ad222..412a59bf8b6 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -344,12 +344,12 @@ void rna_Main_metaballs_remove(Main *bmain, ReportList *reports, struct MetaBall
mb->id.name+2, ID_REAL_USERS(mb));
}
-VFont *rna_Main_fonts_load(Main *UNUSED(bmain), ReportList *reports, const char *filepath)
+VFont *rna_Main_fonts_load(Main *bmain, ReportList *reports, const char *filepath)
{
VFont *font;
errno= 0;
- font= load_vfont(filepath);
+ font= load_vfont(bmain, filepath);
if(!font)
BKE_reportf(reports, RPT_ERROR, "Can't read: \"%s\", %s", filepath,
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 80a418a0047..a9878ab2bf2 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -2040,8 +2040,7 @@ void rna_def_mtex_common(BlenderRNA *brna, StructRNA *srna, const char *begin,
/* mtex */
prop= RNA_def_property(srna, "texture_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, structname);
- RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end",
- "rna_iterator_array_dereference_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, begin, "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_dereference_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Textures", "Texture slots defining the mapping and influence of textures");
rna_def_texture_slots(brna, prop, structname, structname_slots);
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index ce390c5c99f..f29c74caac1 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -1187,7 +1187,7 @@ static void rna_def_mvert(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
prop= RNA_def_property(srna, "groups", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_MeshVertex_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshVertex_groups_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "VertexGroupElement");
RNA_def_property_ui_text(prop, "Groups", "Weights for the vertex groups this vertex is member of");
@@ -1453,7 +1453,7 @@ static void rna_def_mtexpoly(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshTextureFace");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshTextureFaceLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshTextureFaceLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshTextureFaceLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshTextureFaceLayer_data_length", NULL, NULL, NULL);
srna= RNA_def_struct(brna, "MeshTextureFace", NULL);
RNA_def_struct_sdna(srna, "MTexPoly");
@@ -1542,7 +1542,7 @@ static void rna_def_mloopcol(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshColor");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshColorLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshColorLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshColorLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshColorLayer_data_length", NULL, NULL, NULL);
srna= RNA_def_struct(brna, "MeshColor", NULL);
RNA_def_struct_sdna(srna, "MCol");
@@ -1571,7 +1571,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshFloatProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshFloatPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshFloatPropertyLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshFloatPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshFloatPropertyLayer_data_length", NULL, NULL, NULL);
srna= RNA_def_struct(brna, "MeshFloatProperty", NULL);
RNA_def_struct_sdna(srna, "MFloatProperty");
@@ -1597,7 +1597,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshIntProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshIntPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshIntPropertyLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshIntPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshIntPropertyLayer_data_length", NULL, NULL, NULL);
srna= RNA_def_struct(brna, "MeshIntProperty", NULL);
RNA_def_struct_sdna(srna, "MIntProperty");
@@ -1623,7 +1623,7 @@ static void rna_def_mproperties(BlenderRNA *brna)
prop= RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "MeshStringProperty");
RNA_def_property_ui_text(prop, "Data", "");
- RNA_def_property_collection_funcs(prop, "rna_MeshStringPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshStringPropertyLayer_data_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_MeshStringPropertyLayer_data_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_MeshStringPropertyLayer_data_length", NULL, NULL, NULL);
srna= RNA_def_struct(brna, "MeshStringProperty", NULL);
RNA_def_struct_sdna(srna, "MStringProperty");
@@ -1670,6 +1670,7 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
+ RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
}
@@ -1923,7 +1924,7 @@ static void rna_def_mesh(BlenderRNA *brna)
/* UV textures */
prop= RNA_def_property(srna, "uv_textures", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "pdata.layers", "pdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_textures_begin", 0, 0, 0, "rna_Mesh_uv_textures_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_uv_textures_begin", NULL, NULL, NULL, "rna_Mesh_uv_textures_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MeshTextureFaceLayer");
RNA_def_property_ui_text(prop, "UV Textures", "");
rna_def_uv_textures(brna, prop);
@@ -1952,26 +1953,26 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "vertex_colors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "ldata.layers", "ldata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_vertex_colors_begin", 0, 0, 0, "rna_Mesh_vertex_colors_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_vertex_colors_begin", NULL, NULL, NULL, "rna_Mesh_vertex_colors_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MeshColorLayer");
RNA_def_property_ui_text(prop, "Vertex Colors", "");
rna_def_vertex_colors(brna, prop);
prop= RNA_def_property(srna, "layers_float", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "pdata.layers", "pdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_float_layers_begin", 0, 0, 0, "rna_Mesh_float_layers_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_float_layers_begin", NULL, NULL, NULL, "rna_Mesh_float_layers_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MeshFloatPropertyLayer");
RNA_def_property_ui_text(prop, "Float Property Layers", "");
prop= RNA_def_property(srna, "layers_int", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "pdata.layers", "pdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_int_layers_begin", 0, 0, 0, "rna_Mesh_int_layers_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_int_layers_begin", NULL, NULL, NULL, "rna_Mesh_int_layers_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MeshIntPropertyLayer");
RNA_def_property_ui_text(prop, "Int Property Layers", "");
prop= RNA_def_property(srna, "layers_string", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "pdata.layers", "pdata.totlayer");
- RNA_def_property_collection_funcs(prop, "rna_Mesh_string_layers_begin", 0, 0, 0, "rna_Mesh_string_layers_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Mesh_string_layers_begin", NULL, NULL, NULL, "rna_Mesh_string_layers_length", NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "MeshStringPropertyLayer");
RNA_def_property_ui_text(prop, "String Property Layers", "");
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index 5e5cf0be0ae..1c7359cc195 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -330,7 +330,8 @@ static void rna_def_metaball(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "Material");
RNA_def_property_ui_text(prop, "Materials", "");
- RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
+ RNA_def_property_srna(prop, "IDMaterials"); /* see rna_ID.c */
+ RNA_def_property_collection_funcs(prop, 0, NULL, NULL, NULL, NULL, NULL, NULL, "rna_IDMaterials_assign_int");
/* anim */
rna_def_animdata_common(srna);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index cfb40b0f711..614e5ab243d 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -278,7 +278,7 @@ static void rna_Smoke_set_type(Main *bmain, Scene *scene, PointerRNA *ptr)
part->end = 250.0f;
part->ren_as = PART_DRAW_NOT;
part->draw_as = PART_DRAW_DOT;
- sprintf(psys->name, "SmokeParticles");
+ BLI_strncpy(psys->name, "SmokeParticles", sizeof(psys->name));
psys->recalc |= (PSYS_RECALC_RESET|PSYS_RECALC_PHYS);
DAG_id_tag_update(ptr->id.data, OB_RECALC_DATA);
}
@@ -1567,7 +1567,7 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
prop= RNA_def_property(srna, "projectors", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "UVProjector");
- RNA_def_property_collection_funcs(prop, "rna_UVProject_projectors_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_UVProject_projectors_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Projectors", "");
prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 1b113620663..813375a3549 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1874,6 +1874,11 @@ static void def_cmp_id_mask(StructRNA *srna)
RNA_def_property_range(prop, 0, 10000);
RNA_def_property_ui_text(prop, "Index", "Pass index number to convert to alpha");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "use_smooth_mask", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "custom2", 0);
+ RNA_def_property_ui_text(prop, "Smooth Mask", "Apply an anti-aliasing filter to the mask");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
}
static void def_cmp_map_uv(StructRNA *srna)
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 0db928d05c9..0786a7d801b 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -251,16 +251,20 @@ void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr)
static void rna_Object_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
DAG_id_tag_update(ptr->id.data, OB_RECALC_OB);
- DAG_scene_sort(bmain, scene);
+ if (scene) {
+ DAG_scene_sort(bmain, scene);
+ }
WM_main_add_notifier(NC_OBJECT|ND_PARENT, ptr->id.data);
}
/* when changing the selection flag the scene needs updating */
static void rna_Object_select_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
{
- Object *ob= (Object*)ptr->id.data;
- short mode = ob->flag & SELECT ? BA_SELECT : BA_DESELECT;
- ED_base_object_select(object_in_scene(ob, scene), mode);
+ if (scene) {
+ Object *ob= (Object*)ptr->id.data;
+ short mode = ob->flag & SELECT ? BA_SELECT : BA_DESELECT;
+ ED_base_object_select(object_in_scene(ob, scene), mode);
+ }
}
static void rna_Base_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
@@ -1916,7 +1920,7 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "material_slots", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
RNA_def_property_struct_type(prop, "MaterialSlot");
- RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", NULL, NULL, NULL); /* don't dereference pointer! */
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_iterator_array_get", NULL, NULL, NULL, NULL); /* don't dereference pointer! */
RNA_def_property_ui_text(prop, "Material Slots", "Material slots in the object");
prop= RNA_def_property(srna, "active_material", PROP_POINTER, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 0b137633349..a6e0e9f3331 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -827,8 +827,7 @@ static void rna_def_pointcache(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
prop= RNA_def_property(srna, "point_caches", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", "rna_iterator_listbase_next",
- "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "PointCache");
RNA_def_property_ui_text(prop, "Point Cache List", "Point cache list");
rna_def_ptcache_point_caches(brna, prop);
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 8eb25290b18..f0f782fede2 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -691,14 +691,13 @@ static void rna_ParticleDupliWeight_active_index_set(struct PointerRNA *ptr, int
}
}
+static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str);
+
static int rna_ParticleDupliWeight_name_length(PointerRNA *ptr)
{
- ParticleDupliWeight *dw= ptr->data;
-
- if(dw->ob)
- return strlen(dw->ob->id.name+2) + 7;
- else
- return 9 + 7;
+ char tstr[32];
+ rna_ParticleDupliWeight_name_get(ptr, tstr);
+ return strlen(tstr);
}
static void rna_ParticleDupliWeight_name_get(PointerRNA *ptr, char *str)
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 338073fde00..b61495edc94 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -1240,7 +1240,7 @@ static void rna_def_pose(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "chanbase", NULL);
RNA_def_property_struct_type(prop, "PoseBone");
RNA_def_property_ui_text(prop, "Pose Bones", "Individual pose bones for the armature");
- RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, "rna_PoseBones_lookup_string"); /* can be removed, only for fast lookup */
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, "rna_PoseBones_lookup_string", NULL); /* can be removed, only for fast lookup */
/* bone groups */
prop= RNA_def_property(srna, "bone_groups", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "agroups", NULL);
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 1003c9bfba2..f5fab9d2f33 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -329,8 +329,7 @@ static void rna_def_render_result(BlenderRNA *brna)
parm= RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(parm, "RenderLayer");
- RNA_def_property_collection_funcs(parm, "rna_RenderResult_layers_begin", "rna_iterator_listbase_next",
- "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(parm, "rna_RenderResult_layers_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_define_verify_sdna(1);
}
@@ -361,8 +360,7 @@ static void rna_def_render_layer(BlenderRNA *brna)
prop= RNA_def_property(srna, "passes", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "RenderPass");
- RNA_def_property_collection_funcs(prop, "rna_RenderLayer_passes_begin", "rna_iterator_listbase_next",
- "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_RenderLayer_passes_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
prop= RNA_def_property(srna, "rect", PROP_FLOAT, PROP_NONE);
RNA_def_property_flag(prop, PROP_DYNAMIC);
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 95c6b066510..376b0c529d0 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -506,6 +506,13 @@ static int rna_Property_readonly_get(PointerRNA *ptr)
return prop->flag & PROP_EDITABLE ? 0:1;
}
+static int rna_Property_animatable_get(PointerRNA *ptr)
+{
+ PropertyRNA *prop= (PropertyRNA*)ptr->data;
+
+ return (prop->flag & PROP_ANIMATABLE) != 0;
+}
+
static int rna_Property_use_output_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
@@ -979,13 +986,13 @@ static void rna_def_struct(BlenderRNA *brna)
prop= RNA_def_property(srna, "properties", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Property");
- RNA_def_property_collection_funcs(prop, "rna_Struct_properties_begin", "rna_Struct_properties_next", "rna_iterator_listbase_end", "rna_Struct_properties_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Struct_properties_begin", "rna_Struct_properties_next", "rna_iterator_listbase_end", "rna_Struct_properties_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Properties", "Properties in the struct");
prop= RNA_def_property(srna, "functions", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "Function");
- RNA_def_property_collection_funcs(prop, "rna_Struct_functions_begin", "rna_Struct_functions_next", "rna_iterator_listbase_end", "rna_Struct_functions_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Struct_functions_begin", "rna_Struct_functions_next", "rna_iterator_listbase_end", "rna_Struct_functions_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Functions", "");
}
@@ -1066,6 +1073,11 @@ static void rna_def_property(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, "rna_Property_readonly_get", NULL);
RNA_def_property_ui_text(prop, "Read Only", "Property is editable through RNA");
+ prop= RNA_def_property(srna, "is_animatable", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Property_animatable_get", NULL);
+ RNA_def_property_ui_text(prop, "Animatable", "Property is animatable through RNA");
+
prop= RNA_def_property(srna, "is_required", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_is_required_get", NULL);
@@ -1135,7 +1147,7 @@ static void rna_def_function(BlenderRNA *brna)
prop= RNA_def_property(srna, "parameters", PROP_COLLECTION, PROP_NONE);
/*RNA_def_property_clear_flag(prop, PROP_EDITABLE);*/
RNA_def_property_struct_type(prop, "Property");
- RNA_def_property_collection_funcs(prop, "rna_Function_parameters_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Function_parameters_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Parameters", "Parameters for the function");
prop= RNA_def_property(srna, "is_registered", PROP_BOOLEAN, PROP_NONE);
@@ -1286,7 +1298,7 @@ static void rna_def_enum_property(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "enum_items", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "EnumPropertyItem");
- RNA_def_property_collection_funcs(prop, "rna_EnumProperty_items_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_EnumProperty_items_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", NULL, NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Items", "Possible values for the property");
srna= RNA_def_struct(brna, "EnumPropertyItem", NULL);
@@ -1389,9 +1401,9 @@ void RNA_def_rna(BlenderRNA *brna)
RNA_def_property_collection_funcs(prop, "rna_BlenderRNA_structs_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get",
/* included for speed, can be removed */
#if 0
- 0,0,0);
+ 0,0,0,0);
#else
- "rna_BlenderRNA_structs_length", "rna_BlenderRNA_structs_lookup_int", "rna_BlenderRNA_structs_lookup_string");
+ "rna_BlenderRNA_structs_length", "rna_BlenderRNA_structs_lookup_int", "rna_BlenderRNA_structs_lookup_string", NULL);
#endif
RNA_def_property_ui_text(prop, "Structs", "");
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 2eb095aea3d..dbcfb8c333c 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3482,14 +3482,14 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
RNA_def_property_struct_type(prop, "ObjectBase");
RNA_def_property_ui_text(prop, "Bases", "");
- RNA_def_property_collection_funcs(prop, 0, 0, 0, 0, 0, 0, "rna_Scene_object_bases_lookup_string");
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, NULL, NULL, NULL, "rna_Scene_object_bases_lookup_string", NULL);
rna_def_scene_bases(brna, prop);
prop= RNA_def_property(srna, "objects", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "base", NULL);
RNA_def_property_struct_type(prop, "Object");
RNA_def_property_ui_text(prop, "Objects", "");
- RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_Scene_objects_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_Scene_objects_get", NULL, NULL, NULL, NULL);
rna_def_scene_objects(brna, prop);
/* Layers */
@@ -3619,8 +3619,7 @@ void RNA_def_scene(BlenderRNA *brna)
rna_def_scene_keying_sets(brna, prop);
prop= RNA_def_property(srna, "keying_sets_all", PROP_COLLECTION, PROP_NONE);
- RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next",
- "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_Scene_all_keyingsets_begin", "rna_Scene_all_keyingsets_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL);
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_ui_text(prop, "All Keying Sets",
"All Keying Sets available for use (Builtins and Absolute Keying Sets for this Scene)");
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 3d81ec24d29..a75166c3e99 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1174,13 +1174,13 @@ static void rna_def_editor(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Sequences", "");
- RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_sequences_all_begin", "rna_SequenceEditor_sequences_all_next", 0, 0, 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_sequences_all_begin", "rna_SequenceEditor_sequences_all_next", NULL, NULL, NULL, NULL, NULL, NULL);
prop= RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip");
- RNA_def_property_collection_funcs(prop, 0, 0, 0, "rna_SequenceEditor_meta_stack_get", 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_SequenceEditor_meta_stack_get", NULL, NULL, NULL, NULL);
prop= RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
@@ -1350,7 +1350,7 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
RNA_def_property_struct_type(prop, "SequenceElement");
RNA_def_property_ui_text(prop, "Elements", "");
- RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_SequenceEditor_elements_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_SequenceEditor_elements_length", NULL, NULL, NULL);
rna_def_filter_video(srna);
rna_def_proxy(srna);
@@ -1426,7 +1426,7 @@ static void rna_def_movie(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
RNA_def_property_struct_type(prop, "SequenceElement");
RNA_def_property_ui_text(prop, "Elements", "");
- RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_SequenceEditor_elements_length", 0, 0);
+ RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next", "rna_iterator_array_end", "rna_iterator_array_get", "rna_SequenceEditor_elements_length", NULL, NULL, NULL);
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "File", "");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index fa98e07da20..8afcd61b9c8 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1365,7 +1365,7 @@ static void rna_def_space_view3d(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_pivot_point_align", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_ALIGN);
- RNA_def_property_ui_text(prop, "Align", "Manipulate object centers only");
+ RNA_def_property_ui_text(prop, "Align", "Manipulate center points (object and pose mode only)");
RNA_def_property_ui_icon(prop, ICON_ALIGN, 0);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, "rna_SpaceView3D_pivot_update");
@@ -1751,7 +1751,7 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_marker_sync", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MARKER_TRANS);
- RNA_def_property_ui_text(prop, "Transform Markers", "Transform markers as well as strips");
+ RNA_def_property_ui_text(prop, "Sync Markers", "Transform markers as well as strips");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
prop= RNA_def_property(srna, "show_separate_color", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 21a426640f2..b5e8acb76e5 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -559,7 +559,7 @@ static void rna_def_filter_common(StructRNA *srna)
prop= RNA_def_property(srna, "use_mipmap_gauss", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "imaflag", TEX_GAUSS_MIP);
- RNA_def_property_ui_text(prop, "MIP Map Gaussian filter", "Uses Gauss filter to sample down MIP maps");
+ RNA_def_property_ui_text(prop, "MIP Map Gaussian filter", "Use Gauss filter to sample down MIP maps");
RNA_def_property_update(prop, 0, "rna_Texture_update");
prop= RNA_def_property(srna, "filter_type", PROP_ENUM, PROP_NONE);
@@ -591,7 +591,7 @@ static void rna_def_filter_common(StructRNA *srna)
RNA_def_property_float_sdna(prop, NULL, "filtersize");
RNA_def_property_range(prop, 0.1, 50.0);
RNA_def_property_ui_range(prop, 0.1, 50.0, 1, 0.2);
- RNA_def_property_ui_text(prop, "Filter Size", "Multiplies the filter size used by MIP Map and Interpolation");
+ RNA_def_property_ui_text(prop, "Filter Size", "Multiply the filter size used by MIP Map and Interpolation");
RNA_def_property_update(prop, 0, "rna_Texture_update");
}
@@ -601,9 +601,9 @@ static void rna_def_environment_map(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem prop_source_items[] = {
- {ENV_STATIC, "STATIC", 0, "Static", "Calculates environment map only once"},
- {ENV_ANIM, "ANIMATED", 0, "Animated", "Calculates environment map at each rendering"},
- {ENV_LOAD, "IMAGE_FILE", 0, "Image File", "Loads a saved environment map image from disk"},
+ {ENV_STATIC, "STATIC", 0, "Static", "Calculate environment map only once"},
+ {ENV_ANIM, "ANIMATED", 0, "Animated", "Calculate environment map at each rendering"},
+ {ENV_LOAD, "IMAGE_FILE", 0, "Image File", "Load a saved environment map image from disk"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_mapping_items[] = {
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 29357362ae2..2c2bc4704bf 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -781,9 +781,9 @@ static void rna_def_menu(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP);
RNA_def_property_ui_text(prop, "ID Name",
"If this is set, the menu gets a custom ID, otherwise it takes the "
- "name of the class used to define the panel. For example, if the "
+ "name of the class used to define the menu (for example, if the "
"class name is \"OBJECT_MT_hello\", and bl_idname is not set by the "
- "script, then bl_idname = \"OBJECT_MT_hello\"");
+ "script, then bl_idname = \"OBJECT_MT_hello\")");
prop= RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->label");
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index e2f504c81db..6d34da9ec38 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -428,6 +428,10 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_reports_banner", "uiTemplateReportsBanner");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "template_keymap_item_properties", "uiTemplateKeymapItemProperties");
+ parm= RNA_def_pointer(func, "item", "KeyMapItem", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
+
func= RNA_def_function(srna, "introspect", "uiLayoutIntrospect");
parm= RNA_def_string(func, "string", "", 1024*1024, "Descr", "DESCR");
RNA_def_function_return(func, parm);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 8fa780de498..e9df79acd4a 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -451,7 +451,7 @@ static PointerRNA rna_Operator_properties_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, op->type->srna, op->properties);
}
-static PointerRNA rna_OperatorTypeMacro_properties_get(PointerRNA *ptr)
+static PointerRNA rna_OperatorMacro_properties_get(PointerRNA *ptr)
{
wmOperatorTypeMacro *otmacro= (wmOperatorTypeMacro*)ptr->data;
wmOperatorType *ot = WM_operatortype_find(otmacro->idname, TRUE);
@@ -1277,8 +1277,8 @@ static void rna_def_operator_type_macro(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "OperatorTypeMacro", NULL);
- RNA_def_struct_ui_text(srna, "OperatorTypeMacro", "Storage of a sub operator in a macro after it has been added");
+ srna= RNA_def_struct(brna, "OperatorMacro", NULL);
+ RNA_def_struct_ui_text(srna, "Operator Macro", "Storage of a sub operator in a macro after it has been added");
RNA_def_struct_sdna(srna, "wmOperatorTypeMacro");
// prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
@@ -1291,7 +1291,7 @@ static void rna_def_operator_type_macro(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_struct_type(prop, "OperatorProperties");
RNA_def_property_ui_text(prop, "Properties", "");
- RNA_def_property_pointer_funcs(prop, "rna_OperatorTypeMacro_properties_get", NULL, NULL, NULL);
+ RNA_def_property_pointer_funcs(prop, "rna_OperatorMacro_properties_get", NULL, NULL, NULL);
}
static void rna_def_operator_utils(BlenderRNA *brna)
diff --git a/source/blender/nodes/composite/nodes/node_composite_idMask.c b/source/blender/nodes/composite/nodes/node_composite_idMask.c
index 43f78a90add..ddab415b3be 100644
--- a/source/blender/nodes/composite/nodes/node_composite_idMask.c
+++ b/source/blender/nodes/composite/nodes/node_composite_idMask.c
@@ -99,7 +99,7 @@ static void node_composit_exec_idmask(void *data, bNode *node, bNodeStack **in,
stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1); /* allocs */;
- if(rd->scemode & R_FULL_SAMPLE)
+ if((rd->scemode & R_FULL_SAMPLE) || node->custom2 == 0)
do_idmask_fsa(stackbuf, cbuf, (float)node->custom1);
else
do_idmask(stackbuf, cbuf, (float)node->custom1);
diff --git a/source/blender/python/generic/bpy_internal_import.c b/source/blender/python/generic/bpy_internal_import.c
index 90260100c83..d29bc798399 100644
--- a/source/blender/python/generic/bpy_internal_import.c
+++ b/source/blender/python/generic/bpy_internal_import.c
@@ -93,7 +93,7 @@ void bpy_import_main_set(struct Main *maggie)
/* returns a dummy filename for a textblock so we can tell what file a text block comes from */
void bpy_text_filename_get(char *fn, size_t fn_len, Text *text)
{
- BLI_snprintf(fn, fn_len, "%s%c%s", text->id.lib ? text->id.lib->filepath : bpy_import_main->name, SEP, text->id.name+2);
+ BLI_snprintf(fn, fn_len, "%s%c%s", ID_BLEND_PATH(bpy_import_main, &text->id), SEP, text->id.name+2);
}
PyObject *bpy_text_import(Text *text)
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index fe747cdcce5..7e366c02f4f 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -40,7 +40,7 @@ void bpy_app_generic_callback(struct Main *main, struct ID *id, void *arg);
static PyTypeObject BlenderAppCbType;
static PyStructSequence_Field app_cb_info_fields[]= {
- {(char *)"frame_change_pre", NULL},
+ {(char *)"frame_change_pre", NULL},
{(char *)"frame_change_post", NULL},
{(char *)"render_pre", NULL},
{(char *)"render_post", NULL},
diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c
index f3ef55d29c4..319790340ca 100644
--- a/source/blender/python/intern/bpy_driver.c
+++ b/source/blender/python/intern/bpy_driver.c
@@ -41,6 +41,9 @@
#include "bpy_driver.h"
+extern void BPY_update_rna_module(void);
+
+
/* for pydrivers (drivers using one-line Python expressions to express relationships between targets) */
PyObject *bpy_pydriver_Dict= NULL;
@@ -164,6 +167,10 @@ float BPY_driver_exec(ChannelDriver *driver)
if(use_gil)
gilstate= PyGILState_Ensure();
+ /* needed since drivers are updated directly after undo where 'main' is
+ * re-allocated [#28807] */
+ BPY_update_rna_module();
+
/* init global dictionary for py-driver evaluation settings */
if (!bpy_pydriver_Dict) {
if (bpy_pydriver_create_dict() != 0) {
diff --git a/source/blender/python/intern/bpy_operator.c b/source/blender/python/intern/bpy_operator.c
index 7327679cc7e..dedc5df1f1c 100644
--- a/source/blender/python/intern/bpy_operator.c
+++ b/source/blender/python/intern/bpy_operator.c
@@ -408,12 +408,51 @@ static PyObject *pyop_getrna(PyObject *UNUSED(self), PyObject *value)
return (PyObject *)pyrna;
}
+static PyObject *pyop_getinstance(PyObject *UNUSED(self), PyObject *value)
+{
+ wmOperatorType *ot;
+ wmOperator *op;
+ PointerRNA ptr;
+ char *opname= _PyUnicode_AsString(value);
+ BPy_StructRNA *pyrna= NULL;
+
+ if(opname==NULL) {
+ PyErr_SetString(PyExc_TypeError, "_bpy.ops.get_instance() expects a string argument");
+ return NULL;
+ }
+ ot= WM_operatortype_find(opname, TRUE);
+ if(ot==NULL) {
+ PyErr_Format(PyExc_KeyError, "_bpy.ops.get_instance(\"%s\") not found", opname);
+ return NULL;
+ }
+
+#ifdef PYRNA_FREE_SUPPORT
+ op= MEM_callocN(sizeof(wmOperator), __func__);
+#else
+ op= PyMem_MALLOC(sizeof(wmOperator));
+ memset(op, 0, sizeof(wmOperator));
+#endif
+ BLI_strncpy(op->idname, op->idname, sizeof(op->idname)); /* incase its needed */
+ op->type= ot;
+
+ RNA_pointer_create(NULL, &RNA_Operator, op, &ptr);
+
+ pyrna= (BPy_StructRNA *)pyrna_struct_CreatePyObject(&ptr);
+#ifdef PYRNA_FREE_SUPPORT
+ pyrna->freeptr= TRUE;
+#endif
+ op->ptr= &pyrna->ptr;
+
+ return (PyObject *)pyrna;
+}
+
static struct PyMethodDef bpy_ops_methods[]= {
{"poll", (PyCFunction) pyop_poll, METH_VARARGS, NULL},
{"call", (PyCFunction) pyop_call, METH_VARARGS, NULL},
{"as_string", (PyCFunction) pyop_as_string, METH_VARARGS, NULL},
{"dir", (PyCFunction) pyop_dir, METH_NOARGS, NULL},
- {"get_rna", (PyCFunction) pyop_getrna, METH_O, NULL},
+ {"get_rna", (PyCFunction) pyop_getrna, METH_O, NULL}, /* only for introspection, leaks memory */
+ {"get_instance", (PyCFunction) pyop_getinstance, METH_O, NULL}, /* only for introspection, leaks memory */
{"macro_define", (PyCFunction) PYOP_wrap_macro_define, METH_VARARGS, NULL},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c
index de29cb2aeac..b5ded8b3a65 100644
--- a/source/blender/python/intern/bpy_operator_wrap.c
+++ b/source/blender/python/intern/bpy_operator_wrap.c
@@ -125,7 +125,7 @@ PyObject *PYOP_wrap_macro_define(PyObject *UNUSED(self), PyObject *args)
otmacro= WM_operatortype_macro_define(ot, opname);
- RNA_pointer_create(NULL, &RNA_OperatorTypeMacro, otmacro, &ptr_otmacro);
+ RNA_pointer_create(NULL, &RNA_OperatorMacro, otmacro, &ptr_otmacro);
return pyrna_struct_CreatePyObject(&ptr_otmacro);
}
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index 88383ce84d5..5c668590dff 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -56,13 +56,13 @@ extern BPy_StructRNA *bpy_context_module;
static EnumPropertyItem property_flag_items[]= {
{PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
- {PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
+ {PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animateable", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem property_flag_enum_items[]= {
{PROP_HIDDEN, "HIDDEN", 0, "Hidden", ""},
- {PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
+ {PROP_SKIP_SAVE, "SKIP_SAVE", 0, "Skip Save", ""},
{PROP_ANIMATABLE, "ANIMATABLE", 0, "Animateable", ""},
{PROP_ENUM_FLAG, "ENUM_FLAG", 0, "Enum Flag", ""},
{0, NULL, 0, NULL, NULL}};
@@ -72,7 +72,7 @@ static EnumPropertyItem property_subtype_string_items[]= {
{PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
{PROP_DIRPATH, "DIR_PATH", 0, "Directory Path", ""},
{PROP_FILENAME, "FILENAME", 0, "Filename", ""},
- {PROP_TRANSLATE, "TRANSLATE", 0, "Translate", ""},
+ {PROP_TRANSLATE, "TRANSLATE", 0, "Translate", ""},
{PROP_NONE, "NONE", 0, "None", ""},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index 98aa8c9be35..cb68f9cf2dc 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -84,6 +84,11 @@
static PyObject* pyrna_struct_Subtype(PointerRNA *ptr);
static PyObject *pyrna_prop_collection_values(BPy_PropertyRNA *self);
+#define BPY_DOC_ID_PROP_TYPE_NOTE \
+" .. note:: Only :class:`bpy.types.ID`, :class:`bpy.types.Bone` and \n" \
+" :class:`bpy.types.PoseBone` classes support custom properties.\n"
+
+
int pyrna_struct_validity_check(BPy_StructRNA *pysrna)
{
if(pysrna->ptr.type)
@@ -1922,6 +1927,21 @@ static int pyrna_prop_collection_bool(BPy_PropertyRNA *self)
return test;
}
+
+#define PYRNA_PROP_COLLECTION_ABS_INDEX(ret_err) \
+ /* notice getting the length of the collection is avoided unless negative \
+ * index is used or to detect internal error with a valid index. \
+ * This is done for faster lookups. */ \
+ if(keynum < 0) { \
+ keynum_abs += RNA_property_collection_length(&self->ptr, self->prop); \
+ if(keynum_abs < 0) { \
+ PyErr_Format(PyExc_IndexError, \
+ "bpy_prop_collection[%d]: out of range.", keynum); \
+ return ret_err; \
+ } \
+ } \
+
+
/* internal use only */
static PyObject *pyrna_prop_collection_subscript_int(BPy_PropertyRNA *self, Py_ssize_t keynum)
{
@@ -1930,17 +1950,7 @@ static PyObject *pyrna_prop_collection_subscript_int(BPy_PropertyRNA *self, Py_s
PYRNA_PROP_CHECK_OBJ(self)
- /* notice getting the length of the collection is avoided unless negative index is used
- * or to detect internal error with a valid index.
- * This is done for faster lookups. */
- if(keynum < 0) {
- keynum_abs += RNA_property_collection_length(&self->ptr, self->prop);
-
- if(keynum_abs < 0) {
- PyErr_Format(PyExc_IndexError, "bpy_prop_collection[%d]: out of range.", keynum);
- return NULL;
- }
- }
+ PYRNA_PROP_COLLECTION_ABS_INDEX(NULL);
if(RNA_property_collection_lookup_int(&self->ptr, self->prop, keynum_abs, &newptr)) {
return pyrna_struct_CreatePyObject(&newptr);
@@ -1963,6 +1973,28 @@ static PyObject *pyrna_prop_collection_subscript_int(BPy_PropertyRNA *self, Py_s
}
}
+/* values type must have been already checked */
+static int pyrna_prop_collection_ass_subscript_int(BPy_PropertyRNA *self, Py_ssize_t keynum, PyObject *value)
+{
+ Py_ssize_t keynum_abs= keynum;
+ const PointerRNA *ptr= (value == Py_None) ? (&PointerRNA_NULL) : &((BPy_StructRNA *)value)->ptr;
+
+ PYRNA_PROP_CHECK_INT(self)
+
+ PYRNA_PROP_COLLECTION_ABS_INDEX(-1);
+
+ if(RNA_property_collection_assign_int(&self->ptr, self->prop, keynum_abs, ptr) == 0) {
+
+ PyErr_Format(PyExc_IndexError,
+ "bpy_prop_collection[index] = value: "
+ "failed assignment (unknown reason)", keynum);
+
+ return -1;
+ }
+
+ return 0;
+}
+
static PyObject *pyrna_prop_array_subscript_int(BPy_PropertyArrayRNA *self, int keynum)
{
int len;
@@ -2173,6 +2205,128 @@ static PyObject *pyrna_prop_collection_subscript(BPy_PropertyRNA *self, PyObject
}
}
+/* generic check to see if a PyObject is compatible with a collection
+ * -1 on failier, 0 on success, sets the error */
+static int pyrna_prop_collection_type_check(BPy_PropertyRNA *self, PyObject *value)
+{
+ StructRNA *prop_srna;
+
+ if(value == Py_None) {
+ if (RNA_property_flag(self->prop) & PROP_NEVER_NULL) {
+ PyErr_Format(PyExc_TypeError,
+ "bpy_prop_collection[key] = value: invalid, "
+ "this collection doesnt support None assignment");
+ return -1;
+ }
+ else {
+ return 0; /* None is OK */
+ }
+ }
+ else if (BPy_StructRNA_Check(value) == 0) {
+ PyErr_Format(PyExc_TypeError,
+ "bpy_prop_collection[key] = value: invalid, "
+ "expected a StructRNA type or None, not a %.200s",
+ Py_TYPE(value)->tp_name);
+ return -1;
+ }
+ else if((prop_srna= RNA_property_pointer_type(&self->ptr, self->prop))) {
+ StructRNA *value_srna= ((BPy_StructRNA *)value)->ptr.type;
+ if (RNA_struct_is_a(value_srna, prop_srna) == 0) {
+ PyErr_Format(PyExc_TypeError,
+ "bpy_prop_collection[key] = value: invalid, "
+ "expected a '%.200s' type or None, not a '%.200s'",
+ RNA_struct_identifier(prop_srna),
+ RNA_struct_identifier(value_srna)
+ );
+ return -1;
+ }
+ else {
+ return 0; /* OK, this is the correct type!*/
+ }
+ }
+
+ PyErr_Format(PyExc_TypeError,
+ "bpy_prop_collection[key] = value: internal error, "
+ "failed to get the collection type");
+ return -1;
+}
+
+/* note: currently this is a copy of 'pyrna_prop_collection_subscript' with
+ * large blocks commented, we may support slice/key indicies later */
+static int pyrna_prop_collection_ass_subscript(BPy_PropertyRNA *self, PyObject *key, PyObject *value)
+{
+ PYRNA_PROP_CHECK_INT(self);
+
+ /* validate the assigned value */
+ if(value == NULL) {
+ PyErr_SetString(PyExc_TypeError,
+ "del bpy_prop_collection[key]: not supported");
+ return -1;
+ }
+ else if (pyrna_prop_collection_type_check(self, value) == -1) {
+ return -1; /* exception is set */
+ }
+
+#if 0
+ if (PyUnicode_Check(key)) {
+ return pyrna_prop_collection_subscript_str(self, _PyUnicode_AsString(key));
+ }
+ else
+#endif
+ if (PyIndex_Check(key)) {
+ Py_ssize_t i= PyNumber_AsSsize_t(key, PyExc_IndexError);
+ if (i == -1 && PyErr_Occurred())
+ return -1;
+
+ return pyrna_prop_collection_ass_subscript_int(self, i, value);
+ }
+#if 0 /* TODO, fake slice assignment */
+ else if (PySlice_Check(key)) {
+ PySliceObject *key_slice= (PySliceObject *)key;
+ Py_ssize_t step= 1;
+
+ if(key_slice->step != Py_None && !_PyEval_SliceIndex(key, &step)) {
+ return NULL;
+ }
+ else if (step != 1) {
+ PyErr_SetString(PyExc_TypeError, "bpy_prop_collection[slice]: slice steps not supported");
+ return NULL;
+ }
+ else if(key_slice->start == Py_None && key_slice->stop == Py_None) {
+ return pyrna_prop_collection_subscript_slice(self, 0, PY_SSIZE_T_MAX);
+ }
+ else {
+ Py_ssize_t start= 0, stop= PY_SSIZE_T_MAX;
+
+ /* avoid PySlice_GetIndicesEx because it needs to know the length ahead of time. */
+ if(key_slice->start != Py_None && !_PyEval_SliceIndex(key_slice->start, &start)) return NULL;
+ if(key_slice->stop != Py_None && !_PyEval_SliceIndex(key_slice->stop, &stop)) return NULL;
+
+ if(start < 0 || stop < 0) {
+ /* only get the length for negative values */
+ Py_ssize_t len= (Py_ssize_t)RNA_property_collection_length(&self->ptr, self->prop);
+ if(start < 0) start += len;
+ if(stop < 0) start += len;
+ }
+
+ if (stop - start <= 0) {
+ return PyList_New(0);
+ }
+ else {
+ return pyrna_prop_collection_subscript_slice(self, start, stop);
+ }
+ }
+ }
+#endif
+ else {
+ PyErr_Format(PyExc_TypeError,
+ "bpy_prop_collection[key]: invalid key, "
+ "must be a string or an int, not %.200s",
+ Py_TYPE(key)->tp_name);
+ return -1;
+ }
+}
+
static PyObject *pyrna_prop_array_subscript(BPy_PropertyArrayRNA *self, PyObject *key)
{
PYRNA_PROP_CHECK_OBJ((BPy_PropertyRNA *)self)
@@ -2409,7 +2563,7 @@ static PyMappingMethods pyrna_prop_array_as_mapping= {
static PyMappingMethods pyrna_prop_collection_as_mapping= {
(lenfunc) pyrna_prop_collection_length, /* mp_length */
(binaryfunc) pyrna_prop_collection_subscript, /* mp_subscript */
- (objobjargproc) NULL, /* mp_ass_subscript */
+ (objobjargproc) pyrna_prop_collection_ass_subscript, /* mp_ass_subscript */
};
/* only for fast bool's, large structs, assign nb_bool on init */
@@ -2505,7 +2659,7 @@ static PySequenceMethods pyrna_prop_collection_as_sequence= {
NULL, /* sq_repeat */
(ssizeargfunc)pyrna_prop_collection_subscript_int, /* sq_item */ /* Only set this so PySequence_Check() returns True */
NULL, /* *was* sq_slice */
- NULL, /* sq_ass_item */
+ (ssizeobjargproc)/* pyrna_prop_collection_ass_subscript_int */ NULL /* let mapping take this one */, /* sq_ass_item */
NULL, /* *was* sq_ass_slice */
(objobjproc)pyrna_prop_collection_contains, /* sq_contains */
(binaryfunc) NULL, /* sq_inplace_concat */
@@ -2597,8 +2751,7 @@ PyDoc_STRVAR(pyrna_struct_keys_doc,
" :return: custom property keys.\n"
" :rtype: list of strings\n"
"\n"
-" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone` classes\n"
-" support custom properties.\n"
+BPY_DOC_ID_PROP_TYPE_NOTE
);
static PyObject *pyrna_struct_keys(BPy_PropertyRNA *self)
{
@@ -2626,8 +2779,7 @@ PyDoc_STRVAR(pyrna_struct_items_doc,
" :return: custom property key, value pairs.\n"
" :rtype: list of key, value tuples\n"
"\n"
-" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
-" classes support custom properties.\n"
+BPY_DOC_ID_PROP_TYPE_NOTE
);
static PyObject *pyrna_struct_items(BPy_PropertyRNA *self)
{
@@ -2655,8 +2807,7 @@ PyDoc_STRVAR(pyrna_struct_values_doc,
" :return: custom property values.\n"
" :rtype: list\n"
"\n"
-" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
-" classes support custom properties.\n"
+BPY_DOC_ID_PROP_TYPE_NOTE
);
static PyObject *pyrna_struct_values(BPy_PropertyRNA *self)
{
@@ -3506,18 +3657,28 @@ static PyObject *pyrna_struct_get_id_data(BPy_DummyPointerRNA *self)
Py_RETURN_NONE;
}
+static PyObject *pyrna_struct_get_rna_type(BPy_PropertyRNA *self)
+{
+ PointerRNA tptr;
+ RNA_pointer_create(NULL, &RNA_Property, self->prop, &tptr);
+ return pyrna_struct_Subtype(&tptr);
+}
+
+
+
/*****************************************************************************/
/* Python attributes get/set structure: */
/*****************************************************************************/
static PyGetSetDef pyrna_prop_getseters[]= {
- {(char *)"id_data", (getter)pyrna_struct_get_id_data, (setter)NULL, (char *)"The :class:`ID` object this datablock is from or None, (not available for all data types)", NULL},
+ {(char *)"id_data", (getter)pyrna_struct_get_id_data, (setter)NULL, (char *)"The :class:`bpy.types.ID` object this datablock is from or None, (not available for all data types)", NULL},
+ {(char *)"rna_type", (getter)pyrna_struct_get_rna_type, (setter)NULL, (char *)"The property type for introspection", NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
static PyGetSetDef pyrna_struct_getseters[]= {
- {(char *)"id_data", (getter)pyrna_struct_get_id_data, (setter)NULL, (char *)"The :class:`ID` object this datablock is from or None, (not available for all data types)", NULL},
+ {(char *)"id_data", (getter)pyrna_struct_get_id_data, (setter)NULL, (char *)"The :class:`bpy.types.ID` object this datablock is from or None, (not available for all data types)", NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
@@ -3624,8 +3785,7 @@ PyDoc_STRVAR(pyrna_struct_get_doc,
" *key* is not found.\n"
" :type default: Undefined\n"
"\n"
-" .. note:: Only :class:`ID`, :class:`Bone` and :class:`PoseBone`\n"
-" classes support custom properties.\n"
+BPY_DOC_ID_PROP_TYPE_NOTE
);
static PyObject *pyrna_struct_get(BPy_StructRNA *self, PyObject *args)
{
@@ -4706,7 +4866,11 @@ PyTypeObject pyrna_struct_meta_idprop_Type= {
NULL, /* struct PyMethodDef *tp_methods; */
NULL, /* struct PyMemberDef *tp_members; */
NULL, /* struct PyGetSetDef *tp_getset; */
- NULL, /* struct _typeobject *tp_base; */
+#if defined(_MSC_VER) || defined(FREE_WINDOWS)
+ NULL, /* defer assignment */
+#else
+ &PyType_Type, /* struct _typeobject *tp_base; */
+#endif
NULL, /* PyObject *tp_dict; */
NULL, /* descrgetfunc tp_descr_get; */
NULL, /* descrsetfunc tp_descr_set; */
@@ -5277,7 +5441,11 @@ PyTypeObject pyrna_prop_collection_iter_Type= {
NULL, /* reprfunc tp_str; */
/* will only use these if this is a subtype of a py class */
+#if defined(_MSC_VER) || defined(FREE_WINDOWS)
+ NULL, /* defer assignment */
+#else
PyObject_GenericGetAttr, /* getattrofunc tp_getattro; */
+#endif
NULL, /* setattrofunc tp_setattro; */
/* Functions to access object as input/output buffer */
@@ -5306,7 +5474,11 @@ PyTypeObject pyrna_prop_collection_iter_Type= {
#endif
/*** Added in release 2.2 ***/
/* Iterators */
+#if defined(_MSC_VER) || defined(FREE_WINDOWS)
+ NULL, /* defer assignment */
+#else
PyObject_SelfIter, /* getiterfunc tp_iter; */
+#endif
(iternextfunc) pyrna_prop_collection_iter_next, /* iternextfunc tp_iternext; */
/*** Attribute descriptor and subclassing stuff ***/
@@ -5692,8 +5864,15 @@ void BPY_rna_init(void)
mathutils_rna_matrix_cb_index= Mathutils_RegisterCallback(&mathutils_rna_matrix_cb);
#endif
- /* metaclass */
+ /* for some reason MSVC complains of these */
+#if defined(_MSC_VER) || defined(FREE_WINDOWS)
pyrna_struct_meta_idprop_Type.tp_base= &PyType_Type;
+
+ pyrna_prop_collection_iter_Type.tp_iter= PyObject_SelfIter;
+ pyrna_prop_collection_iter_Type.tp_getattro= PyObject_GenericGetAttr;
+#endif
+
+ /* metaclass */
if(PyType_Ready(&pyrna_struct_meta_idprop_Type) < 0)
return;
@@ -5738,7 +5917,11 @@ PyObject *BPY_rna_module(void)
void BPY_update_rna_module(void)
{
+#if 0
RNA_main_pointer_create(G.main, rna_module_ptr);
+#else
+ rna_module_ptr->data= G.main; /* just set data is enough */
+#endif
}
#if 0
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index 8bde1db96ca..d766acc098e 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -273,7 +273,7 @@ char pyrna_struct_driver_add_doc[] =
" :arg index: array index of the property drive. Defaults to -1 for all indices or a single channel if the property is not an array.\n"
" :type index: int\n"
" :return: The driver(s) added.\n"
-" :rtype: :class:`FCurve` or list if index is -1 with an array property.\n"
+" :rtype: :class:`bpy.types.FCurve` or list if index is -1 with an array property.\n"
;
PyObject *pyrna_struct_driver_add(BPy_StructRNA *self, PyObject *args)
{
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index 4a0fa509a0d..b2f56f8ad3c 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -94,11 +94,11 @@ int mathutils_array_parse(float *array, int array_min, int array_max, PyObject *
#if 1 /* approx 6x speedup for mathutils types */
int size;
- if( (VectorObject_Check(value) && (size= ((VectorObject *)value)->size)) ||
- (EulerObject_Check(value) && (size= 3)) ||
- (QuaternionObject_Check(value) && (size= 4)) ||
- (ColorObject_Check(value) && (size= 3))
- ) {
+ if( (size= VectorObject_Check(value) ? ((VectorObject *)value)->size : 0) ||
+ (size= EulerObject_Check(value) ? 3 : 0) ||
+ (size= QuaternionObject_Check(value) ? 4 : 0) ||
+ (size= ColorObject_Check(value) ? 3 : 0))
+ {
if(BaseMath_ReadCallback((BaseMathObject *)value) == -1) {
return -1;
}
diff --git a/source/blender/quicktime/SConscript b/source/blender/quicktime/SConscript
index 82735dc96bd..a128ded965c 100644
--- a/source/blender/quicktime/SConscript
+++ b/source/blender/quicktime/SConscript
@@ -35,6 +35,6 @@ defs=['WITH_QUICKTIME']
if env['WITH_GHOST_COCOA']:
defs.append('GHOST_COCOA')
- env.BlenderLib ('bf_quicktime', sources=source_files, includes=incs, defines=defs, libtype=types, priority=priorities, cc_compilerchange='/usr/bin/gcc-4.2', cxx_compilerchange='/usr/bin/gcc-4.2') # always use Apple-gcc-4.2 for objC language, for gnu-compilers do not support it fully yet
+ env.BlenderLib ('bf_quicktime', sources=source_files, includes=incs, defines=defs, libtype=types, priority=priorities, cc_compilerchange='/usr/bin/gcc-4.2', cxx_compilerchange='/usr/bin/g++-4.2') # always use Apple-gcc-4.2 for objC language, for gnu-compilers do not support it fully yet
else:
env.BlenderLib ('bf_quicktime', sources=source_files, includes=incs, defines=defs, libtype=types, priority=priorities)
diff --git a/source/blender/render/intern/source/convertblender.c b/source/blender/render/intern/source/convertblender.c
index 0835b0ef07f..c241603f64a 100644
--- a/source/blender/render/intern/source/convertblender.c
+++ b/source/blender/render/intern/source/convertblender.c
@@ -4359,9 +4359,9 @@ static void finalize_render_object(Render *re, ObjectRen *obr, int timeoffset)
/* Database */
/* ------------------------------------------------------------------------- */
-static int render_object_type(int type)
+static int render_object_type(short type)
{
- return ELEM5(type, OB_FONT, OB_CURVE, OB_SURF, OB_MESH, OB_MBALL);
+ return OB_TYPE_SUPPORT_MATERIAL(type);
}
static void find_dupli_instances(Render *re, ObjectRen *obr)
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index cc3ae3ab753..fec59e97194 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -464,8 +464,6 @@ typedef struct wmOperatorType {
/* struct wmOperatorTypeMacro */
ListBase macro;
- short flag;
-
/* pointer to modal keymap, do not free! */
struct wmKeyMap *modalkeymap;
@@ -476,6 +474,10 @@ typedef struct wmOperatorType {
/* RNA integration */
ExtensionRNA ext;
+
+ /* Flag last for padding */
+ short flag;
+
} wmOperatorType;
/* **************** Paint Cursor ******************* */
@@ -540,11 +542,12 @@ typedef struct wmDropBox {
/* if poll survives, operator is called */
wmOperatorType *ot; /* not saved in file, so can be pointer */
- short opcontext; /* default invoke */
-
- struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
+
+ struct IDProperty *properties; /* operator properties, assigned to ptr->data and can be written to a file */
struct PointerRNA *ptr; /* rna pointer to access properties */
+ short opcontext; /* default invoke */
+
} wmDropBox;
/* *************** migrated stuff, clean later? ************** */
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 596fa35d597..cafee6b49ca 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -1278,6 +1278,10 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
}
/* Finished and pass through flag as handled */
+ /* Finished and pass through flag as handled */
+ if(retval == (OPERATOR_FINISHED|OPERATOR_PASS_THROUGH))
+ return WM_HANDLER_HANDLED;
+
/* Modal unhandled, break */
if(retval == (OPERATOR_PASS_THROUGH|OPERATOR_RUNNING_MODAL))
return (WM_HANDLER_BREAK|WM_HANDLER_MODAL);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 76ebeaa9f21..bf5b60d691f 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -412,6 +412,10 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
BPY_app_handlers_reset();
BPY_modules_load_user(C);
#endif
+
+ /* important to do before NULL'ing the context */
+ BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
+
CTX_wm_window_set(C, NULL); /* exits queues */
#if 0 /* gives popups on windows but not linux, bug in report API but disable for now to stop users getting annoyed */
@@ -429,8 +433,6 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
// XXX undo_editmode_clear();
BKE_reset_undo();
BKE_write_undo(C, "original"); /* save current state */
-
- BLI_exec_cb(CTX_data_main(C), NULL, BLI_CB_EVT_LOAD_POST);
}
else if(retval == BKE_READ_EXOTIC_OK_OTHER)
BKE_write_undo(C, "Import file");
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index b980b45bae4..16cba7d6758 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1280,7 +1280,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar
uiItemL(col, "Links", ICON_NONE);
uiItemStringO(col, UI_translate_do_iface(N_("Donations")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/blenderorg/blender-foundation/donation-payment");
uiItemStringO(col, UI_translate_do_iface(N_("Credits")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/credits");
- uiItemStringO(col, UI_translate_do_iface(N_("Release Log")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-259");
+ uiItemStringO(col, UI_translate_do_iface(N_("Release Log")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/development/release-logs/blender-260");
uiItemStringO(col, UI_translate_do_iface(N_("Manual")), ICON_URL, "WM_OT_url_open", "url", "http://wiki.blender.org/index.php/Doc:2.5/Manual");
uiItemStringO(col, UI_translate_do_iface(N_("Blender Website")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org");
uiItemStringO(col, UI_translate_do_iface(N_("User Community")), ICON_URL, "WM_OT_url_open", "url", "http://www.blender.org/community/user-community");
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 1c09792dbd8..48ea958f4b7 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -387,6 +387,7 @@ void uiTemplateHistogram(struct uiLayout *layout, struct PointerRNA *ptr, char *
void uiTemplateReportsBanner(struct uiLayout *layout, struct bContext *C, struct wmOperator *op){}
void uiTemplateWaveform(struct uiLayout *layout, struct PointerRNA *ptr, char *propname, int expand){}
void uiTemplateVectorscope(struct uiLayout *_self, struct PointerRNA *data, char* property, int expand){}
+void uiTemplateKeymapItemProperties(struct uiLayout *layout, struct PointerRNA *ptr){}
/* rna render */
struct RenderResult *RE_engine_begin_result(struct RenderEngine *engine, int x, int y, int w, int h){return (struct RenderResult *) NULL;}
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index e11b4f5562f..70e90164e81 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -125,7 +125,7 @@ if(WIN32 AND NOT UNIX)
-DBLEN_VER_RC_4=0
)
endif()
-
+
list(APPEND SRC
../icons/winblender.rc
@@ -198,16 +198,16 @@ if(WITH_PYTHON_MODULE)
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin # only needed on windows
)
-
+
if(WIN32)
# python modules use this
set_target_properties(
blender
PROPERTIES
SUFFIX ".pyd"
- )
+ )
endif()
-
+
else()
add_executable(blender ${EXETYPE} ${SRC})
endif()
@@ -351,11 +351,6 @@ if(UNIX AND NOT APPLE)
if(WITH_INTERNATIONAL)
install(
- FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
- DESTINATION ${TARGETDIR_VER}
- )
-
- install(
DIRECTORY
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
@@ -428,10 +423,6 @@ elseif(WIN32)
if(WITH_INTERNATIONAL) # same as linux!, deduplicate
install(
- FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
- DESTINATION ${TARGETDIR_VER}
- )
- install(
DIRECTORY
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
@@ -591,12 +582,12 @@ elseif(WIN32)
FILES ${LIBDIR}/thumbhandler/lib/BlendThumb.dll
DESTINATION ${TARGETDIR}
)
- else()
- install(
- FILES ${LIBDIR}/thumbhandler/lib/BlendThumb64.dll
- DESTINATION ${TARGETDIR}
- )
endif()
+
+ install( # x86 builds can run on x64 Windows, so this is required at all times
+ FILES ${LIBDIR}/thumbhandler/lib/BlendThumb64.dll
+ DESTINATION ${TARGETDIR}
+ )
elseif(APPLE)
set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app)
@@ -664,11 +655,6 @@ elseif(APPLE)
# localization
if(WITH_INTERNATIONAL)
install(
- FILES ${CMAKE_SOURCE_DIR}/release/bin/.blender/.Blanguages
- DESTINATION ${TARGETDIR_VER}/datafiles
- )
-
- install(
DIRECTORY
${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
@@ -687,14 +673,14 @@ elseif(APPLE)
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/python)
set(PYTHON_ZIP "python_${CMAKE_OSX_ARCHITECTURES}.zip")
-
+
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/python
COMMAND rm -rf ${CMAKE_CURRENT_BINARY_DIR}/python/
COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/python/
COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${CMAKE_CURRENT_BINARY_DIR}/python/
DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
-
+
add_dependencies(blender extractpyzip)
# copy extracted python files
@@ -728,7 +714,7 @@ elseif(APPLE)
FILES ${PLAYER_SOURCEDIR}/Contents/PkgInfo
DESTINATION ${TARGETDIR}/blenderplayer.app/Contents
)
-
+
install_dir(
${PLAYER_SOURCEDIR}/Contents/Resources
\${TARGETDIR}/blenderplayer.app/Contents/
@@ -742,7 +728,7 @@ elseif(APPLE)
COMMAND mkdir ${CMAKE_CURRENT_BINARY_DIR}/python/
COMMAND unzip -q ${LIBDIR}/release/${PYTHON_ZIP} -d ${CMAKE_CURRENT_BINARY_DIR}/python/
DEPENDS ${LIBDIR}/release/${PYTHON_ZIP})
-
+
# copy extracted python files
install_dir(
${CMAKE_CURRENT_BINARY_DIR}/python
@@ -918,12 +904,12 @@ endif()
message(STATUS "Blender Skipping: (${REM_MSG})")
endif()
target_link_libraries(blender ${BLENDER_SORTED_LIBS})
-
+
unset(SEARCHLIB)
unset(SORTLIB)
unset(REMLIB)
unset(REM_MSG)
-
+
#else()
# target_link_libraries(blender ${BLENDER_LINK_LIBS})
#endif()
diff --git a/source/gameengine/Converter/BlenderWorldInfo.h b/source/gameengine/Converter/BlenderWorldInfo.h
index e7b8784a076..45737bd41bc 100644
--- a/source/gameengine/Converter/BlenderWorldInfo.h
+++ b/source/gameengine/Converter/BlenderWorldInfo.h
@@ -54,22 +54,22 @@ public:
~BlenderWorldInfo();
bool hasWorld();
- bool hasMist();
- float getBackColorRed();
- float getBackColorGreen();
- float getBackColorBlue();
+ bool hasMist();
+ float getBackColorRed();
+ float getBackColorGreen();
+ float getBackColorBlue();
float getAmbientColorRed();
float getAmbientColorGreen();
float getAmbientColorBlue();
- float getMistStart();
- float getMistDistance();
- float getMistColorRed();
- float getMistColorGreen();
- float getMistColorBlue();
+ float getMistStart();
+ float getMistDistance();
+ float getMistColorRed();
+ float getMistColorGreen();
+ float getMistColorBlue();
- void
+ void
setBackColor(
float r,
float g,
diff --git a/source/gameengine/Expressions/PyObjectPlus.h b/source/gameengine/Expressions/PyObjectPlus.h
index d3b2eacbb4d..dd4c9a880fd 100644
--- a/source/gameengine/Expressions/PyObjectPlus.h
+++ b/source/gameengine/Expressions/PyObjectPlus.h
@@ -215,7 +215,7 @@ typedef struct PyObjectPlus_Proxy {
if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(...) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args, kwds); \
}; \
- static const char method_name##_doc[]; \
+ static const char method_name##_doc[]; \
#define KX_PYMETHOD_DOC_VARARGS(class_name, method_name) \
PyObject* Py##method_name(PyObject* args); \
@@ -223,7 +223,7 @@ typedef struct PyObjectPlus_Proxy {
if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(...) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(args); \
}; \
- static const char method_name##_doc[]; \
+ static const char method_name##_doc[]; \
#define KX_PYMETHOD_DOC_O(class_name, method_name) \
PyObject* Py##method_name(PyObject* value); \
@@ -231,7 +231,7 @@ typedef struct PyObjectPlus_Proxy {
if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "(value) - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(value); \
}; \
- static const char method_name##_doc[]; \
+ static const char method_name##_doc[]; \
#define KX_PYMETHOD_DOC_NOARGS(class_name, method_name) \
PyObject* Py##method_name(); \
@@ -239,7 +239,7 @@ typedef struct PyObjectPlus_Proxy {
if(BGE_PROXY_REF(self)==NULL) { PyErr_SetString(PyExc_RuntimeError, #class_name "." #method_name "() - " BGE_PROXY_ERROR_MSG); return NULL; } \
return ((class_name*)BGE_PROXY_REF(self))->Py##method_name(); \
}; \
- static const char method_name##_doc[]; \
+ static const char method_name##_doc[]; \
/* The line above should remain empty */
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
index 7c1824cd4eb..33d7ec5b4fc 100644
--- a/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
+++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.cpp
@@ -134,7 +134,7 @@ PyTypeObject SCA_2DFilterActuator::Type = {
PyMethodDef SCA_2DFilterActuator::Methods[] = {
/* add python functions to deal with m_msg... */
- {NULL,NULL}
+ {NULL,NULL}
};
PyAttributeDef SCA_2DFilterActuator::Attributes[] = {
diff --git a/source/gameengine/GameLogic/SCA_2DFilterActuator.h b/source/gameengine/GameLogic/SCA_2DFilterActuator.h
index 82c82ac3be5..01396839291 100644
--- a/source/gameengine/GameLogic/SCA_2DFilterActuator.h
+++ b/source/gameengine/GameLogic/SCA_2DFilterActuator.h
@@ -38,7 +38,7 @@
class SCA_2DFilterActuator : public SCA_IActuator
{
- Py_Header;
+ Py_Header;
private:
vector<STR_String> m_propNames;
diff --git a/source/gameengine/Ketsji/KX_Dome.cpp b/source/gameengine/Ketsji/KX_Dome.cpp
index f0ea6f15ffe..48ad99ae37b 100644
--- a/source/gameengine/Ketsji/KX_Dome.cpp
+++ b/source/gameengine/Ketsji/KX_Dome.cpp
@@ -231,26 +231,12 @@ void KX_Dome::CalculateImageSize(void)
- reduce the buffer for better performace
- create a power of 2 texture bigger than the buffer
*/
-/*
-Blender handles Canvas size differently when in fullscreen mode.
-We are manually checking for that. Although it's a hack, it works.
-
-Bug reported here: #18655 - Inconsistency of pixels in canvas dimensions when in maximized mode (affecting BGE Dome)
-http://projects.blender.org/tracker/?func=detail&aid=18655&group_id=9&atid=125
-*/
-
canvaswidth = m_canvas->GetWidth();
canvasheight = m_canvas->GetHeight();
- bool fullscreen(false); //XXX HACK
- fullscreen = (canvaswidth != m_viewport.GetWidth());
-
m_buffersize = (canvaswidth > canvasheight?canvasheight:canvaswidth);
m_buffersize = (int)(m_buffersize*m_resbuffer); //reduce buffer size for better performance
- if (fullscreen) //XXX HACK
- m_buffersize --;
-
int i = 0;
while ((1 << i) <= m_buffersize)
i++;
@@ -266,10 +252,6 @@ http://projects.blender.org/tracker/?func=detail&aid=18655&group_id=9&atid=125
warp.bufferwidth = canvaswidth;
warp.bufferheight = canvasheight;
}
-
- //XXX HACK
- canvaswidth = m_viewport.GetWidth();
- canvasheight = m_viewport.GetHeight();
}
bool KX_Dome::CreateDL(){
diff --git a/source/gameengine/Ketsji/KX_Dome.h b/source/gameengine/Ketsji/KX_Dome.h
index 844f40f0578..009fb0b92ea 100644
--- a/source/gameengine/Ketsji/KX_Dome.h
+++ b/source/gameengine/Ketsji/KX_Dome.h
@@ -57,22 +57,21 @@ class KX_Dome
{
public:
/// constructor
- KX_Dome (
- RAS_ICanvas* m_canvas,
- /// rasterizer
- RAS_IRasterizer* m_rasterizer,
- /// render tools
- RAS_IRenderTools* m_rendertools,
- /// engine
- KX_KetsjiEngine* m_engine,
-
- short res,
- short mode,
- short angle,
- float resbuf,
- short tilt,
- struct Text* warptext
- );
+ KX_Dome (RAS_ICanvas* m_canvas,
+ /// rasterizer
+ RAS_IRasterizer* m_rasterizer,
+ /// render tools
+ RAS_IRenderTools* m_rendertools,
+ /// engine
+ KX_KetsjiEngine* m_engine,
+
+ short res,
+ short mode,
+ short angle,
+ float resbuf,
+ short tilt,
+ struct Text* warptext
+ );
/// destructor
virtual ~KX_Dome (void);
@@ -180,14 +179,14 @@ protected:
/// rendered scene
KX_Scene * m_scene;
- /// canvas
- RAS_ICanvas* m_canvas;
- /// rasterizer
- RAS_IRasterizer* m_rasterizer;
- /// render tools
- RAS_IRenderTools* m_rendertools;
- /// engine
- KX_KetsjiEngine* m_engine;
+ /// canvas
+ RAS_ICanvas* m_canvas;
+ /// rasterizer
+ RAS_IRasterizer* m_rasterizer;
+ /// render tools
+ RAS_IRenderTools* m_rendertools;
+ /// engine
+ KX_KetsjiEngine* m_engine;
#ifdef WITH_CXX_GUARDEDALLOC
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 853b36b54f7..e5e9c3330e5 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -110,9 +110,9 @@ KX_GameObject::KX_GameObject(
m_pGraphicController(NULL),
m_xray(false),
m_pHitObject(NULL),
+ m_pObstacleSimulation(NULL),
m_actionManager(NULL),
- m_isDeformable(false),
- m_pObstacleSimulation(NULL)
+ m_isDeformable(false)
#ifdef WITH_PYTHON
, m_attr_dict(NULL)
#endif
diff --git a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
index 5f78d9a3722..c2b53fb71ba 100644
--- a/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
+++ b/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
@@ -633,7 +633,7 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM
const float ivmax = 1.0f / vmax;
- float adir[2], adist;
+ float adir[2] /*, adist */;
vcpy(adir, activeObst->pvel);
if (vlen(adir) > 0.01f)
vnorm(adir);
@@ -641,7 +641,7 @@ static void processSamples(KX_Obstacle* activeObst, KX_NavMeshObject* activeNavM
vset(adir,0,0);
float activeObstPos[2];
vset(activeObstPos, activeObst->m_pos.x(), activeObst->m_pos.y());
- adist = vdot(adir, activeObstPos);
+ /* adist = vdot(adir, activeObstPos); */
float minPenalty = FLT_MAX;
diff --git a/source/gameengine/Ketsji/KX_OrientationInterpolator.h b/source/gameengine/Ketsji/KX_OrientationInterpolator.h
index 2ae7b00cb86..8bbe888f74f 100644
--- a/source/gameengine/Ketsji/KX_OrientationInterpolator.h
+++ b/source/gameengine/Ketsji/KX_OrientationInterpolator.h
@@ -41,12 +41,12 @@ class KX_IScalarInterpolator;
class KX_OrientationInterpolator : public KX_IInterpolator {
public:
- KX_OrientationInterpolator(MT_Matrix3x3& target,
- KX_IScalarInterpolator **ipos)
- : m_target(target)
- {
- m_ipos[0] = ipos[0];
- m_ipos[1] = ipos[1];
+ KX_OrientationInterpolator(MT_Matrix3x3& target,
+ KX_IScalarInterpolator **ipos)
+ : m_target(target)
+ {
+ m_ipos[0] = ipos[0];
+ m_ipos[1] = ipos[1];
m_ipos[2] = ipos[2];
}
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.cpp b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
index 1edecdf44d2..f998da18f83 100644
--- a/source/gameengine/Ketsji/KX_SteeringActuator.cpp
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.cpp
@@ -46,38 +46,38 @@
/* ------------------------------------------------------------------------- */
KX_SteeringActuator::KX_SteeringActuator(SCA_IObject *gameobj,
- int mode,
- KX_GameObject *target,
- KX_GameObject *navmesh,
- float distance,
- float velocity,
- float acceleration,
- float turnspeed,
- bool isSelfTerminated,
- int pathUpdatePeriod,
- KX_ObstacleSimulation* simulation,
- short facingmode,
- bool normalup,
- bool enableVisualization) :
- SCA_IActuator(gameobj, KX_ACT_STEERING),
- m_mode(mode),
- m_target(target),
- m_distance(distance),
- m_velocity(velocity),
- m_acceleration(acceleration),
- m_turnspeed(turnspeed),
- m_isSelfTerminated(isSelfTerminated),
- m_pathUpdatePeriod(pathUpdatePeriod),
- m_updateTime(0),
- m_isActive(false),
- m_simulation(simulation),
- m_enableVisualization(enableVisualization),
- m_facingMode(facingmode),
- m_normalUp(normalup),
- m_obstacle(NULL),
- m_pathLen(0),
- m_wayPointIdx(-1),
- m_steerVec(MT_Vector3(0, 0, 0))
+ int mode,
+ KX_GameObject *target,
+ KX_GameObject *navmesh,
+ float distance,
+ float velocity,
+ float acceleration,
+ float turnspeed,
+ bool isSelfTerminated,
+ int pathUpdatePeriod,
+ KX_ObstacleSimulation* simulation,
+ short facingmode,
+ bool normalup,
+ bool enableVisualization)
+ : SCA_IActuator(gameobj, KX_ACT_STEERING),
+ m_target(target),
+ m_mode(mode),
+ m_distance(distance),
+ m_velocity(velocity),
+ m_acceleration(acceleration),
+ m_turnspeed(turnspeed),
+ m_simulation(simulation),
+ m_updateTime(0),
+ m_obstacle(NULL),
+ m_isActive(false),
+ m_isSelfTerminated(isSelfTerminated),
+ m_enableVisualization(enableVisualization),
+ m_facingMode(facingmode),
+ m_normalUp(normalup),
+ m_pathLen(0),
+ m_pathUpdatePeriod(pathUpdatePeriod),
+ m_wayPointIdx(-1),
+ m_steerVec(MT_Vector3(0, 0, 0))
{
m_navmesh = static_cast<KX_NavMeshObject*>(navmesh);
if (m_navmesh)
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.h b/source/gameengine/Ketsji/KX_SteeringActuator.h
index 4f8303107f7..d337799976b 100644
--- a/source/gameengine/Ketsji/KX_SteeringActuator.h
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.h
@@ -56,12 +56,12 @@ class KX_SteeringActuator : public SCA_IActuator
int m_mode;
float m_distance;
float m_velocity;
- float m_acceleration;
+ float m_acceleration;
float m_turnspeed;
KX_ObstacleSimulation* m_simulation;
- KX_Obstacle* m_obstacle;
double m_updateTime;
+ KX_Obstacle* m_obstacle;
bool m_isActive;
bool m_isSelfTerminated;
bool m_enableVisualization;
diff --git a/source/gameengine/Ketsji/KX_VertexProxy.cpp b/source/gameengine/Ketsji/KX_VertexProxy.cpp
index 5589d35f44a..e92351ad110 100644
--- a/source/gameengine/Ketsji/KX_VertexProxy.cpp
+++ b/source/gameengine/Ketsji/KX_VertexProxy.cpp
@@ -436,10 +436,14 @@ KX_VertexProxy::KX_VertexProxy(KX_MeshProxy*mesh, RAS_TexVert* vertex)
: m_vertex(vertex),
m_mesh(mesh)
{
+ /* see bug [#27071] */
+ Py_INCREF(m_mesh->GetProxy());
}
KX_VertexProxy::~KX_VertexProxy()
{
+ /* see bug [#27071] */
+ Py_DECREF(m_mesh->GetProxy());
}
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
index c34a00513bf..1eed0665564 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.h
@@ -66,7 +66,7 @@ protected:
btIDebugDraw* m_debugDrawer;
class btDefaultCollisionConfiguration* m_collisionConfiguration;
- class btBroadphaseInterface* m_broadphase; // broadphase for dynamic world
+ class btBroadphaseInterface* m_broadphase; // broadphase for dynamic world
// for culling only
btOverlappingPairCache* m_cullingCache;
struct btDbvtBroadphase* m_cullingTree; // broadphase for culling
diff --git a/source/gameengine/Rasterizer/RAS_IRasterizer.h b/source/gameengine/Rasterizer/RAS_IRasterizer.h
index 2988aa4effb..478aa0ab03c 100644
--- a/source/gameengine/Rasterizer/RAS_IRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_IRasterizer.h
@@ -207,7 +207,7 @@ public:
* @return true if stereo mode is enabled.
*/
virtual bool Stereo()=0;
- virtual StereoMode GetStereoMode()=0;
+ virtual StereoMode GetStereoMode()=0;
virtual bool InterlacedStereo()=0;
/**
* Sets which eye buffer subsequent primitives will be rendered to.
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h
index 422d6dfa1b3..baf3d9c1166 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_GrayScale2DFilter.h
@@ -39,7 +39,7 @@ void main(void)
{
vec4 texcolor = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st);
float gray = dot(texcolor.rgb, vec3(0.299, 0.587, 0.114));
- gl_FragColor = vec4(gray, gray, gray, texcolor.a);
+ gl_FragColor = vec4(gray, gray, gray, texcolor.a);
}
);
#endif
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h
index 475f3506c2c..7df271c15e4 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLFilters/RAS_Invert2DFilter.h
@@ -37,9 +37,9 @@ uniform sampler2D bgl_RenderedTexture;
void main(void)
{
- vec4 texcolor = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st);
+ vec4 texcolor = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st);
gl_FragColor.rgb = 1.0 - texcolor.rgb;
- gl_FragColor.a = texcolor.a;
+ gl_FragColor.a = texcolor.a;
}
);
#endif
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
index cbfa49510a5..c28db2fd91c 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.h
@@ -149,7 +149,7 @@ public:
virtual void SetRenderArea();
virtual void SetStereoMode(const StereoMode stereomode);
- virtual RAS_IRasterizer::StereoMode GetStereoMode();
+ virtual RAS_IRasterizer::StereoMode GetStereoMode();
virtual bool Stereo();
virtual bool InterlacedStereo();
virtual void SetEye(const StereoEye eye);
diff --git a/source/gameengine/SceneGraph/SG_DList.h b/source/gameengine/SceneGraph/SG_DList.h
index 9e7e514b27a..3fb4eb7b55b 100644
--- a/source/gameengine/SceneGraph/SG_DList.h
+++ b/source/gameengine/SceneGraph/SG_DList.h
@@ -245,10 +245,10 @@ public:
}
}
virtual ~SG_DListHead() {}
- T* Remove()
- {
+ T* Remove()
+ {
return static_cast<T*>(SG_DList::Remove());
- }
+ }
};
diff --git a/source/gameengine/VideoTexture/ImageRender.h b/source/gameengine/VideoTexture/ImageRender.h
index 1101fbbc2d4..4dfd701ac3d 100644
--- a/source/gameengine/VideoTexture/ImageRender.h
+++ b/source/gameengine/VideoTexture/ImageRender.h
@@ -52,42 +52,42 @@ public:
virtual ~ImageRender (void);
/// get background color
- int getBackground (int idx) { return (idx < 0 || idx > 3) ? 0 : int(m_background[idx]*255.f); }
+ int getBackground (int idx) { return (idx < 0 || idx > 3) ? 0 : int(m_background[idx]*255.f); }
/// set background color
void setBackground (int red, int green, int blue, int alpha);
/// clipping distance
float getClip (void) { return m_clip; }
/// set whole buffer use
- void setClip (float clip) { m_clip = clip; }
+ void setClip (float clip) { m_clip = clip; }
protected:
- /// true if ready to render
- bool m_render;
+ /// true if ready to render
+ bool m_render;
/// rendered scene
KX_Scene * m_scene;
/// camera for render
KX_Camera * m_camera;
- /// do we own the camera?
- bool m_owncamera;
- /// for mirror operation
- KX_GameObject * m_observer;
- KX_GameObject * m_mirror;
+ /// do we own the camera?
+ bool m_owncamera;
+ /// for mirror operation
+ KX_GameObject * m_observer;
+ KX_GameObject * m_mirror;
float m_clip; // clipping distance
- float m_mirrorHalfWidth; // mirror width in mirror space
- float m_mirrorHalfHeight; // mirror height in mirror space
- MT_Point3 m_mirrorPos; // mirror center position in local space
- MT_Vector3 m_mirrorZ; // mirror Z axis in local space
- MT_Vector3 m_mirrorY; // mirror Y axis in local space
- MT_Vector3 m_mirrorX; // mirror X axis in local space
- /// canvas
- RAS_ICanvas* m_canvas;
- /// rasterizer
- RAS_IRasterizer* m_rasterizer;
- /// render tools
- RAS_IRenderTools* m_rendertools;
- /// engine
- KX_KetsjiEngine* m_engine;
+ float m_mirrorHalfWidth; // mirror width in mirror space
+ float m_mirrorHalfHeight; // mirror height in mirror space
+ MT_Point3 m_mirrorPos; // mirror center position in local space
+ MT_Vector3 m_mirrorZ; // mirror Z axis in local space
+ MT_Vector3 m_mirrorY; // mirror Y axis in local space
+ MT_Vector3 m_mirrorX; // mirror X axis in local space
+ /// canvas
+ RAS_ICanvas* m_canvas;
+ /// rasterizer
+ RAS_IRasterizer* m_rasterizer;
+ /// render tools
+ RAS_IRenderTools* m_rendertools;
+ /// engine
+ KX_KetsjiEngine* m_engine;
/// background color
float m_background[4];
diff --git a/source/gameengine/VideoTexture/ImageViewport.h b/source/gameengine/VideoTexture/ImageViewport.h
index 1b415fc58be..70c52b0781c 100644
--- a/source/gameengine/VideoTexture/ImageViewport.h
+++ b/source/gameengine/VideoTexture/ImageViewport.h
@@ -51,7 +51,7 @@ public:
/// is alpha channel used
bool getAlpha (void) { return m_alpha; }
/// set whole buffer use
- void setAlpha (bool alpha) { m_alpha = alpha; }
+ void setAlpha (bool alpha) { m_alpha = alpha; }
/// get capture size in viewport
short * getCaptureSize (void) { return m_capSize; }
@@ -71,8 +71,8 @@ protected:
short m_capSize[2];
/// use whole viewport
bool m_whole;
- /// use alpha channel
- bool m_alpha;
+ /// use alpha channel
+ bool m_alpha;
/// position of capture rectangle in viewport
GLint m_position[2];