Merged changes in the trunk up to revision 28247.

This commit is contained in:
Tamito Kajiyama 2010-04-18 02:03:19 +00:00
commit dfe2f8dc03
456 changed files with 40909 additions and 31486 deletions

@ -42,7 +42,7 @@ Remove the CMakeCache.txt file and try again from another folder, e.g.:
")
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(Blender)
#-----------------------------------------------------------------------------

@ -67,12 +67,12 @@ int AUD_FFMPEGReader::decode(AVPacket* packet, AUD_Buffer* buffer)
audio_pkg_data,
audio_pkg_size);
buf_pos += data_size;
// read error, next packet!
if(read_length < 0)
break;
buf_pos += data_size;
// move packet parameters
audio_pkg_data += read_length;
audio_pkg_size -= read_length;

@ -331,7 +331,7 @@ public:
* @param y The y-coordinate of the cursor.
* @return Indication of success.
*/
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const = 0;
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) = 0;
/***************************************************************************************
** Access to mouse button and keyboard states.

@ -531,7 +531,7 @@ GHOST_TSuccess GHOST_SystemCarbon::getCursorPosition(GHOST_TInt32& x, GHOST_TInt
}
GHOST_TSuccess GHOST_SystemCarbon::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const
GHOST_TSuccess GHOST_SystemCarbon::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
{
float xf=(float)x, yf=(float)y;

@ -156,7 +156,7 @@ public:
* @param y The y-coordinate of the cursor.
* @return Indication of success.
*/
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const;
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y);
/***************************************************************************************
** Access to mouse button and keyboard states.

@ -179,8 +179,8 @@ public:
* @param y The y-coordinate of the cursor.
* @return Indication of success.
*/
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const;
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y);
/***************************************************************************************
** Access to mouse button and keyboard states.
***************************************************************************************/
@ -272,6 +272,14 @@ protected:
*/
GHOST_TSuccess handleKeyEvent(void *eventPtr);
/**
* Performs the actual cursor position update (location in screen coordinates).
* @param x The x-coordinate of the cursor.
* @param y The y-coordinate of the cursor.
* @return Indication of success.
*/
GHOST_TSuccess setMouseCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y);
/** Start time at initialization. */
GHOST_TUns64 m_start_time;

@ -807,7 +807,23 @@ GHOST_TSuccess GHOST_SystemCocoa::getCursorPosition(GHOST_TInt32& x, GHOST_TInt3
/**
* @note : expect Cocoa screen coordinates
*/
GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const
GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
{
GHOST_TInt32 wx,wy;
GHOST_WindowCocoa* window = (GHOST_WindowCocoa*)m_windowManager->getActiveWindow();
if (!window) return GHOST_kFailure;
setMouseCursorPosition(x, y);
//Force mouse move event (not pushed by Cocoa)
window->screenToClient(x, y, wx, wy);
pushEvent(new GHOST_EventCursor(getMilliSeconds(), GHOST_kEventCursorMove, window, wx,wy));
m_outsideLoopEventProcessed = true;
return GHOST_kSuccess;
}
GHOST_TSuccess GHOST_SystemCocoa::setMouseCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
{
float xf=(float)x, yf=(float)y;
GHOST_WindowCocoa* window = (GHOST_WindowCocoa*)m_windowManager->getActiveWindow();
@ -1517,7 +1533,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
//Set new cursor position
window->clientToScreen(x_mouse, y_mouse, x_cur, y_cur);
setCursorPosition(x_cur, y_cur); /* wrap */
setMouseCursorPosition(x_cur, y_cur); /* wrap */
//Post event
window->getCursorGrabInitPos(x_cur, y_cur);

@ -273,7 +273,7 @@ GHOST_TSuccess GHOST_SystemWin32::getCursorPosition(GHOST_TInt32& x, GHOST_TInt3
}
GHOST_TSuccess GHOST_SystemWin32::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const
GHOST_TSuccess GHOST_SystemWin32::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
{
return ::SetCursorPos(x, y) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
}

@ -153,7 +153,7 @@ public:
* @param y The y-coordinate of the cursor.
* @return Indication of success.
*/
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const;
virtual GHOST_TSuccess setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y);
/***************************************************************************************
** Access to mouse button and keyboard states.

@ -970,7 +970,7 @@ GHOST_SystemX11::
setCursorPosition(
GHOST_TInt32 x,
GHOST_TInt32 y
) const {
) {
// This is a brute force move in screen coordinates
// XWarpPointer does relative moves so first determine the

@ -158,7 +158,7 @@ public:
setCursorPosition(
GHOST_TInt32 x,
GHOST_TInt32 y
) const;
);
/**
* Returns the state of all modifier keys.

@ -158,11 +158,16 @@ GHOST_WindowWin32::GHOST_WindowWin32(
width = tw;
left = rect.left;
}
else if(left < rect.left)
left = rect.left;
if(th < height)
{
height = th;
top = rect.top;
}
else if(top > rect.top)
top = rect.top;
m_hWnd = ::CreateWindow(
s_windowClassName, // pointer to registered class name

@ -463,12 +463,17 @@ void MEM_printmemlist_stats()
/* sort by length and print */
qsort(printblock, totpb, sizeof(MemPrintBlock), compare_len);
printf("\ntotal memory len: %.3f MB\n", (double)mem_in_use/(double)(1024*1024));
printf(" ITEMS TOTAL-MiB AVERAGE-KiB TYPE\n");
for(a=0, pb=printblock; a<totpb; a++, pb++)
printf("%s items: %d, len: %.3f MB\n", pb->name, pb->items, (double)pb->len/(double)(1024*1024));
printf("%6d (%8.3f %8.3f) %s\n", pb->items, (double)pb->len/(double)(1024*1024), (double)pb->len/1024.0/(double)pb->items, pb->name);
free(printblock);
mem_unlock_thread();
#if 0 /* GLIBC only */
malloc_stats();
#endif
}
/* Prints in python syntax for easy */

@ -349,8 +349,9 @@ void SVD(MaTRiX &A, MaTRiX &U, VecToR &s, MaTRiX &V, VecToR &work1, VecToR &work
for (j = k; j < p-1; j++) {
typename MaTRiX::value_type t = hypot(f,g);
typename MaTRiX::value_type cs = f/t;
typename MaTRiX::value_type sn = g/t;
/* division by zero checks added to avoid NaN (brecht) */
typename MaTRiX::value_type cs = (t == 0.0f)? 0.0f: f/t;
typename MaTRiX::value_type sn = (t == 0.0f)? 0.0f: g/t;
if (j != k) {
e[j-1] = t;
}
@ -366,8 +367,9 @@ void SVD(MaTRiX &A, MaTRiX &U, VecToR &s, MaTRiX &V, VecToR &work1, VecToR &work
}
t = hypot(f,g);
cs = f/t;
sn = g/t;
/* division by zero checks added to avoid NaN (brecht) */
cs = (t == 0.0f)? 0.0f: f/t;
sn = (t == 0.0f)? 0.0f: g/t;
s[j] = t;
f = cs*e[j] + sn*s[j+1];
s[j+1] = -sn*e[j] + cs*s[j+1];

@ -392,7 +392,7 @@
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\blf.c"
RelativePath="..\..\..\source\blender\python\generic\blf_api.c"
>
</File>
<File
@ -400,11 +400,7 @@
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\euler.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\Geometry.c"
RelativePath="..\..\..\source\blender\python\generic\geometry.c"
>
</File>
<File
@ -412,19 +408,27 @@
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\Mathutils.c"
RelativePath="..\..\..\source\blender\python\generic\mathutils.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\matrix.c"
RelativePath="..\..\..\source\blender\python\generic\mathutils_color.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\quat.c"
RelativePath="..\..\..\source\blender\python\generic\mathutils_euler.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\vector.c"
RelativePath="..\..\..\source\blender\python\generic\mathutils_matrix.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\mathutils_quat.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\mathutils_vector.c"
>
</File>
</Filter>
@ -489,7 +493,7 @@
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\blf.h"
RelativePath="..\..\..\source\blender\python\generic\blf_api.h"
>
</File>
<File
@ -497,11 +501,7 @@
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\euler.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\Geometry.h"
RelativePath="..\..\..\source\blender\python\generic\geometry.h"
>
</File>
<File
@ -509,19 +509,27 @@
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\Mathutils.h"
RelativePath="..\..\..\source\blender\python\generic\mathutils.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\matrix.h"
RelativePath="..\..\..\source\blender\python\generic\mathutils_color.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\quat.h"
RelativePath="..\..\..\source\blender\python\generic\mathutils_euler.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\vector.h"
RelativePath="..\..\..\source\blender\python\generic\mathutils_matrix.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\mathutils_quat.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\python\generic\mathutils_vector.h"
>
</File>
</Filter>

@ -7,6 +7,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "blender", "blender.vcproj",
{6E24BF09-9653-4166-A871-F65CC9E98A9B} = {6E24BF09-9653-4166-A871-F65CC9E98A9B}
{A90C4918-4B21-4277-93BD-AF65F30951D9} = {A90C4918-4B21-4277-93BD-AF65F30951D9}
{FB88301F-F725-401B-ACD7-D2ABBF333B71} = {FB88301F-F725-401B-ACD7-D2ABBF333B71}
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC} = {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}
{76D3102B-7DD2-8BA1-034A-8B19FE2897C2} = {76D3102B-7DD2-8BA1-034A-8B19FE2897C2}
{BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} = {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}
{C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}
@ -337,6 +338,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BRE_raytrace", "render\BRE_
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BF_collada", "collada\BF_collada.vcproj", "{76D3102B-7DD2-8BA1-034A-8B19FE2897C2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BL_modifiers", "modifiers\modifiers.vcproj", "{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3D Plugin Debug|Win32 = 3D Plugin Debug|Win32
@ -1594,6 +1597,26 @@ Global
{76D3102B-7DD2-8BA1-034A-8B19FE2897C2}.Debug|Win32.Build.0 = Blender Debug|Win32
{76D3102B-7DD2-8BA1-034A-8B19FE2897C2}.Release|Win32.ActiveCfg = Blender Release|Win32
{76D3102B-7DD2-8BA1-034A-8B19FE2897C2}.Release|Win32.Build.0 = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3D Plugin Debug|Win32.ActiveCfg = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3D Plugin Debug|Win32.Build.0 = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3DPlugin Debug|Win32.ActiveCfg = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3DPlugin Debug|Win32.Build.0 = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3DPlugin Release|Win32.ActiveCfg = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3DPlugin Release|Win32.Build.0 = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Blender Debug|Win32.Build.0 = Blender Debug|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Blender Release|Win32.ActiveCfg = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Blender Release|Win32.Build.0 = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Debug|Win32.ActiveCfg = Blender Debug|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Debug|Win32.Build.0 = Blender Debug|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Release|Win32.ActiveCfg = Blender Release|Win32
{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Release|Win32.Build.0 = Blender Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

@ -45,8 +45,8 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\source\blender;..\..\source\blender\imbuf;..\..\source\blender\misc;..\..\source\blender\blenlib;..\..\source\blender\editors\include;..\..\source\blender\python;..\..\source\blender\windowmanager;..\..\source\blender\renderui;..\..\source\blender\makesdna;..\..\source\blender\makesrna;..\..\source\blender\blenkernel;..\..\source\blender\blenloader;..\..\source\blender\renderconverter;..\..\source\blender\render\extern\include;..\..\source\blender\radiosity\extern\include;..\..\source\kernel\gen_system;..\..\source\kernel\gen_messaging;..\..\..\build\msvc_9\extern\glew\include;..\..\source\blender\gpu"
PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;WITH_QUICKTIME;GAMEBLENDER=1;USE_SUMO_SOLID;FTGL_LIBRARY_STATIC"
AdditionalIncludeDirectories="..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\source\blender;..\..\source\blender\imbuf;..\..\source\blender\misc;..\..\source\blender\blenlib;..\..\source\blender\editors\include;..\..\source\blender\python;..\..\source\blender\windowmanager;..\..\source\blender\renderui;..\..\source\blender\makesdna;..\..\source\blender\makesrna;..\..\source\blender\blenkernel;..\..\source\blender\blenloader;..\..\source\blender\renderconverter;..\..\source\blender\render\extern\include;..\..\source\blender\radiosity\extern\include;..\..\source\kernel\gen_system;..\..\source\kernel\gen_messaging;..\..\..\build\msvc_9\extern\glew\include;..\..\source\blender\gpu;..\..\..\lib\windows\pthreads\include"
PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;WITH_QUICKTIME;GAMEBLENDER=1;USE_SUMO_SOLID;FTGL_LIBRARY_STATIC;WITH_LZMA;WITH_LZO"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
@ -141,8 +141,8 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\source\blender;..\..\source\blender\imbuf;..\..\source\blender\misc;..\..\source\blender\blenlib;..\..\source\blender\editors\include;..\..\source\blender\python;..\..\source\blender\windowmanager;..\..\source\blender\renderui;..\..\source\blender\makesdna;..\..\source\blender\makesrna;..\..\source\blender\blenkernel;..\..\source\blender\blenloader;..\..\source\blender\renderconverter;..\..\source\blender\render\extern\include;..\..\source\blender\radiosity\extern\include;..\..\source\kernel\gen_system;..\..\source\kernel\gen_messaging;..\..\..\build\msvc_9\extern\glew\include;..\..\source\blender\gpu"
PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;WITH_QUICKTIME"
AdditionalIncludeDirectories="..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\source\blender;..\..\source\blender\imbuf;..\..\source\blender\misc;..\..\source\blender\blenlib;..\..\source\blender\editors\include;..\..\source\blender\python;..\..\source\blender\windowmanager;..\..\source\blender\renderui;..\..\source\blender\makesdna;..\..\source\blender\makesrna;..\..\source\blender\blenkernel;..\..\source\blender\blenloader;..\..\source\blender\renderconverter;..\..\source\blender\render\extern\include;..\..\source\blender\radiosity\extern\include;..\..\source\kernel\gen_system;..\..\source\kernel\gen_messaging;..\..\..\build\msvc_9\extern\glew\include;..\..\source\blender\gpu;..\..\..\lib\windows\pthreads\include"
PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;WITH_QUICKTIME;WITH_LZMA;WITH_LZO"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"

@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\modifiers;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\modifiers;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_OPENEXR;WITH_DDS;WITH_BULLET;WITH_FFMPEG;GLEW_STATIC"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@ -194,7 +194,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\modifiers;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;UNWRAPPER;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1;WITH_FFMPEG;GLEW_STATIC"
StringPooling="true"
RuntimeLibrary="0"
@ -269,7 +269,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\modifiers;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
StringPooling="true"
RuntimeLibrary="2"
@ -344,7 +344,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\modifiers;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_FFMPEG;GLEW_STATIC"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@ -419,7 +419,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\modifiers;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;UNWRAPPER;WITH_FFMPEG;GLEW_STATIC"
StringPooling="true"
RuntimeLibrary="0"
@ -526,10 +526,6 @@
RelativePath="..\..\..\source\blender\blenkernel\intern\boids.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenkernel\intern\booleanops.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenkernel\intern\booleanops_mesh.c"
>
@ -758,10 +754,6 @@
RelativePath="..\..\..\source\blender\blenkernel\intern\shrinkwrap.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenkernel\intern\simple_deform.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenkernel\intern\sketch.c"
>

@ -583,6 +583,10 @@
RelativePath="..\..\..\source\blender\blenlib\intern\math_geom.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenlib\intern\math_geom_inline.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\blenlib\intern\math_matrix.c"
>

@ -43,7 +43,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu;..\..\..\..\lib\windows\pthreads\include"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB,DWORDS_LITTLEENDIAN"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
@ -118,7 +118,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu;..\..\..\..\lib\windows\pthreads\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;DWORDS_LITTLEENDIAN;GLEW_STATIC"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@ -194,7 +194,7 @@
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu;..\..\..\..\lib\windows\pthreads\include"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;DWORDS_LITTLEENDIAN;GLEW_STATIC"
StringPooling="true"
RuntimeLibrary="0"
@ -269,7 +269,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu;..\..\..\..\lib\windows\pthreads\include"
PreprocessorDefinitions="NDEBUG,WIN32,_LIB,DWORDS_LITTLEENDIAN"
StringPooling="true"
RuntimeLibrary="2"
@ -344,7 +344,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu;..\..\..\..\lib\windows\pthreads\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;DWORDS_LITTLEENDIAN;GLEW_STATIC"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
@ -419,7 +419,7 @@
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu"
AdditionalIncludeDirectories="..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender\imbuf;..\..\..\source\blender\gpu;..\..\..\..\lib\windows\pthreads\include"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;DWORDS_LITTLEENDIAN;GLEW_STATIC"
StringPooling="true"
RuntimeLibrary="0"

@ -0,0 +1,491 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="BL_modifiers"
ProjectGUID="{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}"
RootNamespace="BL_modifiers"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="BlenderPlayer Debug|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenkernel\intern;..\..\..\source\blender\makesdna;..\..\..\source\blender\modifiers;..\..\..\source\blender\render\extern\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
DefaultCharIsUnsigned="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="..\..\..\..\build\msvc_9\source\blender\modifiers\debug\modifiers.pch"
AssemblerListingLocation="..\..\..\..\build\msvc_9\source\blender\modifiers\debug\"
ObjectFile="..\..\..\..\build\msvc_9\source\blender\modifiers\debug\"
ProgramDataBaseFileName="..\..\..\..\build\msvc_9\source\blender\modifiers\debug\"
WarningLevel="2"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\..\build\msvc_9\libs\debug\BL_modifiers.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="BlenderPlayer Release|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenkernel\intern;..\..\..\source\blender\makesdna;..\..\..\source\blender\modifiers;..\..\..\source\blender\render\extern\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB"
BasicRuntimeChecks="0"
RuntimeLibrary="0"
DefaultCharIsUnsigned="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="..\..\..\..\build\msvc_9\source\blender\modifiers\modifiers.pch"
AssemblerListingLocation="..\..\..\..\build\msvc_9\source\blender\modifiers\"
ObjectFile="..\..\..\..\build\msvc_9\source\blender\modifiers\"
ProgramDataBaseFileName="..\..\..\..\build\msvc_9\source\blender\modifiers\"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\..\build\msvc_9\libs\BL_modifiers.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Blender Debug|Win32"
OutputDirectory="..\..\..\..\build\msvc_9\source\blender\modifiers\debug"
IntermediateDirectory="..\..\..\..\build\msvc_9\source\blender\modifiers\debug"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenkernel\intern;..\..\..\source\blender\makesdna;..\..\..\source\blender\modifiers;..\..\..\source\blender\render\extern\include"
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_LZO;WITH_LZMA"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
DefaultCharIsUnsigned="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="..\..\..\..\build\msvc_9\source\blender\modifiers\debug\modifiers.pch"
AssemblerListingLocation="..\..\..\..\build\msvc_9\source\blender\modifiers\debug\"
ObjectFile="..\..\..\..\build\msvc_9\source\blender\modifiers\debug\"
ProgramDataBaseFileName="..\..\..\..\build\msvc_9\source\blender\modifiers\debug\"
WarningLevel="3"
Detect64BitPortabilityProblems="false"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\..\build\msvc_9\libs\debug\BL_modifiers.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Blender Release|Win32"
OutputDirectory="..\..\..\..\build\msvc_9\source\blender\imbuf"
IntermediateDirectory="..\..\..\..\build\msvc_9\source\blender\imbuf"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\blenkernel\intern;..\..\..\source\blender\makesdna;..\..\..\source\blender\modifiers;..\..\..\source\blender\render\extern\include"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;WITH_LZO;WITH_LZMA"
BasicRuntimeChecks="0"
RuntimeLibrary="0"
DefaultCharIsUnsigned="true"
UsePrecompiledHeader="0"
PrecompiledHeaderFile="..\..\..\..\build\msvc_9\source\blender\modifiers\modifiers.pch"
AssemblerListingLocation="..\..\..\..\build\msvc_9\source\blender\modifiers\"
ObjectFile="..\..\..\..\build\msvc_9\source\blender\modifiers\"
ProgramDataBaseFileName="..\..\..\..\build\msvc_9\source\blender\modifiers\"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\..\..\..\build\msvc_9\libs\BL_modifiers.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_armature.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_array.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_bevel.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_boolean.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_boolean_util.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_build.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_cast.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_cloth.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_collision.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_curve.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_decimate.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_displace.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_edgesplit.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_explode.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_fluidsim.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_fluidsim_util.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_hook.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_lattice.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_mask.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_meshdeform.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_mirror.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_multires.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_none.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_particleinstance.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_particlesystem.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_screw.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_shapekey.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_shrinkwrap.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_simpledeform.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_smoke.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_smooth.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_softbody.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_solidify.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_subsurf.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_surface.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_util.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_uvproject.c"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_wave.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\..\source\blender\modifiers\MOD_modifiertypes.h"
>
</File>
<Filter
Name="intern"
>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_boolean_util.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_fluidsim_util.h"
>
</File>
<File
RelativePath="..\..\..\source\blender\modifiers\intern\MOD_util.h"
>
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 KiB

After

Width:  |  Height:  |  Size: 199 KiB

@ -1,2 +1,2 @@
from Freestyle import *
from Mathutils import Vector
from mathutils import Vector

@ -267,7 +267,7 @@ def write_pov(filename, scene=None, info_callback=None):
file.write('}\n')
def exportMeshs(sel):
def exportMeshs(scene, sel):
ob_num = 0
@ -280,7 +280,7 @@ def write_pov(filename, scene=None, info_callback=None):
me = ob.data
me_materials = me.materials
me = ob.create_mesh(True, 'RENDER')
me = ob.create_mesh(scene, True, 'RENDER')
if not me:
continue
@ -593,7 +593,7 @@ def write_pov(filename, scene=None, info_callback=None):
sel = scene.objects
exportLamps([l for l in sel if l.type == 'LAMP'])
exportMeta([l for l in sel if l.type == 'META'])
exportMeshs(sel)
exportMeshs(scene, sel)
exportWorld(scene.world)
exportGlobalSettings(scene)

@ -74,12 +74,12 @@ import bpy
# also used by X3D exporter
# return a tuple (free, object list), free is True if memory should be freed later with free_derived_objects()
def create_derived_objects(ob):
def create_derived_objects(scene, ob):
if ob.parent and ob.parent.dupli_type != 'NONE':
return False, None
if ob.dupli_type != 'NONE':
ob.create_dupli_list()
ob.create_dupli_list(scene)
return True, [(dob.object, dob.matrix) for dob in ob.dupli_list]
else:
return False, [(ob, ob.matrix)]
@ -942,6 +942,8 @@ def save_3ds(filename, context):
sce = context.scene
# sce= bpy.data.scenes.active
bpy.ops.object.mode_set(mode='OBJECT')
# Initialize the main chunk (primary):
primary = _3ds_chunk(PRIMARY)
# Add version chunk:
@ -966,11 +968,12 @@ def save_3ds(filename, context):
# each material is added once):
materialDict = {}
mesh_objects = []
for ob in [ob for ob in context.scene.objects if ob.is_visible()]:
scene = context.scene
for ob in [ob for ob in scene.objects if ob.is_visible(scene)]:
# for ob in sce.objects.context:
# get derived objects
free, derived = create_derived_objects(ob)
free, derived = create_derived_objects(scene, ob)
if derived == None: continue
@ -980,7 +983,7 @@ def save_3ds(filename, context):
if ob.type not in ('MESH', 'CURVE', 'SURFACE', 'TEXT', 'META'):
continue
data = ob_derived.create_mesh(True, 'PREVIEW')
data = ob_derived.create_mesh(scene, True, 'PREVIEW')
# data = getMeshFromObject(ob_derived, None, True, False, sce)
if data:
data.transform(mat)

@ -77,7 +77,7 @@ import shutil # for file copying
# import Blender
import bpy
import Mathutils
import mathutils
@ -135,7 +135,7 @@ def copy_images(dest_dir, textures):
# I guess FBX uses degrees instead of radians (Arystan).
# Call this function just before writing to FBX.
def eulerRadToDeg(eul):
ret = Mathutils.Euler()
ret = mathutils.Euler()
ret.x = 180 / math.pi * eul[0]
ret.y = 180 / math.pi * eul[1]
@ -143,10 +143,10 @@ def eulerRadToDeg(eul):
return ret
mtx4_identity = Mathutils.Matrix()
mtx4_identity = mathutils.Matrix()
# testing
mtx_x90 = Mathutils.RotationMatrix( math.pi/2, 3, 'X') # used
mtx_x90 = mathutils.RotationMatrix( math.pi/2, 3, 'X') # used
#mtx_x90n = RotationMatrix(-90, 3, 'x')
#mtx_y90 = RotationMatrix( 90, 3, 'y')
#mtx_y90n = RotationMatrix(-90, 3, 'y')
@ -154,11 +154,11 @@ mtx_x90 = Mathutils.RotationMatrix( math.pi/2, 3, 'X') # used
#mtx_z90n = RotationMatrix(-90, 3, 'z')
#mtx4_x90 = RotationMatrix( 90, 4, 'x')
mtx4_x90n = Mathutils.RotationMatrix(-math.pi/2, 4, 'X') # used
mtx4_x90n = mathutils.RotationMatrix(-math.pi/2, 4, 'X') # used
#mtx4_y90 = RotationMatrix( 90, 4, 'y')
mtx4_y90n = Mathutils.RotationMatrix(-math.pi/2, 4, 'Y') # used
mtx4_z90 = Mathutils.RotationMatrix( math.pi/2, 4, 'Z') # used
mtx4_z90n = Mathutils.RotationMatrix(-math.pi/2, 4, 'Z') # used
mtx4_y90n = mathutils.RotationMatrix(-math.pi/2, 4, 'Y') # used
mtx4_z90 = mathutils.RotationMatrix( math.pi/2, 4, 'Z') # used
mtx4_z90n = mathutils.RotationMatrix(-math.pi/2, 4, 'Z') # used
# def strip_path(p):
# return p.split('\\')[-1].split('/')[-1]
@ -333,7 +333,7 @@ def write(filename, batch_objects = None, \
EXP_CAMERA = True,
EXP_EMPTY = True,
EXP_IMAGE_COPY = False,
GLOBAL_MATRIX = Mathutils.Matrix(),
GLOBAL_MATRIX = mathutils.Matrix(),
ANIM_ENABLE = True,
ANIM_OPTIMIZE = True,
ANIM_OPTIMIZE_PRECISSION = 6,
@ -344,6 +344,8 @@ def write(filename, batch_objects = None, \
BATCH_OWN_DIR = False
):
bpy.ops.object.mode_set(mode='OBJECT')
# ----------------- Batch support!
if BATCH_ENABLE:
if os == None: BATCH_OWN_DIR = False
@ -388,7 +390,6 @@ def write(filename, batch_objects = None, \
orig_sce = context.scene
# orig_sce = bpy.data.scenes.active
new_fbxpath = fbxpath # own dir option modifies, we need to keep an original
for data in data_seq: # scene or group
newname = BATCH_FILE_PREFIX + bpy.utils.clean_name(data.name)
@ -599,8 +600,8 @@ def write(filename, batch_objects = None, \
matrix_rot = matrix_rot * mtx_x90
elif type =='CAMERA':
# elif ob and type =='Camera':
y = matrix_rot * Mathutils.Vector(0,1,0)
matrix_rot = Mathutils.RotationMatrix(math.pi/2, 3, y) * matrix_rot
y = matrix_rot * mathutils.Vector(0,1,0)
matrix_rot = mathutils.RotationMatrix(math.pi/2, 3, y) * matrix_rot
return matrix_rot
@ -651,7 +652,7 @@ def write(filename, batch_objects = None, \
}''' % (curtime))
file.write('\nCreationTime: "%.4i-%.2i-%.2i %.2i:%.2i:%.2i:000"' % curtime)
file.write('\nCreator: "Blender3D version %s"' % bpy.app.version_string)
file.write('\nCreator: "Blender version %s"' % bpy.app.version_string)
pose_items = [] # list of (fbxName, matrix) to write pose data for, easier to collect allong the way
@ -701,8 +702,8 @@ def write(filename, batch_objects = None, \
matrix_rot = matrix_rot * mtx_x90
rot = tuple(matrix_rot.to_euler())
elif ob and ob.type =='Camera':
y = matrix_rot * Mathutils.Vector(0,1,0)
matrix_rot = Mathutils.RotationMatrix(math.pi/2, 3, y) * matrix_rot
y = matrix_rot * mathutils.Vector(0,1,0)
matrix_rot = mathutils.RotationMatrix(math.pi/2, 3, y) * matrix_rot
rot = tuple(matrix_rot.to_euler())
else:
rot = tuple(matrix_rot.to_euler())
@ -1087,8 +1088,8 @@ def write(filename, batch_objects = None, \
file.write('\n\t\tTypeFlags: "Camera"')
file.write('\n\t\tGeometryVersion: 124')
file.write('\n\t\tPosition: %.6f,%.6f,%.6f' % loc)
file.write('\n\t\tUp: %.6f,%.6f,%.6f' % tuple(matrix_rot * Mathutils.Vector(0,1,0)) )
file.write('\n\t\tLookAt: %.6f,%.6f,%.6f' % tuple(matrix_rot * Mathutils.Vector(0,0,-1)) )
file.write('\n\t\tUp: %.6f,%.6f,%.6f' % tuple(matrix_rot * mathutils.Vector(0,1,0)) )
file.write('\n\t\tLookAt: %.6f,%.6f,%.6f' % tuple(matrix_rot * mathutils.Vector(0,0,-1)) )
#file.write('\n\t\tUp: 0,0,0' )
#file.write('\n\t\tLookAt: 0,0,0' )
@ -2037,7 +2038,7 @@ def write(filename, batch_objects = None, \
if ob_arms_orig_rest:
for ob_base in bpy.data.objects:
#if ob_base.type == 'Armature':
ob_base.make_display_list()
ob_base.make_display_list(scene)
# ob_base.makeDisplayList()
# This causes the makeDisplayList command to effect the mesh
@ -2053,7 +2054,7 @@ def write(filename, batch_objects = None, \
obs = [(ob_base, ob_base.matrix)]
if ob_base.dupli_type != 'NONE':
ob_base.create_dupli_list()
ob_base.create_dupli_list(scene)
obs = [(dob.object, dob.matrix) for dob in ob_base.dupli_list]
for ob, mtx in obs:
@ -2082,7 +2083,7 @@ def write(filename, batch_objects = None, \
if tmp_ob_type != 'MESH':
# if tmp_ob_type != 'Mesh':
# me = bpy.data.meshes.new()
try: me = ob.create_mesh(True, 'PREVIEW')
try: me = ob.create_mesh(scene, True, 'PREVIEW')
# try: me.getFromObject(ob)
except: me = None
if me:
@ -2093,7 +2094,7 @@ def write(filename, batch_objects = None, \
# Mesh Type!
if EXP_MESH_APPLY_MOD:
# me = bpy.data.meshes.new()
me = ob.create_mesh(True, 'PREVIEW')
me = ob.create_mesh(scene, True, 'PREVIEW')
# me.getFromObject(ob)
# so we keep the vert groups
@ -2213,7 +2214,7 @@ def write(filename, batch_objects = None, \
for ob_base in bpy.data.objects:
if ob_base.type == 'ARMATURE':
# if ob_base.type == 'Armature':
ob_base.make_display_list()
ob_base.make_display_list(scene)
# ob_base.makeDisplayList()
# This causes the makeDisplayList command to effect the mesh
scene.set_frame(scene.frame_current)

@ -48,7 +48,7 @@ Be sure not to use modifiers that change the number or order of verts in the mes
# ***** END GPL LICENCE BLOCK *****
import bpy
import Mathutils
import mathutils
from struct import pack
@ -84,10 +84,10 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
orig_frame = sce.frame_current
sce.set_frame(PREF_STARTFRAME)
me = ob.create_mesh(True, 'PREVIEW')
me = ob.create_mesh(sce, True, 'PREVIEW')
#Flip y and z
mat_flip = Mathutils.Matrix(\
mat_flip = mathutils.Matrix(\
[1.0, 0.0, 0.0, 0.0],\
[0.0, 0.0, 1.0, 0.0],\
[0.0, 1.0, 0.0, 0.0],\
@ -123,7 +123,7 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
"""
sce.set_frame(frame)
me = ob.create_mesh(True, 'PREVIEW')
me = ob.create_mesh(sce, True, 'PREVIEW')
check_vertcount(me, numverts)
me.transform(mat_flip * ob.matrix)

@ -47,7 +47,7 @@ import time
import shutil
import bpy
import Mathutils
import mathutils
# Returns a tuple - path,extension.
@ -88,7 +88,7 @@ def write_mtl(scene, filename, copy_images, mtl_dict):
file = open(filename, "w")
# XXX
# file.write('# Blender3D MTL File: %s\n' % Blender.Get('filename').split('\\')[-1].split('/')[-1])
# file.write('# Blender MTL File: %s\n' % Blender.Get('filename').split('\\')[-1].split('/')[-1])
file.write('# Material Count: %i\n' % len(mtl_dict))
# Write material/image combinations we have used.
for key, (mtl_mat_name, mat, img) in mtl_dict.items():
@ -221,7 +221,7 @@ def write_nurb(file, ob, ob_mat):
cu = ob.data
# use negative indices
Vector = Blender.Mathutils.Vector
Vector = Blender.mathutils.Vector
for nu in cu:
if nu.type==0: DEG_ORDER_U = 1
@ -361,8 +361,8 @@ def write(filename, objects, scene,
file = open(filename, "w")
# Write Header
file.write('# Blender3D v%s OBJ File: %s\n' % (bpy.app.version_string, bpy.data.filename.split('/')[-1].split('\\')[-1] ))
file.write('# www.blender3d.org\n')
file.write('# Blender v%s OBJ File: %s\n' % (bpy.app.version_string, bpy.data.filename.split('/')[-1].split('\\')[-1] ))
file.write('# www.blender.org\n')
# Tell the obj file what material file to use.
if EXPORT_MTL:
@ -370,7 +370,7 @@ def write(filename, objects, scene,
file.write('mtllib %s\n' % ( mtlfilename.split('\\')[-1].split('/')[-1] ))
if EXPORT_ROTX90:
mat_xrot90= Mathutils.RotationMatrix(-math.pi/2, 4, 'X')
mat_xrot90= mathutils.RotationMatrix(-math.pi/2, 4, 'X')
# Initialize totals, these are updated each object
totverts = totuvco = totno = 1
@ -396,7 +396,7 @@ def write(filename, objects, scene,
if ob_main.dupli_type != 'NONE':
# XXX
print('creating dupli_list on', ob_main.name)
ob_main.create_dupli_list()
ob_main.create_dupli_list(scene)
obs = [(dob.object, dob.matrix) for dob in ob_main.dupli_list]
@ -421,7 +421,7 @@ def write(filename, objects, scene,
if ob.type != 'MESH':
continue
me = ob.create_mesh(EXPORT_APPLY_MODIFIERS, 'PREVIEW')
me = ob.create_mesh(scene, EXPORT_APPLY_MODIFIERS, 'PREVIEW')
if EXPORT_ROTX90:
me.transform(mat_xrot90 * ob_mat)
@ -816,14 +816,15 @@ def do_export(filename, context,
EXPORT_KEEP_VERT_ORDER = False,
EXPORT_POLYGROUPS = False,
EXPORT_CURVE_AS_NURBS = True):
# Window.EditMode(0)
# Window.WaitCursor(1)
base_name, ext = splitExt(filename)
context_name = [base_name, '', '', ext] # Base name, scene name, frame number, extension
orig_scene = context.scene
# Exit edit mode before exporting, so current object states are exported properly.
bpy.ops.object.mode_set(mode='OBJECT')
# if EXPORT_ALL_SCENES:
# export_scenes = bpy.data.scenes
# else:

@ -99,10 +99,11 @@ def write(filename, scene, ob, \
Window.WaitCursor(1)
"""
bpy.ops.object.mode_set(mode='OBJECT')
#mesh = BPyMesh.getMeshFromObject(ob, None, EXPORT_APPLY_MODIFIERS, False, scn) # XXX
if EXPORT_APPLY_MODIFIERS:
mesh = ob.create_mesh(True, 'PREVIEW')
mesh = ob.create_mesh(scene, True, 'PREVIEW')
else:
mesh = ob.data
@ -202,7 +203,7 @@ def write(filename, scene, ob, \
file.write('ply\n')
file.write('format ascii 1.0\n')
file.write('comment Created by Blender3D %s - www.blender.org, source file: %s\n' % (bpy.app.version_string, bpy.data.filename.split('/')[-1].split('\\')[-1]))
file.write('comment Created by Blender %s - www.blender.org, source file: %s\n' % (bpy.app.version_string, bpy.data.filename.split('/')[-1].split('\\')[-1]))
file.write('element vertex %d\n' % len(ply_verts))

@ -69,7 +69,7 @@ import math
import os
import bpy
import Mathutils
import mathutils
from export_3ds import create_derived_objects, free_derived_objects
@ -81,7 +81,7 @@ from export_3ds import create_derived_objects, free_derived_objects
#
DEG2RAD=0.017453292519943295
MATWORLD= Mathutils.RotationMatrix(-90, 4, 'X')
MATWORLD= mathutils.RotationMatrix(-90, 4, 'X')
####################################
# Global Variables
@ -852,10 +852,10 @@ class x3d_class:
# --------------------------
for ob_main in [o for o in scene.objects if o.is_visible()]:
for ob_main in [o for o in scene.objects if o.is_visible(scene)]:
# for ob_main in scene.objects.context:
free, derived = create_derived_objects(ob_main)
free, derived = create_derived_objects(scene, ob_main)
if derived == None: continue
@ -871,7 +871,7 @@ class x3d_class:
# elif objType in ("Mesh", "Curve", "Surf", "Text") :
if EXPORT_APPLY_MODIFIERS or objType != 'MESH':
# if EXPORT_APPLY_MODIFIERS or objType != 'Mesh':
me = ob.create_mesh(EXPORT_APPLY_MODIFIERS, 'PREVIEW')
me = ob.create_mesh(scene, EXPORT_APPLY_MODIFIERS, 'PREVIEW')
# me= BPyMesh.getMeshFromObject(ob, containerMesh, EXPORT_APPLY_MODIFIERS, False, scene)
else:
me = ob.data
@ -1155,8 +1155,9 @@ def x3d_export(filename,
scene = context.scene
# scene = Blender.Scene.GetCurrent()
world = scene.world
bpy.ops.object.mode_set(mode='OBJECT')
# XXX these are global textures while .Get() returned only scene's?
alltextures = bpy.data.textures

@ -22,8 +22,8 @@ import math
from math import radians
import bpy
import Mathutils
from Mathutils import Vector, Euler, Matrix, RotationMatrix, TranslationMatrix
import mathutils
from mathutils import Vector, Euler, Matrix, RotationMatrix, TranslationMatrix
class bvh_node_class(object):

@ -144,7 +144,7 @@ import struct
from import_scene_obj import unpack_face_list, load_image
import bpy
import Mathutils
import mathutils
BOUNDS_3DS = []
@ -310,8 +310,8 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
contextObName = None
contextLamp = [None, None] # object, Data
contextMaterial = None
contextMatrix_rot = None # Blender.Mathutils.Matrix(); contextMatrix.identity()
#contextMatrix_tx = None # Blender.Mathutils.Matrix(); contextMatrix.identity()
contextMatrix_rot = None # Blender.mathutils.Matrix(); contextMatrix.identity()
#contextMatrix_tx = None # Blender.mathutils.Matrix(); contextMatrix.identity()
contextMesh_vertls = None
contextMesh_facels = None
contextMeshMaterials = {} # matname:[face_idxs]
@ -722,7 +722,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
def getuv():
temp_data = file.read(STRUCT_SIZE_2FLOAT)
new_chunk.bytes_read += STRUCT_SIZE_2FLOAT #2 float x 4 bytes each
return Mathutils.Vector( struct.unpack('<2f', temp_data) )
return mathutils.Vector( struct.unpack('<2f', temp_data) )
contextMeshUV = [ getuv() for i in range(num_uv) ]
@ -732,7 +732,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
data = list( struct.unpack('<ffffffffffff', temp_data) )
new_chunk.bytes_read += STRUCT_SIZE_4x3MAT
contextMatrix_rot = Mathutils.Matrix(\
contextMatrix_rot = mathutils.Matrix(\
data[:3] + [0],\
data[3:6] + [0],\
data[6:9] + [0],\
@ -740,7 +740,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
'''
contextMatrix_rot = Blender.Mathutils.Matrix(\
contextMatrix_rot = Blender.mathutils.Matrix(\
data[:3] + [0],\
data[3:6] + [0],\
data[6:9] + [0],\
@ -748,14 +748,14 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
'''
'''
contextMatrix_rot = Blender.Mathutils.Matrix(\
contextMatrix_rot = Blender.mathutils.Matrix(\
data[:3] ,\
data[3:6],\
data[6:9])
'''
'''
contextMatrix_rot = Blender.Mathutils.Matrix()
contextMatrix_rot = Blender.mathutils.Matrix()
m = 0
for j in xrange(4):
for i in xrange(3):
@ -773,7 +773,7 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
#print contextMatrix_rot
contextMatrix_rot.invert()
#print contextMatrix_rot
#contextMatrix_tx = Blender.Mathutils.TranslationMatrix(0.5 * Blender.Mathutils.Vector(data[9:]))
#contextMatrix_tx = Blender.mathutils.TranslationMatrix(0.5 * Blender.mathutils.Vector(data[9:]))
#contextMatrix_tx.invert()
#tx.invert()
@ -946,8 +946,8 @@ def load_3ds(filename, context, IMPORT_CONSTRAIN_BOUNDS=10.0, IMAGE_SEARCH=True,
SCALE/=10
# SCALE Matrix
SCALE_MAT = Mathutils.Matrix([SCALE,0,0,0],[0,SCALE,0,0],[0,0,SCALE,0],[0,0,0,1])
# SCALE_MAT = Blender.Mathutils.Matrix([SCALE,0,0,0],[0,SCALE,0,0],[0,0,SCALE,0],[0,0,0,1])
SCALE_MAT = mathutils.Matrix([SCALE,0,0,0],[0,SCALE,0,0],[0,0,SCALE,0],[0,0,0,1])
# SCALE_MAT = Blender.mathutils.Matrix([SCALE,0,0,0],[0,SCALE,0,0],[0,0,SCALE,0],[0,0,0,1])
for ob in importedObjects:
ob.setMatrix(ob.matrixWorld * SCALE_MAT)

@ -54,8 +54,8 @@ Note, This loads mesh objects and materials only, nurbs and curves are not suppo
import os
import time
import bpy
import Mathutils
import Geometry
import mathutils
from geometry import PolyFill
# from Blender import Mesh, Draw, Window, Texture, Material, sys
# # import BPyMesh
@ -127,7 +127,7 @@ def BPyMesh_ngon(from_data, indices, PREF_FIX_LOOPS= True):
if not set: # Need sets for this, otherwise do a normal fill.
PREF_FIX_LOOPS= False
Vector= Mathutils.Vector
Vector= mathutils.Vector
if not indices:
return []
@ -158,7 +158,7 @@ def BPyMesh_ngon(from_data, indices, PREF_FIX_LOOPS= True):
if verts[i][1]==verts[i-1][0]:
verts.pop(i-1)
fill= Geometry.PolyFill([verts])
fill= PolyFill([verts])
else:
'''
@ -266,7 +266,7 @@ def BPyMesh_ngon(from_data, indices, PREF_FIX_LOOPS= True):
vert_map[i+ii]= vert[2]
ii+=len(verts)
fill= Geometry.PolyFill([ [v[0] for v in loop] for loop in loop_list ])
fill= PolyFill([ [v[0] for v in loop] for loop in loop_list ])
#draw_loops(loop_list)
#raise 'done loop'
# map to original indicies

@ -66,7 +66,7 @@ def RKS_GEN_available(ksi, context, ks, data):
# for each F-Curve, include an path to key it
# NOTE: we don't need to set the group settings here
for fcu in adt.action.fcurves:
ks.add_path(id_block, fcu.data_path, index=fcu.array_index)
ks.paths.add(id_block, fcu.data_path, index=fcu.array_index)
# ------
@ -84,7 +84,7 @@ def get_transform_generators_base_info(data):
grouping = None
else:
# get the path to the ID-block
path = data.path_to_id()
path = data.path_from_id()
# try to use the name of the data element to group the F-Curve
# else fallback on the KeyingSet name
@ -103,9 +103,9 @@ def RKS_GEN_location(ksi, context, ks, data):
# add Keying Set entry for this...
if grouping:
ks.add_path(id_block, path, grouping_method='NAMED', group_name=grouping)
ks.paths.add(id_block, path, grouping_method='NAMED', group_name=grouping)
else:
ks.add_path(id_block, path)
ks.paths.add(id_block, path)
# Rotation
def RKS_GEN_rotation(ksi, context, ks, data):
@ -123,9 +123,9 @@ def RKS_GEN_rotation(ksi, context, ks, data):
# add Keying Set entry for this...
if grouping:
ks.add_path(id_block, path, grouping_method='NAMED', group_name=grouping)
ks.paths.add(id_block, path, grouping_method='NAMED', group_name=grouping)
else:
ks.add_path(id_block, path)
ks.paths.add(id_block, path)
# Scaling
def RKS_GEN_scaling(ksi, context, ks, data):
@ -137,9 +137,9 @@ def RKS_GEN_scaling(ksi, context, ks, data):
# add Keying Set entry for this...
if grouping:
ks.add_path(id_block, path, grouping_method='NAMED', group_name=grouping)
ks.paths.add(id_block, path, grouping_method='NAMED', group_name=grouping)
else:
ks.add_path(id_block, path)
ks.paths.add(id_block, path)
###########################
# Un-needed stuff which is here to just shut up the warnings...

@ -168,21 +168,20 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
traceback.print_exc()
_loaded[:] = []
for base_path in script_paths(user=False):
for path_subdir in ("ui", "op", "io", "cfg", "keyingsets"):
user_path = user_script_path()
for base_path in script_paths():
for path_subdir in ("", "ui", "op", "io", "cfg", "keyingsets", "modules"):
path = _os.path.join(base_path, path_subdir)
if _os.path.isdir(path):
sys_path_ensure(path)
for mod in modules_from_path(path, loaded_modules):
test_register(mod)
# only add this to sys.modules, dont run
if path_subdir == "modules":
continue
user_path = user_script_path()
if user_path:
for path_subdir in ("", "ui", "op", "io", "cfg", "keyingsets"):
path = _os.path.join(user_path, path_subdir)
if _os.path.isdir(path):
sys_path_ensure(path)
if user_path != base_path and path_subdir == "":
continue # avoid loading 2.4x scripts
for mod in modules_from_path(path, loaded_modules):
test_register(mod)

@ -19,7 +19,7 @@
# <pep8 compliant>
from _bpy import types as bpy_types
from Mathutils import Vector
from mathutils import Vector
StructRNA = bpy_types.Struct.__bases__[0]
# StructRNA = bpy_types.Struct
@ -236,7 +236,7 @@ class EditBone(StructRNA, _GenericBone):
Transform the the bones head, tail, roll and envalope (when the matrix has a scale component).
Expects a 4x4 or 3x3 matrix.
"""
from Mathutils import Vector
from mathutils import Vector
z_vec = self.matrix.rotation_part() * Vector(0.0, 0.0, 1.0)
self.tail = matrix * self.tail
self.head = matrix * self.head
@ -511,12 +511,16 @@ class Menu(StructRNA, _GenericUI):
if f.startswith("."):
continue
props = layout.operator(operator, text=bpy.utils.display_name(f))
preset_name = bpy.utils.display_name(f)
props = layout.operator(operator, text=preset_name)
for attr, value in props_default.items():
setattr(props, attr, value)
props.path = path
if operator == "script.execute_preset":
props.menu_idname = self.bl_idname
props.preset_name = preset_name
def draw_preset(self, context):
"""Define these on the subclass

@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
from Mathutils import Vector
from mathutils import Vector
# TODO, have these in a more general module
from rna_prop_ui import rna_idprop_ui_prop_get

@ -23,7 +23,7 @@ from math import radians, pi
from rigify import RigifyError, ORG_PREFIX
from rigify_utils import bone_class_instance, copy_bone_simple, add_pole_target_bone, add_stretch_to, blend_bone_list, get_side_name, get_base_name
from rna_prop_ui import rna_idprop_ui_prop_get
from Mathutils import Vector
from mathutils import Vector
METARIG_NAMES = "shoulder", "arm", "forearm", "hand"
@ -244,7 +244,7 @@ def fk(obj, definitions, base_names, options):
driver = driver_fcurve.driver
controller_path = fk_chain.arm_p.path_to_id()
controller_path = fk_chain.arm_p.path_from_id()
# add custom prop
fk_chain.arm_p["hinge"] = 0.0
prop = rna_idprop_ui_prop_get(fk_chain.arm_p, "hinge", create=True)

@ -20,13 +20,92 @@
import bpy
from rna_prop_ui import rna_idprop_ui_prop_get
from Mathutils import Vector
from mathutils import Vector
from rigify import RigifyError
from rigify_utils import copy_bone_simple
#METARIG_NAMES = ("cpy",)
RIG_TYPE = "eye_balls"
def addget_shape_key(obj, name="Key"):
""" Fetches a shape key, or creates it if it doesn't exist
"""
# Create a shapekey set if it doesn't already exist
if obj.data.shape_keys is None:
shape = obj.add_shape_key(name="Basis", from_mix=False)
obj.active_shape_key_index = 0
# Get the shapekey, or create it if it doesn't already exist
if name in obj.data.shape_keys.keys:
shape_key = obj.data.shape_keys.keys[name]
else:
shape_key = obj.add_shape_key(name=name, from_mix=False)
return shape_key
def addget_shape_key_driver(obj, name="Key"):
""" Fetches the driver for the shape key, or creates it if it doesn't
already exist.
"""
driver_path = 'keys["' + name + '"].value'
fcurve = None
driver = None
new = False
if obj.data.shape_keys.animation_data is not None:
for driver_s in obj.data.shape_keys.animation_data.drivers:
if driver_s.data_path == driver_path:
fcurve = driver_s
if fcurve == None:
fcurve = obj.data.shape_keys.keys[name].driver_add("value", 0)
fcurve.driver.type = 'AVERAGE'
new = True
return fcurve, new
def create_shape_and_driver(obj, bone, meshes, shape_name, var_name, var_path, expression):
""" Creates/gets a shape key and sets up a driver for it.
obj = armature object
bone = driving bone name
meshes = list of meshes to create the shapekey/driver on
shape_name = name of the shape key
var_name = name of the driving variable
var_path = path to the property on the bone to drive with
expression = python expression for the driver
"""
pb = obj.pose.bones
bpy.ops.object.mode_set(mode='OBJECT')
for mesh_name in meshes:
mesh_obj = bpy.data.objects[mesh_name]
# Add/get the shape key
shape = addget_shape_key(mesh_obj, name=shape_name)
# Add/get the shape key driver
fcurve, a = addget_shape_key_driver(mesh_obj, name=shape_name)
# Set up the driver
driver = fcurve.driver
driver.type = 'SCRIPTED'
driver.expression = expression
# Get the variable, or create it if it doesn't already exist
if var_name in driver.variables:
var = driver.variables[var_name]
else:
var = driver.variables.new()
var.name = var_name
# Set up the variable
var.type = "SINGLE_PROP"
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = 'pose.bones["' + bone + '"]' + var_path
def mark_actions():
for action in bpy.data.actions:
action.tag = True
@ -120,6 +199,12 @@ def control(obj, definitions, base_names, options):
head = definitions[0]
eye_target = definitions[1]
# Get list of pupil mesh objects
if "mesh" in options:
pupil_meshes = options["mesh"].replace(" ", "").split(",")
else:
pupil_meshes = []
# Get list of eyes
if "eyes" in options:
eye_base_names = options["eyes"].replace(" ", "").split(",")
@ -197,7 +282,7 @@ def control(obj, definitions, base_names, options):
prop["min"] = 0.0
prop["max"] = 1.0
free_driver_path = pb[target_ctrl].path_to_id() + '["free"]'
free_driver_path = pb[target_ctrl].path_from_id() + '["free"]'
# Constraints
# Mind's eye tracks eye target control
@ -246,6 +331,50 @@ def control(obj, definitions, base_names, options):
con.minimum = 0.0
con.maximum = 2.0
con.target_space = 'LOCAL'
# Get/create the shape keys and drivers for pupil dilation
shape_names = ["PUPILS-dilate_wide", "PUPILS-dilate_narrow"]
slider_name = "pupil_dilate"
# Set up the custom property on the bone
prop = rna_idprop_ui_prop_get(pb[target_ctrl], slider_name, create=True)
pb[target_ctrl][slider_name] = 0.0
prop["min"] = 0.0
prop["max"] = 1.0
prop["soft_min"] = 0.0
prop["soft_max"] = 1.0
if len(shape_names) > 1:
prop["min"] = -1.0
prop["soft_min"] = -1.0
# Add the shape drivers
# Positive
if shape_names[0] != "":
# Set up the variables for creating the shape key driver
shape_name = shape_names[0]
var_name = slider_name.replace(".", "_").replace("-", "_")
var_path = '["' + slider_name + '"]'
if slider_name + "_fac" in options:
fac = options[slider_name + "_fac"]
else:
fac = 1.0
expression = var_name + " * " + str(fac)
# Create the shape key driver
create_shape_and_driver(obj, target_ctrl, pupil_meshes, shape_name, var_name, var_path, expression)
# Negative
if shape_names[0] != "" and len(shape_names) > 1:
# Set up the variables for creating the shape key driver
shape_name = shape_names[1]
var_name = slider_name.replace(".", "_").replace("-", "_")
var_path = '["' + slider_name + '"]'
if slider_name + "_fac" in options:
fac = options[slider_name + "_fac"]
else:
fac = 1.0
expression = var_name + " * " + str(fac) + " * -1"
# Create the shape key driver
create_shape_and_driver(obj, target_ctrl, pupil_meshes, shape_name, var_name, var_path, expression)

@ -21,7 +21,7 @@
import bpy
from rna_prop_ui import rna_idprop_ui_prop_get
from math import acos
from Mathutils import Vector
from mathutils import Vector
from rigify import RigifyError
from rigify_utils import copy_bone_simple
@ -355,7 +355,7 @@ def control(obj, definitions, base_names, options):
prop["min"] = 0.0
prop["max"] = 1.0
close_driver_path = pb[upper_lid_ctrl].path_to_id() + '["close_action"]'
close_driver_path = pb[upper_lid_ctrl].path_from_id() + '["close_action"]'
# Constraints

@ -57,31 +57,20 @@ def metarig_template():
def metarig_definition(obj, orig_bone_name):
'''
The bone given is the first in a chain
Expects a chain of at least 2 children.
Expects a chain with at least 1 child of the same base name.
eg.
finger -> finger_01 -> finger_02
finger_01 -> finger_02
'''
bone_definition = []
orig_bone = obj.data.bones[orig_bone_name]
bone_definition.append(orig_bone.name)
bone = orig_bone
chain = 0
while chain < 2: # first 2 bones only have 1 child
children = bone.children
if len(children) != 1:
raise RigifyError("expected the chain to have 2 children from bone '%s' without a fork" % orig_bone_name)
bone = children[0]
bone_definition.append(bone.name) # finger_02, finger_03
chain += 1
if len(bone_definition) != len(METARIG_NAMES):
raise RigifyError("internal problem, expected %d bones" % len(METARIG_NAMES))
bone_definition = [orig_bone.name]
bone_definition.extend([child.name for child in orig_bone.children_recursive_basename])
if len(bone_definition) < 2:
raise RigifyError("expected the chain to have at least 1 child from bone '%s' without the same base name" % orig_bone_name)
return bone_definition
@ -90,6 +79,8 @@ def deform(obj, definitions, base_names, options):
"""
bpy.ops.object.mode_set(mode='EDIT')
three_digits = True if len(definitions) > 2 else False
# Create base digit bones: two bones, each half of the base digit.
f1a = copy_bone_simple(obj.data, definitions[0], "DEF-%s.01" % base_names[definitions[0]], parent=True)
f1b = copy_bone_simple(obj.data, definitions[0], "DEF-%s.02" % base_names[definitions[0]], parent=True)
@ -102,13 +93,15 @@ def deform(obj, definitions, base_names, options):
# Create the other deform bones.
f2 = copy_bone_simple(obj.data, definitions[1], "DEF-%s" % base_names[definitions[1]], parent=True)
f3 = copy_bone_simple(obj.data, definitions[2], "DEF-%s" % base_names[definitions[2]], parent=True)
if three_digits:
f3 = copy_bone_simple(obj.data, definitions[2], "DEF-%s" % base_names[definitions[2]], parent=True)
# Store names before leaving edit mode
f1a_name = f1a.name
f1b_name = f1b.name
f2_name = f2.name
f3_name = f3.name
if three_digits:
f3_name = f3.name
# Leave edit mode
bpy.ops.object.mode_set(mode='OBJECT')
@ -117,7 +110,8 @@ def deform(obj, definitions, base_names, options):
f1a = obj.pose.bones[f1a_name]
f1b = obj.pose.bones[f1b_name]
f2 = obj.pose.bones[f2_name]
f3 = obj.pose.bones[f3_name]
if three_digits:
f3 = obj.pose.bones[f3_name]
# Constrain the base digit's bones
con = f1a.constraints.new('DAMPED_TRACK')
@ -141,15 +135,18 @@ def deform(obj, definitions, base_names, options):
con.target = obj
con.subtarget = definitions[1]
con = f3.constraints.new('COPY_TRANSFORMS')
con.name = "copy_transforms"
con.target = obj
con.subtarget = definitions[2]
if three_digits:
con = f3.constraints.new('COPY_TRANSFORMS')
con.name = "copy_transforms"
con.target = obj
con.subtarget = definitions[2]
def main(obj, bone_definition, base_names, options):
# *** EDITMODE
bpy.ops.object.mode_set(mode='EDIT')
three_digits = True if len(bone_definition) > 2 else False
# get assosiated data
arm = obj.data
@ -159,7 +156,8 @@ def main(obj, bone_definition, base_names, options):
org_f1 = bone_definition[0] # Original finger bone 01
org_f2 = bone_definition[1] # Original finger bone 02
org_f3 = bone_definition[2] # Original finger bone 03
if three_digits:
org_f3 = bone_definition[2] # Original finger bone 03
# Check options
if "bend_ratio" in options:
@ -179,7 +177,10 @@ def main(obj, bone_definition, base_names, options):
# Create the control bone
base_name = base_names[bone_definition[0]].split(".", 1)[0]
tot_len = eb[org_f1].length + eb[org_f2].length + eb[org_f3].length
if three_digits:
tot_len = eb[org_f1].length + eb[org_f2].length + eb[org_f3].length
else:
tot_len = eb[org_f1].length + eb[org_f2].length
control = copy_bone_simple(arm, bone_definition[0], base_name + get_side_name(base_names[bone_definition[0]]), parent=True).name
eb[control].connected = eb[org_f1].connected
eb[control].parent = eb[org_f1].parent
@ -188,26 +189,30 @@ def main(obj, bone_definition, base_names, options):
# Create secondary control bones
f1 = copy_bone_simple(arm, bone_definition[0], base_names[bone_definition[0]]).name
f2 = copy_bone_simple(arm, bone_definition[1], base_names[bone_definition[1]]).name
f3 = copy_bone_simple(arm, bone_definition[2], base_names[bone_definition[2]]).name
if three_digits:
f3 = copy_bone_simple(arm, bone_definition[2], base_names[bone_definition[2]]).name
# Create driver bones
df1 = copy_bone_simple(arm, bone_definition[0], "MCH-" + base_names[bone_definition[0]]).name
eb[df1].length /= 2
df2 = copy_bone_simple(arm, bone_definition[1], "MCH-" + base_names[bone_definition[1]]).name
eb[df2].length /= 2
df3 = copy_bone_simple(arm, bone_definition[2], "MCH-" + base_names[bone_definition[2]]).name
eb[df3].length /= 2
if three_digits:
df3 = copy_bone_simple(arm, bone_definition[2], "MCH-" + base_names[bone_definition[2]]).name
eb[df3].length /= 2
# Set parents of the bones, interleaving the driver bones with the secondary control bones
eb[f3].connected = False
eb[df3].connected = False
if three_digits:
eb[f3].connected = False
eb[df3].connected = False
eb[f2].connected = False
eb[df2].connected = False
eb[f1].connected = False
eb[df1].connected = eb[org_f1].connected
eb[f3].parent = eb[df3]
eb[df3].parent = eb[f2]
if three_digits:
eb[f3].parent = eb[df3]
eb[df3].parent = eb[f2]
eb[f2].parent = eb[df2]
eb[df2].parent = eb[f1]
eb[f1].parent = eb[df1]
@ -215,8 +220,8 @@ def main(obj, bone_definition, base_names, options):
# Set up bones for hinge
if make_hinge:
socket = copy_bone_simple(arm, org_f1, "MCH-socket_" + control, parent=True).name
hinge = copy_bone_simple(arm, eb[org_f1].parent.name, "MCH-hinge_" + control).name
socket = copy_bone_simple(arm, org_f1, "MCH-socket_"+control, parent=True).name
hinge = copy_bone_simple(arm, eb[org_f1].parent.name, "MCH-hinge_"+control).name
eb[control].connected = False
eb[control].parent = eb[hinge]
@ -234,12 +239,15 @@ def main(obj, bone_definition, base_names, options):
pb[control].lock_scale = True, False, True
pb[f1].rotation_mode = 'YZX'
pb[f2].rotation_mode = 'YZX'
pb[f3].rotation_mode = 'YZX'
if three_digits:
pb[f3].rotation_mode = 'YZX'
pb[f1].lock_location = True, True, True
pb[f2].lock_location = True, True, True
pb[f3].lock_location = True, True, True
if three_digits:
pb[f3].lock_location = True, True, True
pb[df2].rotation_mode = 'YZX'
pb[df3].rotation_mode = 'YZX'
if three_digits:
pb[df3].rotation_mode = 'YZX'
# Add the bend_ratio property to the control bone
pb[control]["bend_ratio"] = bend_ratio
@ -271,16 +279,17 @@ def main(obj, bone_definition, base_names, options):
con.target = obj
con.subtarget = f2
con = pb[org_f3].constraints.new('COPY_TRANSFORMS')
con.target = obj
con.subtarget = f3
if three_digits:
con = pb[org_f3].constraints.new('COPY_TRANSFORMS')
con.target = obj
con.subtarget = f3
if make_hinge:
con = pb[hinge].constraints.new('COPY_TRANSFORMS')
con.target = obj
con.subtarget = bb[org_f1].parent.name
hinge_driver_path = pb[control].path_to_id() + '["hinge"]'
hinge_driver_path = pb[control].path_from_id() + '["hinge"]'
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver
@ -301,10 +310,15 @@ def main(obj, bone_definition, base_names, options):
con.subtarget = socket
# Create the drivers for the driver bones (control bone scale rotates driver bones)
controller_path = pb[control].path_to_id() # 'pose.bones["%s"]' % control_bone_name
controller_path = pb[control].path_from_id() # 'pose.bones["%s"]' % control_bone_name
if three_digits:
finger_digits = [df2, df3]
else:
finger_digits = [df2]
i = 0
for bone in [df2, df3]:
for bone in finger_digits:
# XXX - todo, any number
if i == 2:
@ -334,23 +348,31 @@ def main(obj, bone_definition, base_names, options):
var.targets[0].data_path = controller_path + '["bend_ratio"]'
# XXX - todo, any number
if i == 0:
driver.expression = '(-scale+1.0)*pi*2.0*(1.0-br)'
elif i == 1:
driver.expression = '(-scale+1.0)*pi*2.0*br'
if three_digits:
if i == 0:
driver.expression = '(-scale+1.0)*pi*2.0*(1.0-br)'
elif i == 1:
driver.expression = '(-scale+1.0)*pi*2.0*br'
else:
driver.expression = driver.expression = '(-scale+1.0)*pi*2.0'
i += 1
# Last step setup layers
if "ex_layer" in options:
layer = [n == options["ex_layer"] for n in range(0, 32)]
layer = [n==options["ex_layer"] for n in range(0,32)]
else:
layer = list(arm.bones[bone_definition[0]].layer)
for bone_name in [f1, f2, f3]:
arm.bones[bone_name].layer = layer
#for bone_name in [f1, f2, f3]:
# arm.bones[bone_name].layer = layer
arm.bones[f1].layer = layer
arm.bones[f2].layer = layer
if three_digits:
arm.bones[f3].layer = layer
layer = list(arm.bones[bone_definition[0]].layer)
bb[control].layer = layer
# no blending the result of this
return None

@ -279,7 +279,7 @@ def ik(obj, bone_definition, base_names, options):
def fk(obj, bone_definition, base_names, options):
from Mathutils import Vector
from mathutils import Vector
arm = obj.data
# these account for all bones in METARIG_NAMES
@ -349,7 +349,7 @@ def fk(obj, bone_definition, base_names, options):
con.subtarget = mt.hips
# add driver
hinge_driver_path = fk_chain.thigh_p.path_to_id() + '["hinge"]'
hinge_driver_path = fk_chain.thigh_p.path_from_id() + '["hinge"]'
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver

@ -23,7 +23,7 @@ from rna_prop_ui import rna_idprop_ui_prop_get
from math import pi
from rigify import RigifyError
from rigify_utils import bone_class_instance, copy_bone_simple, get_side_name, get_base_name
from Mathutils import Vector
from mathutils import Vector
METARIG_NAMES = "hips", "thigh", "shin", "foot", "toe"
@ -207,7 +207,7 @@ def ik(obj, bone_definition, base_names, options):
prop["min"] = 0.0
prop["max"] = 1.0
ik_driver_path = pb[ik_chain.foot].path_to_id() + '["ik"]'
ik_driver_path = pb[ik_chain.foot].path_from_id() + '["ik"]'
# simple constraining of orig bones
con = mt_chain.thigh_p.constraints.new('COPY_TRANSFORMS')
@ -369,7 +369,7 @@ def fk(obj, bone_definition, base_names, options):
prop["min"] = 0.0
prop["max"] = 1.0
hinge_driver_path = pb[fk_chain.thigh].path_to_id() + '["hinge"]'
hinge_driver_path = pb[fk_chain.thigh].path_from_id() + '["hinge"]'
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver

@ -21,7 +21,7 @@
import bpy
from rna_prop_ui import rna_idprop_ui_prop_get
from math import acos, pi
from Mathutils import Vector
from mathutils import Vector
from rigify import RigifyError
from rigify_utils import copy_bone_simple
@ -448,7 +448,7 @@ def control(obj, definitions, base_names, options):
prop["min"] = 0.0
prop["max"] = 1.0
open_driver_path = pb[lip1].path_to_id() + '["open_action"]'
open_driver_path = pb[lip1].path_from_id() + '["open_action"]'
# Constraints

@ -0,0 +1,344 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import bpy
from rigify import RigifyError
from rigify_utils import bone_class_instance, copy_bone_simple
from rna_prop_ui import rna_idprop_ui_prop_get
def metarig_template():
# TODO:
## generated by rigify.write_meta_rig
#bpy.ops.object.mode_set(mode='EDIT')
#obj = bpy.context.active_object
#arm = obj.data
#bone = arm.edit_bones.new('body')
#bone.head[:] = 0.0000, -0.0276, -0.1328
#bone.tail[:] = 0.0000, -0.0170, -0.0197
#bone.roll = 0.0000
#bone.connected = False
#bone = arm.edit_bones.new('head')
#bone.head[:] = 0.0000, -0.0170, -0.0197
#bone.tail[:] = 0.0000, 0.0726, 0.1354
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['body']
#bone = arm.edit_bones.new('neck.01')
#bone.head[:] = 0.0000, -0.0170, -0.0197
#bone.tail[:] = 0.0000, -0.0099, 0.0146
#bone.roll = 0.0000
#bone.connected = False
#bone.parent = arm.edit_bones['head']
#bone = arm.edit_bones.new('neck.02')
#bone.head[:] = 0.0000, -0.0099, 0.0146
#bone.tail[:] = 0.0000, -0.0242, 0.0514
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['neck.01']
#bone = arm.edit_bones.new('neck.03')
#bone.head[:] = 0.0000, -0.0242, 0.0514
#bone.tail[:] = 0.0000, -0.0417, 0.0868
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['neck.02']
#bone = arm.edit_bones.new('neck.04')
#bone.head[:] = 0.0000, -0.0417, 0.0868
#bone.tail[:] = 0.0000, -0.0509, 0.1190
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['neck.03']
#bone = arm.edit_bones.new('neck.05')
#bone.head[:] = 0.0000, -0.0509, 0.1190
#bone.tail[:] = 0.0000, -0.0537, 0.1600
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['neck.04']
#
#bpy.ops.object.mode_set(mode='OBJECT')
#pbone = obj.pose.bones['head']
#pbone['type'] = 'neck_flex'
pass
def metarig_definition(obj, orig_bone_name):
'''
The bone given is neck_01, its parent is the body
eg.
body -> neck_01 -> neck_02 -> neck_03.... etc
'''
arm = obj.data
neck = arm.bones[orig_bone_name]
body = neck.parent
bone_definition = [body.name, neck.name]
bone_definition.extend([child.name for child in neck.children_recursive_basename])
return bone_definition
def deform(obj, definitions, base_names, options):
for org_bone_name in definitions[1:]:
bpy.ops.object.mode_set(mode='EDIT')
# Create deform bone.
bone = copy_bone_simple(obj.data, org_bone_name, "DEF-%s" % base_names[org_bone_name], parent=True)
# Store name before leaving edit mode
bone_name = bone.name
# Leave edit mode
bpy.ops.object.mode_set(mode='OBJECT')
# Get the pose bone
bone = obj.pose.bones[bone_name]
# Constrain to the original bone
# XXX. Todo, is this needed if the bone is connected to its parent?
con = bone.constraints.new('COPY_TRANSFORMS')
con.name = "copy_loc"
con.target = obj
con.subtarget = org_bone_name
def main(obj, bone_definition, base_names, options):
from mathutils import Vector
arm = obj.data
eb = obj.data.edit_bones
bb = obj.data.bones
pb = obj.pose.bones
body = bone_definition[0]
# Create the neck and head control bones
if "head_name" in options:
head_name = options["head_name"]
else:
head_name = "head"
neck_name = base_names[bone_definition[1]].split(".")[0]
neck_ctrl = copy_bone_simple(arm, bone_definition[1], neck_name).name
head_ctrl = copy_bone_simple(arm, bone_definition[len(bone_definition)-1], head_name).name
eb[head_ctrl].tail += eb[neck_ctrl].head - eb[head_ctrl].head
eb[head_ctrl].head = eb[neck_ctrl].head
# Create hinge and socket bones
neck_hinge = copy_bone_simple(arm, bone_definition[0], "MCH-" + neck_name + "_hinge").name
head_hinge = copy_bone_simple(arm, neck_ctrl, "MCH-" + head_name + "_hinge").name
eb[neck_hinge].tail += eb[neck_ctrl].head - eb[neck_hinge].head
eb[neck_hinge].head = eb[neck_ctrl].head
eb[head_hinge].tail += eb[neck_ctrl].head - eb[head_hinge].head
eb[head_hinge].head = eb[neck_ctrl].head
neck_socket = copy_bone_simple(arm, bone_definition[1], "MCH-" + neck_name + "_socket").name
head_socket = copy_bone_simple(arm, bone_definition[1], "MCH-" + head_name + "_socket").name
# Parent-child relationships between the body, hinges, controls, and sockets
eb[neck_ctrl].parent = eb[neck_hinge]
eb[head_ctrl].parent = eb[head_hinge]
eb[neck_socket].parent = eb[body]
eb[head_socket].parent = eb[body]
# Create neck bones
neck = [] # neck bones
neck_neck = [] # bones constrained to neck control
neck_head = [] # bones constrained to head control
for i in range(1, len(bone_definition)):
# Create bones
neck_bone = copy_bone_simple(arm, bone_definition[i], base_names[bone_definition[i]]).name
neck_neck_bone = copy_bone_simple(arm, neck_ctrl, "MCH-" + base_names[bone_definition[i]] + ".neck").name
neck_head_bone = copy_bone_simple(arm, head_ctrl, "MCH-" + base_names[bone_definition[i]] + ".head").name
# Move them all to the same place
eb[neck_neck_bone].tail += eb[neck_bone].head - eb[neck_neck_bone].head
eb[neck_head_bone].tail += eb[neck_bone].head - eb[neck_neck_bone].head
eb[neck_neck_bone].head = eb[neck_bone].head
eb[neck_head_bone].head = eb[neck_bone].head
# Parent/child relationships
eb[neck_bone].parent = eb[neck_head_bone]
eb[neck_head_bone].parent = eb[neck_neck_bone]
if i > 1:
eb[neck_neck_bone].parent = eb[neck[i-2]]
else:
eb[neck_neck_bone].parent = eb[body]
# Add them to the lists
neck += [neck_bone]
neck_neck += [neck_neck_bone]
neck_head += [neck_head_bone]
# Create deformation rig
deform(obj, bone_definition, base_names, options)
bpy.ops.object.mode_set(mode='OBJECT')
# Axis locks
pb[neck_ctrl].lock_location = True, True, True
pb[head_ctrl].lock_location = True, True, True
for bone in neck:
pb[bone].lock_location = True, True, True
# Neck hinge
prop = rna_idprop_ui_prop_get(pb[neck_ctrl], "hinge", create=True)
pb[neck_ctrl]["hinge"] = 0.0
prop["soft_min"] = 0.0
prop["soft_max"] = 1.0
prop["hard_min"] = 0.0
prop["hard_max"] = 1.0
con = pb[neck_hinge].constraints.new('COPY_LOCATION')
con.name = "socket"
con.target = obj
con.subtarget = neck_socket
con = pb[neck_hinge].constraints.new('COPY_ROTATION')
con.name = "hinge"
con.target = obj
con.subtarget = body
hinge_driver_path = pb[neck_ctrl].path_from_id() + '["hinge"]'
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver
var = driver.variables.new()
driver.type = 'AVERAGE'
var.name = "var"
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = hinge_driver_path
mod = fcurve.modifiers[0]
mod.poly_order = 1
mod.coefficients[0] = 1.0
mod.coefficients[1] = -1.0
# Head hinge
prop = rna_idprop_ui_prop_get(pb[head_ctrl], "hinge", create=True)
pb[head_ctrl]["hinge"] = 0.0
prop["soft_min"] = 0.0
prop["soft_max"] = 1.0
prop["hard_min"] = 0.0
prop["hard_max"] = 1.0
con = pb[head_hinge].constraints.new('COPY_LOCATION')
con.name = "socket"
con.target = obj
con.subtarget = head_socket
con = pb[head_hinge].constraints.new('COPY_ROTATION')
con.name = "hinge"
con.target = obj
con.subtarget = neck_ctrl
hinge_driver_path = pb[head_ctrl].path_from_id() + '["hinge"]'
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver
var = driver.variables.new()
driver.type = 'AVERAGE'
var.name = "var"
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = hinge_driver_path
mod = fcurve.modifiers[0]
mod.poly_order = 1
mod.coefficients[0] = 1.0
mod.coefficients[1] = -1.0
# Neck rotation constraints
for i in range(0, len(neck_neck)):
con = pb[neck_neck[i]].constraints.new('COPY_ROTATION')
con.name = "neck rotation"
con.target = obj
con.subtarget = neck_ctrl
con.influence = (i+1) / len(neck_neck)
# Head rotation constraints/drivers
prop = rna_idprop_ui_prop_get(pb[head_ctrl], "extent", create=True)
if "extent" in options:
pb[head_ctrl]["extent"] = options["extent"]
else:
pb[head_ctrl]["extent"] = 0.5
prop["soft_min"] = 0.0
prop["soft_max"] = 1.0
prop["hard_min"] = 0.0
prop["hard_max"] = 1.0
extent_prop_path = pb[head_ctrl].path_from_id() + '["extent"]'
for i in range(0, len(neck_head)):
con = pb[neck_head[i]].constraints.new('COPY_ROTATION')
con.name = "head rotation"
con.target = obj
con.subtarget = head_ctrl
if i < (len(neck_head)-1):
inf = (i+1) / len(neck_head)
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver
var = driver.variables.new()
var.name = "ext"
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = extent_prop_path
driver.expression = "0 if ext == 0 else (((%s-1)/ext)+1)" % inf
else:
con.influence = 1.0
# Constrain original bones to the neck bones
for i in range(0, len(neck)):
con = pb[bone_definition[i+1]].constraints.new('COPY_TRANSFORMS')
con.name = "copy_transform"
con.target = obj
con.subtarget = neck[i]
# Set the controls' custom shapes to use other bones for transforms
pb[neck_ctrl].custom_shape_transform = pb[bone_definition[len(bone_definition)//2]]
pb[head_ctrl].custom_shape_transform = pb[bone_definition[len(bone_definition)-1]]
# last step setup layers
if "ex_layer" in options:
layer = [n==options["ex_layer"] for n in range(0,32)]
else:
layer = list(arm.bones[bone_definition[1]].layer)
for bone in neck:
bb[bone].layer = layer
layer = list(arm.bones[bone_definition[1]].layer)
bb[neck_ctrl].layer = layer
bb[head_ctrl].layer = layer
# no blending the result of this
return None

@ -125,7 +125,7 @@ def deform(obj, definitions, base_names, options):
def main(obj, bone_definition, base_names, options):
from Mathutils import Vector
from mathutils import Vector
arm = obj.data
@ -237,7 +237,7 @@ def main(obj, bone_definition, base_names, options):
con.subtarget = mt.body
# add driver
hinge_driver_path = ex.head_ctrl_p.path_to_id() + '["hinge"]'
hinge_driver_path = ex.head_ctrl_p.path_from_id() + '["hinge"]'
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver
@ -254,7 +254,7 @@ def main(obj, bone_definition, base_names, options):
mod.coefficients[0] = 1.0
mod.coefficients[1] = -1.0
head_driver_path = ex.head_ctrl_p.path_to_id()
head_driver_path = ex.head_ctrl_p.path_from_id()
target_names = [("b%.2d" % (i + 1)) for i in range(len(neck_chain))]

@ -156,7 +156,7 @@ def main(obj, bone_definition, base_names, options):
driver_fcurves = pinky_pbone.driver_add("rotation_euler")
controller_path = control_pbone.path_to_id()
controller_path = control_pbone.path_from_id()
# add custom prop
control_pbone["spread"] = 0.0
@ -248,7 +248,7 @@ def main(obj, bone_definition, base_names, options):
# NOTE: the direction of the Z rotation depends on which side the palm is on.
# we could do a simple side-of-x test but better to work out the direction
# the hand is facing.
from Mathutils import Vector
from mathutils import Vector
from math import degrees
child_pbone_01 = obj.pose.bones[children[0]].bone
child_pbone_02 = obj.pose.bones[children[1]].bone

@ -147,7 +147,7 @@ def deform(obj, definitions, base_names, options):
def main(obj, bone_definition, base_names, options):
from Mathutils import Vector, RotationMatrix
from mathutils import Vector, RotationMatrix
from math import radians, pi
arm = obj.data
@ -301,7 +301,7 @@ def main(obj, bone_definition, base_names, options):
var.name = "var"
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = ex.ribcage_copy_p.path_to_id() + '["hinge"]'
var.targets[0].data_path = ex.ribcage_copy_p.path_from_id() + '["hinge"]'
mod = fcurve.modifiers[0]
mod.poly_order = 1
@ -347,7 +347,7 @@ def main(obj, bone_definition, base_names, options):
# Constrain 'inbetween' bones
target_names = [("b%.2d" % (i + 1)) for i in range(spine_chain_len - 1)]
rib_driver_path = ex.ribcage_copy_p.path_to_id()
rib_driver_path = ex.ribcage_copy_p.path_from_id()
ex.ribcage_copy_p["bend_tot"] = 0.0
fcurve = ex.ribcage_copy_p.driver_add('["bend_tot"]', 0)

@ -22,7 +22,7 @@ import bpy
from rigify import RigifyError
from rigify_utils import bone_class_instance, copy_bone_simple
from rna_prop_ui import rna_idprop_ui_prop_get
from Mathutils import Vector, RotationMatrix
from mathutils import Vector, RotationMatrix
from math import radians, pi
# not used, defined for completeness
@ -133,7 +133,7 @@ def main(obj, bone_definitions, base_names, options):
con_h.subtarget = hinge1
# Add drivers
bone_path = pb[bones[0]].path_to_id()
bone_path = pb[bones[0]].path_from_id()
driver_fcurve = con_f.driver_add("influence", 0)
driver = driver_fcurve.driver

@ -0,0 +1,361 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import bpy
from rigify import RigifyError
from rigify_utils import bone_class_instance, copy_bone_simple
from rna_prop_ui import rna_idprop_ui_prop_get
# not used, defined for completeness
METARIG_NAMES = ("body", "head")
def metarig_template():
# TODO:
## generated by rigify.write_meta_rig
#bpy.ops.object.mode_set(mode='EDIT')
#obj = bpy.context.active_object
#arm = obj.data
#bone = arm.edit_bones.new('body')
#bone.head[:] = 0.0000, -0.0276, -0.1328
#bone.tail[:] = 0.0000, -0.0170, -0.0197
#bone.roll = 0.0000
#bone.connected = False
#bone = arm.edit_bones.new('head')
#bone.head[:] = 0.0000, -0.0170, -0.0197
#bone.tail[:] = 0.0000, 0.0726, 0.1354
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['body']
#bone = arm.edit_bones.new('neck.01')
#bone.head[:] = 0.0000, -0.0170, -0.0197
#bone.tail[:] = 0.0000, -0.0099, 0.0146
#bone.roll = 0.0000
#bone.connected = False
#bone.parent = arm.edit_bones['head']
#bone = arm.edit_bones.new('neck.02')
#bone.head[:] = 0.0000, -0.0099, 0.0146
#bone.tail[:] = 0.0000, -0.0242, 0.0514
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['neck.01']
#bone = arm.edit_bones.new('neck.03')
#bone.head[:] = 0.0000, -0.0242, 0.0514
#bone.tail[:] = 0.0000, -0.0417, 0.0868
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['neck.02']
#bone = arm.edit_bones.new('neck.04')
#bone.head[:] = 0.0000, -0.0417, 0.0868
#bone.tail[:] = 0.0000, -0.0509, 0.1190
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['neck.03']
#bone = arm.edit_bones.new('neck.05')
#bone.head[:] = 0.0000, -0.0509, 0.1190
#bone.tail[:] = 0.0000, -0.0537, 0.1600
#bone.roll = 0.0000
#bone.connected = True
#bone.parent = arm.edit_bones['neck.04']
#
#bpy.ops.object.mode_set(mode='OBJECT')
#pbone = obj.pose.bones['head']
#pbone['type'] = 'neck_flex'
pass
def metarig_definition(obj, orig_bone_name):
'''
The bone given is the tongue control, its parent is the body,
# its only child the first of a chain with matching basenames.
eg.
body -> tongue_control -> tongue_01 -> tongue_02 -> tongue_03.... etc
'''
arm = obj.data
tongue = arm.bones[orig_bone_name]
body = tongue.parent
children = tongue.children
if len(children) != 1:
raise RigifyError("expected the tongue bone '%s' to have only 1 child." % orig_bone_name)
child = children[0]
bone_definition = [body.name, tongue.name, child.name]
bone_definition.extend([child.name for child in child.children_recursive_basename])
return bone_definition
def deform(obj, definitions, base_names, options):
for org_bone_name in definitions[2:]:
bpy.ops.object.mode_set(mode='EDIT')
# Create deform bone.
bone = copy_bone_simple(obj.data, org_bone_name, "DEF-%s" % base_names[org_bone_name], parent=True)
# Store name before leaving edit mode
bone_name = bone.name
# Leave edit mode
bpy.ops.object.mode_set(mode='OBJECT')
# Get the pose bone
bone = obj.pose.bones[bone_name]
# Constrain to the original bone
# XXX. Todo, is this needed if the bone is connected to its parent?
con = bone.constraints.new('COPY_TRANSFORMS')
con.name = "copy_loc"
con.target = obj
con.subtarget = org_bone_name
# TODO: rename all of the head/neck references to tongue
def main(obj, bone_definition, base_names, options):
from mathutils import Vector
arm = obj.data
# Initialize container classes for convenience
mt = bone_class_instance(obj, ["body", "head"]) # meta
mt.body = bone_definition[0]
mt.head = bone_definition[1]
mt.update()
neck_chain = bone_definition[2:]
mt_chain = bone_class_instance(obj, [("neck_%.2d" % (i + 1)) for i in range(len(neck_chain))]) # 99 bones enough eh?
for i, attr in enumerate(mt_chain.attr_names):
setattr(mt_chain, attr, neck_chain[i])
mt_chain.update()
neck_chain_basename = base_names[mt_chain.neck_01_e.name].split(".")[0]
neck_chain_segment_length = mt_chain.neck_01_e.length
ex = bone_class_instance(obj, ["head", "head_hinge", "neck_socket", "head_ctrl"]) # hinge & extras
# Add the head hinge at the bodys location, becomes the parent of the original head
# apply everything to this copy of the chain
ex_chain = mt_chain.copy(base_names=base_names)
ex_chain.neck_01_e.parent = mt_chain.neck_01_e.parent
# Copy the head bone and offset
ex.head_e = copy_bone_simple(arm, mt.head, "MCH-%s" % base_names[mt.head], parent=True)
ex.head_e.connected = False
ex.head = ex.head_e.name
# offset
head_length = ex.head_e.length
ex.head_e.head.y += head_length / 2.0
ex.head_e.tail.y += head_length / 2.0
# Yes, use the body bone but call it a head hinge
ex.head_hinge_e = copy_bone_simple(arm, mt.body, "MCH-%s_hinge" % base_names[mt.head], parent=False)
ex.head_hinge_e.connected = False
ex.head_hinge = ex.head_hinge_e.name
ex.head_hinge_e.head.y += head_length / 4.0
ex.head_hinge_e.tail.y += head_length / 4.0
# Insert the neck socket, the head copys this loation
ex.neck_socket_e = arm.edit_bones.new("MCH-%s_socked" % neck_chain_basename)
ex.neck_socket = ex.neck_socket_e.name
ex.neck_socket_e.connected = False
ex.neck_socket_e.parent = mt.body_e
ex.neck_socket_e.head = mt.head_e.head
ex.neck_socket_e.tail = mt.head_e.head - Vector(0.0, neck_chain_segment_length / 2.0, 0.0)
ex.neck_socket_e.roll = 0.0
# copy of the head for controling
ex.head_ctrl_e = copy_bone_simple(arm, mt.head, base_names[mt.head])
ex.head_ctrl = ex.head_ctrl_e.name
ex.head_ctrl_e.parent = ex.head_hinge_e
for i, attr in enumerate(ex_chain.attr_names):
neck_e = getattr(ex_chain, attr + "_e")
# dont store parent names, re-reference as each chain bones parent.
neck_e_parent = arm.edit_bones.new("MCH-rot_%s" % base_names[getattr(mt_chain, attr)])
neck_e_parent.head = neck_e.head
neck_e_parent.tail = neck_e.head + (mt.head_e.vector.normalize() * neck_chain_segment_length / 2.0)
neck_e_parent.roll = mt.head_e.roll
orig_parent = neck_e.parent
neck_e.connected = False
neck_e.parent = neck_e_parent
neck_e_parent.connected = False
if i == 0:
neck_e_parent.parent = mt.body_e
else:
neck_e_parent.parent = orig_parent
deform(obj, bone_definition, base_names, options)
bpy.ops.object.mode_set(mode='OBJECT')
mt.update()
mt_chain.update()
ex_chain.update()
ex.update()
# Axis locks
ex.head_ctrl_p.lock_location = True, True, True
ex.head_ctrl_p.lock_scale = True, False, True
# Simple one off constraints, no drivers
con = ex.head_ctrl_p.constraints.new('COPY_LOCATION')
con.target = obj
con.subtarget = ex.neck_socket
con = ex.head_p.constraints.new('COPY_ROTATION')
con.target = obj
con.subtarget = ex.head_ctrl
# driven hinge
prop = rna_idprop_ui_prop_get(ex.head_ctrl_p, "hinge", create=True)
ex.head_ctrl_p["hinge"] = 0.0
prop["soft_min"] = 0.0
prop["soft_max"] = 1.0
con = ex.head_hinge_p.constraints.new('COPY_ROTATION')
con.name = "hinge"
con.target = obj
con.subtarget = mt.body
# add driver
hinge_driver_path = ex.head_ctrl_p.path_to_id() + '["hinge"]'
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver
var = driver.variables.new()
driver.type = 'AVERAGE'
var.name = "var"
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = hinge_driver_path
#mod = fcurve_driver.modifiers.new('GENERATOR')
mod = fcurve.modifiers[0]
mod.poly_order = 1
mod.coefficients[0] = 1.0
mod.coefficients[1] = -1.0
head_driver_path = ex.head_ctrl_p.path_to_id()
target_names = [("b%.2d" % (i + 1)) for i in range(len(neck_chain))]
ex.head_ctrl_p["bend_tot"] = 0.0
fcurve = ex.head_ctrl_p.driver_add('["bend_tot"]', 0)
driver = fcurve.driver
driver.type = 'SUM'
fcurve.modifiers.remove(0) # grr dont need a modifier
for i in range(len(neck_chain)):
var = driver.variables.new()
var.name = target_names[i]
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = head_driver_path + ('["bend_%.2d"]' % (i + 1))
for i, attr in enumerate(ex_chain.attr_names):
neck_p = getattr(ex_chain, attr + "_p")
neck_p.lock_location = True, True, True
neck_p.lock_location = True, True, True
neck_p.lock_rotations_4d = True
# Add bend prop
prop_name = "bend_%.2d" % (i + 1)
prop = rna_idprop_ui_prop_get(ex.head_ctrl_p, prop_name, create=True)
ex.head_ctrl_p[prop_name] = 1.0
prop["soft_min"] = 0.0
prop["soft_max"] = 1.0
# add parent constraint
neck_p_parent = neck_p.parent
# add constraints
if i == 0:
con = neck_p.constraints.new('COPY_SCALE')
con.name = "Copy Scale"
con.target = obj
con.subtarget = ex.head_ctrl
con.owner_space = 'LOCAL'
con.target_space = 'LOCAL'
con = neck_p_parent.constraints.new('COPY_ROTATION')
con.name = "Copy Rotation"
con.target = obj
con.subtarget = ex.head
con.owner_space = 'LOCAL'
con.target_space = 'LOCAL'
fcurve = con.driver_add("influence", 0)
driver = fcurve.driver
driver.type = 'SCRIPTED'
driver.expression = "bend/bend_tot"
fcurve.modifiers.remove(0) # grr dont need a modifier
# add target
var = driver.variables.new()
var.name = "bend_tot"
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = head_driver_path + ('["bend_tot"]')
var = driver.variables.new()
var.name = "bend"
var.targets[0].id_type = 'OBJECT'
var.targets[0].id = obj
var.targets[0].data_path = head_driver_path + ('["%s"]' % prop_name)
# finally constrain the original bone to this one
orig_neck_p = getattr(mt_chain, attr + "_p")
con = orig_neck_p.constraints.new('COPY_TRANSFORMS')
con.target = obj
con.subtarget = neck_p.name
# Set the head control's custom shape to use the last
# org neck bone for its transform
ex.head_ctrl_p.custom_shape_transform = obj.pose.bones[bone_definition[len(bone_definition)-1]]
# last step setup layers
if "ex_layer" in options:
layer = [n==options["ex_layer"] for n in range(0,32)]
else:
layer = list(arm.bones[bone_definition[1]].layer)
for attr in ex_chain.attr_names:
getattr(ex_chain, attr + "_b").layer = layer
for attr in ex.attr_names:
getattr(ex, attr + "_b").layer = layer
layer = list(arm.bones[bone_definition[1]].layer)
ex.head_ctrl_b.layer = layer
# no blending the result of this
return None

@ -26,7 +26,7 @@
# that a generic function would need to check for.
import bpy
from Mathutils import Vector
from mathutils import Vector
from rna_prop_ui import rna_idprop_ui_prop_get
DELIMITER = '-._'
@ -136,7 +136,7 @@ def blend_bone_list(obj, apply_bones, from_bones, to_bones, target_bone=None, ta
prop["soft_min"] = 0.0
prop["soft_max"] = 1.0
driver_path = prop_pbone.path_to_id() + ('["%s"]' % target_prop)
driver_path = prop_pbone.path_from_id() + ('["%s"]' % target_prop)
def blend_target(driver):
var = driver.variables.new()

@ -25,6 +25,44 @@ import bpy
# use to strip python paths
script_paths = bpy.utils.script_paths()
_FAKE_STRUCT_SUBCLASS = True
def _get_direct_attr(rna_type, attr):
props = getattr(rna_type, attr)
base = rna_type.base
if not base:
return [prop for prop in props]
else:
props_base = getattr(base, attr).values()
return [prop for prop in props if prop not in props_base]
def get_direct_properties(rna_type):
return _get_direct_attr(rna_type, "properties")
def get_direct_functions(rna_type):
return _get_direct_attr(rna_type, "functions")
def rna_id_ignore(rna_id):
if rna_id == "rna_type":
return True
if "_OT_" in rna_id:
return True
if "_MT_" in rna_id:
return True
if "_PT_" in rna_id:
return True
if "_HT_" in rna_id:
return True
if "_KSI_" in rna_id:
return True
return False
def range_str(val):
if val < -10000000:
@ -67,8 +105,8 @@ class InfoStructRNA:
def build(self):
rna_type = self.bl_rna
parent_id = self.identifier
self.properties[:] = [GetInfoPropertyRNA(rna_prop, parent_id) for rna_id, rna_prop in rna_type.properties.items() if rna_id != "rna_type"]
self.functions[:] = [GetInfoFunctionRNA(rna_prop, parent_id) for rna_prop in rna_type.functions.values()]
self.properties[:] = [GetInfoPropertyRNA(rna_prop, parent_id) for rna_prop in get_direct_properties(rna_type) if rna_prop.identifier != "rna_type"]
self.functions[:] = [GetInfoFunctionRNA(rna_prop, parent_id) for rna_prop in get_direct_functions(rna_type)]
def get_bases(self):
bases = []
@ -116,17 +154,17 @@ class InfoStructRNA:
def __repr__(self):
txt = ''
txt = ""
txt += self.identifier
if self.base:
txt += '(%s)' % self.base.identifier
txt += ': ' + self.description + '\n'
txt += "(%s)" % self.base.identifier
txt += ": " + self.description + "\n"
for prop in self.properties:
txt += prop.__repr__() + '\n'
txt += prop.__repr__() + "\n"
for func in self.functions:
txt += func.__repr__() + '\n'
txt += func.__repr__() + "\n"
return txt
@ -366,21 +404,7 @@ def BuildRNAInfo():
rna_full_path_dict = {} # store the result of full_rna_struct_path(rna_struct)
rna_children_dict = {} # store all rna_structs nested from here
rna_references_dict = {} # store a list of rna path strings that reference this type
rna_functions_dict = {} # store all functions directly in this type (not inherited)
def rna_id_ignore(rna_id):
if rna_id == "rna_type":
return True
if "_OT_" in rna_id:
return True
if "_MT_" in rna_id:
return True
if "_PT_" in rna_id:
return True
if "_HT_" in rna_id:
return True
return False
# rna_functions_dict = {} # store all functions directly in this type (not inherited)
def full_rna_struct_path(rna_struct):
'''
@ -426,7 +450,8 @@ def BuildRNAInfo():
rna_full_path_dict[identifier] = full_rna_struct_path(rna_struct)
# Store a list of functions, remove inherited later
rna_functions_dict[identifier] = list(rna_struct.functions)
# NOT USED YET
## rna_functions_dict[identifier] = get_direct_functions(rna_struct)
# fill in these later
@ -438,12 +463,6 @@ def BuildRNAInfo():
print("Ignoring", rna_type_name)
# Sucks but we need to copy this so we can check original parent functions
rna_functions_dict__copy = {}
for key, val in rna_functions_dict.items():
rna_functions_dict__copy[key] = val[:]
structs.sort() # not needed but speeds up sort below, setting items without an inheritance first
# Arrange so classes are always defined in the correct order
@ -478,41 +497,27 @@ def BuildRNAInfo():
# precalc vars to avoid a lot of looping
for (rna_base, identifier, rna_struct) in structs:
if rna_base:
rna_base_prop_keys = rna_struct_dict[rna_base].properties.keys() # could cache
rna_base_func_keys = [f.identifier for f in rna_struct_dict[rna_base].functions]
else:
rna_base_prop_keys = []
rna_base_func_keys = []
# rna_struct_path = full_rna_struct_path(rna_struct)
rna_struct_path = rna_full_path_dict[identifier]
for rna_prop_identifier, rna_prop in rna_struct.properties.items():
for rna_prop in get_direct_properties(rna_struct):
rna_prop_identifier = rna_prop.identifier
if rna_prop_identifier == 'RNA' or \
rna_id_ignore(rna_prop_identifier) or \
rna_prop_identifier in rna_base_prop_keys:
if rna_prop_identifier == 'RNA' or rna_id_ignore(rna_prop_identifier):
continue
for rna_prop_ptr in (getattr(rna_prop, "fixed_type", None), getattr(rna_prop, "srna", None)):
# Does this property point to me?
if rna_prop_ptr:
rna_references_dict[rna_prop_ptr.identifier].append("%s.%s" % (rna_struct_path, rna_prop_identifier))
for rna_func in rna_struct.functions:
for rna_func in get_direct_functions(rna_struct):
for rna_prop_identifier, rna_prop in rna_func.parameters.items():
if rna_prop_identifier == 'RNA' or \
rna_id_ignore(rna_prop_identifier) or \
rna_prop_identifier in rna_base_func_keys:
if rna_prop_identifier == 'RNA' or rna_id_ignore(rna_prop_identifier):
continue
try:
rna_prop_ptr = rna_prop.fixed_type
except AttributeError:
rna_prop_ptr = None
rna_prop_ptr = getattr(rna_prop, "fixed_type", None)
# Does this property point to me?
if rna_prop_ptr:
@ -525,16 +530,6 @@ def BuildRNAInfo():
rna_children_dict[nested.identifier].append(rna_struct)
if rna_base:
rna_funcs = rna_functions_dict[identifier]
if rna_funcs:
# Remove inherited functions if we have any
rna_base_funcs = rna_functions_dict__copy[rna_base]
rna_funcs[:] = [f for f in rna_funcs if f not in rna_base_funcs]
rna_functions_dict__copy.clear()
del rna_functions_dict__copy
# Sort the refs, just reads nicer
for rna_refs in rna_references_dict.values():
rna_refs.sort()

@ -18,7 +18,7 @@
# <pep8-80 compliant>
import bpy
import Mathutils
import mathutils
from math import cos, sin, pi
# could this be stored elsewhere?

@ -18,13 +18,13 @@
# <pep8 compliant>
import bpy
import Mathutils
import mathutils
from math import cos, sin, pi
def add_torus(major_rad, minor_rad, major_seg, minor_seg):
Vector = Mathutils.Vector
Quaternion = Mathutils.Quaternion
Vector = mathutils.Vector
Quaternion = mathutils.Quaternion
PI_2 = pi * 2
z_axis = (0, 0, 1)

@ -190,7 +190,7 @@ def banner(context):
add_scrollback("Execute: Enter", 'OUTPUT')
add_scrollback("Autocomplete: Ctrl+Space", 'OUTPUT')
add_scrollback("Ctrl +/- Wheel: Zoom", 'OUTPUT')
add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, Mathutils, Geometry", 'OUTPUT')
add_scrollback("Builtin Modules: bpy, bpy.data, bpy.ops, bpy.props, bpy.types, bpy.context, bgl, blf, mathutils, Geometry", 'OUTPUT')
add_scrollback("", 'OUTPUT')
add_scrollback(" WARNING!!! Blender 2.5 API is subject to change, see API reference for more info.", 'ERROR')
add_scrollback("", 'OUTPUT')

@ -1,6 +1,6 @@
from math import *
import bpy
from Mathutils import *
from mathutils import *
def main(context):
def cleanupEulCurve(fcv):

@ -50,6 +50,8 @@ class EditExternally(bpy.types.Operator):
# and will include a trailing backslash, so we strip it.
image_editor.rstrip('\\')
image_editor = ["open", "-a", image_editor]
else:
image_editor = [image_editor]
return image_editor
@ -133,8 +135,10 @@ class ProjectEdit(bpy.types.Operator):
filename = os.path.splitext(filename)[0]
# filename = bpy.utils.clean_name(filename) # fixes <memory> rubbish, needs checking
if filename.startswith("."): # TODO, have a way to check if the file is saved, assuem .B25.blend
filename = os.path.join(os.path.dirname(bpy.data.filename), filename)
if filename.startswith(".") or filename == "":
# TODO, have a way to check if the file is saved, assume .B25.blend
tmpdir = context.user_preferences.filepaths.temporary_directory
filename = os.path.join(tmpdir, "project_edit")
else:
filename = "//" + filename

@ -76,7 +76,7 @@ class MeshMirrorUV(bpy.types.Operator):
def execute(self, context):
DIR = 1 # TODO, make an option
from Mathutils import Vector
from mathutils import Vector
ob = context.active_object
is_editmode = (ob.mode == 'EDIT')

@ -22,7 +22,7 @@ import bpy
def pose_info():
from Mathutils import Matrix
from mathutils import Matrix
info = {}
@ -109,34 +109,19 @@ def bake(frame_start, frame_end, step=1, only_selected=False):
#pbone.location = matrix.translation_part()
#pbone.rotation_quaternion = matrix.to_quat()
pbone.matrix_local = [f for v in matrix for f in v]
pbone.keyframe_insert("location", -1, f)
pbone.keyframe_insert("location", -1, f, name)
rotation_mode = pbone.rotation_mode
if rotation_mode == 'QUATERNION':
pbone.keyframe_insert("rotation_quaternion", -1, f)
pbone.keyframe_insert("rotation_quaternion", -1, f, name)
elif rotation_mode == 'AXIS_ANGLE':
pbone.keyframe_insert("rotation_axis_angle", -1, f)
pbone.keyframe_insert("rotation_axis_angle", -1, f, name)
else: # euler, XYZ, ZXY etc
pbone.keyframe_insert("rotation_euler", -1, f)
pbone.keyframe_insert("rotation_euler", -1, f, name)
pbone.keyframe_insert("scale", -1, f)
# assign groups, could become a more generic function
agrp_loc = action.groups.add("Location")
agrp_rot = action.groups.add("Rotation")
agrp_sca = action.groups.add("Scale")
for fcu in action.fcurves:
path = fcu.data_path.rsplit(".", 1)[-1]
if path.startswith("loc"):
fcu.group = agrp_loc
if path.startswith("rot"):
fcu.group = agrp_rot
if path.startswith("sca"):
fcu.group = agrp_sca
pbone.keyframe_insert("scale", -1, f, name)
return action

@ -235,8 +235,8 @@ class ShapeTransfer(bpy.types.Operator):
ob.active_shape_key_index = len(me.shape_keys.keys) - 1
ob.shape_key_lock = True
from Geometry import BarycentricTransform
from Mathutils import Vector
from geometry import BarycentricTransform
from mathutils import Vector
if use_clamp and mode == 'OFFSET':
use_clamp = False
@ -452,7 +452,7 @@ class MakeDupliFace(bpy.types.Operator):
return (obj and obj.type == 'MESH')
def _main(self, context):
from Mathutils import Vector
from mathutils import Vector
from math import sqrt
SCALE_FAC = 0.01

@ -19,15 +19,15 @@
# <pep8 compliant>
import bpy
from Mathutils import Vector
from mathutils import Vector
def align_objects(align_x, align_y, align_z, align_mode, relative_to):
cursor = bpy.context.scene.cursor_location
Left_Up_Front_SEL = [[],[],[]]
Right_Down_Back_SEL = [[],[],[]]
Left_Up_Front_SEL = [[], [], []]
Right_Down_Back_SEL = [[], [], []]
flag_first = True
@ -43,13 +43,13 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
if obj == bpy.context.active_object:
center_active_x = ( Left_Up_Front[0] + Right_Down_Back[0] ) / 2
center_active_y = ( Left_Up_Front[1] + Right_Down_Back[1] ) / 2
center_active_z = ( Left_Up_Front[2] + Right_Down_Back[2] ) / 2
center_active_x = (Left_Up_Front[0] + Right_Down_Back[0]) / 2
center_active_y = (Left_Up_Front[1] + Right_Down_Back[1]) / 2
center_active_z = (Left_Up_Front[2] + Right_Down_Back[2]) / 2
size_active_x = ( Right_Down_Back[0] - Left_Up_Front[0] ) / 2
size_active_y = ( Right_Down_Back[1] - Left_Up_Front[1] ) / 2
size_active_z = ( Left_Up_Front[2] - Right_Down_Back[2] ) / 2
size_active_x = (Right_Down_Back[0] - Left_Up_Front[0]) / 2
size_active_y = (Right_Down_Back[1] - Left_Up_Front[1]) / 2
size_active_z = (Left_Up_Front[2] - Right_Down_Back[2]) / 2
# Selection Center
@ -85,9 +85,9 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
if Right_Down_Back[2] < Right_Down_Back_SEL[2]:
Right_Down_Back_SEL[2] = Right_Down_Back[2]
center_sel_x = ( Left_Up_Front_SEL[0] + Right_Down_Back_SEL[0] ) / 2
center_sel_y = ( Left_Up_Front_SEL[1] + Right_Down_Back_SEL[1] ) / 2
center_sel_z = ( Left_Up_Front_SEL[2] + Right_Down_Back_SEL[2] ) / 2
center_sel_x = (Left_Up_Front_SEL[0] + Right_Down_Back_SEL[0]) / 2
center_sel_y = (Left_Up_Front_SEL[1] + Right_Down_Back_SEL[1]) / 2
center_sel_z = (Left_Up_Front_SEL[2] + Right_Down_Back_SEL[2]) / 2
# Main Loop
@ -100,9 +100,9 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
Left_Up_Front = bb_world[1]
Right_Down_Back = bb_world[7]
center_x = ( Left_Up_Front[0] + Right_Down_Back[0] ) / 2
center_y = ( Left_Up_Front[1] + Right_Down_Back[1] ) / 2
center_z = ( Left_Up_Front[2] + Right_Down_Back[2] ) / 2
center_x = (Left_Up_Front[0] + Right_Down_Back[0]) / 2
center_y = (Left_Up_Front[1] + Right_Down_Back[1]) / 2
center_z = (Left_Up_Front[2] + Right_Down_Back[2]) / 2
positive_x = Right_Down_Back[0]
positive_y = Right_Down_Back[1]
@ -240,8 +240,7 @@ class AlignObjects(bpy.types.Operator):
align_mode = bpy.props.EnumProperty(items=(
('OPT_1', "Negative Sides", ""),
('OPT_2', "Centers", ""),
('OPT_3', "Positive Sides", "")
),
('OPT_3', "Positive Sides", "")),
name="Align Mode:",
description="",
default='OPT_2')
@ -250,8 +249,7 @@ class AlignObjects(bpy.types.Operator):
('OPT_1', "Scene Origin", ""),
('OPT_2', "3D Cursor", ""),
('OPT_3', "Selection", ""),
('OPT_4', "Active", "")
),
('OPT_4', "Active", "")),
name="Relative To:",
description="",
default='OPT_4')

@ -25,12 +25,12 @@ def randomize_selected(seed, loc, rot, scale, scale_even, scale_min):
import random
from random import uniform
from Mathutils import Vector
from mathutils import Vector
random.seed(seed)
def rand_vec(vec_range):
return Vector([uniform(- val, val) for val in vec_range])
return Vector([uniform(-val, val) for val in vec_range])
for obj in bpy.context.selected_objects:

@ -46,7 +46,13 @@ 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
file_preset = open(os.path.join(target_path, filename), 'w')
path = os.path.join(target_path, filename)
if getattr(self, "save_keyconfig", True):
bpy.ops.wm.keyconfig_export(path=path, kc_name=self.properties.name)
file_preset = open(path, 'a')
file_preset.write("wm.active_keyconfig = kc\n\n")
else:
file_preset = open(path, 'w')
for rna_path in self.preset_values:
value = eval(rna_path)
@ -68,6 +74,25 @@ class AddPresetBase(bpy.types.Operator):
return {'RUNNING_MODAL'}
class ExecutePreset(bpy.types.Operator):
''' Executes a preset '''
bl_idname = "script.execute_preset"
bl_label = "Execute a Python Preset"
path = bpy.props.StringProperty(name="Path", description="Path of the Python file to execute", maxlen=512, default="")
preset_name = bpy.props.StringProperty(name="Preset Name", description="Name of the Preset being executed", default="")
menu_idname = bpy.props.StringProperty(name="Menu ID Name", description="ID name of the menu this was called from", default="")
def execute(self, context):
# change the menu title to the most recently chosen option
preset_class = getattr(bpy.types, self.properties.menu_idname)
preset_class.bl_label = self.properties.preset_name
# execute the preset using script.python_file_run
bpy.ops.script.python_file_run(path=self.properties.path)
return {'FINISHED'}
class AddPresetRender(AddPresetBase):
'''Add a Render Preset'''
bl_idname = "render.preset_add"
@ -158,11 +183,32 @@ class AddPresetSunSky(AddPresetBase):
preset_subdir = "sunsky"
class AddPresetInteraction(AddPresetBase):
'''Add an Application Interaction Preset'''
bl_idname = "wm.interaction_preset_add"
bl_label = "Add Interaction Preset"
name = AddPresetBase.name
save_keyconfig = True
preset_values = [
"bpy.context.user_preferences.edit.drag_immediately",
"bpy.context.user_preferences.edit.insertkey_xyz_to_rgb",
"bpy.context.user_preferences.inputs.select_mouse",
"bpy.context.user_preferences.inputs.zoom_style",
"bpy.context.user_preferences.inputs.zoom_axis",
"bpy.context.user_preferences.inputs.view_rotation",
"bpy.context.user_preferences.inputs.invert_zoom_direction",
]
preset_subdir = "interaction"
classes = [
ExecutePreset,
AddPresetRender,
AddPresetSSS,
AddPresetCloth,
AddPresetSunSky]
AddPresetSunSky,
AddPresetInteraction]
def register():

@ -22,10 +22,9 @@
# <pep8 compliant>
#from Blender import Object, Draw, Window, sys, Mesh, Geometry
from Mathutils import Matrix, Vector, RotationMatrix
from mathutils import Matrix, Vector, RotationMatrix
import time
import Geometry
import geometry
import bpy
from math import cos, radians
@ -227,7 +226,7 @@ def islandIntersectUvIsland(source, target, SourceOffset):
# Edge intersect test
for ed in edgeLoopsSource:
for seg in edgeLoopsTarget:
i = Geometry.LineIntersect2D(\
i = geometry.LineIntersect2D(\
seg[0], seg[1], SourceOffset+ed[0], SourceOffset+ed[1])
if i:
return 1 # LINE INTERSECTION
@ -741,7 +740,7 @@ def packIslands(islandList):
#XXX Window.DrawProgressBar(0.7, 'Packing %i UV Islands...' % len(packBoxes) )
time1 = time.time()
packWidth, packHeight = Geometry.BoxPack2D(packBoxes)
packWidth, packHeight = geometry.BoxPack2D(packBoxes)
# print 'Box Packing Time:', time.time() - time1
@ -1056,7 +1055,7 @@ def main(context, island_margin, projection_limit):
for f in faceProjectionGroupList[i]:
f_uv = f.uv
for j, v in enumerate(f.v):
# XXX - note, between Mathutils in 2.4 and 2.5 the order changed.
# XXX - note, between mathutils in 2.4 and 2.5 the order changed.
f_uv[j][:] = (v.co * MatProj)[:2]

@ -34,7 +34,7 @@ import bpy
import math
import time
from Mathutils import Vector
from mathutils import Vector
from bpy.props import *

@ -0,0 +1,16 @@
# Configuration Blender
import bpy
wm = bpy.context.manager
wm.active_keyconfig = wm.keyconfigs['Blender']
bpy.context.user_preferences.view.auto_depth = False
bpy.context.user_preferences.view.zoom_to_mouse = False
bpy.context.user_preferences.view.rotate_around_selection = False
bpy.context.user_preferences.edit.drag_immediately = False
bpy.context.user_preferences.edit.insertkey_xyz_to_rgb = False
bpy.context.user_preferences.inputs.select_mouse = 'RIGHT'
bpy.context.user_preferences.inputs.zoom_style = 'DOLLY'
bpy.context.user_preferences.inputs.zoom_axis = 'VERTICAL'
bpy.context.user_preferences.inputs.view_rotation = 'TRACKBALL'
bpy.context.user_preferences.inputs.invert_zoom_direction = False

@ -0,0 +1,382 @@
# Configuration Maya
import bpy
wm = bpy.context.manager
kc = wm.add_keyconfig('Maya')
# Map 3D View
km = kc.add_keymap('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
kmi = km.items.add('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
kmi.properties.release_confirm = True
kmi = km.items.add('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')
kmi = km.items.add('view3d.rotate', 'LEFTMOUSE', 'PRESS', alt=True)
kmi = km.items.add('view3d.move', 'MIDDLEMOUSE', 'PRESS', alt=True)
kmi = km.items.add('view3d.zoom', 'RIGHTMOUSE', 'PRESS', alt=True)
kmi = km.items.add('view3d.view_selected', 'NUMPAD_PERIOD', 'PRESS')
kmi = km.items.add('view3d.view_center_cursor', 'NUMPAD_PERIOD', 'PRESS', ctrl=True)
kmi = km.items.add('view3d.fly', 'F', 'PRESS', shift=True)
kmi = km.items.add('view3d.smoothview', 'TIMER1', 'ANY', any=True)
kmi = km.items.add('view3d.rotate', 'TRACKPADPAN', 'ANY', alt=True)
kmi = km.items.add('view3d.rotate', 'MOUSEROTATE', 'ANY')
kmi = km.items.add('view3d.move', 'TRACKPADPAN', 'ANY')
kmi = km.items.add('view3d.zoom', 'TRACKPADZOOM', 'ANY')
kmi = km.items.add('view3d.zoom', 'NUMPAD_PLUS', 'PRESS')
kmi.properties.delta = 1
kmi = km.items.add('view3d.zoom', 'NUMPAD_MINUS', 'PRESS')
kmi.properties.delta = -1
kmi = km.items.add('view3d.zoom', 'EQUAL', 'PRESS', ctrl=True)
kmi.properties.delta = 1
kmi = km.items.add('view3d.zoom', 'MINUS', 'PRESS', ctrl=True)
kmi.properties.delta = -1
kmi = km.items.add('view3d.zoom', 'WHEELINMOUSE', 'PRESS')
kmi.properties.delta = 1
kmi = km.items.add('view3d.zoom', 'WHEELOUTMOUSE', 'PRESS')
kmi.properties.delta = -1
kmi = km.items.add('view3d.view_all', 'HOME', 'PRESS')
kmi.properties.center = False
kmi = km.items.add('view3d.view_all', 'C', 'PRESS', shift=True)
kmi.properties.center = True
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_0', 'PRESS')
kmi.properties.type = 'CAMERA'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_1', 'PRESS')
kmi.properties.type = 'FRONT'
kmi = km.items.add('view3d.view_orbit', 'NUMPAD_2', 'PRESS')
kmi.properties.type = 'ORBITDOWN'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_3', 'PRESS')
kmi.properties.type = 'RIGHT'
kmi = km.items.add('view3d.view_orbit', 'NUMPAD_4', 'PRESS')
kmi.properties.type = 'ORBITLEFT'
kmi = km.items.add('view3d.view_persportho', 'NUMPAD_5', 'PRESS')
kmi = km.items.add('view3d.view_orbit', 'NUMPAD_6', 'PRESS')
kmi.properties.type = 'ORBITRIGHT'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_7', 'PRESS')
kmi.properties.type = 'TOP'
kmi = km.items.add('view3d.view_orbit', 'NUMPAD_8', 'PRESS')
kmi.properties.type = 'ORBITUP'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', ctrl=True)
kmi.properties.type = 'BACK'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_3', 'PRESS', ctrl=True)
kmi.properties.type = 'LEFT'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_7', 'PRESS', ctrl=True)
kmi.properties.type = 'BOTTOM'
kmi = km.items.add('view3d.view_pan', 'NUMPAD_2', 'PRESS', ctrl=True)
kmi.properties.type = 'PANDOWN'
kmi = km.items.add('view3d.view_pan', 'NUMPAD_4', 'PRESS', ctrl=True)
kmi.properties.type = 'PANLEFT'
kmi = km.items.add('view3d.view_pan', 'NUMPAD_6', 'PRESS', ctrl=True)
kmi.properties.type = 'PANRIGHT'
kmi = km.items.add('view3d.view_pan', 'NUMPAD_8', 'PRESS', ctrl=True)
kmi.properties.type = 'PANUP'
kmi = km.items.add('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', ctrl=True)
kmi.properties.type = 'PANRIGHT'
kmi = km.items.add('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True)
kmi.properties.type = 'PANLEFT'
kmi = km.items.add('view3d.view_pan', 'WHEELUPMOUSE', 'PRESS', shift=True)
kmi.properties.type = 'PANUP'
kmi = km.items.add('view3d.view_pan', 'WHEELDOWNMOUSE', 'PRESS', shift=True)
kmi.properties.type = 'PANDOWN'
kmi = km.items.add('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', ctrl=True, alt=True)
kmi.properties.type = 'ORBITLEFT'
kmi = km.items.add('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', ctrl=True, alt=True)
kmi.properties.type = 'ORBITRIGHT'
kmi = km.items.add('view3d.view_orbit', 'WHEELUPMOUSE', 'PRESS', shift=True, alt=True)
kmi.properties.type = 'ORBITUP'
kmi = km.items.add('view3d.view_orbit', 'WHEELDOWNMOUSE', 'PRESS', shift=True, alt=True)
kmi.properties.type = 'ORBITDOWN'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', shift=True)
kmi.properties.align_active = True
kmi.properties.type = 'FRONT'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_3', 'PRESS', shift=True)
kmi.properties.align_active = True
kmi.properties.type = 'RIGHT'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_7', 'PRESS', shift=True)
kmi.properties.align_active = True
kmi.properties.type = 'TOP'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_1', 'PRESS', shift=True, ctrl=True)
kmi.properties.align_active = True
kmi.properties.type = 'BACK'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_3', 'PRESS', shift=True, ctrl=True)
kmi.properties.align_active = True
kmi.properties.type = 'LEFT'
kmi = km.items.add('view3d.viewnumpad', 'NUMPAD_7', 'PRESS', shift=True, ctrl=True)
kmi.properties.align_active = True
kmi.properties.type = 'BOTTOM'
kmi = km.items.add('view3d.localview', 'NUMPAD_SLASH', 'PRESS')
kmi = km.items.add('view3d.layers', 'ACCENT_GRAVE', 'PRESS')
kmi.properties.nr = 0
kmi = km.items.add('view3d.layers', 'ONE', 'PRESS', any=True)
kmi.properties.nr = 1
kmi = km.items.add('view3d.layers', 'TWO', 'PRESS', any=True)
kmi.properties.nr = 2
kmi = km.items.add('view3d.layers', 'THREE', 'PRESS', any=True)
kmi.properties.nr = 3
kmi = km.items.add('view3d.layers', 'FOUR', 'PRESS', any=True)
kmi.properties.nr = 4
kmi = km.items.add('view3d.layers', 'FIVE', 'PRESS', any=True)
kmi.properties.nr = 5
kmi = km.items.add('view3d.layers', 'SIX', 'PRESS', any=True)
kmi.properties.nr = 6
kmi = km.items.add('view3d.layers', 'SEVEN', 'PRESS', any=True)
kmi.properties.nr = 7
kmi = km.items.add('view3d.layers', 'EIGHT', 'PRESS', any=True)
kmi.properties.nr = 8
kmi = km.items.add('view3d.layers', 'NINE', 'PRESS', any=True)
kmi.properties.nr = 9
kmi = km.items.add('view3d.layers', 'ZERO', 'PRESS', any=True)
kmi.properties.nr = 10
kmi = km.items.add('wm.context_toggle_enum', 'Z', 'PRESS')
kmi.properties.path = 'space_data.viewport_shading'
kmi.properties.value_1 = 'SOLID'
kmi.properties.value_2 = 'WIREFRAME'
kmi = km.items.add('wm.context_toggle_enum', 'Z', 'PRESS', alt=True)
kmi.properties.path = 'space_data.viewport_shading'
kmi.properties.value_1 = 'TEXTURED'
kmi.properties.value_2 = 'SOLID'
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS')
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True)
kmi.properties.extend = True
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS', ctrl=True)
kmi.properties.center = True
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS', alt=True)
kmi.properties.enumerate = True
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True)
kmi.properties.center = True
kmi.properties.extend = True
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
kmi.properties.center = True
kmi.properties.enumerate = True
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
kmi.properties.enumerate = True
kmi.properties.extend = True
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
kmi.properties.center = True
kmi.properties.enumerate = True
kmi.properties.extend = True
kmi = km.items.add('view3d.select_border', 'EVT_TWEAK_S', 'ANY')
kmi = km.items.add('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', ctrl=True)
kmi = km.items.add('view3d.select_lasso', 'EVT_TWEAK_A', 'ANY', shift=True, ctrl=True)
kmi.properties.deselect = True
kmi = km.items.add('view3d.select_circle', 'C', 'PRESS')
kmi = km.items.add('view3d.clip_border', 'B', 'PRESS', alt=True)
kmi = km.items.add('view3d.zoom_border', 'B', 'PRESS', shift=True)
kmi = km.items.add('view3d.render_border', 'B', 'PRESS', shift=True)
kmi = km.items.add('view3d.camera_to_view', 'NUMPAD_0', 'PRESS', ctrl=True, alt=True)
kmi = km.items.add('view3d.object_as_camera', 'NUMPAD_0', 'PRESS', ctrl=True)
kmi = km.items.add('wm.call_menu', 'S', 'PRESS', shift=True)
kmi.properties.name = 'VIEW3D_MT_snap'
kmi = km.items.add('wm.context_set_enum', 'COMMA', 'PRESS')
kmi.properties.path = 'space_data.pivot_point'
kmi.properties.value = 'BOUNDING_BOX_CENTER'
kmi = km.items.add('wm.context_set_enum', 'COMMA', 'PRESS', ctrl=True)
kmi.properties.path = 'space_data.pivot_point'
kmi.properties.value = 'MEDIAN_POINT'
kmi = km.items.add('wm.context_toggle', 'COMMA', 'PRESS', alt=True)
kmi.properties.path = 'space_data.pivot_point_align'
kmi = km.items.add('wm.context_toggle', 'Q', 'PRESS')
kmi.properties.path = 'space_data.manipulator'
kmi = km.items.add('wm.context_set_enum', 'PERIOD', 'PRESS')
kmi.properties.path = 'space_data.pivot_point'
kmi.properties.value = 'CURSOR'
kmi = km.items.add('wm.context_set_enum', 'PERIOD', 'PRESS', ctrl=True)
kmi.properties.path = 'space_data.pivot_point'
kmi.properties.value = 'INDIVIDUAL_ORIGINS'
kmi = km.items.add('wm.context_set_enum', 'PERIOD', 'PRESS', alt=True)
kmi.properties.path = 'space_data.pivot_point'
kmi.properties.value = 'ACTIVE_ELEMENT'
kmi = km.items.add('transform.translate', 'G', 'PRESS', shift=True)
kmi = km.items.add('transform.translate', 'EVT_TWEAK_S', 'ANY')
kmi = km.items.add('transform.rotate', 'R', 'PRESS', shift=True)
kmi = km.items.add('transform.resize', 'S', 'PRESS', shift=True)
kmi = km.items.add('transform.warp', 'W', 'PRESS', shift=True)
kmi = km.items.add('transform.tosphere', 'S', 'PRESS', shift=True, alt=True)
kmi = km.items.add('transform.shear', 'S', 'PRESS', shift=True, ctrl=True, alt=True)
kmi = km.items.add('transform.select_orientation', 'SPACE', 'PRESS', alt=True)
kmi = km.items.add('transform.create_orientation', 'SPACE', 'PRESS', ctrl=True, alt=True)
kmi.properties.use = True
kmi = km.items.add('transform.mirror', 'M', 'PRESS', ctrl=True)
kmi = km.items.add('wm.context_toggle', 'TAB', 'PRESS', shift=True)
kmi.properties.path = 'tool_settings.snap'
kmi = km.items.add('transform.snap_type', 'TAB', 'PRESS', shift=True, ctrl=True)
kmi = km.items.add('view3d.enable_manipulator', 'W', 'PRESS')
kmi.properties.translate = True
kmi = km.items.add('view3d.enable_manipulator', 'E', 'PRESS')
kmi.properties.rotate = True
kmi = km.items.add('view3d.enable_manipulator', 'R', 'PRESS')
kmi.properties.scale = True
# Map Mesh
km = kc.add_keymap('Mesh', space_type='EMPTY', region_type='WINDOW', modal=False)
kmi = km.items.add('mesh.loopcut_slide', 'R', 'PRESS', ctrl=True)
kmi = km.items.add('mesh.loop_select', 'SELECTMOUSE', 'PRESS', alt=True)
kmi = km.items.add('mesh.loop_select', 'SELECTMOUSE', 'PRESS', shift=True, alt=True)
kmi.properties.extend = True
kmi = km.items.add('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', ctrl=True, alt=True)
kmi = km.items.add('mesh.edgering_select', 'SELECTMOUSE', 'PRESS', shift=True, ctrl=True, alt=True)
kmi.properties.extend = True
kmi = km.items.add('mesh.select_shortest_path', 'SELECTMOUSE', 'PRESS', ctrl=True)
kmi = km.items.add('mesh.select_all', 'A', 'PRESS')
kmi = km.items.add('mesh.select_more', 'NUMPAD_PLUS', 'PRESS', ctrl=True)
kmi = km.items.add('mesh.select_less', 'NUMPAD_MINUS', 'PRESS', ctrl=True)
kmi = km.items.add('mesh.select_inverse', 'I', 'PRESS', ctrl=True)
kmi = km.items.add('mesh.select_non_manifold', 'M', 'PRESS', shift=True, ctrl=True, alt=True)
kmi = km.items.add('mesh.select_linked', 'L', 'PRESS', ctrl=True)
kmi = km.items.add('mesh.select_linked_pick', 'L', 'PRESS')
kmi = km.items.add('mesh.select_linked_pick', 'L', 'PRESS', shift=True)
kmi.properties.deselect = True
kmi = km.items.add('mesh.faces_select_linked_flat', 'F', 'PRESS', shift=True, ctrl=True, alt=True)
kmi.properties.sharpness = 135.0
kmi = km.items.add('mesh.select_similar', 'G', 'PRESS', shift=True)
kmi = km.items.add('wm.call_menu', 'TAB', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_edit_mesh_selection_mode'
kmi = km.items.add('mesh.hide', 'H', 'PRESS')
kmi = km.items.add('mesh.hide', 'H', 'PRESS', shift=True)
kmi.properties.unselected = True
kmi = km.items.add('mesh.reveal', 'H', 'PRESS', alt=True)
kmi = km.items.add('mesh.normals_make_consistent', 'N', 'PRESS', ctrl=True)
kmi = km.items.add('mesh.normals_make_consistent', 'N', 'PRESS', shift=True, ctrl=True)
kmi.properties.inside = True
kmi = km.items.add('view3d.edit_mesh_extrude_move_normal', 'E', 'PRESS', ctrl=True)
kmi = km.items.add('view3d.edit_mesh_extrude_individual_move', 'E', 'PRESS', shift=True)
kmi = km.items.add('wm.call_menu', 'E', 'PRESS', alt=True)
kmi.properties.name = 'VIEW3D_MT_edit_mesh_extrude'
kmi = km.items.add('mesh.spin', 'R', 'PRESS', alt=True)
kmi = km.items.add('mesh.fill', 'F', 'PRESS', alt=True)
kmi = km.items.add('mesh.beautify_fill', 'F', 'PRESS', shift=True, alt=True)
kmi = km.items.add('mesh.quads_convert_to_tris', 'T', 'PRESS', ctrl=True)
kmi = km.items.add('mesh.tris_convert_to_quads', 'J', 'PRESS', alt=True)
kmi = km.items.add('mesh.edge_flip', 'F', 'PRESS', shift=True, ctrl=True)
kmi = km.items.add('mesh.rip_move', 'V', 'PRESS')
kmi = km.items.add('mesh.merge', 'M', 'PRESS', alt=True)
kmi = km.items.add('transform.shrink_fatten', 'S', 'PRESS', ctrl=True, alt=True)
kmi = km.items.add('mesh.edge_face_add', 'F', 'PRESS')
kmi = km.items.add('mesh.duplicate_move', 'D', 'PRESS', shift=True)
kmi = km.items.add('wm.call_menu', 'A', 'PRESS', shift=True)
kmi.properties.name = 'INFO_MT_mesh_add'
kmi = km.items.add('mesh.separate', 'P', 'PRESS')
kmi = km.items.add('mesh.split', 'Y', 'PRESS')
kmi = km.items.add('mesh.dupli_extrude_cursor', 'ACTIONMOUSE', 'CLICK', ctrl=True)
kmi = km.items.add('mesh.delete', 'X', 'PRESS')
kmi = km.items.add('mesh.delete', 'DEL', 'PRESS')
kmi = km.items.add('mesh.knife_cut', 'LEFTMOUSE', 'PRESS', key_modifier='K')
kmi = km.items.add('mesh.knife_cut', 'LEFTMOUSE', 'PRESS', shift=True, key_modifier='K')
kmi.properties.type = 'MIDPOINTS'
kmi = km.items.add('object.vertex_parent_set', 'P', 'PRESS', ctrl=True)
kmi = km.items.add('wm.call_menu', 'W', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_edit_mesh_specials'
kmi = km.items.add('wm.call_menu', 'F', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_edit_mesh_faces'
kmi = km.items.add('wm.call_menu', 'E', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_edit_mesh_edges'
kmi = km.items.add('wm.call_menu', 'V', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_edit_mesh_vertices'
kmi = km.items.add('wm.call_menu', 'H', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_hook'
kmi = km.items.add('wm.call_menu', 'U', 'PRESS')
kmi.properties.name = 'VIEW3D_MT_uv_map'
kmi = km.items.add('wm.call_menu', 'G', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_vertex_group'
kmi = km.items.add('wm.context_cycle_enum', 'O', 'PRESS', shift=True)
kmi.properties.path = 'tool_settings.proportional_editing_falloff'
kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS')
kmi.properties.path = 'tool_settings.proportional_editing'
kmi.properties.value_1 = 'DISABLED'
kmi.properties.value_2 = 'ENABLED'
kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS', alt=True)
kmi.properties.path = 'tool_settings.proportional_editing'
kmi.properties.value_1 = 'DISABLED'
kmi.properties.value_2 = 'CONNECTED'
# Map Object Mode
km = kc.add_keymap('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False)
kmi = km.items.add('wm.context_cycle_enum', 'O', 'PRESS', shift=True)
kmi.properties.path = 'tool_settings.proportional_editing_falloff'
kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS')
kmi.properties.path = 'tool_settings.proportional_editing'
kmi.properties.value_1 = 'DISABLED'
kmi.properties.value_2 = 'ENABLED'
kmi = km.items.add('view3d.game_start', 'P', 'PRESS')
kmi = km.items.add('object.select_all', 'A', 'PRESS')
kmi = km.items.add('object.select_inverse', 'I', 'PRESS', ctrl=True)
kmi = km.items.add('object.select_linked', 'L', 'PRESS', shift=True)
kmi = km.items.add('object.select_grouped', 'G', 'PRESS', shift=True)
kmi = km.items.add('object.select_mirror', 'M', 'PRESS', shift=True, ctrl=True)
kmi = km.items.add('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS')
kmi.properties.direction = 'PARENT'
kmi = km.items.add('object.select_hierarchy', 'LEFT_BRACKET', 'PRESS', shift=True)
kmi.properties.direction = 'PARENT'
kmi.properties.extend = True
kmi = km.items.add('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS')
kmi.properties.direction = 'CHILD'
kmi = km.items.add('object.select_hierarchy', 'RIGHT_BRACKET', 'PRESS', shift=True)
kmi.properties.direction = 'CHILD'
kmi.properties.extend = True
kmi = km.items.add('object.parent_set', 'P', 'PRESS', ctrl=True)
kmi = km.items.add('object.parent_no_inverse_set', 'P', 'PRESS', shift=True, ctrl=True)
kmi = km.items.add('object.parent_clear', 'P', 'PRESS', alt=True)
kmi = km.items.add('object.track_set', 'T', 'PRESS', ctrl=True)
kmi = km.items.add('object.track_clear', 'T', 'PRESS', alt=True)
kmi = km.items.add('object.constraint_add_with_targets', 'C', 'PRESS', shift=True, ctrl=True)
kmi = km.items.add('object.constraints_clear', 'C', 'PRESS', ctrl=True, alt=True)
kmi = km.items.add('object.location_clear', 'G', 'PRESS', alt=True)
kmi = km.items.add('object.rotation_clear', 'R', 'PRESS', alt=True)
kmi = km.items.add('object.scale_clear', 'S', 'PRESS', alt=True)
kmi = km.items.add('object.origin_clear', 'O', 'PRESS', alt=True)
kmi = km.items.add('object.restrictview_clear', 'H', 'PRESS', alt=True)
kmi = km.items.add('object.restrictview_set', 'H', 'PRESS')
kmi = km.items.add('object.restrictview_set', 'H', 'PRESS', shift=True)
kmi.properties.unselected = True
kmi = km.items.add('object.move_to_layer', 'M', 'PRESS')
kmi = km.items.add('object.delete', 'X', 'PRESS')
kmi = km.items.add('object.delete', 'DEL', 'PRESS')
kmi = km.items.add('wm.call_menu', 'A', 'PRESS', shift=True)
kmi.properties.name = 'INFO_MT_add'
kmi = km.items.add('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True)
kmi = km.items.add('wm.call_menu', 'A', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_object_apply'
kmi = km.items.add('wm.call_menu', 'U', 'PRESS')
kmi.properties.name = 'VIEW3D_MT_make_single_user'
kmi = km.items.add('wm.call_menu', 'L', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_make_links'
kmi = km.items.add('object.duplicate_move', 'D', 'PRESS', shift=True)
kmi = km.items.add('object.duplicate_move_linked', 'D', 'PRESS', alt=True)
kmi = km.items.add('object.join', 'J', 'PRESS', ctrl=True)
kmi = km.items.add('object.convert', 'C', 'PRESS', alt=True)
kmi = km.items.add('object.proxy_make', 'P', 'PRESS', ctrl=True, alt=True)
kmi = km.items.add('object.make_local', 'L', 'PRESS')
kmi = km.items.add('anim.keyframe_insert_menu', 'I', 'PRESS')
kmi = km.items.add('anim.keyframe_delete_v3d', 'I', 'PRESS', alt=True)
kmi = km.items.add('anim.keying_set_active_set', 'I', 'PRESS', shift=True, ctrl=True, alt=True)
kmi = km.items.add('group.create', 'G', 'PRESS', ctrl=True)
kmi = km.items.add('group.objects_remove', 'G', 'PRESS', ctrl=True, alt=True)
kmi = km.items.add('group.objects_add_active', 'G', 'PRESS', shift=True, ctrl=True)
kmi = km.items.add('group.objects_remove_active', 'G', 'PRESS', shift=True, alt=True)
kmi = km.items.add('wm.call_menu', 'W', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_object_specials'
kmi = km.items.add('object.subdivision_set', 'ZERO', 'PRESS', ctrl=True)
kmi.properties.level = 0
kmi = km.items.add('object.subdivision_set', 'ONE', 'PRESS', ctrl=True)
kmi.properties.level = 1
kmi = km.items.add('object.subdivision_set', 'TWO', 'PRESS', ctrl=True)
kmi.properties.level = 2
kmi = km.items.add('object.subdivision_set', 'THREE', 'PRESS', ctrl=True)
kmi.properties.level = 3
kmi = km.items.add('object.subdivision_set', 'FOUR', 'PRESS', ctrl=True)
kmi.properties.level = 4
kmi = km.items.add('object.subdivision_set', 'FIVE', 'PRESS', ctrl=True)
kmi.properties.level = 5
wm.active_keyconfig = kc
bpy.context.user_preferences.view.auto_depth = False
bpy.context.user_preferences.view.zoom_to_mouse = False
bpy.context.user_preferences.view.rotate_around_selection = False
bpy.context.user_preferences.edit.drag_immediately = True
bpy.context.user_preferences.edit.insertkey_xyz_to_rgb = False
bpy.context.user_preferences.inputs.select_mouse = 'LEFT'
bpy.context.user_preferences.inputs.zoom_style = 'DOLLY'
bpy.context.user_preferences.inputs.zoom_axis = 'HORIZONTAL'
bpy.context.user_preferences.inputs.view_rotation = 'TURNTABLE'
bpy.context.user_preferences.inputs.invert_zoom_direction = True

@ -7,7 +7,7 @@
# import GameKeys
# support for Vector(), Matrix() types and advanced functions like ScaleMatrix(...) and RotationMatrix(...)
# import Mathutils
# import mathutils
# for functions like getWindowWidth(), getWindowHeight()
# import Rasterizer

@ -26,7 +26,7 @@ narrowui = 180
class LAMP_MT_sunsky_presets(bpy.types.Menu):
bl_label = "Render Presets"
preset_subdir = "sunsky"
preset_operator = "script.python_file_run"
preset_operator = "script.execute_preset"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
draw = bpy.types.Menu.draw_preset
@ -146,8 +146,8 @@ class DATA_PT_sunsky(DataButtonsPanel):
row = layout.row(align=True)
row.prop(lamp, "use_sky")
row.menu("LAMP_MT_sunsky_presets", text="Presets")
row.operator("lamp.sunsky_preset_add", text="Add")
row.menu("LAMP_MT_sunsky_presets", text=bpy.types.LAMP_MT_sunsky_presets.bl_label)
row.operator("lamp.sunsky_preset_add", text="", icon="ZOOMIN")
row = layout.row()
row.active = lamp.use_sky or lamp.use_atmosphere

@ -283,6 +283,52 @@ class DATA_PT_uv_texture(DataButtonsPanel):
layout.prop(lay, "name")
class DATA_PT_texface(DataButtonsPanel):
bl_label = "Texture Face"
def poll(self, context):
ob = context.active_object
rd = context.scene.render
return (context.mode =='EDIT_MESH') and (rd.engine == 'BLENDER_GAME') and ob and ob.type == 'MESH'
def draw(self, context):
layout = self.layout
col = layout.column()
wide_ui = context.region.width > narrowui
me = context.mesh
tf = me.faces.active_tface
if tf:
split = layout.split()
col = split.column()
col.prop(tf, "tex")
col.prop(tf, "light")
col.prop(tf, "invisible")
col.prop(tf, "collision")
col.prop(tf, "shared")
col.prop(tf, "twoside")
col.prop(tf, "object_color")
if wide_ui:
col = split.column()
col.prop(tf, "halo")
col.prop(tf, "billboard")
col.prop(tf, "shadow")
col.prop(tf, "text")
col.prop(tf, "alpha_sort")
col = layout.column()
col.prop(tf, "transp")
else:
col.label(text="No UV Texture")
class DATA_PT_vertex_colors(DataButtonsPanel):
bl_label = "Vertex Colors"
@ -315,6 +361,7 @@ classes = [
DATA_PT_vertex_groups,
DATA_PT_shape_keys,
DATA_PT_uv_texture,
DATA_PT_texface,
DATA_PT_vertex_colors,
DATA_PT_custom_props_mesh]

@ -291,6 +291,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
col.prop(md, "unborn")
col.prop(md, "alive")
col.prop(md, "dead")
col.prop(md, "size")
layout.operator("object.explode_refresh", text="Refresh")

@ -39,7 +39,7 @@ def active_node_mat(mat):
class MATERIAL_MT_sss_presets(bpy.types.Menu):
bl_label = "SSS Presets"
preset_subdir = "sss"
preset_operator = "script.python_file_run"
preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
@ -505,8 +505,8 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
row = layout.row().split()
sub = row.row(align=True).split(percentage=0.75)
sub.menu("MATERIAL_MT_sss_presets", text="Presets")
sub.operator("material.sss_preset_add", text="Add")
sub.menu("MATERIAL_MT_sss_presets", text=bpy.types.MATERIAL_MT_sss_presets.bl_label)
sub.operator("material.sss_preset_add", text="", icon="ZOOMIN")
split = layout.split()
@ -913,6 +913,32 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
col.prop(vol, "depth_cutoff")
class MATERIAL_PT_volume_options(VolumeButtonsPanel):
bl_label = "Options"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
bl_default_closed = True
def draw(self, context):
layout = self.layout
mat = active_node_mat(context.material)
wide_ui = context.region.width > narrowui
split = layout.split()
col = split.column()
col.prop(mat, "traceable")
col.prop(mat, "full_oversampling")
col.prop(mat, "exclude_mist")
col = split.column()
col.label(text="Light Group:")
col.prop(mat, "light_group", text="")
row = col.row()
row.active = bool(mat.light_group)
row.prop(mat, "light_group_exclusive", text="Exclusive")
classes = [
MATERIAL_PT_context_material,
MATERIAL_PT_preview,
@ -937,8 +963,8 @@ classes = [
MATERIAL_PT_volume_shading,
MATERIAL_PT_volume_lighting,
MATERIAL_PT_volume_transp,
MATERIAL_PT_volume_integration,
MATERIAL_PT_volume_options,
MATERIAL_PT_custom_props]

@ -390,10 +390,13 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
sub.prop(part, "drag_factor", slider=True)
sub.prop(part, "damp_factor", slider=True)
sub = split.column()
sub.label(text="Integration:")
sub.prop(part, "integrator", text="")
sub.prop(part, "time_tweak")
sub.prop(part, "subframes")
sub = layout.row()
sub.prop(part, "size_deflect")
sub.prop(part, "die_on_collision")
sub.prop(part, "integrator")
sub.prop(part, "time_tweak")
elif part.physics_type == 'FLUID':
fluid = part.fluid
@ -405,10 +408,13 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
sub.prop(part, "drag_factor", slider=True)
sub.prop(part, "damp_factor", slider=True)
sub = split.column()
sub.label(text="Integration:")
sub.prop(part, "integrator", text="")
sub.prop(part, "time_tweak")
sub.prop(part, "subframes")
sub = layout.row()
sub.prop(part, "size_deflect")
sub.prop(part, "die_on_collision")
sub.prop(part, "integrator")
sub.prop(part, "time_tweak")
split = layout.split()
sub = split.column()

@ -36,7 +36,7 @@ class CLOTH_MT_presets(bpy.types.Menu):
'''
bl_label = "Cloth Presets"
preset_subdir = "cloth"
preset_operator = "script.python_file_run"
preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
@ -91,8 +91,8 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
col.label(text="Presets:")
sub = col.row(align=True).split(percentage=0.75)
sub.menu("CLOTH_MT_presets", text="Presets")
sub.operator("cloth.preset_add", text="Add")
sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
sub.operator("cloth.preset_add", text="", icon="ZOOMIN")
col.label(text="Quality:")
col.prop(cloth, "quality", text="Steps", slider=True)

@ -25,7 +25,7 @@ narrowui = 180
class RENDER_MT_presets(bpy.types.Menu):
bl_label = "Render Presets"
preset_subdir = "render"
preset_operator = "script.python_file_run"
preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
@ -396,14 +396,38 @@ class RENDER_PT_output(RenderButtonsPanel):
elif rd.file_format == 'QUICKTIME_CARBON':
split = layout.split()
split.operator("scene.render_set_quicktime_codec")
split.operator("scene.render_data_set_quicktime_codec")
elif rd.file_format == 'QUICKTIME_QTKIT':
split = layout.split()
col = split.column()
col.prop(rd, "quicktime_codec_type")
col.prop(rd, "quicktime_codec_type", text="Video Codec")
col.prop(rd, "quicktime_codec_spatial_quality", text="Quality")
# Audio
col.prop(rd, "quicktime_audiocodec_type", text="Audio Codec")
if rd.quicktime_audiocodec_type != 'No audio':
split = layout.split()
col = split.column()
if rd.quicktime_audiocodec_type == 'LPCM':
col.prop(rd, "quicktime_audio_bitdepth", text="")
if wide_ui:
col = split.column()
col.prop(rd, "quicktime_audio_samplerate", text="")
split = layout.split()
col = split.column()
if rd.quicktime_audiocodec_type == 'AAC':
col.prop(rd, "quicktime_audio_bitrate")
if wide_ui:
subsplit = split.split()
col = subsplit.column()
if rd.quicktime_audiocodec_type == 'AAC':
col.prop(rd, "quicktime_audio_codec_isvbr")
if wide_ui:
col = subsplit.column()
col.prop(rd, "quicktime_audio_resampling_hq")
class RENDER_PT_encoding(RenderButtonsPanel):
bl_label = "Encoding"
@ -540,8 +564,8 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
row = layout.row().split()
sub = row.row(align=True).split(percentage=0.75)
sub.menu("RENDER_MT_presets", text="Presets")
sub.operator("render.preset_add", text="Add")
sub.menu("RENDER_MT_presets", text=bpy.types.RENDER_MT_presets.bl_label)
sub.operator("render.preset_add", text="", icon="ZOOMIN")
split = layout.split()

@ -300,7 +300,7 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
# write paths
f.write("# Path Definitions\n")
for ksp in ks.paths:
f.write("ksp = ks.add_path(")
f.write("ksp = ks.paths.add(")
# id-block + RNA-path
if ksp.id:

@ -203,6 +203,12 @@ class TextureSlotPanel(TextureButtonsPanel):
class TEXTURE_PT_mapping(TextureSlotPanel):
bl_label = "Mapping"
def poll(self, context):
idblock = context_tex_datablock(context)
if type(idblock) == bpy.types.Brush and not context.sculpt_object:
return False
return context.texture_slot
def draw(self, context):
layout = self.layout
@ -242,15 +248,16 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
split.prop(tex, "object", text="")
if type(idblock) == bpy.types.Brush:
layout.prop(tex, "map_mode", expand=True)
if context.sculpt_object:
layout.prop(tex, "map_mode", expand=True)
row = layout.row()
row.active = tex.map_mode in ('FIXED', 'TILED')
row.prop(tex, "angle")
row = layout.row()
row.active = tex.map_mode in ('TILED', '3D')
row.column().prop(tex, "size")
row = layout.row()
row.active = tex.map_mode in ('FIXED', 'TILED')
row.prop(tex, "angle")
row = layout.row()
row.active = tex.map_mode in ('TILED', '3D')
row.column().prop(tex, "size")
else:
if type(idblock) == bpy.types.Material:
split = layout.split(percentage=0.3)

@ -124,6 +124,9 @@ class DOPESHEET_MT_select(bpy.types.Menu):
layout.operator("action.select_more")
layout.operator("action.select_less")
layout.separator()
layout.operator("action.select_linked")
class DOPESHEET_MT_channel(bpy.types.Menu):
bl_label = "Channel"

@ -114,6 +114,7 @@ class GRAPH_MT_select(bpy.types.Menu):
layout.separator()
layout.operator("graph.select_border")
layout.operator("graph.select_border", text="Border Axis Range").axis_range = True
layout.operator("graph.select_border", text="Border (Include Handles)").include_handles = True
layout.separator()
layout.operator("graph.select_column", text="Columns on Selected Keys").mode = 'KEYS'
@ -126,6 +127,9 @@ class GRAPH_MT_select(bpy.types.Menu):
layout.operator("graph.select_more")
layout.operator("graph.select_less")
layout.separator()
layout.operator("graph.select_linked")
class GRAPH_MT_channel(bpy.types.Menu):
bl_label = "Channel"

@ -406,7 +406,44 @@ class IMAGE_PT_view_histogram(bpy.types.Panel):
sima = context.space_data
layout.template_histogram(sima, "histogram")
layout.template_histogram(sima.scopes, "histogram")
layout.prop(sima.scopes.histogram, "mode", icon_only=True)
class IMAGE_PT_view_waveform(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'PREVIEW'
bl_label = "Waveform"
def poll(self, context):
sima = context.space_data
return (sima and sima.image)
def draw(self, context):
layout = self.layout
sima = context.space_data
layout.template_waveform(sima, "scopes")
sub = layout.row().split(percentage=0.75)
sub.prop(sima.scopes, "waveform_alpha")
sub.prop(sima.scopes, "waveform_mode", text="", icon_only=True)
class IMAGE_PT_view_vectorscope(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'PREVIEW'
bl_label = "Vectorscope"
def poll(self, context):
sima = context.space_data
return (sima and sima.image)
def draw(self, context):
layout = self.layout
sima = context.space_data
layout.template_vectorscope(sima, "scopes")
layout.prop(sima.scopes, "vectorscope_alpha")
class IMAGE_PT_sample_line(bpy.types.Panel):
@ -423,6 +460,27 @@ class IMAGE_PT_sample_line(bpy.types.Panel):
layout.operator("image.sample_line")
sima = context.space_data
layout.template_histogram(sima, "sample_histogram")
layout.prop(sima.sample_histogram, "mode")
class IMAGE_PT_scope_sample(bpy.types.Panel):
bl_space_type = 'IMAGE_EDITOR'
bl_region_type = 'PREVIEW'
bl_label = "Scope Samples"
def poll(self, context):
sima = context.space_data
return sima
def draw(self, context):
layout = self.layout
sima = context.space_data
split = layout.split()
row = split.row()
row.prop(sima.scopes, "use_full_resolution")
row = split.row()
row.active = not sima.scopes.use_full_resolution
row.prop(sima.scopes, "accuracy")
class IMAGE_PT_view_properties(bpy.types.Panel):
@ -614,7 +672,10 @@ classes = [
IMAGE_PT_game_properties,
IMAGE_PT_view_properties,
IMAGE_PT_view_histogram,
IMAGE_PT_sample_line]
IMAGE_PT_view_waveform,
IMAGE_PT_view_vectorscope,
IMAGE_PT_sample_line,
IMAGE_PT_scope_sample]
def register():

@ -106,7 +106,9 @@ class INFO_MT_file(bpy.types.Menu):
layout.operator_context = 'INVOKE_AREA'
layout.operator("wm.link_append", text="Link")
layout.operator("wm.link_append", text="Append").link = False
props = layout.operator("wm.link_append", text="Append")
props.link = False
props.instance_groups = False
layout.separator()
@ -349,7 +351,7 @@ class HELP_OT_blender_eshop(HelpOperator):
'''Buy official Blender resources and merchandise online'''
bl_idname = "help.blender_eshop"
bl_label = "Blender e-Shop"
_url = 'http://www.blender3d.org/e-shop'
_url = 'http://www.blender.org/e-shop'
class HELP_OT_developer_community(HelpOperator):

@ -69,6 +69,10 @@ class NODE_HT_header(bpy.types.Header):
layout.prop(scene.render, "free_unused_nodes", text="Free Unused")
layout.prop(snode, "backdrop")
layout.separator()
layout.template_running_jobs()
class NODE_MT_view(bpy.types.Menu):
bl_label = "View"

@ -245,7 +245,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
if strip:
stype = strip.type
# XXX note strip.type is never equal to 'EFFECT', look at seq_type_items within rna_sequencer.c
if stype == 'EFFECT':
pass
@ -727,9 +727,12 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel):
flow = layout.column_flow()
flow.prop(strip, "proxy_custom_directory")
flow.prop(strip, "proxy_custom_file")
if strip.proxy: # TODO - need to add this somehow
flow.prop(strip.proxy, "directory")
flow.prop(strip.proxy, "file")
if strip.proxy_custom_directory and not strip.proxy_custom_file:
flow.prop(strip.proxy, "directory")
if strip.proxy_custom_file:
flow.prop(strip.proxy, "filepath")
class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
@ -741,9 +744,12 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
st = context.space_data
col = layout.column()
col.prop(st, "draw_overexposed") # text="Zebra"
col.prop(st, "draw_safe_margin")
if st.display_mode == 'IMAGE':
col.prop(st, "draw_overexposed") # text="Zebra"
col.prop(st, "draw_safe_margin")
if st.display_mode == 'WAVEFORM':
col.prop(st, "separate_color_preview")
col.prop(st, "proxy_render_size")
classes = [
SEQUENCER_HT_header, # header/menu classes

@ -19,7 +19,6 @@
# <pep8 compliant>
import bpy
import os
import re
import shutil
@ -67,91 +66,6 @@ def opengl_lamp_buttons(column, lamp):
col.active = lamp.enabled
col.prop(lamp, "direction", text="")
KM_HIERARCHY = [
('Window', 'EMPTY', 'WINDOW', []), # file save, window change, exit
('Screen', 'EMPTY', 'WINDOW', [ # full screen, undo, screenshot
('Screen Editing', 'EMPTY', 'WINDOW', []), # resizing, action corners
]),
('View2D', 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)
('View2D Buttons List', 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
('Header', 'EMPTY', 'WINDOW', []), # header stuff (per region)
('Grease Pencil', 'EMPTY', 'WINDOW', []), # grease pencil stuff (per region)
('3D View', 'VIEW_3D', 'WINDOW', [ # view 3d navigation and generic stuff (select, transform)
('Object Mode', 'EMPTY', 'WINDOW', []),
('Mesh', 'EMPTY', 'WINDOW', []),
('Curve', 'EMPTY', 'WINDOW', []),
('Armature', 'EMPTY', 'WINDOW', []),
('Metaball', 'EMPTY', 'WINDOW', []),
('Lattice', 'EMPTY', 'WINDOW', []),
('Font', 'EMPTY', 'WINDOW', []),
('Pose', 'EMPTY', 'WINDOW', []),
('Vertex Paint', 'EMPTY', 'WINDOW', []),
('Weight Paint', 'EMPTY', 'WINDOW', []),
('Face Mask', 'EMPTY', 'WINDOW', []),
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
('Sculpt', 'EMPTY', 'WINDOW', []),
('Armature Sketch', 'EMPTY', 'WINDOW', []),
('Particle', 'EMPTY', 'WINDOW', []),
('Object Non-modal', 'EMPTY', 'WINDOW', []), # mode change
('3D View Generic', 'VIEW_3D', 'WINDOW', []) # toolbar and properties
]),
('Frames', 'EMPTY', 'WINDOW', []), # frame navigation (per region)
('Markers', 'EMPTY', 'WINDOW', []), # markers (per region)
('Animation', 'EMPTY', 'WINDOW', []), # frame change on click, preview range (per region)
('Animation Channels', 'EMPTY', 'WINDOW', []),
('Graph Editor', 'GRAPH_EDITOR', 'WINDOW', [
('Graph Editor Generic', 'GRAPH_EDITOR', 'WINDOW', [])
]),
('Dopesheet', 'DOPESHEET_EDITOR', 'WINDOW', []),
('NLA Editor', 'NLA_EDITOR', 'WINDOW', [
('NLA Channels', 'NLA_EDITOR', 'WINDOW', []),
('NLA Generic', 'NLA_EDITOR', 'WINDOW', [])
]),
('Image', 'IMAGE_EDITOR', 'WINDOW', [
('UV Editor', 'EMPTY', 'WINDOW', []), # image (reverse order, UVEdit before Image
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
('Image Generic', 'IMAGE_EDITOR', 'WINDOW', [])
]),
('Timeline', 'TIMELINE', 'WINDOW', []),
('Outliner', 'OUTLINER', 'WINDOW', []),
('Node Editor', 'NODE_EDITOR', 'WINDOW', [
('Node Generic', 'NODE_EDITOR', 'WINDOW', [])
]),
('Sequencer', 'SEQUENCE_EDITOR', 'WINDOW', []),
('Logic Editor', 'LOGIC_EDITOR', 'WINDOW', []),
('File Browser', 'FILE_BROWSER', 'WINDOW', [
('File Browser Main', 'FILE_BROWSER', 'WINDOW', []),
('File Browser Buttons', 'FILE_BROWSER', 'WINDOW', [])
]),
('Property Editor', 'PROPERTIES', 'WINDOW', []), # align context menu
('Script', 'SCRIPTS_WINDOW', 'WINDOW', []),
('Text', 'TEXT_EDITOR', 'WINDOW', []),
('Console', 'CONSOLE', 'WINDOW', []),
('View3D Gesture Circle', 'EMPTY', 'WINDOW', []),
('Gesture Border', 'EMPTY', 'WINDOW', []),
('Standard Modal Map', 'EMPTY', 'WINDOW', []),
('Transform Modal Map', 'EMPTY', 'WINDOW', []),
('View3D Fly Modal', 'EMPTY', 'WINDOW', []),
('View3D Rotate Modal', 'EMPTY', 'WINDOW', []),
('View3D Move Modal', 'EMPTY', 'WINDOW', []),
('View3D Zoom Modal', 'EMPTY', 'WINDOW', []),
]
class USERPREF_HT_header(bpy.types.Header):
bl_space_type = 'USER_PREFERENCES'
@ -193,6 +107,26 @@ class USERPREF_PT_tabs(bpy.types.Panel):
layout.prop(userpref, "active_section", expand=True)
class USERPREF_MT_interaction_presets(bpy.types.Menu):
bl_label = "Presets"
preset_subdir = "interaction"
preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
class USERPREF_MT_splash(bpy.types.Menu):
bl_label = "Splash"
def draw(self, context):
layout = self.layout
split = layout.split()
row = split.row()
row.label("")
row = split.row()
row.label("Interaction:")
row.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label)
class USERPREF_PT_interface(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Interface"
@ -694,6 +628,8 @@ class USERPREF_PT_theme(bpy.types.Panel):
col.prop(v3d, "bone_solid")
col.prop(v3d, "bone_pose")
col.prop(v3d, "edge_seam")
col.prop(v3d, "edge_sharp")
col.prop(v3d, "edge_crease")
#col.prop(v3d, "edge") Doesn't seem to work
elif theme.theme_area == 'GRAPH_EDITOR':
@ -1079,202 +1015,29 @@ class USERPREF_PT_file(bpy.types.Panel):
sub.enabled = paths.auto_save_temporary_files
sub.prop(paths, "auto_save_time", text="Timer (mins)")
from space_userpref_keymap import InputKeyMapPanel
class USERPREF_PT_input(bpy.types.Panel):
class USERPREF_PT_input(InputKeyMapPanel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Input"
bl_region_type = 'WINDOW'
bl_show_header = False
def poll(self, context):
userpref = context.user_preferences
return (userpref.active_section == 'INPUT')
def draw_entry(self, kc, entry, col, level=0):
idname, spaceid, regionid, children = entry
km = kc.find_keymap(idname, space_type=spaceid, region_type=regionid)
if km:
self.draw_km(kc, km, children, col, level)
def indented_layout(self, layout, level):
indentpx = 16
if level == 0:
level = 0.0001 # Tweak so that a percentage of 0 won't split by half
indent = level * indentpx / bpy.context.region.width
split = layout.split(percentage=indent)
col = split.column()
col = split.column()
return col
def draw_km(self, kc, km, children, layout, level):
km = km.active()
layout.set_context_pointer("keymap", km)
col = self.indented_layout(layout, level)
row = col.row()
row.prop(km, "children_expanded", text="", no_bg=True)
row.label(text=km.name)
row.label()
row.label()
if km.modal:
row.label(text="", icon='LINKED')
if km.user_defined:
op = row.operator("wm.keymap_restore", text="Restore")
else:
op = row.operator("wm.keymap_edit", text="Edit")
if km.children_expanded:
if children:
# Put the Parent key map's entries in a 'global' sub-category
# equal in hierarchy to the other children categories
subcol = self.indented_layout(col, level + 1)
subrow = subcol.row()
subrow.prop(km, "items_expanded", text="", no_bg=True)
subrow.label(text="%s (Global)" % km.name)
else:
km.items_expanded = True
# Key Map items
if km.items_expanded:
for kmi in km.items:
self.draw_kmi(kc, km, kmi, col, level + 1)
# "Add New" at end of keymap item list
col = self.indented_layout(col, level + 1)
subcol = col.split(percentage=0.2).column()
subcol.enabled = km.user_defined
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
col.separator()
# Child key maps
if children:
subcol = col.column()
row = subcol.row()
for entry in children:
self.draw_entry(kc, entry, col, level + 1)
def draw_kmi(self, kc, km, kmi, layout, level):
map_type = kmi.map_type
col = self.indented_layout(layout, level)
if km.user_defined:
col = col.column(align=True)
box = col.box()
else:
box = col.column()
split = box.split(percentage=0.05)
# header bar
row = split.row()
row.prop(kmi, "expanded", text="", no_bg=True)
row = split.row()
row.enabled = km.user_defined
row.prop(kmi, "active", text="", no_bg=True)
if km.modal:
row.prop(kmi, "propvalue", text="")
else:
row.label(text=kmi.name)
row = split.row()
row.enabled = km.user_defined
row.prop(kmi, "map_type", text="")
if map_type == 'KEYBOARD':
row.prop(kmi, "type", text="", full_event=True)
elif map_type == 'MOUSE':
row.prop(kmi, "type", text="", full_event=True)
elif map_type == 'TWEAK':
subrow = row.row()
subrow.prop(kmi, "type", text="")
subrow.prop(kmi, "value", text="")
elif map_type == 'TIMER':
row.prop(kmi, "type", text="")
else:
row.label()
if kmi.id:
op = row.operator("wm.keyitem_restore", text="", icon='BACK')
op.item_id = kmi.id
op = row.operator("wm.keyitem_remove", text="", icon='X')
op.item_id = kmi.id
# Expanded, additional event settings
if kmi.expanded:
box = col.box()
box.enabled = km.user_defined
if map_type not in ('TEXTINPUT', 'TIMER'):
split = box.split(percentage=0.4)
sub = split.row()
if km.modal:
sub.prop(kmi, "propvalue", text="")
else:
sub.prop(kmi, "idname", text="")
sub = split.column()
subrow = sub.row(align=True)
if map_type == 'KEYBOARD':
subrow.prop(kmi, "type", text="", event=True)
subrow.prop(kmi, "value", text="")
elif map_type == 'MOUSE':
subrow.prop(kmi, "type", text="")
subrow.prop(kmi, "value", text="")
subrow = sub.row()
subrow.scale_x = 0.75
subrow.prop(kmi, "any")
subrow.prop(kmi, "shift")
subrow.prop(kmi, "ctrl")
subrow.prop(kmi, "alt")
subrow.prop(kmi, "oskey", text="Cmd")
subrow.prop(kmi, "key_modifier", text="", event=True)
def display_properties(properties, title=None):
box.separator()
if title:
box.label(text=title)
flow = box.column_flow(columns=2)
for pname in dir(properties):
if not properties.is_property_hidden(pname):
value = eval("properties." + pname)
if isinstance(value, bpy.types.OperatorProperties):
display_properties(value, title=pname)
else:
flow.prop(properties, pname)
# Operator properties
props = kmi.properties
if props is not None:
display_properties(props)
# Modal key maps attached to this operator
if not km.modal:
kmm = kc.find_keymap_modal(kmi.idname)
if kmm:
self.draw_km(kc, kmm, None, layout, level + 1)
layout.set_context_pointer("keymap", km)
def draw_input_prefs(self, inputs, layout):
# General settings
row = layout.row()
col = row.column()
sub = col.column()
sub.label(text="Presets:")
subrow = sub.row(align=True)
subrow.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label)
subrow.operator("wm.interaction_preset_add", text="", icon="ZOOMIN")
sub.separator()
sub.label(text="Mouse:")
sub1 = sub.column()
sub1.enabled = (inputs.select_mouse == 'RIGHT')
@ -1321,42 +1084,6 @@ class USERPREF_PT_input(bpy.types.Panel):
row.separator()
def draw_filtered(self, kc, layout):
filter = kc.filter.lower()
for km in kc.keymaps:
km = km.active()
layout.set_context_pointer("keymap", km)
filtered_items = [kmi for kmi in km.items if filter in kmi.name.lower()]
if len(filtered_items) != 0:
col = layout.column()
row = col.row()
row.label(text=km.name, icon="DOT")
row.label()
row.label()
if km.user_defined:
op = row.operator("wm.keymap_restore", text="Restore")
else:
op = row.operator("wm.keymap_edit", text="Edit")
for kmi in filtered_items:
self.draw_kmi(kc, km, kmi, col, 1)
# "Add New" at end of keymap item list
col = self.indented_layout(layout, 1)
subcol = col.split(percentage=0.2).column()
subcol.enabled = km.user_defined
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
def draw_hierarchy(self, defkc, layout):
for entry in KM_HIERARCHY:
self.draw_entry(defkc, entry, layout)
def draw(self, context):
layout = self.layout
@ -1375,28 +1102,7 @@ class USERPREF_PT_input(bpy.types.Panel):
self.draw_input_prefs(inputs, split)
# Keymap Settings
col = split.column()
# kc = wm.active_keyconfig
kc = wm.default_keyconfig
sub = col.column()
subsplit = sub.split()
subcol = subsplit.column()
row = subcol.row()
row.prop_object(wm, "active_keyconfig", wm, "keyconfigs", text="Configuration:")
layout.set_context_pointer("keyconfig", wm.active_keyconfig)
row.operator("wm.keyconfig_remove", text="", icon='X')
row.prop(kc, "filter", icon="VIEWZOOM")
col.separator()
if kc.filter != "":
self.draw_filtered(kc, col)
else:
self.draw_hierarchy(kc, col)
self.draw_keymaps(context, split)
#print("runtime", time.time() - start)
@ -1713,385 +1419,6 @@ class WM_OT_addon_links(bpy.types.Operator):
return {'FINISHED'}
class WM_OT_keyconfig_test(bpy.types.Operator):
"Test keyconfig for conflicts"
bl_idname = "wm.keyconfig_test"
bl_label = "Test Key Configuration for Conflicts"
def testEntry(self, kc, entry, src=None, parent=None):
result = False
def kmistr(kmi):
if km.modal:
s = ["kmi = km.items.add_modal(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value)]
else:
s = ["kmi = km.items.add(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value)]
if kmi.any:
s.append(", any=True")
else:
if kmi.shift:
s.append(", shift=True")
if kmi.ctrl:
s.append(", ctrl=True")
if kmi.alt:
s.append(", alt=True")
if kmi.oskey:
s.append(", oskey=True")
if kmi.key_modifier and kmi.key_modifier != 'NONE':
s.append(", key_modifier=\'%s\'" % kmi.key_modifier)
s.append(")\n")
def export_properties(prefix, properties):
for pname in dir(properties):
if not properties.is_property_hidden(pname):
value = eval("properties.%s" % pname)
if isinstance(value, bpy.types.OperatorProperties):
export_properties(prefix + "." + pname, value)
elif properties.is_property_set(pname):
value = _string_value(value)
if value != "":
s.append(prefix + ".%s = %s\n" % (pname, value))
props = kmi.properties
if props is not None:
export_properties("kmi.properties", props)
return "".join(s).strip()
idname, spaceid, regionid, children = entry
km = kc.find_keymap(idname, space_type=spaceid, region_type=regionid)
if km:
km = km.active()
if src:
for item in km.items:
if src.compare(item):
print("===========")
print(parent.name)
print(kmistr(src))
print(km.name)
print(kmistr(item))
result = True
for child in children:
if self.testEntry(kc, child, src, parent):
result = True
else:
for i in range(len(km.items)):
src = km.items[i]
for child in children:
if self.testEntry(kc, child, src, km):
result = True
for j in range(len(km.items) - i - 1):
item = km.items[j + i + 1]
if src.compare(item):
print("===========")
print(km.name)
print(kmistr(src))
print(kmistr(item))
result = True
for child in children:
if self.testEntry(kc, child):
result = True
return result
def testConfig(self, kc):
result = False
for entry in KM_HIERARCHY:
if self.testEntry(kc, entry):
result = True
return result
def execute(self, context):
wm = context.manager
kc = wm.default_keyconfig
if self.testConfig(kc):
print("CONFLICT")
return {'FINISHED'}
def _string_value(value):
if isinstance(value, str) or isinstance(value, bool) or isinstance(value, float) or isinstance(value, int):
result = repr(value)
elif getattr(value, '__len__', False):
repr(list(value))
else:
print("Export key configuration: can't write ", value)
return result
class WM_OT_keyconfig_import(bpy.types.Operator):
"Import key configuration from a python script"
bl_idname = "wm.keyconfig_import"
bl_label = "Import Key Configuration..."
path = StringProperty(name="File Path", description="File path to write file to")
filename = StringProperty(name="File Name", description="Name of the file")
directory = StringProperty(name="Directory", description="Directory of the file")
filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
keep_original = BoolProperty(name="Keep original", description="Keep original file after copying to configuration folder", default=True)
def execute(self, context):
if not self.properties.path:
raise Exception("File path not set")
f = open(self.properties.path, "r")
if not f:
raise Exception("Could not open file")
name_pattern = re.compile("^kc = wm.add_keyconfig\('(.*)'\)$")
for line in f.readlines():
match = name_pattern.match(line)
if match:
config_name = match.groups()[0]
f.close()
path = os.path.split(os.path.split(__file__)[0])[0] # remove ui/space_userpref.py
path = os.path.join(path, "cfg")
# create config folder if needed
if not os.path.exists(path):
os.mkdir(path)
path = os.path.join(path, config_name + ".py")
if self.properties.keep_original:
shutil.copy(self.properties.path, path)
else:
shutil.move(self.properties.path, path)
exec("import " + config_name)
wm = bpy.context.manager
wm.active_keyconfig = wm.keyconfigs[config_name]
return {'FINISHED'}
def invoke(self, context, event):
wm = context.manager
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
class WM_OT_keyconfig_export(bpy.types.Operator):
"Export key configuration to a python script"
bl_idname = "wm.keyconfig_export"
bl_label = "Export Key Configuration..."
path = StringProperty(name="File Path", description="File path to write file to")
filename = StringProperty(name="File Name", description="Name of the file")
directory = StringProperty(name="Directory", description="Directory of the file")
filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
def execute(self, context):
if not self.properties.path:
raise Exception("File path not set")
f = open(self.properties.path, "w")
if not f:
raise Exception("Could not open file")
wm = context.manager
kc = wm.active_keyconfig
if kc.name == 'Blender':
name = os.path.splitext(os.path.basename(self.properties.path))[0]
else:
name = kc.name
f.write("# Configuration %s\n" % name)
f.write("import bpy\n\n")
f.write("wm = bpy.context.manager\n")
f.write("kc = wm.add_keyconfig('%s')\n\n" % name)
for km in kc.keymaps:
km = km.active()
f.write("# Map %s\n" % km.name)
f.write("km = kc.add_keymap('%s', space_type='%s', region_type='%s', modal=%s)\n\n" % (km.name, km.space_type, km.region_type, km.modal))
for kmi in km.items:
if km.modal:
f.write("kmi = km.items.add_modal('%s', '%s', '%s'" % (kmi.propvalue, kmi.type, kmi.value))
else:
f.write("kmi = km.items.add('%s', '%s', '%s'" % (kmi.idname, kmi.type, kmi.value))
if kmi.any:
f.write(", any=True")
else:
if kmi.shift:
f.write(", shift=True")
if kmi.ctrl:
f.write(", ctrl=True")
if kmi.alt:
f.write(", alt=True")
if kmi.oskey:
f.write(", oskey=True")
if kmi.key_modifier and kmi.key_modifier != 'NONE':
f.write(", key_modifier='%s'" % kmi.key_modifier)
f.write(")\n")
def export_properties(prefix, properties):
for pname in dir(properties):
if not properties.is_property_hidden(pname):
value = eval("properties.%s" % pname)
if isinstance(value, bpy.types.OperatorProperties):
export_properties(prefix + "." + pname, value)
elif properties.is_property_set(pname):
value = _string_value(value)
if value != "":
f.write(prefix + ".%s = %s\n" % (pname, value))
props = kmi.properties
if props is not None:
export_properties("kmi.properties", props)
f.write("\n")
f.close()
return {'FINISHED'}
def invoke(self, context, event):
wm = context.manager
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
class WM_OT_keymap_edit(bpy.types.Operator):
"Edit key map"
bl_idname = "wm.keymap_edit"
bl_label = "Edit Key Map"
def execute(self, context):
wm = context.manager
km = context.keymap
km.copy_to_user()
return {'FINISHED'}
class WM_OT_keymap_restore(bpy.types.Operator):
"Restore key map(s)"
bl_idname = "wm.keymap_restore"
bl_label = "Restore Key Map(s)"
all = BoolProperty(attr="all", name="All Keymaps", description="Restore all keymaps to default")
def execute(self, context):
wm = context.manager
if self.properties.all:
for km in wm.default_keyconfig.keymaps:
km.restore_to_default()
else:
km = context.keymap
km.restore_to_default()
return {'FINISHED'}
class WM_OT_keyitem_restore(bpy.types.Operator):
"Restore key map item"
bl_idname = "wm.keyitem_restore"
bl_label = "Restore Key Map Item"
item_id = IntProperty(attr="item_id", name="Item Identifier", description="Identifier of the item to remove")
def execute(self, context):
wm = context.manager
km = context.keymap
kmi = km.item_from_id(self.properties.item_id)
km.restore_item_to_default(kmi)
return {'FINISHED'}
class WM_OT_keyitem_add(bpy.types.Operator):
"Add key map item"
bl_idname = "wm.keyitem_add"
bl_label = "Add Key Map Item"
def execute(self, context):
wm = context.manager
km = context.keymap
kc = wm.default_keyconfig
if km.modal:
km.items.add_modal("", 'A', 'PRESS') # kmi
else:
km.items.add("none", 'A', 'PRESS') # kmi
# clear filter and expand keymap so we can see the newly added item
if kc.filter != '':
kc.filter = ''
km.items_expanded = True
km.children_expanded = True
return {'FINISHED'}
class WM_OT_keyitem_remove(bpy.types.Operator):
"Remove key map item"
bl_idname = "wm.keyitem_remove"
bl_label = "Remove Key Map Item"
item_id = IntProperty(attr="item_id", name="Item Identifier", description="Identifier of the item to remove")
def execute(self, context):
wm = context.manager
km = context.keymap
kmi = km.item_from_id(self.properties.item_id)
km.remove_item(kmi)
return {'FINISHED'}
class WM_OT_keyconfig_remove(bpy.types.Operator):
"Remove key config"
bl_idname = "wm.keyconfig_remove"
bl_label = "Remove Key Config"
def poll(self, context):
wm = context.manager
return wm.active_keyconfig.user_defined
def execute(self, context):
wm = context.manager
keyconfig = wm.active_keyconfig
module = __import__(keyconfig.name)
os.remove(module.__file__)
compiled_path = module.__file__ + "c" # for .pyc
if os.path.exists(compiled_path):
os.remove(compiled_path)
wm.remove_keyconfig(keyconfig)
return {'FINISHED'}
classes = [
USERPREF_HT_header,
USERPREF_PT_tabs,
@ -2103,21 +1430,14 @@ classes = [
USERPREF_PT_input,
USERPREF_PT_addons,
USERPREF_MT_interaction_presets,
USERPREF_MT_splash,
WM_OT_addon_enable,
WM_OT_addon_disable,
WM_OT_addon_install,
WM_OT_addon_expand,
WM_OT_addon_links,
WM_OT_keyconfig_export,
WM_OT_keyconfig_import,
WM_OT_keyconfig_test,
WM_OT_keyconfig_remove,
WM_OT_keymap_edit,
WM_OT_keymap_restore,
WM_OT_keyitem_add,
WM_OT_keyitem_remove,
WM_OT_keyitem_restore]
WM_OT_addon_links]
def register():

@ -0,0 +1,813 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
import bpy
import os
import re
import shutil
KM_HIERARCHY = [
('Window', 'EMPTY', 'WINDOW', []), # file save, window change, exit
('Screen', 'EMPTY', 'WINDOW', [ # full screen, undo, screenshot
('Screen Editing', 'EMPTY', 'WINDOW', []), # resizing, action corners
]),
('View2D', 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)
('View2D Buttons List', 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
('Header', 'EMPTY', 'WINDOW', []), # header stuff (per region)
('Grease Pencil', 'EMPTY', 'WINDOW', []), # grease pencil stuff (per region)
('3D View', 'VIEW_3D', 'WINDOW', [ # view 3d navigation and generic stuff (select, transform)
('Object Mode', 'EMPTY', 'WINDOW', []),
('Mesh', 'EMPTY', 'WINDOW', []),
('Curve', 'EMPTY', 'WINDOW', []),
('Armature', 'EMPTY', 'WINDOW', []),
('Metaball', 'EMPTY', 'WINDOW', []),
('Lattice', 'EMPTY', 'WINDOW', []),
('Font', 'EMPTY', 'WINDOW', []),
('Pose', 'EMPTY', 'WINDOW', []),
('Vertex Paint', 'EMPTY', 'WINDOW', []),
('Weight Paint', 'EMPTY', 'WINDOW', []),
('Face Mask', 'EMPTY', 'WINDOW', []),
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
('Sculpt', 'EMPTY', 'WINDOW', []),
('Armature Sketch', 'EMPTY', 'WINDOW', []),
('Particle', 'EMPTY', 'WINDOW', []),
('Object Non-modal', 'EMPTY', 'WINDOW', []), # mode change
('3D View Generic', 'VIEW_3D', 'WINDOW', []) # toolbar and properties
]),
('Frames', 'EMPTY', 'WINDOW', []), # frame navigation (per region)
('Markers', 'EMPTY', 'WINDOW', []), # markers (per region)
('Animation', 'EMPTY', 'WINDOW', []), # frame change on click, preview range (per region)
('Animation Channels', 'EMPTY', 'WINDOW', []),
('Graph Editor', 'GRAPH_EDITOR', 'WINDOW', [
('Graph Editor Generic', 'GRAPH_EDITOR', 'WINDOW', [])
]),
('Dopesheet', 'DOPESHEET_EDITOR', 'WINDOW', []),
('NLA Editor', 'NLA_EDITOR', 'WINDOW', [
('NLA Channels', 'NLA_EDITOR', 'WINDOW', []),
('NLA Generic', 'NLA_EDITOR', 'WINDOW', [])
]),
('Image', 'IMAGE_EDITOR', 'WINDOW', [
('UV Editor', 'EMPTY', 'WINDOW', []), # image (reverse order, UVEdit before Image
('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
('Image Generic', 'IMAGE_EDITOR', 'WINDOW', [])
]),
('Timeline', 'TIMELINE', 'WINDOW', []),
('Outliner', 'OUTLINER', 'WINDOW', []),
('Node Editor', 'NODE_EDITOR', 'WINDOW', [
('Node Generic', 'NODE_EDITOR', 'WINDOW', [])
]),
('Sequencer', 'SEQUENCE_EDITOR', 'WINDOW', []),
('Logic Editor', 'LOGIC_EDITOR', 'WINDOW', []),
('File Browser', 'FILE_BROWSER', 'WINDOW', [
('File Browser Main', 'FILE_BROWSER', 'WINDOW', []),
('File Browser Buttons', 'FILE_BROWSER', 'WINDOW', [])
]),
('Property Editor', 'PROPERTIES', 'WINDOW', []), # align context menu
('Script', 'SCRIPTS_WINDOW', 'WINDOW', []),
('Text', 'TEXT_EDITOR', 'WINDOW', []),
('Console', 'CONSOLE', 'WINDOW', []),
('View3D Gesture Circle', 'EMPTY', 'WINDOW', []),
('Gesture Border', 'EMPTY', 'WINDOW', []),
('Standard Modal Map', 'EMPTY', 'WINDOW', []),
('Transform Modal Map', 'EMPTY', 'WINDOW', []),
('View3D Fly Modal', 'EMPTY', 'WINDOW', []),
('View3D Rotate Modal', 'EMPTY', 'WINDOW', []),
('View3D Move Modal', 'EMPTY', 'WINDOW', []),
('View3D Zoom Modal', 'EMPTY', 'WINDOW', []),
]
def _km_exists_in(km, export_keymaps):
for km2, kc in export_keymaps:
if km2.name == km.name:
return True
return False
# kc1 takes priority over kc2
def _merge_keymaps(kc1, kc2):
merged_keymaps = [(km, kc1) for km in kc1.keymaps]
if kc1 != kc2:
merged_keymaps.extend([(km, kc2) for km in kc2.keymaps if not _km_exists_in(km, merged_keymaps)])
return merged_keymaps
class InputKeyMapPanel(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
bl_label = "Input"
bl_region_type = 'WINDOW'
bl_show_header = False
def draw_entry(self, display_keymaps, entry, col, level=0):
idname, spaceid, regionid, children = entry
for km, kc in display_keymaps:
if km.name == idname and km.space_type == spaceid and km.region_type == regionid:
self.draw_km(display_keymaps, kc, km, children, col, level)
'''
km = kc.find_keymap(idname, space_type=spaceid, region_type=regionid)
if not km:
kc = defkc
km = kc.find_keymap(idname, space_type=spaceid, region_type=regionid)
if km:
self.draw_km(kc, km, children, col, level)
'''
def indented_layout(self, layout, level):
indentpx = 16
if level == 0:
level = 0.0001 # Tweak so that a percentage of 0 won't split by half
indent = level * indentpx / bpy.context.region.width
split = layout.split(percentage=indent)
col = split.column()
col = split.column()
return col
def draw_km(self, display_keymaps, kc, km, children, layout, level):
km = km.active()
layout.set_context_pointer("keymap", km)
col = self.indented_layout(layout, level)
row = col.row()
row.prop(km, "children_expanded", text="", no_bg=True)
row.label(text=km.name)
row.label()
row.label()
if km.modal:
row.label(text="", icon='LINKED')
if km.user_defined:
op = row.operator("wm.keymap_restore", text="Restore")
else:
op = row.operator("wm.keymap_edit", text="Edit")
if km.children_expanded:
if children:
# Put the Parent key map's entries in a 'global' sub-category
# equal in hierarchy to the other children categories
subcol = self.indented_layout(col, level + 1)
subrow = subcol.row()
subrow.prop(km, "items_expanded", text="", no_bg=True)
subrow.label(text="%s (Global)" % km.name)
else:
km.items_expanded = True
# Key Map items
if km.items_expanded:
for kmi in km.items:
self.draw_kmi(display_keymaps, kc, km, kmi, col, level + 1)
# "Add New" at end of keymap item list
col = self.indented_layout(col, level + 1)
subcol = col.split(percentage=0.2).column()
subcol.enabled = km.user_defined
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
col.separator()
# Child key maps
if children:
subcol = col.column()
row = subcol.row()
for entry in children:
self.draw_entry(display_keymaps, entry, col, level + 1)
def draw_kmi(self, display_keymaps, kc, km, kmi, layout, level):
map_type = kmi.map_type
col = self.indented_layout(layout, level)
if km.user_defined:
col = col.column(align=True)
box = col.box()
else:
box = col.column()
split = box.split(percentage=0.05)
# header bar
row = split.row()
row.prop(kmi, "expanded", text="", no_bg=True)
row = split.row()
row.enabled = km.user_defined
row.prop(kmi, "active", text="", no_bg=True)
if km.modal:
row.prop(kmi, "propvalue", text="")
else:
row.label(text=kmi.name)
row = split.row()
row.enabled = km.user_defined
row.prop(kmi, "map_type", text="")
if map_type == 'KEYBOARD':
row.prop(kmi, "type", text="", full_event=True)
elif map_type == 'MOUSE':
row.prop(kmi, "type", text="", full_event=True)
elif map_type == 'TWEAK':
subrow = row.row()
subrow.prop(kmi, "type", text="")
subrow.prop(kmi, "value", text="")
elif map_type == 'TIMER':
row.prop(kmi, "type", text="")
else:
row.label()
if kmi.id:
op = row.operator("wm.keyitem_restore", text="", icon='BACK')
op.item_id = kmi.id
op = row.operator("wm.keyitem_remove", text="", icon='X')
op.item_id = kmi.id
# Expanded, additional event settings
if kmi.expanded:
box = col.box()
box.enabled = km.user_defined
if map_type not in ('TEXTINPUT', 'TIMER'):
split = box.split(percentage=0.4)
sub = split.row()
if km.modal:
sub.prop(kmi, "propvalue", text="")
else:
sub.prop(kmi, "idname", text="")
sub = split.column()
subrow = sub.row(align=True)
if map_type == 'KEYBOARD':
subrow.prop(kmi, "type", text="", event=True)
subrow.prop(kmi, "value", text="")
elif map_type == 'MOUSE':
subrow.prop(kmi, "type", text="")
subrow.prop(kmi, "value", text="")
subrow = sub.row()
subrow.scale_x = 0.75
subrow.prop(kmi, "any")
subrow.prop(kmi, "shift")
subrow.prop(kmi, "ctrl")
subrow.prop(kmi, "alt")
subrow.prop(kmi, "oskey", text="Cmd")
subrow.prop(kmi, "key_modifier", text="", event=True)
def display_properties(properties, title=None):
box.separator()
if title:
box.label(text=title)
flow = box.column_flow(columns=2)
for pname in dir(properties):
if not properties.is_property_hidden(pname):
value = eval("properties." + pname)
if isinstance(value, bpy.types.OperatorProperties):
display_properties(value, title=pname)
else:
flow.prop(properties, pname)
# Operator properties
props = kmi.properties
if props is not None:
display_properties(props)
# Modal key maps attached to this operator
if not km.modal:
kmm = kc.find_keymap_modal(kmi.idname)
if kmm:
self.draw_km(display_keymaps, kc, kmm, None, layout, level + 1)
layout.set_context_pointer("keymap", km)
def draw_filtered(self, display_keymaps, filter, layout):
for km, kc in display_keymaps:
km = km.active()
layout.set_context_pointer("keymap", km)
filtered_items = [kmi for kmi in km.items if filter in kmi.name.lower()]
if len(filtered_items) != 0:
col = layout.column()
row = col.row()
row.label(text=km.name, icon="DOT")
row.label()
row.label()
if km.user_defined:
op = row.operator("wm.keymap_restore", text="Restore")
else:
op = row.operator("wm.keymap_edit", text="Edit")
for kmi in filtered_items:
self.draw_kmi(display_keymaps, kc, km, kmi, col, 1)
# "Add New" at end of keymap item list
col = self.indented_layout(layout, 1)
subcol = col.split(percentage=0.2).column()
subcol.enabled = km.user_defined
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
def draw_hierarchy(self, display_keymaps, layout):
for entry in KM_HIERARCHY:
self.draw_entry(display_keymaps, entry, layout)
def draw_keymaps(self, context, layout):
wm = context.manager
kc = wm.active_keyconfig
defkc = wm.default_keyconfig
col = layout.column()
sub = col.column()
subsplit = sub.split()
subcol = subsplit.column()
row = subcol.row()
row.prop_object(wm, "active_keyconfig", wm, "keyconfigs", text="Key Config:")
layout.set_context_pointer("keyconfig", wm.active_keyconfig)
row.operator("wm.keyconfig_remove", text="", icon='X')
row.prop(context.space_data, "filter", icon="VIEWZOOM")
col.separator()
display_keymaps = _merge_keymaps(kc, defkc)
if context.space_data.filter != "":
filter = context.space_data.filter.lower()
self.draw_filtered(display_keymaps, filter, col)
else:
self.draw_hierarchy(display_keymaps, col)
from bpy.props import *
class WM_OT_keyconfig_test(bpy.types.Operator):
"Test keyconfig for conflicts"
bl_idname = "wm.keyconfig_test"
bl_label = "Test Key Configuration for Conflicts"
def testEntry(self, kc, entry, src=None, parent=None):
result = False
def kmistr(kmi):
if km.modal:
s = ["kmi = km.items.add_modal(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value)]
else:
s = ["kmi = km.items.add(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value)]
if kmi.any:
s.append(", any=True")
else:
if kmi.shift:
s.append(", shift=True")
if kmi.ctrl:
s.append(", ctrl=True")
if kmi.alt:
s.append(", alt=True")
if kmi.oskey:
s.append(", oskey=True")
if kmi.key_modifier and kmi.key_modifier != 'NONE':
s.append(", key_modifier=\'%s\'" % kmi.key_modifier)
s.append(")\n")
def export_properties(prefix, properties):
for pname in dir(properties):
if not properties.is_property_hidden(pname):
value = eval("properties.%s" % pname)
if isinstance(value, bpy.types.OperatorProperties):
export_properties(prefix + "." + pname, value)
elif properties.is_property_set(pname):
value = _string_value(value)
if value != "":
s.append(prefix + ".%s = %s\n" % (pname, value))
props = kmi.properties
if props is not None:
export_properties("kmi.properties", props)
return "".join(s).strip()
idname, spaceid, regionid, children = entry
km = kc.find_keymap(idname, space_type=spaceid, region_type=regionid)
if km:
km = km.active()
if src:
for item in km.items:
if src.compare(item):
print("===========")
print(parent.name)
print(kmistr(src))
print(km.name)
print(kmistr(item))
result = True
for child in children:
if self.testEntry(kc, child, src, parent):
result = True
else:
for i in range(len(km.items)):
src = km.items[i]
for child in children:
if self.testEntry(kc, child, src, km):
result = True
for j in range(len(km.items) - i - 1):
item = km.items[j + i + 1]
if src.compare(item):
print("===========")
print(km.name)
print(kmistr(src))
print(kmistr(item))
result = True
for child in children:
if self.testEntry(kc, child):
result = True
return result
def testConfig(self, kc):
result = False
for entry in KM_HIERARCHY:
if self.testEntry(kc, entry):
result = True
return result
def execute(self, context):
wm = context.manager
kc = wm.default_keyconfig
if self.testConfig(kc):
print("CONFLICT")
return {'FINISHED'}
def _string_value(value):
if isinstance(value, str) or isinstance(value, bool) or isinstance(value, float) or isinstance(value, int):
result = repr(value)
elif getattr(value, '__len__', False):
repr(list(value))
else:
print("Export key configuration: can't write ", value)
return result
class WM_OT_keyconfig_import(bpy.types.Operator):
"Import key configuration from a python script"
bl_idname = "wm.keyconfig_import"
bl_label = "Import Key Configuration..."
path = StringProperty(name="File Path", description="File path to write file to")
filename = StringProperty(name="File Name", description="Name of the file")
directory = StringProperty(name="Directory", description="Directory of the file")
filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
keep_original = BoolProperty(name="Keep original", description="Keep original file after copying to configuration folder", default=True)
def execute(self, context):
if not self.properties.path:
raise Exception("File path not set")
f = open(self.properties.path, "r")
if not f:
raise Exception("Could not open file")
name_pattern = re.compile("^kc = wm.add_keyconfig\('(.*)'\)$")
for line in f.readlines():
match = name_pattern.match(line)
if match:
config_name = match.groups()[0]
f.close()
path = os.path.split(os.path.split(__file__)[0])[0] # remove ui/space_userpref.py
path = os.path.join(path, "cfg")
# create config folder if needed
if not os.path.exists(path):
os.mkdir(path)
path = os.path.join(path, config_name + ".py")
if self.properties.keep_original:
shutil.copy(self.properties.path, path)
else:
shutil.move(self.properties.path, path)
exec("import " + config_name)
wm = bpy.context.manager
wm.active_keyconfig = wm.keyconfigs[config_name]
return {'FINISHED'}
def invoke(self, context, event):
wm = context.manager
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
# This operator is also used by interaction presets saving - AddPresetBase
class WM_OT_keyconfig_export(bpy.types.Operator):
"Export key configuration to a python script"
bl_idname = "wm.keyconfig_export"
bl_label = "Export Key Configuration..."
path = StringProperty(name="File Path", description="File path to write file to")
filename = StringProperty(name="File Name", description="Name of the file")
directory = StringProperty(name="Directory", description="Directory of the file")
filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
kc_name = StringProperty(name="KeyConfig Name", description="Name to save the key config as")
def execute(self, context):
if not self.properties.path:
raise Exception("File path not set")
f = open(self.properties.path, "w")
if not f:
raise Exception("Could not open file")
wm = context.manager
kc = wm.active_keyconfig
if self.properties.kc_name != '':
name = self.properties.kc_name
elif kc.name == 'Blender':
name = os.path.splitext(os.path.basename(self.properties.path))[0]
else:
name = kc.name
f.write("# Configuration %s\n" % name)
f.write("import bpy\n\n")
f.write("wm = bpy.context.manager\n")
f.write("kc = wm.add_keyconfig('%s')\n\n" % name)
# Generate a list of keymaps to export:
#
# First add all user_defined keymaps (found in inputs.edited_keymaps list),
# then add all remaining keymaps from the currently active custom keyconfig.
#
# This will create a final list of keymaps that can be used as a 'diff' against
# the default blender keyconfig, recreating the current setup from a fresh blender
# without needing to export keymaps which haven't been edited.
class FakeKeyConfig():
keymaps = []
edited_kc = FakeKeyConfig()
edited_kc.keymaps.extend(context.user_preferences.inputs.edited_keymaps)
# merge edited keymaps with non-default keyconfig, if it exists
if kc != wm.default_keyconfig:
export_keymaps = _merge_keymaps(edited_kc, kc)
else:
export_keymaps = _merge_keymaps(edited_kc, edited_kc)
for km, kc_x in export_keymaps:
km = km.active()
f.write("# Map %s\n" % km.name)
f.write("km = kc.add_keymap('%s', space_type='%s', region_type='%s', modal=%s)\n\n" % (km.name, km.space_type, km.region_type, km.modal))
for kmi in km.items:
if km.modal:
f.write("kmi = km.items.add_modal('%s', '%s', '%s'" % (kmi.propvalue, kmi.type, kmi.value))
else:
f.write("kmi = km.items.add('%s', '%s', '%s'" % (kmi.idname, kmi.type, kmi.value))
if kmi.any:
f.write(", any=True")
else:
if kmi.shift:
f.write(", shift=True")
if kmi.ctrl:
f.write(", ctrl=True")
if kmi.alt:
f.write(", alt=True")
if kmi.oskey:
f.write(", oskey=True")
if kmi.key_modifier and kmi.key_modifier != 'NONE':
f.write(", key_modifier='%s'" % kmi.key_modifier)
f.write(")\n")
def export_properties(prefix, properties):
for pname in dir(properties):
if not properties.is_property_hidden(pname):
value = eval("properties.%s" % pname)
if isinstance(value, bpy.types.OperatorProperties):
export_properties(prefix + "." + pname, value)
elif properties.is_property_set(pname):
value = _string_value(value)
if value != "":
f.write(prefix + ".%s = %s\n" % (pname, value))
props = kmi.properties
if props is not None:
export_properties("kmi.properties", props)
f.write("\n")
f.close()
return {'FINISHED'}
def invoke(self, context, event):
wm = context.manager
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
class WM_OT_keymap_edit(bpy.types.Operator):
"Edit stored key map"
bl_idname = "wm.keymap_edit"
bl_label = "Edit Key Map"
def execute(self, context):
wm = context.manager
km = context.keymap
km.copy_to_user()
return {'FINISHED'}
class WM_OT_keymap_restore(bpy.types.Operator):
"Restore key map(s)"
bl_idname = "wm.keymap_restore"
bl_label = "Restore Key Map(s)"
all = BoolProperty(attr="all", name="All Keymaps", description="Restore all keymaps to default")
def execute(self, context):
wm = context.manager
if self.properties.all:
for km in wm.default_keyconfig.keymaps:
km.restore_to_default()
else:
km = context.keymap
km.restore_to_default()
return {'FINISHED'}
class WM_OT_keyitem_restore(bpy.types.Operator):
"Restore key map item"
bl_idname = "wm.keyitem_restore"
bl_label = "Restore Key Map Item"
item_id = IntProperty(attr="item_id", name="Item Identifier", description="Identifier of the item to remove")
def execute(self, context):
wm = context.manager
km = context.keymap
kmi = km.item_from_id(self.properties.item_id)
km.restore_item_to_default(kmi)
return {'FINISHED'}
class WM_OT_keyitem_add(bpy.types.Operator):
"Add key map item"
bl_idname = "wm.keyitem_add"
bl_label = "Add Key Map Item"
def execute(self, context):
wm = context.manager
km = context.keymap
kc = wm.default_keyconfig
if km.modal:
km.items.add_modal("", 'A', 'PRESS') # kmi
else:
km.items.add("none", 'A', 'PRESS') # kmi
# clear filter and expand keymap so we can see the newly added item
if context.space_data.filter != '':
context.space_data.filter = ''
km.items_expanded = True
km.children_expanded = True
return {'FINISHED'}
class WM_OT_keyitem_remove(bpy.types.Operator):
"Remove key map item"
bl_idname = "wm.keyitem_remove"
bl_label = "Remove Key Map Item"
item_id = IntProperty(attr="item_id", name="Item Identifier", description="Identifier of the item to remove")
def execute(self, context):
wm = context.manager
km = context.keymap
kmi = km.item_from_id(self.properties.item_id)
km.remove_item(kmi)
return {'FINISHED'}
class WM_OT_keyconfig_remove(bpy.types.Operator):
"Remove key config"
bl_idname = "wm.keyconfig_remove"
bl_label = "Remove Key Config"
def poll(self, context):
wm = context.manager
return wm.active_keyconfig.user_defined
def execute(self, context):
wm = context.manager
keyconfig = wm.active_keyconfig
module = __import__(keyconfig.name)
os.remove(module.__file__)
compiled_path = module.__file__ + "c" # for .pyc
if os.path.exists(compiled_path):
os.remove(compiled_path)
wm.remove_keyconfig(keyconfig)
return {'FINISHED'}
classes = [
WM_OT_keyconfig_export,
WM_OT_keyconfig_import,
WM_OT_keyconfig_test,
WM_OT_keyconfig_remove,
WM_OT_keymap_edit,
WM_OT_keymap_restore,
WM_OT_keyitem_add,
WM_OT_keyitem_remove,
WM_OT_keyitem_restore]
def register():
register = bpy.types.register
for cls in classes:
register(cls)
def unregister():
unregister = bpy.types.unregister
for cls in classes:
unregister(cls)
if __name__ == "__main__":
register()

@ -145,7 +145,7 @@ class VIEW3D_MT_transform(bpy.types.Menu):
layout.operator("transform.tosphere", text="To Sphere")
layout.operator("transform.shear", text="Shear")
layout.operator("transform.warp", text="Warp")
layout.operator("transform.transform", text="Push/Pull").mode = 'PUSHPULL'
layout.operator("transform.push_pull", text="Push/Pull")
if context.edit_object and context.edit_object.type == 'ARMATURE':
layout.operator("armature.align")
else:
@ -207,7 +207,6 @@ class VIEW3D_MT_snap(bpy.types.Menu):
layout.operator("view3d.snap_selected_to_grid", text="Selection to Grid")
layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor")
layout.operator("view3d.snap_selected_to_center", text="Selection to Origin")
layout.separator()

@ -668,7 +668,8 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel):
col.template_ID_preview(brush, "texture", new="texture.new", rows=2, cols=4)
col.row().prop(tex_slot, "map_mode", expand=True)
if context.sculpt_object:
col.row().prop(tex_slot, "map_mode", expand=True)
class VIEW3D_PT_tools_brush_tool(PaintPanel):

@ -97,6 +97,7 @@ COMLIB += $(OCGDIR)/blender/nodes_tex/$(DEBUG_DIR)libnodes_tex.a
COMLIB += $(OCGDIR)/blender/nodes/$(DEBUG_DIR)libnodes.a
COMLIB += $(OCGDIR)/blender/imbuf/$(DEBUG_DIR)libimbuf.a
COMLIB += $(OCGDIR)/blender/ikplugin/$(DEBUG_DIR)libikplugin.a
COMLIB += $(OCGDIR)/blender/modifiers/$(DEBUG_DIR)libmodifiers.a
COMLIB += $(NAN_IKSOLVER)/lib/$(DEBUG_DIR)libiksolver.a
COMLIB += $(NAN_ITASC)/lib/$(DEBUG_DIR)libitasc.a
COMLIB += $(NAN_ITASC)/lib/$(DEBUG_DIR)libitasc_kdl.a

@ -29,6 +29,7 @@ ADD_SUBDIRECTORY(editors)
ADD_SUBDIRECTORY(avi)
ADD_SUBDIRECTORY(nodes)
ADD_SUBDIRECTORY(blenkernel)
ADD_SUBDIRECTORY(modifiers)
ADD_SUBDIRECTORY(blenlib)
ADD_SUBDIRECTORY(blenloader)
ADD_SUBDIRECTORY(blenpluginapi)

@ -33,7 +33,7 @@ include nan_definitions.mk
DIRS = windowmanager editors blenloader readblenfile
DIRS += avi imbuf render blenlib blenkernel blenpluginapi
DIRS += makesdna makesrna
DIRS += python nodes gpu
DIRS += python nodes modifiers gpu
DIRS += blenfont ikplugin
ifeq ($(WITH_QUICKTIME), true)

@ -17,6 +17,7 @@ SConscript(['avi/SConscript',
'readblenfile/SConscript',
'render/SConscript',
'nodes/SConscript',
'modifiers/SConscript',
'ikplugin/SConscript',
'windowmanager/SConscript',
'blenfont/SConscript'])

@ -456,7 +456,7 @@ void DM_interp_face_data(struct DerivedMesh *source, struct DerivedMesh *dest,
float *weights, FaceVertWeight *vert_weights,
int count, int dest_index);
void DM_swap_face_data(struct DerivedMesh *dm, int index, int *corner_indices);
void DM_swap_face_data(struct DerivedMesh *dm, int index, const int *corner_indices);
/* Temporary? A function to give a colorband to derivedmesh for vertexcolor ranges */
void vDM_ColorBand_store(struct ColorBand *coba);

@ -45,7 +45,7 @@ struct Scene;
struct Main;
#define BLENDER_VERSION 252
#define BLENDER_SUBVERSION 4
#define BLENDER_SUBVERSION 5
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0

@ -31,7 +31,7 @@
struct CurveMapping;
struct CurveMap;
struct Histogram;
struct Scopes;
struct ImBuf;
struct rctf;
@ -74,7 +74,8 @@ void curvemapping_initialize(struct CurveMapping *cumap);
void curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size);
void colorcorrection_do_ibuf(struct ImBuf *ibuf, const char *profile);
void histogram_update(struct Histogram *hist, struct ImBuf *ibuf);
void scopes_update(struct Scopes *scopes, struct ImBuf *ibuf, int use_color_management);
void scopes_free(struct Scopes *scopes);
#endif

@ -174,7 +174,7 @@ void CustomData_bmesh_interp(struct CustomData *data, void **src_blocks,
/* swaps the data in the element corners, to new corners with indices as
specified in corner_indices. for edges this is an array of length 2, for
faces an array of length 4 */
void CustomData_swap(struct CustomData *data, int index, int *corner_indices);
void CustomData_swap(struct CustomData *data, int index, const int *corner_indices);
/* gets a pointer to the data element at index from the first layer of type
* returns NULL if there is no layer of type

@ -187,6 +187,8 @@ void copy_fcurves(ListBase *dst, ListBase *src);
/* find matching F-Curve in the given list of F-Curves */
struct FCurve *list_find_fcurve(ListBase *list, const char rna_path[], const int array_index);
struct FCurve *iter_step_fcurve (struct FCurve *fcu_iter, const char rna_path[]);
/* high level function to get an fcurve from C without having the rna */
struct FCurve *id_data_find_fcurve(ID *id, void *data, struct StructRNA *type, char *prop_name, int index);

@ -30,32 +30,21 @@
#ifndef BKE_FLUIDSIM_H
#define BKE_FLUIDSIM_H
struct Object;
struct Scene;
struct FluidsimModifierData;
struct FluidsimSettings;
struct DerivedMesh;
struct MVert;
/* old interface */
struct FluidsimSettings *fluidsimSettingsNew(struct Object *srcob);
void initElbeemMesh(struct Scene *scene, struct Object *ob,
int *numVertices, float **vertices,
int *numTriangles, int **triangles,
int useGlobalCoords, int modifierIndex);
/* new fluid-modifier interface */
void fluidsim_init(struct FluidsimModifierData *fluidmd);
void fluidsim_free(struct FluidsimModifierData *fluidmd);
struct DerivedMesh *fluidsim_read_cache(struct Object *ob, struct DerivedMesh *orgdm,
struct FluidsimModifierData *fluidmd, int framenr, int useRenderParams);
void fluidsim_read_vel_cache(struct FluidsimModifierData *fluidmd, struct DerivedMesh *dm,
char *filename);
struct DerivedMesh *fluidsimModifier_do(struct FluidsimModifierData *fluidmd,
struct Scene *scene, struct Object *ob, struct DerivedMesh *dm,
int useRenderParams, int isFinalCalc);
/* bounding box & memory estimate */
void fluid_get_bb(struct MVert *mvert, int totvert, float obmat[][4],
float start[3], float size[3]);

@ -31,6 +31,7 @@
#ifndef BKE_GROUP_H
#define BKE_GROUP_H
struct Base;
struct Group;
struct GroupObject;
struct Object;

@ -35,6 +35,7 @@ struct Mesh;
struct MFace;
struct Multires;
struct MultiresModifierData;
struct ModifierData;
struct Object;
void multires_mark_as_modified(struct Object *ob);
@ -46,11 +47,14 @@ struct DerivedMesh *multires_dm_create_from_derived(struct MultiresModifierData*
int local_mmd, struct DerivedMesh*, struct Object *, int, int);
struct MultiresModifierData *find_multires_modifier(struct Object *ob);
struct DerivedMesh *get_multires_dm(struct Object *ob);
void multiresModifier_join(struct Object *);
void multiresModifier_del_levels(struct MultiresModifierData *, struct Object *, int direction);
void multiresModifier_subdivide(struct MultiresModifierData *mmd, struct Object *ob,
int updateblock, int simple);
int multiresModifier_reshape(struct MultiresModifierData *mmd, struct Object *dst, struct Object *src);
int multiresModifier_reshapeFromDM(struct MultiresModifierData *mmd, struct Object *ob, struct DerivedMesh *srcdm);
int multiresModifier_reshapeFromDeformMod(struct MultiresModifierData *mmd, struct Object *ob, struct ModifierData *md);
void multires_stitch_grids(struct Object *);

@ -46,6 +46,7 @@ struct BulletSoftBody;
struct Group;
struct bAction;
struct RenderData;
struct rctf;
void clear_workob(struct Object *workob);
void what_does_parent(struct Scene *scene, struct Object *ob, struct Object *workob);
@ -76,6 +77,7 @@ void *add_camera(char *name);
struct Camera *copy_camera(struct Camera *cam);
void make_local_camera(struct Camera *cam);
float dof_camera(struct Object *ob);
void *add_lamp(char *name);
struct Lamp *copy_lamp(struct Lamp *la);
void make_local_lamp(struct Lamp *la);

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