Merging revision 30126:30261 from trunk.

This commit is contained in:
Joerg Mueller 2010-07-13 11:14:49 +00:00
commit 7a89b679c9
108 changed files with 12318 additions and 13767 deletions

@ -61,7 +61,7 @@ SET(BLENDER_VERSION 2.5)
#-----------------------------------------------------------------------------
# Load some macros.
INCLUDE(CMake/macros.cmake)
INCLUDE(build_files/cmake/macros.cmake)
#-----------------------------------------------------------------------------
# Set default config options
@ -534,7 +534,7 @@ IF(WIN32)
ELSE(MSVC) # MINGW
SET(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
SET(CMAKE_CXX_FLAGS "-pipe -funsigned-char -fno-strict-aliasing -mwindows" CACHE STRING "Mingw C++ flags ")
SET(CMAKE_CXX_FLAGS "-pipe -funsigned-char -fno-strict-aliasing" CACHE STRING "Mingw C++ flags ")
SET(CMAKE_C_FLAGS "-pipe -funsigned-char -fno-strict-aliasing" CACHE STRING "Mingw C flags ")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g" CACHE STRING "Mingw debug C++ flags ")
@ -561,7 +561,7 @@ IF(WIN32)
SET(GETTEXT_LIB intl)
ENDIF(WITH_INTERNATIONAL)
SET(JPEG_LIBRARY jpeg)
SET(JPEG_LIBRARY libjpeg)
SET(PNG_LIBRARIES png)
SET(ZLIB ${LIBDIR}/zlib)
@ -607,7 +607,7 @@ IF(WIN32)
IF(WITH_OPENEXR)
SET(OPENEXR ${LIBDIR}/gcc/openexr)
SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
SET(OPENEXR_LIB Half IlmImf Iex)
SET(OPENEXR_LIB Half IlmImf Imath IlmThread)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
ENDIF(WITH_OPENEXR)

@ -41,7 +41,7 @@ sinclude user-def.mk
# export NAN_NO_OPENAL=true
export NANBLENDERHOME=$(shell pwd)
MAKEFLAGS=-I$(NANBLENDERHOME)/source --no-print-directory
MAKEFLAGS=-I$(NANBLENDERHOME)/build_files/make --no-print-directory
SOURCEDIR =
ifeq ($(FREE_WINDOWS),true)
@ -50,7 +50,7 @@ else
DIRS ?= extern intern source po
endif
include source/nan_subdirs.mk
include build_files/make/nan_subdirs.mk
.PHONY: release
release:

@ -46,6 +46,9 @@ import glob
import re
from tempfile import mkdtemp
# needed for importing tools
sys.path.append(os.path.join(".", "build_files", "scons"))
import tools.Blender
import tools.btools
import tools.bcolors
@ -159,7 +162,7 @@ if crossbuild and platform not in ('win32-vc', 'win64-vc'):
env['OURPLATFORM'] = platform
configfile = 'config'+os.sep+platform+'-config.py'
configfile = os.path.join("build_files", "scons", "config", platform + "-config.py")
if os.path.exists(configfile):
print B.bc.OKGREEN + "Using config file: " + B.bc.ENDC + configfile

@ -0,0 +1,38 @@
#!/bin/sh
#
# This is an example script to build things with the Nan Makefiles
#
#
rm -f /tmp/.nanguess
export MAKE=make
export NANBLENDERHOME=`pwd`
export MAKEFLAGS="-w -I $NANBLENDERHOME/source --no-print-directory"
export HMAKE="$NANBLENDERHOME/source/tools/hmake/hmake"
export NAN_PYTHON=/soft/python-2.2.2b1/progeny1
export NAN_PYTHON_VERSION=2.2
export NAN_OPENAL=/usr/local
export NAN_JPEG=/usr/local
export NAN_PNG=/usr/local
export NAN_SDL=/usr/local
export NAN_ODE=/usr/local
export NAN_ZLIB=/usr/local
export NAN_FREETYPE=/usr/local
export NAN_MOZILLA_INC=/usr/local/include/mozilla-1.0.1/
export NAN_MOZILLA_LIB=/usr/local/lib/mozilla-1.0.1/
#export NAN_NSPR=/scratch/irulan/mein/nspr-4.2.2/mozilla/nsprpub/dist/
export CPPFLAGS="$CPPFLAGS"
export CFLAGS="$CFLAGS"
export INTERNATIONAL=true
$HMAKE -C intern/
if [ $? -eq 0 ]; then
$HMAKE -C source/
fi
$HMAKE -C release
#cd release
#make

@ -0,0 +1,18 @@
#!/bin/bash
rm -f /tmp/.nanguess
export MAKE=make
export NANBLENDERHOME=`pwd`
export MAKEFLAGS="-w -I $NANBLENDERHOME/source --no-print-directory"
export HMAKE="$NANBLENDERHOME/source/tools/hmake/hmake"
echo
echo NANBLENDERHOME : ${NANBLENDERHOME}
export NAN_PYTHON=/sw
$HMAKE -C intern/
if [ $? -eq 0 ]; then
$HMAKE -C source/
fi
cd release
make

@ -0,0 +1,35 @@
#!/bin/sh
# This is an example build script for SunOS5.8
rm -f /tmp/.nanguess
export MAKE=make
export NANBLENDERHOME=`pwd`
export MAKEFLAGS="-w -I $NANBLENDERHOME/source --no-print-directory"
export HMAKE="$NANBLENDERHOME/source/tools/hmake/hmake"
export NAN_PYTHON=/soft/python-2.2.2b1/SunOS5.8
export NAN_PYTHON_VERSION=2.2
export NAN_OPENAL=/usr/local
export NAN_JPEG=/usr/local
export NAN_PNG=/usr/local
export NAN_SDL=/usr/local
export NAN_ODE=/usr/local
export NAN_OPENSSL=/soft/ssl/openssl-0.9.6e
export NAN_ZLIB=/usr/local
export NAN_FREETYPE=/usr/local
export NAN_MOZILLA_INC=/usr/local/include/mozilla-1.0.1/
export NAN_MOZILLA_LIB=/usr/local/lib/mozilla-1.0.1/
export NAN_NSPR=/scratch/irulan/mein/nspr-4.2.2/mozilla/nsprpub/dist/
export CPPFLAGS="$CPPFLAGS"
export CFLAGS="$CFLAGS"
export INTERNATIONAL=true
$HMAKE -C intern/
if [ $? -eq 0 ]; then
$HMAKE -C source/
fi
$HMAKE -C release
#cd release
#make

@ -31,7 +31,7 @@
# set some defaults when these are not overruled (?=) by environment variables
#
sinclude ../user-def.mk
sinclude ../../user-def.mk
# This warning only takes place once in source/
ifeq (debug, $(findstring debug, $(MAKECMDGOALS)))

@ -2702,7 +2702,7 @@ typedef GLenum (GLAPIENTRY * PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
typedef void (GLAPIENTRY * PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint* framebuffers);
typedef void (GLAPIENTRY * PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint* renderbuffers);
typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURLAYERPROC) (GLenum target,GLenum attachment, GLuint texture,GLint level,GLint layer);
typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target,GLenum attachment, GLuint texture,GLint level,GLint layer);
typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
typedef void (GLAPIENTRY * PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint layer);
@ -2723,7 +2723,7 @@ typedef void (GLAPIENTRY * PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum targ
#define glDeleteFramebuffers GLEW_GET_FUN(__glewDeleteFramebuffers)
#define glDeleteRenderbuffers GLEW_GET_FUN(__glewDeleteRenderbuffers)
#define glFramebufferRenderbuffer GLEW_GET_FUN(__glewFramebufferRenderbuffer)
#define glFramebufferTexturLayer GLEW_GET_FUN(__glewFramebufferTexturLayer)
#define glFramebufferTextureLayer GLEW_GET_FUN(__glewFramebufferTextureLayer)
#define glFramebufferTexture1D GLEW_GET_FUN(__glewFramebufferTexture1D)
#define glFramebufferTexture2D GLEW_GET_FUN(__glewFramebufferTexture2D)
#define glFramebufferTexture3D GLEW_GET_FUN(__glewFramebufferTexture3D)
@ -8288,7 +8288,6 @@ typedef void (GLAPIENTRY * PFNGLGETVIDEOUI64VNVPROC) (GLuint video_slot, GLenum
typedef void (GLAPIENTRY * PFNGLGETVIDEOUIVNVPROC) (GLuint video_slot, GLenum pname, GLuint* params);
typedef void (GLAPIENTRY * PFNGLPRESENTFRAMEDUALFILLNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3);
typedef void (GLAPIENTRY * PFNGLPRESENTFRAMEKEYEDNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1);
typedef void (GLAPIENTRY * PFNGLVIDEOPARAMETERIVNVPROC) (GLuint video_slot, GLenum pname, const GLint* params);
#define glGetVideoi64vNV GLEW_GET_FUN(__glewGetVideoi64vNV)
#define glGetVideoivNV GLEW_GET_FUN(__glewGetVideoivNV)
@ -10563,7 +10562,7 @@ GLEW_FUN_EXPORT PFNGLCHECKFRAMEBUFFERSTATUSPROC __glewCheckFramebufferStatus;
GLEW_FUN_EXPORT PFNGLDELETEFRAMEBUFFERSPROC __glewDeleteFramebuffers;
GLEW_FUN_EXPORT PFNGLDELETERENDERBUFFERSPROC __glewDeleteRenderbuffers;
GLEW_FUN_EXPORT PFNGLFRAMEBUFFERRENDERBUFFERPROC __glewFramebufferRenderbuffer;
GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURLAYERPROC __glewFramebufferTexturLayer;
GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURELAYERPROC __glewFramebufferTextureLayer;
GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE1DPROC __glewFramebufferTexture1D;
GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE2DPROC __glewFramebufferTexture2D;
GLEW_FUN_EXPORT PFNGLFRAMEBUFFERTEXTURE3DPROC __glewFramebufferTexture3D;
@ -11612,7 +11611,6 @@ GLEW_FUN_EXPORT PFNGLGETVIDEOUI64VNVPROC __glewGetVideoui64vNV;
GLEW_FUN_EXPORT PFNGLGETVIDEOUIVNVPROC __glewGetVideouivNV;
GLEW_FUN_EXPORT PFNGLPRESENTFRAMEDUALFILLNVPROC __glewPresentFrameDualFillNV;
GLEW_FUN_EXPORT PFNGLPRESENTFRAMEKEYEDNVPROC __glewPresentFrameKeyedNV;
GLEW_FUN_EXPORT PFNGLVIDEOPARAMETERIVNVPROC __glewVideoParameterivNV;
GLEW_FUN_EXPORT PFNGLPRIMITIVERESTARTINDEXNVPROC __glewPrimitiveRestartIndexNV;
GLEW_FUN_EXPORT PFNGLPRIMITIVERESTARTNVPROC __glewPrimitiveRestartNV;

@ -547,7 +547,7 @@ PFNGLCHECKFRAMEBUFFERSTATUSPROC __glewCheckFramebufferStatus = NULL;
PFNGLDELETEFRAMEBUFFERSPROC __glewDeleteFramebuffers = NULL;
PFNGLDELETERENDERBUFFERSPROC __glewDeleteRenderbuffers = NULL;
PFNGLFRAMEBUFFERRENDERBUFFERPROC __glewFramebufferRenderbuffer = NULL;
PFNGLFRAMEBUFFERTEXTURLAYERPROC __glewFramebufferTexturLayer = NULL;
PFNGLFRAMEBUFFERTEXTURELAYERPROC __glewFramebufferTextureLayer = NULL;
PFNGLFRAMEBUFFERTEXTURE1DPROC __glewFramebufferTexture1D = NULL;
PFNGLFRAMEBUFFERTEXTURE2DPROC __glewFramebufferTexture2D = NULL;
PFNGLFRAMEBUFFERTEXTURE3DPROC __glewFramebufferTexture3D = NULL;
@ -1596,7 +1596,6 @@ PFNGLGETVIDEOUI64VNVPROC __glewGetVideoui64vNV = NULL;
PFNGLGETVIDEOUIVNVPROC __glewGetVideouivNV = NULL;
PFNGLPRESENTFRAMEDUALFILLNVPROC __glewPresentFrameDualFillNV = NULL;
PFNGLPRESENTFRAMEKEYEDNVPROC __glewPresentFrameKeyedNV = NULL;
PFNGLVIDEOPARAMETERIVNVPROC __glewVideoParameterivNV = NULL;
PFNGLPRIMITIVERESTARTINDEXNVPROC __glewPrimitiveRestartIndexNV = NULL;
PFNGLPRIMITIVERESTARTNVPROC __glewPrimitiveRestartNV = NULL;
@ -2739,7 +2738,7 @@ static GLboolean _glewInit_GL_ARB_framebuffer_object (GLEW_CONTEXT_ARG_DEF_INIT)
r = ((glDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC)glewGetProcAddress((const GLubyte*)"glDeleteFramebuffers")) == NULL) || r;
r = ((glDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC)glewGetProcAddress((const GLubyte*)"glDeleteRenderbuffers")) == NULL) || r;
r = ((glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC)glewGetProcAddress((const GLubyte*)"glFramebufferRenderbuffer")) == NULL) || r;
r = ((glFramebufferTexturLayer = (PFNGLFRAMEBUFFERTEXTURLAYERPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexturLayer")) == NULL) || r;
r = ((glFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTextureLayer")) == NULL) || r;
r = ((glFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture1D")) == NULL) || r;
r = ((glFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture2D")) == NULL) || r;
r = ((glFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC)glewGetProcAddress((const GLubyte*)"glFramebufferTexture3D")) == NULL) || r;
@ -5303,7 +5302,6 @@ static GLboolean _glewInit_GL_NV_present_video (GLEW_CONTEXT_ARG_DEF_INIT)
r = ((glGetVideouivNV = (PFNGLGETVIDEOUIVNVPROC)glewGetProcAddress((const GLubyte*)"glGetVideouivNV")) == NULL) || r;
r = ((glPresentFrameDualFillNV = (PFNGLPRESENTFRAMEDUALFILLNVPROC)glewGetProcAddress((const GLubyte*)"glPresentFrameDualFillNV")) == NULL) || r;
r = ((glPresentFrameKeyedNV = (PFNGLPRESENTFRAMEKEYEDNVPROC)glewGetProcAddress((const GLubyte*)"glPresentFrameKeyedNV")) == NULL) || r;
r = ((glVideoParameterivNV = (PFNGLVIDEOPARAMETERIVNVPROC)glewGetProcAddress((const GLubyte*)"glVideoParameterivNV")) == NULL) || r;
return r;
}

@ -813,7 +813,11 @@ GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32
GHOST_WindowCocoa* window = (GHOST_WindowCocoa*)m_windowManager->getActiveWindow();
if (!window) return GHOST_kFailure;
//Cursor and mouse dissociation placed here not to interfere with continuous grab
// (in cont. grab setMouseCursorPosition is directly called)
CGAssociateMouseAndMouseCursorPosition(false);
setMouseCursorPosition(x, y);
CGAssociateMouseAndMouseCursorPosition(true);
//Force mouse move event (not pushed by Cocoa)
window->screenToClient(x, y, wx, wy);

@ -1461,7 +1461,7 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const
const GHOST_TUns8* GHOST_SystemX11::getSystemDir() const
{
return (GHOST_TUns8*)"/usr/share/";
return (GHOST_TUns8*)"/usr/share";
}
const GHOST_TUns8* GHOST_SystemX11::getUserDir() const
@ -1478,3 +1478,4 @@ const GHOST_TUns8* GHOST_SystemX11::getBinaryDir() const
{
return NULL;
}

@ -468,6 +468,10 @@
RelativePath="..\..\GHOST_IWindow.h"
>
</File>
<File
RelativePath="..\..\GHOST_Path-api.h"
>
</File>
<File
RelativePath="..\..\GHOST_Rect.h"
>
@ -525,6 +529,10 @@
RelativePath="..\..\intern\GHOST_NDOFManager.cpp"
>
</File>
<File
RelativePath="..\..\intern\GHOST_Path-api.cpp"
>
</File>
<File
RelativePath="..\..\intern\GHOST_Rect.cpp"
>

@ -74,7 +74,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386"
AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib libsndfile-1.lib OpenCOLLADABaseUtils.lib OpenCOLLADAFramework.lib OpenCOLLADAStreamWriter.lib OpenCOLLADASaxFrameworkLoader.lib pcre.lib UTF.lib GeneratedSaxParser.lib MathMLSolver.lib xml2.lib buffer.lib ftoa.lib"
AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib libsndfile-1.lib OpenCOLLADABaseUtils.lib OpenCOLLADAFramework.lib OpenCOLLADAStreamWriter.lib OpenCOLLADASaxFrameworkLoader.lib pcre.lib GeneratedSaxParser.lib MathMLSolver.lib xml2.lib buffer.lib ftoa.lib"
ShowProgress="0"
OutputFile="..\..\..\install\msvc_9\blender.exe"
LinkIncremental="1"
@ -169,7 +169,7 @@
<Tool
Name="VCLinkerTool"
AdditionalOptions="/MACHINE:I386&#x0D;&#x0A;"
AdditionalDependencies="SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib libsndfile-1.lib libsamplerate.lib libjack.lib OpenCOLLADABaseUtils_d.lib OpenCOLLADAFramework_d.lib OpenCOLLADAStreamWriter_d.lib OpenCOLLADASaxFrameworkLoader_d.lib pcre_d.lib UTF_d.lib GeneratedSaxParser_d.lib MathMLSolver_d.lib xml2_d.lib buffer_d.lib ftoa_d.lib"
AdditionalDependencies="SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib libsndfile-1.lib libsamplerate.lib libjack.lib OpenCOLLADABaseUtils_d.lib OpenCOLLADAFramework_d.lib OpenCOLLADAStreamWriter_d.lib OpenCOLLADASaxFrameworkLoader_d.lib pcre_d.lib GeneratedSaxParser_d.lib MathMLSolver_d.lib xml2_d.lib buffer_d.lib ftoa_d.lib"
ShowProgress="0"
OutputFile="..\..\..\install\msvc_9d\blender.exe"
LinkIncremental="2"

@ -527,6 +527,10 @@
RelativePath="..\..\..\source\blender\blenlib\intern\bpath.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenlib\intern\cpu.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenlib\intern\DLRB_tree.c"
>
@ -684,6 +688,10 @@
RelativePath="..\..\..\source\blender\blenlib\intern\BLI_callbacks.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenlib\BLI_cpu.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenlib\BLI_dlrbTree.h"
>

@ -589,6 +589,10 @@
RelativePath="..\..\..\source\blender\imbuf\intern\thumbs.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\imbuf\intern\thumbs_blend.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\imbuf\intern\tiff.c"
>

@ -605,6 +605,10 @@
RelativePath="..\..\..\source\blender\makesrna\intern\rna_actuator.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_actuator_api.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_animation.c"
>
@ -657,6 +661,10 @@
RelativePath="..\..\..\source\blender\makesrna\intern\rna_controller.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_controller_api.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_curve.c"
>
@ -809,10 +817,18 @@
RelativePath="..\..\..\source\blender\makesrna\intern\rna_sensor.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_sensor_api.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_sequencer.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_sequencer_api.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\makesrna\intern\rna_smoke.c"
>

@ -47,19 +47,17 @@ class AddPresetBase(bpy.types.Operator):
target_path = bpy.utils.preset_paths(self.preset_subdir)[0] # we need some way to tell the user and system preset path
filepath = os.path.join(target_path, filename)
if getattr(self, "save_keyconfig", True):
if getattr(self, "save_keyconfig", False):
bpy.ops.wm.keyconfig_export(filepath=filepath, kc_name=self.properties.name)
file_preset = open(filepath, 'a')
file_preset.write("wm.active_keyconfig = kc\n\n")
else:
file_preset = open(filepath, 'w')
file_preset.write("import bpy\n")
for rna_path in self.preset_values:
value = eval(rna_path)
if type(value) == str:
value = "'%s'" % value
file_preset.write("%s = %s\n" % (rna_path, value))
file_preset.write("%s = %s\n" % (rna_path, repr(value)))
file_preset.close()

@ -93,7 +93,6 @@ class DATA_PT_skeleton(DataButtonsPanel):
if wide_ui:
col = split.column()
col.prop(arm, "deform_quaternion", text="Quaternion")
col.prop(arm, "deform_bbone_rest", text="B-Bones Rest")
class DATA_PT_display(DataButtonsPanel):
@ -122,7 +121,6 @@ class DATA_PT_display(DataButtonsPanel):
col = split.column()
col.prop(arm, "draw_group_colors", text="Colors")
col.prop(arm, "delay_deform", text="Delay Refresh")
col.prop(ob, "x_ray", text="X-Ray (Object)")
class DATA_PT_bone_groups(DataButtonsPanel):

@ -32,13 +32,14 @@ def particle_panel_enabled(context, psys):
return (psys.point_cache.baked is False) and (not psys.edited) and (not context.particle_system_editable)
def particle_panel_poll(context):
def particle_panel_poll(panel, context):
psys = context.particle_system
engine = context.scene.render.engine
if psys is None:
return False
if psys.settings is None:
return False
return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR')
return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR') and (engine in panel.COMPAT_ENGINES)
class ParticleButtonsPanel(bpy.types.Panel):
@ -47,15 +48,17 @@ class ParticleButtonsPanel(bpy.types.Panel):
bl_context = "particle"
def poll(self, context):
return particle_panel_poll(context)
return particle_panel_poll(self, context)
class PARTICLE_PT_context_particles(ParticleButtonsPanel):
bl_label = ""
bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
return (context.particle_system or context.object)
engine = context.scene.render.engine
return (context.particle_system or context.object) and (engine in self.COMPAT_ENGINES)
def draw(self, context):
layout = self.layout
@ -134,14 +137,16 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel):
class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel):
COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "particle_system.settings"
class PARTICLE_PT_emission(ParticleButtonsPanel):
bl_label = "Emission"
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
if particle_panel_poll(context):
if particle_panel_poll(self, context):
return not context.particle_system.point_cache.external
else:
return False
@ -201,14 +206,16 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
bl_label = "Hair dynamics"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
psys = context.particle_system
engine = context.scene.render.engine
if psys is None:
return False
if psys.settings is None:
return False
return psys.settings.type == 'HAIR'
return psys.settings.type == 'HAIR' and (engine in self.COMPAT_ENGINES)
def draw_header(self, context):
#cloth = context.cloth.collision_settings
@ -256,9 +263,11 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
class PARTICLE_PT_cache(ParticleButtonsPanel):
bl_label = "Cache"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
psys = context.particle_system
engine = context.scene.render.engine
if psys is None:
return False
if psys.settings is None:
@ -266,7 +275,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
phystype = psys.settings.physics_type
if phystype == 'NO' or phystype == 'KEYED':
return False
return psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and psys.hair_dynamics)
return (psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and psys.hair_dynamics)) and engine in self.COMPAT_ENGINES
def draw(self, context):
psys = context.particle_system
@ -276,9 +285,10 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
class PARTICLE_PT_velocity(ParticleButtonsPanel):
bl_label = "Velocity"
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
if particle_panel_poll(context):
if particle_panel_poll(self, context):
psys = context.particle_system
return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
else:
@ -322,9 +332,10 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel):
class PARTICLE_PT_rotation(ParticleButtonsPanel):
bl_label = "Rotation"
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
if particle_panel_poll(context):
if particle_panel_poll(self, context):
psys = context.particle_system
return psys.settings.physics_type != 'BOIDS' and not psys.point_cache.external
else:
@ -367,9 +378,10 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel):
class PARTICLE_PT_physics(ParticleButtonsPanel):
bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
if particle_panel_poll(context):
if particle_panel_poll(self, context):
return not context.particle_system.point_cache.external
else:
return False
@ -562,16 +574,18 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
bl_label = "Boid Brain"
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
psys = context.particle_system
engine = context.scene.render.engine
if psys is None:
return False
if psys.settings is None:
return False
if psys.point_cache.external:
return False
return psys.settings.physics_type == 'BOIDS'
return psys.settings.physics_type == 'BOIDS' and engine in self.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
@ -660,14 +674,16 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
class PARTICLE_PT_render(ParticleButtonsPanel):
bl_label = "Render"
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
psys = context.particle_system
engine = context.scene.render.engine
if psys is None:
return False
if psys.settings is None:
return False
return True
return engine in self.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
@ -829,14 +845,16 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
class PARTICLE_PT_draw(ParticleButtonsPanel):
bl_label = "Display"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def poll(self, context):
psys = context.particle_system
engine = context.scene.render.engine
if psys is None:
return False
if psys.settings is None:
return False
return True
return engine in self.COMPAT_ENGINES
def draw(self, context):
layout = self.layout
@ -886,6 +904,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel):
class PARTICLE_PT_children(ParticleButtonsPanel):
bl_label = "Children"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@ -970,6 +989,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
class PARTICLE_PT_field_weights(ParticleButtonsPanel):
bl_label = "Field Weights"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
part = context.particle_system.settings
@ -982,6 +1002,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel):
class PARTICLE_PT_force_fields(ParticleButtonsPanel):
bl_label = "Force Field Settings"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout
@ -1009,6 +1030,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel):
class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
bl_label = "Vertexgroups"
bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
layout = self.layout

@ -145,8 +145,8 @@ class IMAGE_MT_uvs_showhide(bpy.types.Menu):
layout = self.layout
layout.operator("uv.reveal")
layout.operator("uv.hide")
layout.operator("uv.hide").unselected = True
layout.operator("uv.hide", text="Hide Selected")
layout.operator("uv.hide", text="Hide Unselected").unselected = True
class IMAGE_MT_uvs_transform(bpy.types.Menu):

@ -329,7 +329,7 @@ class INFO_MT_help(bpy.types.Menu):
class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
bl_idname = "help.operator_cheat_sheet"
bl_label = "Operator Cheat Sheet (new textblock)"
bl_label = "Operator Cheat Sheet"
def execute(self, context):
op_strings = []

@ -336,7 +336,9 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
def draw(self, context):
layout = self.layout
scene = context.scene
render = context.scene.render
frame_current = scene.frame_current
strip = act_strip(context)
split = layout.split(percentage=0.3)
@ -351,37 +353,30 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
split.label(text="Blend:")
split.prop(strip, "blend_mode", text="")
row = layout.row()
if strip.mute == True:
row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON', text="")
elif strip.mute is False:
row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_OFF', text="")
row = layout.row(align=True)
sub = row.row()
sub.active = (not strip.mute)
sub.prop(strip, "blend_opacity", text="Opacity", slider=True)
row = layout.row()
row.prop(strip, "lock")
sub = row.row()
row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="")
row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="")
col = layout.column()
col.enabled = not strip.lock
col.prop(strip, "channel")
col.prop(strip, "frame_start")
subrow = col.split(percentage=0.66)
subrow.prop(strip, "frame_final_length")
subrow.label(text="%.2f sec" % (strip.frame_final_length / (render.fps / render.fps_base)))
sub = col.column()
sub.enabled = not strip.lock
sub.prop(strip, "channel")
sub.prop(strip, "frame_start")
sub.prop(strip, "frame_final_length")
col = layout.column(align=True)
col.label(text="Offset:")
col.prop(strip, "frame_offset_start", text="Start")
col.prop(strip, "frame_offset_end", text="End")
row = col.row()
row.label(text="Final Length: %s" % bpy.utils.smpte_from_frame(strip.frame_final_length))
row = col.row()
row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_length)
row.label(text="Strip Position: %d" % (frame_current - strip.frame_start))
col = layout.column(align=True)
col.label(text="Still:")
col.prop(strip, "frame_still_start", text="Start")
col.prop(strip, "frame_still_end", text="End")
col.label(text="Frame Offset %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
col.label(text="Frame Still %d:%d" % (strip.frame_still_start, strip.frame_still_end))
class SEQUENCER_PT_preview(bpy.types.Panel):
@ -552,16 +547,14 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
self.draw_filename(context)
layout.prop(strip, "use_translation", text="Image Offset:")
if strip.transform:
if strip.use_translation:
col = layout.column(align=True)
col.active = strip.use_translation
col.prop(strip.transform, "offset_x", text="X")
col.prop(strip.transform, "offset_y", text="Y")
layout.prop(strip, "use_crop", text="Image Crop:")
if strip.crop:
if strip.use_crop:
col = layout.column(align=True)
col.active = strip.use_crop
col.prop(strip.crop, "top")
col.prop(strip.crop, "left")
col.prop(strip.crop, "bottom")
@ -752,6 +745,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel):
col = layout.column()
col.label(text="Colors:")
col.prop(strip, "color_saturation", text="Saturation")
col.prop(strip, "multiply_colors", text="Multiply")
col.prop(strip, "premultiply")
col.prop(strip, "convert_float")

@ -162,7 +162,6 @@ class USERPREF_PT_interface(bpy.types.Panel):
col.prop(view, "show_view_name", text="View Name")
col.prop(view, "show_playback_fps", text="Playback FPS")
col.prop(view, "global_scene")
col.prop(view, "pin_floating_panels")
col.prop(view, "object_origin_size")
col.separator()
@ -281,13 +280,6 @@ class USERPREF_PT_edit(bpy.types.Panel):
row.separator()
col = row.column()
col.label(text="Snap:")
col.prop(edit, "snap_translate", text="Translate")
col.prop(edit, "snap_rotate", text="Rotate")
col.prop(edit, "snap_scale", text="Scale")
col.separator()
col.separator()
col.separator()
col.label(text="Grease Pencil:")
col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
@ -847,7 +839,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
cats = ["All", "Enabled", "Disabled"] + sorted(cats)
bpy.types.Scene.EnumProperty(items=[(cat, cat, str(i)) for i, cat in enumerate(cats)],
bpy.types.Scene.EnumProperty(items=[(cat, cat, cat + " addons") for cat in cats],
name="Category", attr="addon_filter", description="Filter add-ons by category")
bpy.types.Scene.StringProperty(name="Search", attr="addon_search",
description="Search within the selected filter")

@ -1544,6 +1544,7 @@ class VIEW3D_MT_edit_mesh_faces(bpy.types.Menu):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("mesh.flip_normals")
# layout.operator("mesh.bevel")
# layout.operator("mesh.bevel")
layout.operator("mesh.edge_face_add")

@ -383,6 +383,7 @@ void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat);
#define CMP_SCALE_RELATIVE 0
#define CMP_SCALE_ABSOLUTE 1
#define CMP_SCALE_SCENEPERCENT 2
#define CMP_SCALE_RENDERPERCENT 3
/* the type definitions array */

@ -37,6 +37,9 @@ struct Object;
struct bController;
struct bActuator;
void link_logicbricks(void **poin, void ***ppoin, short *tot, short size);
void unlink_logicbricks(void **poin, void ***ppoin, short *tot);
void unlink_controller(struct bController *cont);
void unlink_controllers(struct ListBase *lb);
void free_controller(struct bController *cont);
@ -67,5 +70,9 @@ void set_sca_new_poins_ob(struct Object *ob);
void set_sca_new_poins(void);
void sca_remove_ob_poin(struct Object *obt, struct Object *ob);
void sca_move_sensor(struct bSensor *sens_to_move, Object *ob, int move_up);
void sca_move_controller(struct bController *cont_to_move, Object *ob, int move_up);
void sca_move_actuator(struct bActuator *act_to_move, Object *ob, int move_up);
#endif

@ -687,11 +687,11 @@ Mat4 *b_bone_spline_setup(bPoseChannel *pchan, int rest)
/* ************ Armature Deform ******************* */
static void pchan_b_bone_defmats(bPoseChannel *pchan, int use_quaternion, int rest_def)
static void pchan_b_bone_defmats(bPoseChannel *pchan, int use_quaternion)
{
Bone *bone= pchan->bone;
Mat4 *b_bone= b_bone_spline_setup(pchan, 0);
Mat4 *b_bone_rest= (rest_def)? NULL: b_bone_spline_setup(pchan, 1);
Mat4 *b_bone_rest= b_bone_spline_setup(pchan, 1);
Mat4 *b_bone_mats;
DualQuat *b_bone_dual_quats= NULL;
float tmat[4][4];
@ -718,10 +718,7 @@ static void pchan_b_bone_defmats(bPoseChannel *pchan, int use_quaternion, int re
unit_m4(tmat);
for(a=0; a<bone->segments; a++) {
if(b_bone_rest)
invert_m4_m4(tmat, b_bone_rest[a].mat);
else
tmat[3][1] = -a*(bone->length/(float)bone->segments);
mul_serie_m4(b_bone_mats[a+1].mat, pchan->chan_mat, bone->arm_mat,
b_bone[a].mat, tmat, b_bone_mats[0].mat, NULL, NULL, NULL);
@ -919,7 +916,6 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm,
float obinv[4][4], premat[4][4], postmat[4][4];
int use_envelope = deformflag & ARM_DEF_ENVELOPE;
int use_quaternion = deformflag & ARM_DEF_QUATERNION;
int bbone_rest_def = deformflag & ARM_DEF_B_BONE_REST;
int invert_vgroup= deformflag & ARM_DEF_INVERT_VGROUP;
int numGroups = 0; /* safety for vertexgroup index overflow */
int i, target_totvert = 0; /* safety for vertexgroup overflow */
@ -946,7 +942,7 @@ void armature_deform_verts(Object *armOb, Object *target, DerivedMesh *dm,
for(pchan = armOb->pose->chanbase.first; pchan; pchan = pchan->next) {
if(!(pchan->bone->flag & BONE_NO_DEFORM)) {
if(pchan->bone->segments > 1)
pchan_b_bone_defmats(pchan, use_quaternion, bbone_rest_def);
pchan_b_bone_defmats(pchan, use_quaternion);
if(use_quaternion) {
pchan->dual_quat= &dualquats[totchan++];
@ -1701,6 +1697,8 @@ void armature_rebuild_pose(Object *ob, bArmature *arm)
ob->pose->flag &= ~POSE_RECALC;
ob->pose->flag |= POSE_WAS_REBUILT;
make_pose_channels_hash(ob->pose);
}

@ -576,8 +576,8 @@ static void mesh_create_shadedColors(Render *re, Object *ob, int onlyForMesh, un
char *col2= (char*)(col2base?&col2base[j*4]:NULL);
float *vn = (mf->flag & ME_SMOOTH)?&vnors[3*vidx[j]]:n1;
VECCOPY(vec, mv->co);
mul_m4_v3(mat, vec);
mul_v3_m4v3(vec, mat, mv->co);
vec[0]+= 0.001*vn[0];
vec[1]+= 0.001*vn[1];
vec[2]+= 0.001*vn[2];
@ -688,8 +688,7 @@ void shadeDispList(Scene *scene, Base *base)
a= dl->nr;
while(a--) {
VECCOPY(vec, fp);
mul_m4_v3(mat, vec);
mul_v3_m4v3(vec, mat, fp);
fastshade(vec, n1, fp, ma, (char *)col1, NULL);
@ -704,8 +703,7 @@ void shadeDispList(Scene *scene, Base *base)
nor= dl->nors;
while(a--) {
VECCOPY(vec, fp);
mul_m4_v3(mat, vec);
mul_v3_m4v3(vec, mat, fp);
n1[0]= imat[0][0]*nor[0]+imat[0][1]*nor[1]+imat[0][2]*nor[2];
n1[1]= imat[1][0]*nor[0]+imat[1][1]*nor[1]+imat[1][2]*nor[2];
@ -742,8 +740,7 @@ void shadeDispList(Scene *scene, Base *base)
a= dl->nr;
while(a--) {
VECCOPY(vec, fp);
mul_m4_v3(mat, vec);
mul_v3_m4v3(vec, mat, fp);
/* transpose ! */
n1[0]= imat[0][0]*nor[0]+imat[0][1]*nor[1]+imat[0][2]*nor[2];

@ -2125,13 +2125,22 @@ void metaball_polygonize(Scene *scene, Object *ob, ListBase *dispbase)
if((totelem > 512) && (totelem <= 1024)) init_metaball_octal_tree(4);
if(totelem > 1024) init_metaball_octal_tree(5);
/* don't polygonize metaballs with too high resolution (base mball to small) */
/* don't polygonize metaballs with too high resolution (base mball to small)
* note: Eps was 0.0001f but this was giving problems for blood animation for durian, using 0.00001f */
if(metaball_tree) {
if(ob->size[0]<=0.0001f*(metaball_tree->first->x_max - metaball_tree->first->x_min) ||
ob->size[1]<=0.0001f*(metaball_tree->first->y_max - metaball_tree->first->y_min) ||
ob->size[2]<=0.0001f*(metaball_tree->first->z_max - metaball_tree->first->z_min))
if( ob->size[0] <= 0.00001f * (metaball_tree->first->x_max - metaball_tree->first->x_min) ||
ob->size[1] <= 0.00001f * (metaball_tree->first->y_max - metaball_tree->first->y_min) ||
ob->size[2] <= 0.00001f * (metaball_tree->first->z_max - metaball_tree->first->z_min))
{
new_pgn_element(-1); /* free values created by init_meta */
MEM_freeN(mainb);
/* free tree */
free_metaball_octal_node(metaball_tree->first);
MEM_freeN(metaball_tree);
metaball_tree= NULL;
return;
}
}

@ -2755,7 +2755,7 @@ void object_camera_matrix(
float pixsize;
float shiftx=0.0, shifty=0.0, winside, viewfac;
rd->mode &= ~R_ORTHO;
rd->mode &= ~(R_ORTHO|R_PANORAMA);
/* question mark */
(*ycor)= rd->yasp / rd->xasp;

@ -4257,9 +4257,14 @@ void psys_get_dupli_texture(Object *ob, ParticleSettings *part, ParticleSystemMo
num= pa->num_dmcache;
if(num == DMCACHE_NOTFOUND)
if(pa->num < psmd->dm->getNumFaces(psmd->dm))
num= pa->num;
if (num >= psmd->dm->getNumFaces(psmd->dm)) {
/* happens when simplify is enabled
* gives invalid coords but would crash otherwise */
num= DMCACHE_NOTFOUND;
}
if(mtface && num != DMCACHE_NOTFOUND) {
mface= psmd->dm->getFaceData(psmd->dm, num, CD_MFACE);
mtface += num;

@ -3232,6 +3232,10 @@ static void hair_step(ParticleSimulationData *sim, float cfra)
if(psys->part->type==PART_HAIR && psys->flag & PSYS_HAIR_DYNAMICS)
do_hair_dynamics(sim);
/* following lines were removed r29079 but cause bug [#22811], see report for details */
psys_update_effectors(sim);
psys_update_path_cache(sim, cfra);
psys->flag |= PSYS_HAIR_UPDATED;
}

@ -45,6 +45,7 @@
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_library.h"
#include "BKE_sca.h"
/* ******************* SENSORS ************************ */
@ -189,26 +190,13 @@ void unlink_controller(bController *cont)
{
bSensor *sens;
Object *ob;
int a, removed;
/* check for controller pointers in sensors */
ob= G.main->object.first;
while(ob) {
sens= ob->sensors.first;
while(sens) {
removed= 0;
for(a=0; a<sens->totlinks; a++) {
if(removed) (sens->links)[a-1] = (sens->links)[a];
else if((sens->links)[a] == cont) removed= 1;
}
if(removed) {
sens->totlinks--;
if(sens->totlinks==0) {
MEM_freeN(sens->links);
sens->links= NULL;
}
}
unlink_logicbricks((void **)&cont, (void ***)&(sens->links), &sens->totlinks);
sens= sens->next;
}
ob= ob->id.next;
@ -313,26 +301,13 @@ void unlink_actuator(bActuator *act)
{
bController *cont;
Object *ob;
int a, removed;
/* check for actuator pointers in controllers */
ob= G.main->object.first;
while(ob) {
cont= ob->controllers.first;
while(cont) {
removed= 0;
for(a=0; a<cont->totlinks; a++) {
if(removed) (cont->links)[a-1] = (cont->links)[a];
else if((cont->links)[a] == act) removed= 1;
}
if(removed) {
cont->totlinks--;
if(cont->totlinks==0) {
MEM_freeN(cont->links);
cont->links= NULL;
}
}
unlink_logicbricks((void **)&act, (void ***)&(cont->links), &cont->totlinks);
cont= cont->next;
}
ob= ob->id.next;
@ -512,7 +487,6 @@ bActuator *new_actuator(int type)
}
/* ******************** GENERAL ******************* */
void clear_sca_new_poins_ob(Object *ob)
{
bSensor *sens;
@ -683,3 +657,180 @@ void sca_remove_ob_poin(Object *obt, Object *ob)
act= act->next;
}
}
/* ******************** INTERFACE ******************* */
void sca_move_sensor(bSensor *sens_to_move, Object *ob, int move_up)
{
bSensor *sens, *tmp;
int val;
val = move_up ? 1:2;
/* make sure this sensor belongs to this object */
sens= ob->sensors.first;
while(sens) {
if(sens == sens_to_move) break;
sens= sens->next;
}
if(!sens) return;
/* move up */
if( val==1 && sens->prev) {
for (tmp=sens->prev; tmp; tmp=tmp->prev) {
if (tmp->flag & SENS_VISIBLE)
break;
}
if (tmp) {
BLI_remlink(&ob->sensors, sens);
BLI_insertlinkbefore(&ob->sensors, tmp, sens);
}
}
/* move down */
else if( val==2 && sens->next) {
for (tmp=sens->next; tmp; tmp=tmp->next) {
if (tmp->flag & SENS_VISIBLE)
break;
}
if (tmp) {
BLI_remlink(&ob->sensors, sens);
BLI_insertlink(&ob->sensors, tmp, sens);
}
}
}
void sca_move_controller(bController *cont_to_move, Object *ob, int move_up)
{
bController *cont, *tmp;
int val;
val = move_up ? 1:2;
/* make sure this controller belongs to this object */
cont= ob->controllers.first;
while(cont) {
if(cont == cont_to_move) break;
cont= cont->next;
}
if(!cont) return;
/* move up */
if( val==1 && cont->prev) {
/* locate the controller that has the same state mask but is earlier in the list */
tmp = cont->prev;
while(tmp) {
if(tmp->state_mask & cont->state_mask)
break;
tmp = tmp->prev;
}
if (tmp) {
BLI_remlink(&ob->controllers, cont);
BLI_insertlinkbefore(&ob->controllers, tmp, cont);
}
}
/* move down */
else if( val==2 && cont->next) {
tmp = cont->next;
while(tmp) {
if(tmp->state_mask & cont->state_mask)
break;
tmp = tmp->next;
}
BLI_remlink(&ob->controllers, cont);
BLI_insertlink(&ob->controllers, tmp, cont);
}
}
void sca_move_actuator(bActuator *act_to_move, Object *ob, int move_up)
{
bActuator *act, *tmp;
int val;
val = move_up ? 1:2;
/* make sure this actuator belongs to this object */
act= ob->actuators.first;
while(act) {
if(act == act_to_move) break;
act= act->next;
}
if(!act) return;
/* move up */
if( val==1 && act->prev) {
/* locate the first visible actuators before this one */
for (tmp = act->prev; tmp; tmp=tmp->prev) {
if (tmp->flag & ACT_VISIBLE)
break;
}
if (tmp) {
BLI_remlink(&ob->actuators, act);
BLI_insertlinkbefore(&ob->actuators, tmp, act);
}
}
/* move down */
else if( val==2 && act->next) {
/* locate the first visible actuators after this one */
for (tmp=act->next; tmp; tmp=tmp->next) {
if (tmp->flag & ACT_VISIBLE)
break;
}
if (tmp) {
BLI_remlink(&ob->actuators, act);
BLI_insertlink(&ob->actuators, tmp, act);
}
}
}
void link_logicbricks(void **poin, void ***ppoin, short *tot, short size)
{
void **old_links= NULL;
int ibrick;
/* check if the bricks are already linked */
for (ibrick=0; ibrick < *tot; ibrick++) {
if ((*ppoin)[ibrick] == *poin)
return;
}
if (*ppoin) {
old_links= *ppoin;
(*tot) ++;
*ppoin = MEM_callocN((*tot)*size, "new link");
for (ibrick=0; ibrick < *tot - 1; ibrick++) {
(*ppoin)[ibrick] = old_links[ibrick];
}
(*ppoin)[ibrick] = *poin;
if(old_links) MEM_freeN(old_links);
}
else {
(*tot) = 1;
*ppoin = MEM_callocN((*tot)*size, "new link");
(*ppoin)[0] = *poin;
}
}
void unlink_logicbricks(void **poin, void ***ppoin, short *tot)
{
int ibrick, removed;
removed= 0;
for (ibrick=0; ibrick < *tot; ibrick++) {
if(removed) (*ppoin)[ibrick - removed] = (*ppoin)[ibrick];
else if((*ppoin)[ibrick] == *poin) removed = 1;
}
if (removed) {
(*tot) --;
if(*tot == 0) {
MEM_freeN(*ppoin);
(*ppoin)= NULL;
}
return;
}
}

@ -312,7 +312,7 @@ static void do_plugin_effect(Scene *scene, Sequence *seq, int cfra,
IMB_convert_rgba_to_abgr(out);
}
if (seq->plugin->version<=3 && float_rendering) {
IMB_float_from_rect(out);
IMB_float_from_rect_simple(out);
}
if (use_temp_bufs) {
@ -2783,7 +2783,7 @@ static void do_multicam(Scene *scene, Sequence *seq, int cfra,
IMB_rect_from_float(i);
memcpy(out->rect, i->rect, out->x * out->y * 4);
} else if (out->rect_float && i->rect) {
IMB_float_from_rect(i);
IMB_float_from_rect_simple(i);
memcpy(out->rect_float, i->rect_float, out->x * out->y *4*sizeof(float));
}
}

@ -247,9 +247,9 @@ void seq_free_sequence(Scene *scene, Sequence *seq)
if(seq->scene_sound)
sound_remove_scene_sound(scene, seq->scene_sound);
}
seq_free_animdata(scene, seq);
}
MEM_freeN(seq);
}
@ -1022,13 +1022,13 @@ static void do_effect(Scene *scene, int cfra, Sequence *seq, TStripElem * se,
y= se2->ibuf->y;
if (!se1->ibuf->rect_float && se->ibuf->rect_float) {
IMB_float_from_rect(se1->ibuf);
IMB_float_from_rect_simple(se1->ibuf);
}
if (!se2->ibuf->rect_float && se->ibuf->rect_float) {
IMB_float_from_rect(se2->ibuf);
IMB_float_from_rect_simple(se2->ibuf);
}
if (!se3->ibuf->rect_float && se->ibuf->rect_float) {
IMB_float_from_rect(se3->ibuf);
IMB_float_from_rect_simple(se3->ibuf);
}
if (!se1->ibuf->rect && !se->ibuf->rect_float) {
@ -1509,6 +1509,11 @@ static StripColorBalance calc_cb(StripColorBalance * cb_)
if(cb.flag & SEQ_COLOR_BALANCE_INVERSE_LIFT) {
for (c = 0; c < 3; c++) {
/* tweak to give more subtle results
* values above 1.0 are scaled */
if(cb.lift[c] > 1.0f)
cb.lift[c] = pow(cb.lift[c] - 1.0f, 2.0f) + 1.0f;
cb.lift[c] = 2.0f - cb.lift[c];
}
}
@ -1764,12 +1769,31 @@ static void input_preprocess(Scene *scene, Sequence *seq, TStripElem *se, int cf
if(seq->flag & SEQ_FLIPX) {
IMB_flipx(se->ibuf);
}
if(seq->flag & SEQ_FLIPY) {
IMB_flipy(se->ibuf);
if(seq->sat != 1.0f) {
/* inline for now, could become an imbuf function */
int i;
char *rct= (char *)se->ibuf->rect;
float *rctf= se->ibuf->rect_float;
const float sat= seq->sat;
float hsv[3];
if(rct) {
float rgb[3];
for (i = se->ibuf->x * se->ibuf->y; i > 0; i--, rct+=4) {
rgb_byte_to_float(rct, rgb);
rgb_to_hsv(rgb[0], rgb[1], rgb[2], hsv, hsv+1, hsv+2);
hsv_to_rgb(hsv[0], hsv[1] * sat, hsv[2], rgb, rgb+1, rgb+2);
rgb_float_to_byte(rgb, rct);
}
}
if(seq->mul == 0.0) {
seq->mul = 1.0;
if(rctf) {
for (i = se->ibuf->x * se->ibuf->y; i > 0; i--, rctf+=4) {
rgb_to_hsv(rctf[0], rctf[1], rctf[2], hsv, hsv+1, hsv+2);
hsv_to_rgb(hsv[0], hsv[1] * sat, hsv[2], rctf, rctf+1, rctf+2);
}
}
}
mul = seq->mul;
@ -1784,17 +1808,9 @@ static void input_preprocess(Scene *scene, Sequence *seq, TStripElem *se, int cf
}
if(seq->flag & SEQ_MAKE_FLOAT) {
if (!se->ibuf->rect_float) {
int profile = IB_PROFILE_NONE;
if (!se->ibuf->rect_float)
IMB_float_from_rect_simple(se->ibuf);
/* no color management:
* don't disturb the existing profiles */
SWAP(int, se->ibuf->profile, profile);
IMB_float_from_rect(se->ibuf);
SWAP(int, se->ibuf->profile, profile);
}
if (se->ibuf->rect) {
imb_freerectImBuf(se->ibuf);
}
@ -2085,14 +2101,14 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
}
copy_from_ibuf_still(seq, se);
if (!se->ibuf) {
se->ibuf= IMB_loadiffname(
name, IB_rect);
if (se->ibuf==NULL && (se->ibuf= IMB_loadiffname(name, IB_rect))) {
/* we don't need both (speed reasons)! */
if (se->ibuf &&
se->ibuf->rect_float && se->ibuf->rect) {
if (se->ibuf->rect_float && se->ibuf->rect)
imb_freerectImBuf(se->ibuf);
}
/* all sequencer color is done in SRGB space, linear gives odd crossfades */
if(se->ibuf->profile == IB_PROFILE_LINEAR_RGB)
IMB_convert_profile(se->ibuf, IB_PROFILE_NONE);
copy_to_ibuf_still(seq, se);
}
@ -2544,10 +2560,6 @@ static TStripElem* do_build_seq_array_recursively(
int i;
TStripElem* se = 0;
// XXX for prefetch and overlay offset!..., very bad!!!
AnimData *adt= BKE_animdata_from_id(&scene->id);
BKE_animsys_evaluate_animdata(&scene->id, adt, cfra, ADT_RECALC_ANIM);
count = get_shown_sequences(seqbasep, cfra, chanshown,
(Sequence **)&seq_arr);
@ -2561,6 +2573,14 @@ static TStripElem* do_build_seq_array_recursively(
return 0;
}
#if 0 /* commentind since this breaks keyframing, since it resets the value on draw */
if(scene->r.cfra != cfra) {
// XXX for prefetch and overlay offset!..., very bad!!!
AnimData *adt= BKE_animdata_from_id(&scene->id);
BKE_animsys_evaluate_animdata(&scene->id, adt, cfra, ADT_RECALC_ANIM);
}
#endif
test_and_auto_discard_ibuf(se, seqrectx, seqrecty);
if (se->ibuf_comp != 0) {
@ -2703,11 +2723,11 @@ static TStripElem* do_build_seq_array_recursively(
if (!se1->ibuf_comp->rect_float &&
se2->ibuf_comp->rect_float) {
IMB_float_from_rect(se1->ibuf_comp);
IMB_float_from_rect_simple(se1->ibuf_comp);
}
if (!se2->ibuf->rect_float &&
se2->ibuf_comp->rect_float) {
IMB_float_from_rect(se2->ibuf);
IMB_float_from_rect_simple(se2->ibuf);
}
if (!se1->ibuf_comp->rect &&
@ -4042,6 +4062,7 @@ Sequence *alloc_sequence(ListBase *lb, int cfra, int machine)
seq->flag= SELECT;
seq->start= cfra;
seq->machine= machine;
seq->sat= 1.0;
seq->mul= 1.0;
seq->blend_opacity = 100.0;
seq->volume = 1.0f;

@ -72,12 +72,12 @@ World *add_world(char *name)
wrld= alloc_libblock(&G.main->world, ID_WO, name);
wrld->horr= 0.25f;
wrld->horg= 0.25f;
wrld->horb= 0.25f;
wrld->zenr= 0.1f;
wrld->zeng= 0.1f;
wrld->zenb= 0.1f;
wrld->horr= 0.05f;
wrld->horg= 0.05f;
wrld->horb= 0.05f;
wrld->zenr= 0.01f;
wrld->zeng= 0.01f;
wrld->zenb= 0.01f;
wrld->skytype= 0;
wrld->stardist= 15.0f;
wrld->starsize= 2.0f;
@ -96,6 +96,8 @@ World *add_world(char *name)
wrld->ao_approx_error= 0.25f;
wrld->preview = NULL;
wrld->miststa = 5.0f;
wrld->mistdist = 25.0f;
return wrld;
}

@ -101,11 +101,14 @@ char *BLI_get_folder_create(int folder_id, char *subfolder);
#define BLENDER_HISTORY_FILE "recent-files.txt"
#ifdef WIN32
#define BLENDER_BASE_FORMAT "%s\\Blender Foundation\\Blender\\%s"
#define BLENDER_USER_FORMAT "%s\\Blender Foundation\\Blender\\%s"
#define BLENDER_SYSTEM_FORMAT "%s\\Blender Foundation\\Blender\\%s"
#elif __APPLE__
#define BLENDER_BASE_FORMAT "%s/Blender/%s"
#define BLENDER_USER_FORMAT "%s/Blender/%s"
#define BLENDER_SYSTEM_FORMAT "%s/Blender/%s"
#else
#define BLENDER_BASE_FORMAT "%s/.blender/%s"
#define BLENDER_USER_FORMAT "%s/.blender/%s"
#define BLENDER_SYSTEM_FORMAT "%s/blender/%s"
#endif
void BLI_setenv(const char *env, const char *val);

@ -1014,7 +1014,7 @@ static int get_path_user(char *targetpath, char *folder_name, char *envvar)
user_base_path = (const char *)GHOST_getUserDir();
if (user_base_path) {
BLI_snprintf(user_path, FILE_MAX, BLENDER_BASE_FORMAT, user_base_path, blender_version_decimal());
BLI_snprintf(user_path, FILE_MAX, BLENDER_USER_FORMAT, user_base_path, blender_version_decimal());
}
if(!user_path[0])
@ -1040,7 +1040,7 @@ static int get_path_system(char *targetpath, char *folder_name, char *envvar)
system_base_path = (const char *)GHOST_getSystemDir();
if (system_base_path) {
BLI_snprintf(system_path, FILE_MAX, BLENDER_BASE_FORMAT, system_base_path, blender_version_decimal());
BLI_snprintf(system_path, FILE_MAX, BLENDER_SYSTEM_FORMAT, system_base_path, blender_version_decimal());
}
if(!system_path[0])
@ -1064,13 +1064,14 @@ char *BLI_get_folder(int folder_id, char *subfolder)
switch (folder_id) {
case BLENDER_DATAFILES: /* general case */
BLI_join_dirfile(search_path, "datafiles", subfolder);
if (get_path_user(path, search_path, "BLENDER_USER_DATAFILES")) break;
if (get_path_local(path, search_path)) break;
if (get_path_user(path, search_path, "BLENDER_USER_DATAFILES")) break;
if (get_path_system(path, search_path, "BLENDER_SYSTEM_DATAFILES")) break;
return NULL;
case BLENDER_USER_DATAFILES:
BLI_join_dirfile(search_path, "datafiles", subfolder);
if (get_path_local(path, search_path)) break;
if (get_path_user(path, search_path, "BLENDER_USER_DATAFILES")) break;
return NULL;
@ -1081,13 +1082,14 @@ char *BLI_get_folder(int folder_id, char *subfolder)
case BLENDER_CONFIG: /* general case */
BLI_join_dirfile(search_path, "config", subfolder);
if (get_path_user(path, search_path, "BLENDER_USER_CONFIG")) break;
if (get_path_local(path, search_path)) break;
if (get_path_user(path, search_path, "BLENDER_USER_CONFIG")) break;
if (get_path_system(path, search_path, "BLENDER_SYSTEM_CONFIG")) break;
return NULL;
case BLENDER_USER_CONFIG:
BLI_join_dirfile(search_path, "config", subfolder);
if (get_path_local(path, search_path)) break;
if (get_path_user(path, search_path, "BLENDER_USER_CONFIG")) break;
return NULL;
@ -1098,13 +1100,14 @@ char *BLI_get_folder(int folder_id, char *subfolder)
case BLENDER_SCRIPTS: /* general case */
BLI_join_dirfile(search_path, "scripts", subfolder);
if (get_path_user(path, search_path, "BLENDER_USER_SCRIPTS")) break;
if (get_path_local(path, search_path)) break;
if (get_path_user(path, search_path, "BLENDER_USER_SCRIPTS")) break;
if (get_path_system(path, search_path, "BLENDER_SYSTEM_SCRIPTS")) break;
return NULL;
case BLENDER_USER_SCRIPTS:
BLI_join_dirfile(search_path, "scripts", subfolder);
if (get_path_local(path, search_path)) break;
if (get_path_user(path, search_path, "BLENDER_USER_SCRIPTS")) break;
return NULL;
@ -1121,7 +1124,6 @@ char *BLI_get_folder(int folder_id, char *subfolder)
case BLENDER_SYSTEM_PYTHON:
BLI_join_dirfile(search_path, "python", subfolder);
if (get_path_system(path, search_path, "BLENDER_SYSTEM_PYTHON")) break;
return NULL;
}

@ -10953,6 +10953,15 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
tex->saturation= 1.0f;
}
for (scene= main->scene.first; scene; scene=scene->id.next) {
if(scene) {
Sequence *seq;
SEQ_BEGIN(scene->ed, seq) {
seq->sat= 1.0f;
}
SEQ_END
}
}
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -31,8 +31,8 @@
/* Datafiles embedded in Blender */
extern int datatoc_B_blend_size;
extern char datatoc_B_blend[];
extern int datatoc_startup_blend_size;
extern char datatoc_startup_blend[];
extern int datatoc_blenderbuttons_size;
extern char datatoc_blenderbuttons[];

@ -285,32 +285,6 @@ void uiEndPanel(uiBlock *block, int width, int height)
}
}
#if 0
void uiPanelToMouse(const bContext *C, Panel *pa)
{
/* global control over this feature; UI_PNL_TO_MOUSE only called for hotkey panels */
if(U.uiflag & USER_PANELPINNED);
else if(pa->control & UI_PNL_TO_MOUSE) {
int mx, my;
mx= CTX_wm_window(C)->eventstate->x;
my= CTX_wm_window(C)->eventstate->y;
pa->ofsx= mx-pa->sizex/2;
pa->ofsy= my-pa->sizey/2;
if(pa->flag & PNL_CLOSED) pa->flag &= ~PNL_CLOSED;
}
if(pa->control & UI_PNL_UNSTOW) {
if(pa->flag & PNL_CLOSEDY) {
pa->flag &= ~PNL_CLOSED;
}
}
}
#endif
static void ui_offset_panel_block(uiBlock *block)
{
uiStyle *style= U.uistyles.first;

@ -1832,11 +1832,11 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
/* RGB values */
uiBlockBeginAlign(block);
bt= uiDefButR(block, NUMSLI, 0, "R ", 0, -60, butwidth, UI_UNIT_Y, ptr, propname, 0, 0.0, 0.0, 0, 0, "");
bt= uiDefButR(block, NUMSLI, 0, "R ", 0, -60, butwidth, UI_UNIT_Y, ptr, propname, 0, 0.0, 0.0, 0, 3, "");
uiButSetFunc(bt, do_picker_rna_cb, bt, NULL);
bt= uiDefButR(block, NUMSLI, 0, "G ", 0, -80, butwidth, UI_UNIT_Y, ptr, propname, 1, 0.0, 0.0, 0, 0, "");
bt= uiDefButR(block, NUMSLI, 0, "G ", 0, -80, butwidth, UI_UNIT_Y, ptr, propname, 1, 0.0, 0.0, 0, 3, "");
uiButSetFunc(bt, do_picker_rna_cb, bt, NULL);
bt= uiDefButR(block, NUMSLI, 0, "B ", 0, -100, butwidth, UI_UNIT_Y, ptr, propname, 2, 0.0, 0.0, 0, 0, "");
bt= uiDefButR(block, NUMSLI, 0, "B ", 0, -100, butwidth, UI_UNIT_Y, ptr, propname, 2, 0.0, 0.0, 0, 3, "");
uiButSetFunc(bt, do_picker_rna_cb, bt, NULL);
// could use uiItemFullR(col, ptr, prop, -1, 0, UI_ITEM_R_EXPAND|UI_ITEM_R_SLIDER, "", 0);

@ -82,10 +82,6 @@
/* own include */
#include "mesh_intern.h"
/* XXX */
static int pupmenu(const char *dummy) {return 0;}
/* XXX */
/* * ********************** no editmode!!! *********** */

@ -150,7 +150,7 @@ void SOUND_OT_open(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_RELPATH);
WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH);
RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory.");
}

@ -211,6 +211,16 @@ static bActuator *edit_actuator_property_get(bContext *C, wmOperator *op, Object
return act;
}
static int logicbricks_move_property_get(wmOperator *op)
{
int type = RNA_enum_get(op->ptr, "direction");
if (type == 1)
return TRUE;
else
return FALSE;
}
/* ************* Add/Remove Sensor Operator ************* */
static int sensor_remove_exec(bContext *C, wmOperator *op)
@ -530,12 +540,158 @@ void LOGIC_OT_actuator_add(wmOperatorType *ot)
RNA_def_string(ot->srna, "object", "", 32, "Object", "Name of the Object to add the Actuator to");
}
/* ************* Move Logic Bricks Operator ************* */
static EnumPropertyItem logicbricks_move_direction[] ={
{1, "UP", 0, "Move Up", ""},
{2, "DOWN", 0, "Move Down", ""},
{0, NULL, 0, NULL, NULL}};
static int sensor_move_exec(bContext *C, wmOperator *op)
{
Object *ob=NULL;
bSensor *sens= edit_sensor_property_get(C, op, &ob);
int move_up= logicbricks_move_property_get(op);
if (!sens)
return OPERATOR_CANCELLED;
sca_move_sensor(sens, ob, move_up);
WM_event_add_notifier(C, NC_LOGIC, NULL);
return OPERATOR_FINISHED;
}
static int sensor_move_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
if (edit_sensor_invoke_properties(C, op)) {
return sensor_move_exec(C, op);
}
else
return OPERATOR_CANCELLED;
}
void LOGIC_OT_sensor_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Sensor";
ot->description = "Move Densor";
ot->idname= "LOGIC_OT_sensor_move";
/* api callbacks */
ot->invoke= sensor_move_invoke;
ot->exec= sensor_move_exec;
ot->poll= edit_sensor_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
edit_sensor_properties(ot);
RNA_def_enum(ot->srna, "direction", logicbricks_move_direction, 1, "Direction", "Move Up or Down");
}
static int controller_move_exec(bContext *C, wmOperator *op)
{
Object *ob=NULL;
bController *cont= edit_controller_property_get(C, op, &ob);
int move_up= logicbricks_move_property_get(op);
if (!cont)
return OPERATOR_CANCELLED;
sca_move_controller(cont, ob, move_up);
WM_event_add_notifier(C, NC_LOGIC, NULL);
return OPERATOR_FINISHED;
}
static int controller_move_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
if (edit_controller_invoke_properties(C, op)) {
return controller_move_exec(C, op);
}
else
return OPERATOR_CANCELLED;
}
void LOGIC_OT_controller_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Controller";
ot->description = "Move Controller";
ot->idname= "LOGIC_OT_controller_move";
/* api callbacks */
ot->invoke= controller_move_invoke;
ot->exec= controller_move_exec;
ot->poll= edit_controller_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
edit_controller_properties(ot);
RNA_def_enum(ot->srna, "direction", logicbricks_move_direction, 1, "Direction", "Move Up or Down");
}
static int actuator_move_exec(bContext *C, wmOperator *op)
{
Object *ob=NULL;
bActuator *act = edit_actuator_property_get(C, op, &ob);
int move_up= logicbricks_move_property_get(op);
if (!act)
return OPERATOR_CANCELLED;
sca_move_actuator(act, ob, move_up);
WM_event_add_notifier(C, NC_LOGIC, NULL);
return OPERATOR_FINISHED;
}
static int actuator_move_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
if (edit_actuator_invoke_properties(C, op)) {
return actuator_move_exec(C, op);
}
else
return OPERATOR_CANCELLED;
}
void LOGIC_OT_actuator_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Actuator";
ot->description = "Move Actuator";
ot->idname= "LOGIC_OT_actuator_move";
/* api callbacks */
ot->invoke= actuator_move_invoke;
ot->exec= actuator_move_exec;
ot->poll= edit_actuator_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
edit_actuator_properties(ot);
RNA_def_enum(ot->srna, "direction", logicbricks_move_direction, 1, "Direction", "Move Up or Down");
}
void ED_operatortypes_logic(void)
{
WM_operatortype_append(LOGIC_OT_sensor_remove);
WM_operatortype_append(LOGIC_OT_sensor_add);
WM_operatortype_append(LOGIC_OT_sensor_move);
WM_operatortype_append(LOGIC_OT_controller_remove);
WM_operatortype_append(LOGIC_OT_controller_add);
WM_operatortype_append(LOGIC_OT_controller_move);
WM_operatortype_append(LOGIC_OT_actuator_remove);
WM_operatortype_append(LOGIC_OT_actuator_add);
WM_operatortype_append(LOGIC_OT_actuator_move);
}

@ -194,8 +194,9 @@ static void make_unique_prop_names_cb(bContext *C, void *strv, void *redraw_view
}
static void sca_move_sensor(bContext *C, void *datav, void *move_up)
static void old_sca_move_sensor(bContext *C, void *datav, void *move_up)
{
/* deprecated, no longer using it (moved to sca.c) */
Scene *scene= CTX_data_scene(C);
bSensor *sens_to_delete= datav;
int val;
@ -246,8 +247,9 @@ static void sca_move_sensor(bContext *C, void *datav, void *move_up)
}
}
static void sca_move_controller(bContext *C, void *datav, void *move_up)
static void old_sca_move_controller(bContext *C, void *datav, void *move_up)
{
/* deprecated, no longer using it (moved to sca.c) */
Scene *scene= CTX_data_scene(C);
bController *controller_to_del= datav;
int val;
@ -301,8 +303,9 @@ static void sca_move_controller(bContext *C, void *datav, void *move_up)
}
}
static void sca_move_actuator(bContext *C, void *datav, void *move_up)
static void old_sca_move_actuator(bContext *C, void *datav, void *move_up)
{
/* deprecated, no longer using it (moved to sca.c) */
Scene *scene= CTX_data_scene(C);
bActuator *actuator_to_move= datav;
int val;
@ -909,8 +912,15 @@ static ID **get_selected_and_linked_obs(bContext *C, short *count, short scavisf
ob= G.main->object.first;
nr= 0;
/* make the active object always the first one of the list */
if (obact) {
idar[0]= (ID *)obact;
nr++;
}
while(ob) {
if( ob->scavisflag ) {
if( (ob->scavisflag) && (ob != obact)) {
idar[nr]= (ID *)ob;
nr++;
}
@ -3188,6 +3198,11 @@ static void draw_sensor_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *lo
&& RNA_boolean_get(ptr, "expanded")) || RNA_boolean_get(ptr, "pinned")));
uiItemR(subrow, ptr, "pinned", UI_ITEM_R_NO_BG, "", 0);
if(RNA_boolean_get(ptr, "expanded")==0) {
uiItemEnumO(row, "LOGIC_OT_sensor_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(row, "LOGIC_OT_sensor_move", "", ICON_TRIA_DOWN, "direction", 2); // down
}
uiItemO(row, "", ICON_X, "LOGIC_OT_sensor_remove");
}
@ -3527,6 +3542,11 @@ static void draw_controller_header(uiLayout *layout, PointerRNA *ptr)
uiItemL(row, name, 0);
uiItemR(row, ptr, "priority", 0, "", 0);
if(RNA_boolean_get(ptr, "expanded")==0) {
uiItemEnumO(row, "LOGIC_OT_controller_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(row, "LOGIC_OT_controller_move", "", ICON_TRIA_DOWN, "direction", 2); // down
}
uiItemO(row, "", ICON_X, "LOGIC_OT_controller_remove");
}
@ -3606,6 +3626,10 @@ static void draw_actuator_header(uiLayout *layout, PointerRNA *ptr, PointerRNA *
&& RNA_boolean_get(ptr, "expanded")) || RNA_boolean_get(ptr, "pinned")));
uiItemR(subrow, ptr, "pinned", UI_ITEM_R_NO_BG, "", 0);
if(RNA_boolean_get(ptr, "expanded")==0) {
uiItemEnumO(row, "LOGIC_OT_actuator_move", "", ICON_TRIA_UP, "direction", 1); // up
uiItemEnumO(row, "LOGIC_OT_actuator_move", "", ICON_TRIA_DOWN, "direction", 2); // down
}
uiItemO(row, "", ICON_X, "LOGIC_OT_actuator_remove");
}
@ -4360,6 +4384,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
{
SpaceLogic *slogic= CTX_wm_space_logic(C);
Object *ob= CTX_data_active_object(C);
Object *act_ob= ob;
ID **idar;
PointerRNA logic_ptr, settings_ptr;
@ -4453,6 +4478,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
row = uiLayoutRow(split, 1);
uiDefButBitS(block, TOG, OB_SHOWCONT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide controllers");
if (ob == act_ob)
uiItemMenuEnumO(row, "LOGIC_OT_controller_add", "type", "Add Controller", 0);
if (RNA_boolean_get(&settings_ptr, "show_state_panel")) {
@ -4546,6 +4572,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
row = uiLayoutRow(layout, 1);
uiDefButBitS(block, TOG, OB_SHOWSENS, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
if (ob == act_ob)
uiItemMenuEnumO(row, "LOGIC_OT_sensor_add", "type", "Add Sensor", 0);
if ((ob->scaflag & OB_SHOWSENS) == 0) continue;
@ -4611,6 +4638,7 @@ static void logic_buttons_new(bContext *C, ARegion *ar)
row = uiLayoutRow(layout, 1);
uiDefButBitS(block, TOG, OB_SHOWACT, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), UI_UNIT_Y, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
if (ob == act_ob)
uiItemMenuEnumO(row, "LOGIC_OT_actuator_add", "type", "Add Actuator", 0);
if ((ob->scaflag & OB_SHOWACT) == 0) continue;
@ -4825,15 +4853,15 @@ void logic_buttons(bContext *C, ARegion *ar)
cpack(0x999999);
glRecti(xco+22, yco, xco+width-22,yco+19);
but= uiDefBut(block, LABEL, 0, controller_name(cont->type), (short)(xco+22), yco, 70, UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller type");
//uiButSetFunc(but, sca_move_controller, cont, NULL);
//uiButSetFunc(but, old_sca_move_controller, cont, NULL);
but= uiDefBut(block, LABEL, 0, cont->name,(short)(xco+92), yco,(short)(width-158), UI_UNIT_Y, cont, 0, 0, 0, 0, "Controller name");
//uiButSetFunc(but, sca_move_controller, cont, NULL);
//uiButSetFunc(but, old_sca_move_controller, cont, NULL);
uiBlockBeginAlign(block);
but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(110+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
uiButSetFunc(but, sca_move_controller, cont, (void *)TRUE);
uiButSetFunc(but, old_sca_move_controller, cont, (void *)TRUE);
but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(88+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
uiButSetFunc(but, sca_move_controller, cont, (void *)FALSE);
uiButSetFunc(but, old_sca_move_controller, cont, (void *)FALSE);
uiBlockEndAlign(block);
ycoo= yco;
@ -4917,15 +4945,15 @@ void logic_buttons(bContext *C, ARegion *ar)
set_col_sensor(sens->type, 1);
glRecti(xco+22, yco, xco+width-22,yco+19);
but= uiDefBut(block, LABEL, 0, sensor_name(sens->type), (short)(xco+22), yco, 80, UI_UNIT_Y, sens, 0, 0, 0, 0, "");
//uiButSetFunc(but, sca_move_sensor, sens, NULL);
//uiButSetFunc(but, old_sca_move_sensor, sens, NULL);
but= uiDefBut(block, LABEL, 0, sens->name, (short)(xco+102), yco, (short)(width-(pin?146:124)), UI_UNIT_Y, sens, 0, 31, 0, 0, "");
//uiButSetFunc(but, sca_move_sensor, sens, NULL);
//uiButSetFunc(but, old_sca_move_sensor, sens, NULL);
uiBlockBeginAlign(block);
but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(66+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
uiButSetFunc(but, sca_move_sensor, sens, (void *)TRUE);
uiButSetFunc(but, old_sca_move_sensor, sens, (void *)TRUE);
but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(44+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
uiButSetFunc(but, sca_move_sensor, sens, (void *)FALSE);
uiButSetFunc(but, old_sca_move_sensor, sens, (void *)FALSE);
uiBlockEndAlign(block);
}
@ -4995,15 +5023,15 @@ void logic_buttons(bContext *C, ARegion *ar)
set_col_actuator(act->type, 1);
glRecti((short)(xco+22), yco, (short)(xco+width-22),(short)(yco+19));
but= uiDefBut(block, LABEL, 0, actuator_name(act->type), (short)(xco+22), yco, 90, UI_UNIT_Y, act, 0, 0, 0, 0, "Actuator type");
// uiButSetFunc(but, sca_move_actuator, act, NULL);
// uiButSetFunc(but, old_sca_move_actuator, act, NULL);
but= uiDefBut(block, LABEL, 0, act->name, (short)(xco+112), yco, (short)(width-(pin?156:134)), UI_UNIT_Y, act, 0, 0, 0, 0, "Actuator name");
// uiButSetFunc(but, sca_move_actuator, act, NULL);
// uiButSetFunc(but, old_sca_move_actuator, act, NULL);
uiBlockBeginAlign(block);
but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_UP, (short)(xco+width-(66+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick up");
uiButSetFunc(but, sca_move_actuator, act, (void *)TRUE);
uiButSetFunc(but, old_sca_move_actuator, act, (void *)TRUE);
but= uiDefIconBut(block, BUT, B_REDR, ICON_TRIA_DOWN, (short)(xco+width-(44+5)), yco, 22, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Move this logic brick down");
uiButSetFunc(but, sca_move_actuator, act, (void *)FALSE);
uiButSetFunc(but, old_sca_move_actuator, act, (void *)FALSE);
uiBlockEndAlign(block);
ycoo= yco;

@ -365,14 +365,13 @@ static void draw_seq_handle(View2D *v2d, Sequence *seq, float pixelx, short dire
}
}
static void draw_seq_extensions(Scene *scene, SpaceSeq *sseq, Sequence *seq)
static void draw_seq_extensions(Scene *scene, ARegion *ar, SpaceSeq *sseq, Sequence *seq)
{
float x1, x2, y1, y2, pixely, a;
char col[3], blendcol[3];
View2D *v2d= &sseq->v2d;
View2D *v2d= &ar->v2d;
if(seq->type >= SEQ_EFFECT) return;
if(v2d->mask.ymax == v2d->mask.ymin) return; /* avoid divide by zero */
x1= seq->startdisp;
x2= seq->enddisp;
@ -625,7 +624,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, SpaceSeq *sseq, Sequence *
/* draw additional info and controls */
if (!is_single_image)
draw_seq_extensions(scene, sseq, seq);
draw_seq_extensions(scene, ar, sseq, seq);
draw_seq_handle(v2d, seq, pixelx, SEQ_LEFTHANDLE);
draw_seq_handle(v2d, seq, pixelx, SEQ_RIGHTHANDLE);

@ -473,6 +473,7 @@ static void time_main_area_draw(const bContext *C, ARegion *ar)
UI_view2d_grid_free(grid);
/* keyframes */
if(!G.rendering) /* ANIM_nla_mapping_apply_fcurve() modifies curve data while rendering, possible race condition */
time_draw_keyframes(C, stime, ar);
/* current frame */

@ -4475,13 +4475,13 @@ static void tekenvertsN(Nurb *nu, short sel, short hide_handles, void *lastsel)
a= nu->pntsu;
while(a--) {
if(bezt->hide==0) {
if (bezt == lastsel) {
if (sel == 1 && bezt == lastsel) {
UI_ThemeColor(TH_LASTSEL_POINT);
bglVertex3fv(bezt->vec[1]);
if (!hide_handles) {
bglVertex3fv(bezt->vec[0]);
bglVertex3fv(bezt->vec[2]);
if(bezt->f1 & SELECT) bglVertex3fv(bezt->vec[0]);
if(bezt->f3 & SELECT) bglVertex3fv(bezt->vec[2]);
}
UI_ThemeColor(color);

@ -996,7 +996,10 @@ void ED_spacetype_view3d(void)
art->draw= view3d_tools_area_draw;
BLI_addhead(&st->regiontypes, art);
#if 0
/* unfinished still */
view3d_toolshelf_register(art);
#endif
/* regions: tool properties */
art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");

@ -1897,26 +1897,13 @@ void snapGridAction(TransInfo *t, float *val, GearsType action) {
void snapGrid(TransInfo *t, float *val) {
int invert;
GearsType action;
// Only do something if using Snap to Grid
if (t->tsnap.mode != SCE_SNAP_MODE_INCREMENT)
return;
if(t->mode==TFM_ROTATION || t->mode==TFM_WARP || t->mode==TFM_TILT || t->mode==TFM_TRACKBALL || t->mode==TFM_BONE_ROLL)
invert = U.flag & USER_AUTOROTGRID;
else if(t->mode==TFM_RESIZE || t->mode==TFM_SHEAR || t->mode==TFM_BONESIZE || t->mode==TFM_SHRINKFATTEN || t->mode==TFM_CURVE_SHRINKFATTEN)
invert = U.flag & USER_AUTOSIZEGRID;
else
invert = U.flag & USER_AUTOGRABGRID;
if(invert) {
action = activeSnap(t) ? NO_GEARS: BIG_GEARS;
}
else {
action = activeSnap(t) ? BIG_GEARS : NO_GEARS;
}
if (action == BIG_GEARS && (t->modifiers & MOD_PRECISION)) {
action = SMALL_GEARS;

@ -319,6 +319,9 @@ void IMB_de_interlace(struct ImBuf *ibuf);
void IMB_interlace(struct ImBuf *ibuf);
void IMB_rect_from_float(struct ImBuf *ibuf);
void IMB_float_from_rect(struct ImBuf *ibuf);
void IMB_float_from_rect_simple(struct ImBuf *ibuf); /* no profile conversion */
/* note, check that the conversion exists, only some are supported */
void IMB_convert_profile(struct ImBuf *ibuf, int profile);
/**
* Change the ordering of the color bytes pointed to by rect from

@ -222,3 +222,74 @@ void IMB_float_from_rect(struct ImBuf *ibuf)
}
}
/* no profile conversion */
void IMB_float_from_rect_simple(struct ImBuf *ibuf)
{
int profile = IB_PROFILE_NONE;
/* no color management:
* don't disturb the existing profiles */
SWAP(int, ibuf->profile, profile);
IMB_float_from_rect(ibuf);
SWAP(int, ibuf->profile, profile);
}
void IMB_convert_profile(struct ImBuf *ibuf, int profile)
{
int ok= FALSE;
int i;
unsigned char *rct= (unsigned char *)ibuf->rect;
float *rctf= ibuf->rect_float;
if(ibuf->profile == profile)
return;
if(ELEM(ibuf->profile, IB_PROFILE_NONE, IB_PROFILE_SRGB)) { /* from */
if(profile == IB_PROFILE_LINEAR_RGB) { /* to */
if(ibuf->rect_float) {
for (i = ibuf->x * ibuf->y; i > 0; i--, rctf+=4) {
rctf[0]= srgb_to_linearrgb(rctf[0]);
rctf[1]= srgb_to_linearrgb(rctf[1]);
rctf[2]= srgb_to_linearrgb(rctf[2]);
}
}
if(ibuf->rect) {
for (i = ibuf->x * ibuf->y; i > 0; i--, rct+=4) {
rctf[0]= (unsigned char)((srgb_to_linearrgb((float)rctf[0]/255.0f) * 255.0f) + 0.5f);
rctf[1]= (unsigned char)((srgb_to_linearrgb((float)rctf[1]/255.0f) * 255.0f) + 0.5f);
rctf[2]= (unsigned char)((srgb_to_linearrgb((float)rctf[2]/255.0f) * 255.0f) + 0.5f);
}
}
ok= TRUE;
}
}
else if (ibuf->profile == IB_PROFILE_LINEAR_RGB) { /* from */
if(ELEM(profile, IB_PROFILE_NONE, IB_PROFILE_SRGB)) { /* to */
if(ibuf->rect_float) {
for (i = ibuf->x * ibuf->y; i > 0; i--, rctf+=4) {
rctf[0]= linearrgb_to_srgb(rctf[0]);
rctf[1]= linearrgb_to_srgb(rctf[1]);
rctf[2]= linearrgb_to_srgb(rctf[2]);
}
}
if(ibuf->rect) {
for (i = ibuf->x * ibuf->y; i > 0; i--, rct+=4) {
rctf[0]= (unsigned char)((linearrgb_to_srgb((float)rctf[0]/255.0f) * 255.0f) + 0.5f);
rctf[1]= (unsigned char)((linearrgb_to_srgb((float)rctf[1]/255.0f) * 255.0f) + 0.5f);
rctf[2]= (unsigned char)((linearrgb_to_srgb((float)rctf[2]/255.0f) * 255.0f) + 0.5f);
}
}
ok= TRUE;
}
}
if(ok==FALSE){
printf("IMB_convert_profile: failed profile conversion %d -> %d\n", ibuf->profile, profile);
return;
}
ibuf->profile= profile;
}

@ -46,6 +46,7 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void)
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math_color.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
@ -229,6 +230,7 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
if(ibuf->rect_float) {
float *from;
if(ibuf->profile == IB_PROFILE_LINEAR_RGB) {
for (int i = ibuf->y-1; i >= 0; i--)
{
from= ibuf->rect_float + channels*i*width;
@ -236,30 +238,59 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, char *name, int flags)
for (int j = ibuf->x; j > 0; j--)
{
to->r = from[0];
to->g = (channels >= 2)? from[1]: from[0];
to->b = (channels >= 3)? from[2]: from[0];
to->a = (channels >= 4)? from[3]: from[0];
to->g = from[1];
to->b = from[2];
to->a = (channels >= 4)? from[3]: 1.0f;
to++; from += 4;
}
}
}
else {
for (int i = ibuf->y-1; i >= 0; i--)
{
from= ibuf->rect_float + channels*i*width;
for (int j = ibuf->x; j > 0; j--)
{
to->r = srgb_to_linearrgb(from[0]);
to->g = srgb_to_linearrgb(from[1]);
to->b = srgb_to_linearrgb(from[2]);
to->a = (channels >= 4)? from[3]: 1.0f;
to++; from += 4;
}
}
}
}
else {
unsigned char *from;
if(ibuf->profile == IB_PROFILE_LINEAR_RGB) {
for (int i = ibuf->y-1; i >= 0; i--)
{
from= (unsigned char *)ibuf->rect + channels*i*width;
for (int j = ibuf->x; j > 0; j--)
{
to->r = (float)(from[0])/255.0;
to->g = (float)((channels >= 2)? from[1]: from[0])/255.0;
to->b = (float)((channels >= 3)? from[2]: from[0])/255.0;
to->a = (float)((channels >= 4)? from[3]: from[0])/255.0;
to->g = (float)(from[1])/255.0;
to->b = (float)(from[2])/255.0;
to->a = (float)(channels >= 4) ? from[3]/255.0 : 1.0f;
to++; from += 4;
}
}
}
else {
for (int i = ibuf->y-1; i >= 0; i--)
{
for (int j = ibuf->x; j > 0; j--)
{
to->r = srgb_to_linearrgb((float)from[0] / 255.0);
to->g = srgb_to_linearrgb((float)from[1] / 255.0);
to->b = srgb_to_linearrgb((float)from[2] / 255.0);
to->a = channels >= 4 ? (float)from[3]/255.0 : 1.0f;
to++; from += 4;
}
}
}
}
// printf("OpenEXR-save: Writing OpenEXR file of height %d.\n", height);
@ -308,9 +339,9 @@ static int imb_save_openexr_float(struct ImBuf *ibuf, char *name, int flags)
float *rect[4] = {NULL, NULL, NULL, NULL};
rect[0]= ibuf->rect_float + channels*(height-1)*width;
rect[1]= (channels >= 2)? rect[0]+1: rect[0];
rect[2]= (channels >= 3)? rect[0]+2: rect[0];
rect[3]= (channels >= 4)? rect[0]+3: rect[0];
rect[1]= rect[0]+1;
rect[2]= rect[0]+2;
rect[3]= (channels >= 4)? rect[0]+3:rect[0]; /* red as alpha, is this needed since alpha isnt written? */
frameBuffer.insert ("R", Slice (FLOAT, (char *)rect[0], xstride, ystride));
frameBuffer.insert ("G", Slice (FLOAT, (char *)rect[1], xstride, ystride));
@ -994,7 +1025,15 @@ struct ImBuf *imb_load_openexr(unsigned char *mem, int size, int flags)
file->setFrameBuffer (frameBuffer);
file->readPixels (dw.min.y, dw.max.y);
IMB_rect_from_float(ibuf);
// XXX, ImBuf has no nice way to deal with this.
// ideally IM_rect would be used when the caller wants a rect BUT
// at the moment all functions use IM_rect.
// Disabling this is ok because all functions should check if a rect exists and create one on demand.
//
// Disabling this because the sequencer frees immediate.
//
// if(flag & IM_rect)
// IMB_rect_from_float(ibuf);
}
}

@ -134,7 +134,7 @@ typedef enum eArmature_DeformFlag {
ARM_DEF_VGROUP = (1<<0),
ARM_DEF_ENVELOPE = (1<<1),
ARM_DEF_QUATERNION = (1<<2),
ARM_DEF_B_BONE_REST = (1<<3),
ARM_DEF_B_BONE_REST = (1<<3), /* deprecated */
ARM_DEF_INVERT_VGROUP = (1<<4)
} eArmature_DeformFlag;

@ -140,6 +140,7 @@ typedef struct Sequence {
int startstill, endstill;
int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */
int startdisp, enddisp; /*starting and ending points in the sequence*/
float sat, pad;
float mul, handsize;
/* is sfra needed anymore? - it looks like its only used in one place */
int sfra; /* starting frame according to the timeline of the scene. */

@ -390,9 +390,9 @@ extern UserDef U; /* from blenkernel blender.c */
/* flag */
#define USER_AUTOSAVE (1 << 0)
#define USER_AUTOGRABGRID (1 << 1)
#define USER_AUTOROTGRID (1 << 2)
#define USER_AUTOSIZEGRID (1 << 3)
#define USER_AUTOGRABGRID (1 << 1) /* deprecated */
#define USER_AUTOROTGRID (1 << 2) /* deprecated */
#define USER_AUTOSIZEGRID (1 << 3) /* deprecated */
#define USER_SCENEGLOBAL (1 << 4)
#define USER_TRACKBALL (1 << 5)
#define USER_DUPLILINK (1 << 6)
@ -439,7 +439,7 @@ extern UserDef U; /* from blenkernel blender.c */
#define USER_FLIPFULLSCREEN (1 << 7)
#define USER_ALLWINCODECS (1 << 8)
#define USER_MENUOPENAUTO (1 << 9)
#define USER_PANELPINNED (1 << 10)
#define USER_PANELPINNED (1 << 10) /* deprecated */
#define USER_AUTOPERSP (1 << 11)
#define USER_LOCKAROUND (1 << 12)
#define USER_GLOBALUNDO (1 << 13)

@ -2237,7 +2237,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_action.c", "rna_action_api.c", RNA_def_action},
{"rna_animation.c", "rna_animation_api.c", RNA_def_animation},
{"rna_animviz.c", NULL, RNA_def_animviz},
{"rna_actuator.c", NULL, RNA_def_actuator},
{"rna_actuator.c", "rna_actuator_api.c", RNA_def_actuator},
{"rna_armature.c", "rna_armature_api.c", RNA_def_armature},
{"rna_boid.c", NULL, RNA_def_boid},
{"rna_brush.c", NULL, RNA_def_brush},
@ -2246,7 +2246,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_color.c", NULL, RNA_def_color},
{"rna_constraint.c", NULL, RNA_def_constraint},
{"rna_context.c", NULL, RNA_def_context},
{"rna_controller.c", NULL, RNA_def_controller},
{"rna_controller.c", "rna_controller_api.c", RNA_def_controller},
{"rna_curve.c", NULL, RNA_def_curve},
{"rna_fcurve.c", "rna_fcurve_api.c", RNA_def_fcurve},
{"rna_fluidsim.c", NULL, RNA_def_fluidsim},
@ -2273,7 +2273,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_scene.c", "rna_scene_api.c", RNA_def_scene},
{"rna_screen.c", NULL, RNA_def_screen},
{"rna_sculpt_paint.c", NULL, RNA_def_sculpt_paint},
{"rna_sensor.c", NULL, RNA_def_sensor},
{"rna_sensor.c", "rna_sensor_api.c", RNA_def_sensor},
{"rna_sequencer.c", "rna_sequencer_api.c", RNA_def_sequencer},
{"rna_smoke.c", NULL, RNA_def_smoke},
{"rna_space.c", NULL, RNA_def_space},

@ -486,6 +486,8 @@ void rna_def_actuator(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_SHOW);
RNA_def_property_ui_text(prop, "Expanded", "Set actuator expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
RNA_api_actuator(srna);
}
static void rna_def_action_actuator(BlenderRNA *brna)
@ -920,7 +922,7 @@ static void rna_def_sound_actuator(BlenderRNA *brna)
prop= RNA_def_property(srna, "maximum_gain_3d", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "sound3D.max_gain");
RNA_def_property_ui_range(prop, 0.0, 1.0, 0.1, 0.01);
RNA_def_property_ui_text(prop, "Minimum Gain", "The maximum gain of the sound, no matter how near it is");
RNA_def_property_ui_text(prop, "Maximum Gain", "The maximum gain of the sound, no matter how near it is");
RNA_def_property_update(prop, NC_LOGIC, NULL);
prop= RNA_def_property(srna, "reference_distance_3d", PROP_FLOAT, PROP_NONE);

@ -0,0 +1,72 @@
/**
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2010 Blender Foundation.
* All rights reserved.
*
*
* Contributor(s):
*
* ***** END GPL LICENSE BLOCK *****
*/
#include <stdlib.h>
#include <stdio.h>
#include "WM_types.h"
#include "RNA_define.h"
#ifdef RNA_RUNTIME
#include "BKE_sca.h"
#include "DNA_controller_types.h"
#include "DNA_actuator_types.h"
static void rna_Actuator_link(bActuator *act, bController *cont)
{
link_logicbricks((void **)&act, (void ***)&(cont->links), &cont->totlinks, sizeof(bActuator *));
}
static void rna_Actuator_unlink(bActuator *act, bController *cont)
{
unlink_logicbricks((void **)&act, (void ***)&(cont->links), &cont->totlinks);
}
#else
void RNA_api_actuator(StructRNA *srna)
{
FunctionRNA *func;
PropertyRNA *parm;
func= RNA_def_function(srna, "link", "rna_Actuator_link");
RNA_def_function_ui_description(func, "Link the actuator to a controller.");
parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to.");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
func= RNA_def_function(srna, "unlink", "rna_Actuator_unlink");
RNA_def_function_ui_description(func, "Unlink the actuator from a controller.");
parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from.");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
#endif

@ -861,11 +861,6 @@ static void rna_def_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Dual Quaternion Deformation", "Enable deform rotation with Quaternions");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
prop= RNA_def_property(srna, "deform_bbone_rest", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_B_BONE_REST);
RNA_def_property_ui_text(prop, "B-Bones Deform in Rest Position", "Make B-Bones deform already in Rest Position");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
//prop= RNA_def_property(srna, "deform_invert_vertexgroups", PROP_BOOLEAN, PROP_NONE);
//RNA_def_property_boolean_negative_sdna(prop, NULL, "deformflag", ARM_DEF_INVERT_VGROUP);
//RNA_def_property_ui_text(prop, "Invert Vertex Group Influence", "Invert Vertex Group influence (only for Modifiers)");

@ -156,6 +156,8 @@ void RNA_def_controller(BlenderRNA *brna)
RNA_def_struct_refine_func(srna, "rna_Controller_refine");
RNA_def_struct_ui_text(srna, "Controller", "Game engine logic brick to process events, connecting sensors to actuators");
RNA_api_controller(srna);
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);

@ -0,0 +1,81 @@
/**
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2010 Blender Foundation.
* All rights reserved.
*
*
* Contributor(s):
*
* ***** END GPL LICENSE BLOCK *****
*/
#include <stdlib.h>
#include <stdio.h>
#include "WM_types.h"
#include "RNA_define.h"
#ifdef RNA_RUNTIME
#include "BKE_sca.h"
#include "DNA_sensor_types.h"
#include "DNA_controller_types.h"
#include "DNA_actuator_types.h"
static void rna_Controller_link(bController *cont, bSensor *sens, bActuator *act)
{
if(sens)
link_logicbricks((void **)&cont, (void ***)&(sens->links), &sens->totlinks, sizeof(bController *));
if(act)
link_logicbricks((void **)&act, (void ***)&(cont->links), &cont->totlinks, sizeof(bActuator *));
}
static void rna_Controller_unlink(bController *cont, bSensor *sens, bActuator *act)
{
if(sens)
unlink_logicbricks((void **)&cont, (void ***)&(sens->links), &sens->totlinks);
if(act)
unlink_logicbricks((void **)&act, (void ***)&(cont->links), &cont->totlinks);
}
#else
void RNA_api_controller(StructRNA *srna)
{
FunctionRNA *func;
PropertyRNA *parm;
func= RNA_def_function(srna, "link", "rna_Controller_link");
RNA_def_function_ui_description(func, "Link the controller with a sensor/actuator.");
parm= RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to link the controller to.");
RNA_def_property_update(parm, NC_LOGIC, NULL);
parm= RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to link the controller to.");
RNA_def_property_update(parm, NC_LOGIC, NULL);
func= RNA_def_function(srna, "unlink", "rna_Controller_unlink");
RNA_def_function_ui_description(func, "Unlink the controller from a sensor/actuator.");
parm= RNA_def_pointer(func, "sensor", "Sensor", "", "Sensor to unlink the controller from.");
RNA_def_property_update(parm, NC_LOGIC, NULL);
parm= RNA_def_pointer(func, "actuator", "Actuator", "", "Actuator to unlink the controller from.");
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
#endif

@ -237,6 +237,9 @@ void RNA_api_sequence_strip(StructRNA *srna);
void RNA_api_text(struct StructRNA *srna);
void RNA_api_ui_layout(struct StructRNA *srna);
void RNA_api_wm(struct StructRNA *srna);
void RNA_api_sensor(struct StructRNA *srna);
void RNA_api_controller(struct StructRNA *srna);
void RNA_api_actuator(struct StructRNA *srna);
/* main collection functions */
void RNA_def_main_cameras(BlenderRNA *brna, PropertyRNA *cprop);

@ -983,11 +983,6 @@ static void rna_def_modifier_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Quaternion", "Deform rotation interpolation with quaternions");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "b_bone_rest", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "deformflag", ARM_DEF_B_BONE_REST);
RNA_def_property_ui_text(prop, "B-Bone Rest", "Make B-Bones deform already in rest position");
RNA_def_property_update(prop, 0, "rna_Modifier_update");
prop= RNA_def_property(srna, "multi_modifier", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "multi", 0);
RNA_def_property_ui_text(prop, "Multi Modifier", "Use same input as previous modifier, and mix results using overall vgroup");

@ -1176,6 +1176,7 @@ static void def_cmp_scale(StructRNA *srna)
{0, "RELATIVE", 0, "Relative", ""},
{1, "ABSOLUTE", 0, "Absolute", ""},
{2, "SCENE_SIZE", 0, "Scene Size", ""},
{3, "RENDER_SIZE", 0, "Render Size", ""},
{0, NULL, 0, NULL, NULL}};
prop = RNA_def_property(srna, "space", PROP_ENUM, PROP_NONE);

@ -1476,7 +1476,7 @@ static void rna_def_object(BlenderRNA *brna)
{OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""},
{OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
{OB_BOUND_CONE, "CONE", 0, "Cone", ""},
{OB_BOUND_POLYH, "POLYHEDER", 0, "Polyheder", ""},
{OB_BOUND_POLYH, "POLYHEDRON", 0, "Polyhedron", ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dupli_items[] = {

@ -302,6 +302,8 @@ static void rna_def_sensor(BlenderRNA *brna)
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sensor_tap_set");
RNA_def_property_ui_text(prop, "Tap", "Trigger controllers only for an instant, even while the sensor remains true");
RNA_def_property_update(prop, NC_LOGIC, NULL);
RNA_api_sensor(srna);
}
static void rna_def_always_sensor(BlenderRNA *brna)

@ -0,0 +1,72 @@
/**
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* The Original Code is Copyright (C) 2010 Blender Foundation.
* All rights reserved.
*
*
* Contributor(s):
*
* ***** END GPL LICENSE BLOCK *****
*/
#include <stdlib.h>
#include <stdio.h>
#include "WM_types.h"
#include "RNA_define.h"
#ifdef RNA_RUNTIME
#include "BKE_sca.h"
#include "DNA_sensor_types.h"
#include "DNA_controller_types.h"
static void rna_Sensor_link(bSensor *sens, bController *cont)
{
link_logicbricks((void **)&cont, (void ***)&(sens->links), &sens->totlinks, sizeof(bController *));
}
static void rna_Sensor_unlink(bSensor *sens, bController *cont)
{
unlink_logicbricks((void **)&cont, (void ***)&(sens->links), &sens->totlinks);
}
#else
void RNA_api_sensor(StructRNA *srna)
{
FunctionRNA *func;
PropertyRNA *parm;
func= RNA_def_function(srna, "link", "rna_Sensor_link");
RNA_def_function_ui_description(func, "Link the sensor to a controller.");
parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to link to.");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
func= RNA_def_function(srna, "unlink", "rna_Sensor_unlink");
RNA_def_function_ui_description(func, "Unlink the sensor from a controller.");
parm= RNA_def_pointer(func, "controller", "Controller", "", "Controller to unlink from.");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_property_update(parm, NC_LOGIC, NULL);
}
#endif

@ -583,9 +583,7 @@ static void rna_def_strip_element(BlenderRNA *brna)
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Filename", "");
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceElement_filename_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@ -848,7 +846,7 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_ui_text(prop, "End offset", "");
RNA_def_property_ui_text(prop, "End Offset", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
@ -994,6 +992,13 @@ static void rna_def_filter_video(StructRNA *srna)
RNA_def_property_ui_text(prop, "Multiply Colors", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "sat");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3);
RNA_def_property_ui_text(prop, "Saturation", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f, 30.0f);
RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");

@ -1940,10 +1940,6 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 40);
RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox");
prop= RNA_def_property(srna, "pin_floating_panels", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PANELPINNED);
RNA_def_property_ui_text(prop, "Pin Floating Panels", "Make floating panels invoked by a hotkey (e.g. N Key) open at the previous location");
prop= RNA_def_property(srna, "use_column_layout", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS);
RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox");
@ -2128,19 +2124,6 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO);
RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory");
/* snapping */
prop= RNA_def_property(srna, "snap_translate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOGRABGRID);
RNA_def_property_ui_text(prop, "Enable Translation Snap", "Snap objects and sub-objects to grid units when moving");
prop= RNA_def_property(srna, "snap_rotate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOROTGRID);
RNA_def_property_ui_text(prop, "Enable Rotation Snap", "Snap objects and sub-objects to grid units when rotating");
prop= RNA_def_property(srna, "snap_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSIZEGRID);
RNA_def_property_ui_text(prop, "Enable Scaling Snap", "Snap objects and sub-objects to grid units when scaling");
/* auto keyframing */
prop= RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);

File diff suppressed because it is too large Load Diff

@ -57,7 +57,7 @@ def check_commandline():
usage()
if sys.argv[1] == '-h':
help()
elif not (sys.argv[1][-4:] == '.txt' or sys.argv[1][-3:] == '.py'):
elif not (sys.argv[1].endswith(".txt") or sys.argv[1].endswith(".py")):
print ('\nBad input file extension... exiting.')
usage()
else:
@ -147,7 +147,7 @@ def get_props_from_txt(input_filename):
changed = check_if_changed(bfrom, bto)
# lists formatting
props=[comment, changed, bclass, bfrom, bto, kwcheck, btype, description]
props=[comment, changed, bclass, bfrom, bto, kwcheck, btype, repr(description)]
props_list.append(props)
props_length_max=list(map(max,zip(props_length_max,list(map(len,props)))))
@ -164,9 +164,10 @@ def get_props_from_py(input_filename):
props_length_max = [0 for i in rna_api[0]] # this way if the vector will take more elements we are safe
for index,props in enumerate(rna_api):
[comment, changed, bclass, bfrom, bto, kwcheck, btype, description] = props
comment, changed, bclass, bfrom, bto, kwcheck, btype, description = props
kwcheck = check_prefix(bto) # keyword-check
changed = check_if_changed(bfrom, bto) # changed?
description = repr(description)
rna_api[index] = [comment, changed, bclass, bfrom, bto, kwcheck, btype, description]
props_length = list(map(len,props)) # lengths
props_length_max = list(map(max,zip(props_length_max,props_length))) # max lengths
@ -174,9 +175,9 @@ def get_props_from_py(input_filename):
def get_props(input_filename):
if input_filename[-4:] == '.txt':
if input_filename.endswith(".txt"):
props_list,props_length_max = get_props_from_txt(input_filename)
elif input_filename[-3:] == '.py':
elif input_filename.endswith(".py"):
props_list,props_length_max = get_props_from_py(input_filename)
return (props_list,props_length_max)
@ -200,16 +201,17 @@ def sort(props_list, sort_priority):
def file_basename(input_filename):
# if needed will use os.path
if input_filename[-4:] == '.txt':
if input_filename[-9:] == '_work.txt':
base_filename = input_filename[:-9]
if input_filename.endswith(".txt"):
if input_filename.endswith("_work.txt"):
base_filename = input_filename.replace("_work.txt", "")
else:
base_filename = input_filename[:-4]
elif input_filename[-3:] == '.py':
if input_filename[-8:] == '_work.py':
base_filename = input_filename[:-8]
base_filename = input_filename.replace(".txt", "")
elif input_filename.endswith(".py"):
if input_filename.endswith("_work.py"):
base_filename = input_filename.replace("_work.py", "")
else:
base_filename = input_filename[:-3]
base_filename = input_filename.replace(".py", "")
return base_filename
@ -236,16 +238,22 @@ def write_files(basename, props_list, props_length_max):
# rna_api
if props[0] == 'NOTE': indent = '# '
else: indent = ' '
rna += indent + '("%s", "%s", "%s", "%s", "%s"),\n' % tuple(props[2:5] + props[6:])
rna += indent + '("%s", "%s", "%s", "%s", %s),\n' % tuple(props[2:5] + props[6:]) # description is alredy string formatted
# py
blanks = [' '* (x[0]-x[1]) for x in zip(props_length_max,list(map(len,props)))]
props = ['"%s"%s'%(x[0],x[1]) for x in zip(props,blanks)]
props = [('"%s"%s' if props[-1] != x[0] else "%s%s") % (x[0],x[1]) for x in zip(props,blanks)]
py += indent + '(%s, %s, %s, %s, %s, %s, %s, %s),\n' % tuple(props)
f_txt.write(txt)
f_py.write("rna_api = [\n%s]\n" % py)
f_rna.write("rna_api = [\n%s]\n" % rna)
# write useful py script, wont hurt
f_py.write("\n'''\n")
f_py.write("for p_note, p_changed, p_class, p_from, p_to, p_check, p_type, p_desc in rna_api:\n")
f_py.write(" print(p_to)\n")
f_py.write("\n'''\n")
f_txt.close()
f_py.close()
f_rna.close()

File diff suppressed because it is too large Load Diff

@ -124,8 +124,16 @@ static void node_composit_exec_colorbalance(void *data, bNode *node, bNodeStack
{
NodeColorBalance *n= (NodeColorBalance *)node->storage;
int c;
copy_v3_v3(n->lift_lgg, n->lift);
for (c = 0; c < 3; c++) {
n->lift_lgg[c] = 2.0f - n->lift[c];
/* tweak to give more subtle results
* values above 1.0 are scaled */
if(n->lift_lgg[c] > 1.0f)
n->lift_lgg[c] = pow(n->lift_lgg[c] - 1.0f, 2.0f) + 1.0f;
n->lift_lgg[c] = 2.0f - n->lift_lgg[c];
}
}

@ -64,6 +64,10 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b
else if(node->custom1==CMP_SCALE_SCENEPERCENT) {
newx = cbuf->x * (rd->size / 100.0f);
newy = cbuf->y * (rd->size / 100.0f);
}
else if (node->custom1==CMP_SCALE_RENDERPERCENT) {
newx= (rd->xsch * rd->size)/100;
newy= (rd->ysch * rd->size)/100;
} else { /* CMP_SCALE_ABSOLUTE */
newx= MAX2((int)in[1]->vec[0], 1);
newy= MAX2((int)in[2]->vec[0], 1);

@ -96,8 +96,9 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
/* first make the preview image */
CompBuf *prevbuf= alloc_compbuf(140, 140, CB_RGBA, 1); /* alloc */
sizex = rd->xsch;
sizey = rd->ysch;
/* Also take care about the render size! */
sizex = (rd->size*rd->xsch)/100;
sizey = (rd->size*rd->ysch)/100;
prevbuf->rect_procedural= texture_procedural;
prevbuf->node= node;

Some files were not shown because too many files have changed in this diff Show More