Merged changes in the trunk up to revision 31440.

This commit is contained in:
2010-08-18 13:16:34 +00:00
179 changed files with 6744 additions and 6694 deletions

View File

@@ -44,7 +44,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
InlineFunctionExpansion="2" InlineFunctionExpansion="2"
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include;..\..\..\..\..\lib\windows\fftw3\include" AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\Python;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include;..\..\..\..\..\lib\windows\fftw3\include;..\..\..\..\..\lib\windows\python\include\python3.1"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL" PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -118,7 +118,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include;..\..\..\..\..\lib\windows\fftw3\include" AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\Python;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include;..\..\..\..\..\lib\windows\fftw3\include;..\..\..\..\..\lib\windows\python\include\python3.1"
PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL" PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
@@ -193,7 +193,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
InlineFunctionExpansion="2" InlineFunctionExpansion="2"
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include;..\..\..\..\..\lib\windows\fftw3\include" AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\Python;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include;..\..\..\..\..\lib\windows\fftw3\include;..\..\..\..\..\lib\windows\python\include\python3.1"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL" PreprocessorDefinitions="WIN32,NDEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
StringPooling="true" StringPooling="true"
RuntimeLibrary="2" RuntimeLibrary="2"
@@ -267,7 +267,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include;..\..\..\..\..\lib\windows\fftw3\include" AdditionalIncludeDirectories="..\..;..\..\ffmpeg;..\..\FX;..\..\intern;..\..\OpenAL;..\..\SDL;..\..\SRC;..\..\sndfile;..\..\Python;..\..\..\..\..\lib\windows\pthreads\include;..\..\..\..\..\lib\windows\samplerate\include;..\..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\..\lib\windows\sdl\include;..\..\..\..\..\lib\windows\openal\include;..\..\..\..\..\lib\windows\jack\include;..\..\..\..\..\lib\windows\sndfile\include;..\..\..\..\..\lib\windows\fftw3\include;..\..\..\..\..\lib\windows\python\include\python3.1"
PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL" PreprocessorDefinitions="WIN32,_DEBUG,_LIB,WITH_FFMPEG,WITH_SDL,WITH_OPENAL"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="3"
@@ -321,6 +321,10 @@
<Filter <Filter
Name="intern" Name="intern"
> >
<File
RelativePath="..\..\intern\AUD_3DMath.h"
>
</File>
<File <File
RelativePath="..\..\intern\AUD_Buffer.cpp" RelativePath="..\..\intern\AUD_Buffer.cpp"
> >
@@ -385,6 +389,14 @@
RelativePath="..\..\intern\AUD_ConverterReader.h" RelativePath="..\..\intern\AUD_ConverterReader.h"
> >
</File> </File>
<File
RelativePath="..\..\intern\AUD_DefaultMixer.cpp"
>
</File>
<File
RelativePath="..\..\intern\AUD_DefaultMixer.h"
>
</File>
<File <File
RelativePath="..\..\intern\AUD_FileFactory.cpp" RelativePath="..\..\intern\AUD_FileFactory.cpp"
> >
@@ -449,6 +461,10 @@
RelativePath="..\..\intern\AUD_NULLDevice.h" RelativePath="..\..\intern\AUD_NULLDevice.h"
> >
</File> </File>
<File
RelativePath="..\..\intern\AUD_PyInit.h"
>
</File>
<File <File
RelativePath="..\..\intern\AUD_ReadDevice.cpp" RelativePath="..\..\intern\AUD_ReadDevice.cpp"
> >
@@ -481,6 +497,22 @@
RelativePath="..\..\intern\AUD_SequencerReader.h" RelativePath="..\..\intern\AUD_SequencerReader.h"
> >
</File> </File>
<File
RelativePath="..\..\intern\AUD_SilenceFactory.cpp"
>
</File>
<File
RelativePath="..\..\intern\AUD_SilenceFactory.h"
>
</File>
<File
RelativePath="..\..\intern\AUD_SilenceReader.cpp"
>
</File>
<File
RelativePath="..\..\intern\AUD_SilenceReader.h"
>
</File>
<File <File
RelativePath="..\..\intern\AUD_SinusFactory.cpp" RelativePath="..\..\intern\AUD_SinusFactory.cpp"
> >
@@ -505,10 +537,6 @@
RelativePath="..\..\intern\AUD_SoftwareDevice.h" RelativePath="..\..\intern\AUD_SoftwareDevice.h"
> >
</File> </File>
<File
RelativePath="..\..\intern\AUD_SourceCaps.h"
>
</File>
<File <File
RelativePath="..\..\intern\AUD_Space.h" RelativePath="..\..\intern\AUD_Space.h"
> >
@@ -554,11 +582,11 @@
> >
</File> </File>
<File <File
RelativePath="..\..\FX\AUD_AccumulatorReader.cpp" RelativePath="..\..\FX\AUD_BaseIIRFilterReader.cpp"
> >
</File> </File>
<File <File
RelativePath="..\..\FX\AUD_AccumulatorReader.h" RelativePath="..\..\FX\AUD_BaseIIRFilterReader.h"
> >
</File> </File>
<File <File
@@ -570,11 +598,11 @@
> >
</File> </File>
<File <File
RelativePath="..\..\FX\AUD_ButterworthReader.cpp" RelativePath="..\..\FX\AUD_CallbackIIRFilterReader.cpp"
> >
</File> </File>
<File <File
RelativePath="..\..\FX\AUD_ButterworthReader.h" RelativePath="..\..\FX\AUD_CallbackIIRFilterReader.h"
> >
</File> </File>
<File <File
@@ -593,6 +621,14 @@
RelativePath="..\..\FX\AUD_DelayReader.h" RelativePath="..\..\FX\AUD_DelayReader.h"
> >
</File> </File>
<File
RelativePath="..\..\FX\AUD_DoubleFactory.cpp"
>
</File>
<File
RelativePath="..\..\FX\AUD_DoubleFactory.h"
>
</File>
<File <File
RelativePath="..\..\FX\AUD_DoubleReader.cpp" RelativePath="..\..\FX\AUD_DoubleReader.cpp"
> >
@@ -625,14 +661,6 @@
RelativePath="..\..\FX\AUD_EnvelopeFactory.h" RelativePath="..\..\FX\AUD_EnvelopeFactory.h"
> >
</File> </File>
<File
RelativePath="..\..\FX\AUD_EnvelopeReader.cpp"
>
</File>
<File
RelativePath="..\..\FX\AUD_EnvelopeReader.h"
>
</File>
<File <File
RelativePath="..\..\FX\AUD_FaderFactory.cpp" RelativePath="..\..\FX\AUD_FaderFactory.cpp"
> >
@@ -658,11 +686,19 @@
> >
</File> </File>
<File <File
RelativePath="..\..\FX\AUD_HighpassReader.cpp" RelativePath="..\..\FX\AUD_IIRFilterFactory.cpp"
> >
</File> </File>
<File <File
RelativePath="..\..\FX\AUD_HighpassReader.h" RelativePath="..\..\FX\AUD_IIRFilterFactory.h"
>
</File>
<File
RelativePath="..\..\FX\AUD_IIRFilterReader.cpp"
>
</File>
<File
RelativePath="..\..\FX\AUD_IIRFilterReader.h"
> >
</File> </File>
<File <File
@@ -705,14 +741,6 @@
RelativePath="..\..\FX\AUD_LowpassFactory.h" RelativePath="..\..\FX\AUD_LowpassFactory.h"
> >
</File> </File>
<File
RelativePath="..\..\FX\AUD_LowpassReader.cpp"
>
</File>
<File
RelativePath="..\..\FX\AUD_LowpassReader.h"
>
</File>
<File <File
RelativePath="..\..\FX\AUD_PingPongFactory.cpp" RelativePath="..\..\FX\AUD_PingPongFactory.cpp"
> >
@@ -745,14 +773,6 @@
RelativePath="..\..\FX\AUD_RectifyFactory.h" RelativePath="..\..\FX\AUD_RectifyFactory.h"
> >
</File> </File>
<File
RelativePath="..\..\FX\AUD_RectifyReader.cpp"
>
</File>
<File
RelativePath="..\..\FX\AUD_RectifyReader.h"
>
</File>
<File <File
RelativePath="..\..\FX\AUD_ReverseFactory.cpp" RelativePath="..\..\FX\AUD_ReverseFactory.cpp"
> >
@@ -777,14 +797,6 @@
RelativePath="..\..\FX\AUD_SquareFactory.h" RelativePath="..\..\FX\AUD_SquareFactory.h"
> >
</File> </File>
<File
RelativePath="..\..\FX\AUD_SquareReader.cpp"
>
</File>
<File
RelativePath="..\..\FX\AUD_SquareReader.h"
>
</File>
<File <File
RelativePath="..\..\FX\AUD_SumFactory.cpp" RelativePath="..\..\FX\AUD_SumFactory.cpp"
> >
@@ -794,11 +806,19 @@
> >
</File> </File>
<File <File
RelativePath="..\..\FX\AUD_SumReader.cpp" RelativePath="..\..\FX\AUD_SuperposeFactory.cpp"
> >
</File> </File>
<File <File
RelativePath="..\..\FX\AUD_SumReader.h" RelativePath="..\..\FX\AUD_SuperposeFactory.h"
>
</File>
<File
RelativePath="..\..\FX\AUD_SuperposeReader.cpp"
>
</File>
<File
RelativePath="..\..\FX\AUD_SuperposeReader.h"
> >
</File> </File>
<File <File
@@ -809,14 +829,6 @@
RelativePath="..\..\FX\AUD_VolumeFactory.h" RelativePath="..\..\FX\AUD_VolumeFactory.h"
> >
</File> </File>
<File
RelativePath="..\..\FX\AUD_VolumeReader.cpp"
>
</File>
<File
RelativePath="..\..\FX\AUD_VolumeReader.h"
>
</File>
</Filter> </Filter>
<Filter <Filter
Name="OpenAL" Name="OpenAL"
@@ -895,22 +907,14 @@
</File> </File>
</Filter> </Filter>
<Filter <Filter
Name="fftw" Name="Python"
> >
<File <File
RelativePath="..\..\fftw\AUD_BandPassFactory.cpp" RelativePath="..\..\Python\AUD_PyAPI.cpp"
> >
</File> </File>
<File <File
RelativePath="..\..\fftw\AUD_BandPassFactory.h" RelativePath="..\..\Python\AUD_PyAPI.h"
>
</File>
<File
RelativePath="..\..\fftw\AUD_BandPassReader.cpp"
>
</File>
<File
RelativePath="..\..\fftw\AUD_BandPassReader.h"
> >
</File> </File>
</Filter> </Filter>

View File

@@ -43,7 +43,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include" AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB;WITH_FFMPEG" PreprocessorDefinitions="_DEBUG,WIN32,_LIB;WITH_FFMPEG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
@@ -121,7 +121,7 @@
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="2" Optimization="2"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include" AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB" PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"
@@ -198,7 +198,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include" AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="_DEBUG,WIN32,_LIB;WITH_FFMPEG" PreprocessorDefinitions="_DEBUG,WIN32,_LIB;WITH_FFMPEG"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="1"
@@ -275,7 +275,7 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
InlineFunctionExpansion="1" InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include" AdditionalIncludeDirectories="..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\img;..\..\..\source\blender\imbuf;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\include;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesrna;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenloader;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\blender\radiosity\extern\include;..\..\..\source\kernel\gen_system;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\source\blender\windowmanager;..\..\..\source\blender\editors\include;..\..\..\intern\audaspace\intern"
PreprocessorDefinitions="WIN32,NDEBUG,_LIB" PreprocessorDefinitions="WIN32,NDEBUG,_LIB"
StringPooling="true" StringPooling="true"
RuntimeLibrary="0" RuntimeLibrary="0"

View File

@@ -564,14 +564,14 @@ def extract_triangles(mesh):
img = None img = None
for i, face in enumerate(mesh.faces): for i, face in enumerate(mesh.faces):
f_v = face.verts f_v = face.vertices
# f_v = face.v # f_v = face.v
uf = mesh.active_uv_texture.data[i] if do_uv else None uf = mesh.active_uv_texture.data[i] if do_uv else None
if do_uv: if do_uv:
f_uv = uf.uv f_uv = uf.uv
# f_uv = (uf.uv1, uf.uv2, uf.uv3, uf.uv4) if face.verts[3] else (uf.uv1, uf.uv2, uf.uv3) # f_uv = (uf.uv1, uf.uv2, uf.uv3, uf.uv4) if face.vertices[3] else (uf.uv1, uf.uv2, uf.uv3)
# f_uv = face.uv # f_uv = face.uv
img = uf.image if uf else None img = uf.image if uf else None
# img = face.image # img = face.image
@@ -761,18 +761,18 @@ def make_mesh_chunk(mesh, materialDict):
if len(mesh.uv_textures): if len(mesh.uv_textures):
# if mesh.faceUV: # if mesh.faceUV:
# Remove the face UVs and convert it to vertex UV: # Remove the face UVs and convert it to vertex UV:
vert_array, uv_array, tri_list = remove_face_uv(mesh.verts, tri_list) vert_array, uv_array, tri_list = remove_face_uv(mesh.vertices, tri_list)
else: else:
# Add the vertices to the vertex array: # Add the vertices to the vertex array:
vert_array = _3ds_array() vert_array = _3ds_array()
for vert in mesh.verts: for vert in mesh.vertices:
vert_array.add(_3ds_point_3d(vert.co)) vert_array.add(_3ds_point_3d(vert.co))
# If the mesh has vertex UVs, create an array of UVs: # If the mesh has vertex UVs, create an array of UVs:
if len(mesh.sticky): if len(mesh.sticky):
# if mesh.vertexUV: # if mesh.vertexUV:
uv_array = _3ds_array() uv_array = _3ds_array()
for uv in mesh.sticky: for uv in mesh.sticky:
# for vert in mesh.verts: # for vert in mesh.vertices:
uv_array.add(_3ds_point_uv(uv.co)) uv_array.add(_3ds_point_uv(uv.co))
# uv_array.add(_3ds_point_uv(vert.uvco)) # uv_array.add(_3ds_point_uv(vert.uvco))
else: else:
@@ -1065,7 +1065,7 @@ def write(filename, context):
''' '''
if not blender_mesh.users: if not blender_mesh.users:
bpy.data.meshes.remove(blender_mesh) bpy.data.meshes.remove(blender_mesh)
# blender_mesh.verts = None # blender_mesh.vertices = None
i+=i i+=i

View File

@@ -221,7 +221,7 @@ def mat4x4str(mat):
def getVertsFromGroup(me, group_index): def getVertsFromGroup(me, group_index):
ret = [] ret = []
for i, v in enumerate(me.verts): for i, v in enumerate(me.vertices):
for g in v.groups: for g in v.groups:
if g.group == group_index: if g.group == group_index:
ret.append((i, g.weight)) ret.append((i, g.weight))
@@ -243,11 +243,11 @@ def BPyMesh_meshWeight2List(ob):
if not len_groupNames: if not len_groupNames:
# no verts? return a vert aligned empty list # no verts? return a vert aligned empty list
return [[] for i in range(len(me.verts))], [] return [[] for i in range(len(me.vertices))], []
else: else:
vWeightList= [[0.0]*len_groupNames for i in range(len(me.verts))] vWeightList= [[0.0]*len_groupNames for i in range(len(me.vertices))]
for i, v in enumerate(me.verts): for i, v in enumerate(me.vertices):
for g in v.groups: for g in v.groups:
vWeightList[i][g.group] = g.weight vWeightList[i][g.group] = g.weight
@@ -1398,7 +1398,7 @@ def write(filename, batch_objects = None, \
# TODO - this is a bit lazy, we could have a simple write loop # TODO - this is a bit lazy, we could have a simple write loop
# for this case because all weights are 1.0 but for now this is ok # for this case because all weights are 1.0 but for now this is ok
# Parent Bones arent used all that much anyway. # Parent Bones arent used all that much anyway.
vgroup_data = [(j, 1.0) for j in range(len(my_mesh.blenData.verts))] vgroup_data = [(j, 1.0) for j in range(len(my_mesh.blenData.vertices))]
else: else:
# This bone is not a parent of this mesh object, no weights # This bone is not a parent of this mesh object, no weights
vgroup_data = [] vgroup_data = []
@@ -1487,7 +1487,7 @@ def write(filename, batch_objects = None, \
file.write('\n\t\tVertices: ') file.write('\n\t\tVertices: ')
i=-1 i=-1
for v in me.verts: for v in me.vertices:
if i==-1: if i==-1:
file.write('%.6f,%.6f,%.6f' % tuple(v.co)); i=0 file.write('%.6f,%.6f,%.6f' % tuple(v.co)); i=0
else: else:
@@ -1499,7 +1499,7 @@ def write(filename, batch_objects = None, \
file.write('\n\t\tPolygonVertexIndex: ') file.write('\n\t\tPolygonVertexIndex: ')
i=-1 i=-1
for f in me.faces: for f in me.faces:
fi = f.verts[:] fi = f.vertices[:]
# last index XORd w. -1 indicates end of face # last index XORd w. -1 indicates end of face
fi[-1] = fi[-1] ^ -1 fi[-1] = fi[-1] ^ -1
@@ -1519,8 +1519,8 @@ def write(filename, batch_objects = None, \
# write loose edges as faces. # write loose edges as faces.
for ed in me.edges: for ed in me.edges:
if ed.loose: if ed.is_loose:
ed_val = ed.verts[:] ed_val = ed.vertices[:]
ed_val = ed_val[0], ed_val[-1] ^ -1 ed_val = ed_val[0], ed_val[-1] ^ -1
if i==-1: if i==-1:
@@ -1538,14 +1538,14 @@ def write(filename, batch_objects = None, \
i=-1 i=-1
for ed in me.edges: for ed in me.edges:
if i==-1: if i==-1:
file.write('%i,%i' % (ed.verts[0], ed.verts[1])) file.write('%i,%i' % (ed.vertices[0], ed.vertices[1]))
# file.write('%i,%i' % (ed.v1.index, ed.v2.index)) # file.write('%i,%i' % (ed.v1.index, ed.v2.index))
i=0 i=0
else: else:
if i==13: if i==13:
file.write('\n\t\t') file.write('\n\t\t')
i=0 i=0
file.write(',%i,%i' % (ed.verts[0], ed.verts[1])) file.write(',%i,%i' % (ed.vertices[0], ed.vertices[1]))
# file.write(',%i,%i' % (ed.v1.index, ed.v2.index)) # file.write(',%i,%i' % (ed.v1.index, ed.v2.index))
i+=1 i+=1
@@ -1560,7 +1560,7 @@ def write(filename, batch_objects = None, \
Normals: ''') Normals: ''')
i=-1 i=-1
for v in me.verts: for v in me.vertices:
if i==-1: if i==-1:
file.write('%.15f,%.15f,%.15f' % tuple(v.normal)); i=0 file.write('%.15f,%.15f,%.15f' % tuple(v.normal)); i=0
# file.write('%.15f,%.15f,%.15f' % tuple(v.no)); i=0 # file.write('%.15f,%.15f,%.15f' % tuple(v.no)); i=0
@@ -1584,11 +1584,11 @@ def write(filename, batch_objects = None, \
i=-1 i=-1
for f in me.faces: for f in me.faces:
if i==-1: if i==-1:
file.write('%i' % f.smooth); i=0 file.write('%i' % f.use_smooth); i=0
else: else:
if i==54: if i==54:
file.write('\n '); i=0 file.write('\n '); i=0
file.write(',%i' % f.smooth) file.write(',%i' % f.use_smooth)
i+=1 i+=1
file.write('\n\t\t}') file.write('\n\t\t}')
@@ -1602,27 +1602,23 @@ def write(filename, batch_objects = None, \
ReferenceInformationType: "Direct" ReferenceInformationType: "Direct"
Smoothing: ''') Smoothing: ''')
# SHARP = Blender.Mesh.EdgeFlags.SHARP
i=-1 i=-1
for ed in me.edges: for ed in me.edges:
if i==-1: if i==-1:
file.write('%i' % (ed.sharp)); i=0 file.write('%i' % (ed.use_sharp)); i=0
# file.write('%i' % ((ed.flag&SHARP)!=0)); i=0
else: else:
if i==54: if i==54:
file.write('\n '); i=0 file.write('\n '); i=0
file.write(',%i' % (ed.sharp)) file.write(',%i' % (ed.use_sharp))
# file.write(',%i' % ((ed.flag&SHARP)!=0))
i+=1 i+=1
file.write('\n\t\t}') file.write('\n\t\t}')
# del SHARP
# small utility function # small utility function
# returns a slice of data depending on number of face verts # returns a slice of data depending on number of face verts
# data is either a MeshTextureFace or MeshColor # data is either a MeshTextureFace or MeshColor
def face_data(data, face): def face_data(data, face):
totvert = len(f.verts) totvert = len(f.vertices)
return data[:totvert] return data[:totvert]
@@ -2072,7 +2068,7 @@ def write(filename, batch_objects = None, \
# ob.copy().link(me) # ob.copy().link(me)
# # If new mesh has no vgroups we can try add if verts are teh same # # If new mesh has no vgroups we can try add if verts are teh same
# if not me.getVertGroupNames(): # vgroups were not kept by the modifier # if not me.getVertGroupNames(): # vgroups were not kept by the modifier
# if len(me.verts) == len(orig_mesh.verts): # if len(me.vertices) == len(orig_mesh.vertices):
# groupNames, vWeightDict = BPyMesh.meshWeight2Dict(orig_mesh) # groupNames, vWeightDict = BPyMesh.meshWeight2Dict(orig_mesh)
# BPyMesh.dict2MeshWeight(me, groupNames, vWeightDict) # BPyMesh.dict2MeshWeight(me, groupNames, vWeightDict)
@@ -2961,7 +2957,7 @@ Takes: {''')
# Clear mesh data Only when writing with modifiers applied # Clear mesh data Only when writing with modifiers applied
for me in meshes_to_clear: for me in meshes_to_clear:
bpy.data.meshes.remove(me) bpy.data.meshes.remove(me)
# me.verts = None # me.vertices = None
# --------------------------- Footer # --------------------------- Footer
if world: if world:

View File

@@ -65,7 +65,7 @@ def check_vertcount(mesh, vertcount):
''' '''
check and make sure the vertcount is consistent throughout the frame range check and make sure the vertcount is consistent throughout the frame range
''' '''
if len(mesh.verts) != vertcount: if len(mesh.vertices) != vertcount:
raise Exception('Error, number of verts has changed during animation, cannot export') raise Exception('Error, number of verts has changed during animation, cannot export')
f.close() f.close()
zero_file(filepath) zero_file(filepath)
@@ -94,7 +94,7 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
[0.0, 0.0, 0.0, 1.0],\ [0.0, 0.0, 0.0, 1.0],\
) )
numverts = len(me.verts) numverts = len(me.vertices)
numframes = PREF_ENDFRAME - PREF_STARTFRAME + 1 numframes = PREF_ENDFRAME - PREF_STARTFRAME + 1
PREF_FPS = float(PREF_FPS) PREF_FPS = float(PREF_FPS)
@@ -114,7 +114,7 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
check_vertcount(me, numverts) check_vertcount(me, numverts)
me.transform(mat_flip * ob.matrix_world) me.transform(mat_flip * ob.matrix_world)
f.write(pack(">%df" % (numverts * 3), *[axis for v in me.verts for axis in v.co])) f.write(pack(">%df" % (numverts * 3), *[axis for v in me.vertices for axis in v.co]))
for frame in range(PREF_STARTFRAME, PREF_ENDFRAME + 1):#in order to start at desired frame for frame in range(PREF_STARTFRAME, PREF_ENDFRAME + 1):#in order to start at desired frame
""" """
@@ -128,10 +128,10 @@ def write(filename, sce, ob, PREF_STARTFRAME, PREF_ENDFRAME, PREF_FPS):
me.transform(mat_flip * ob.matrix_world) me.transform(mat_flip * ob.matrix_world)
# Write the vertex data # Write the vertex data
f.write(pack(">%df" % (numverts * 3), *[axis for v in me.verts for axis in v.co])) f.write(pack(">%df" % (numverts * 3), *[axis for v in me.vertices for axis in v.co]))
""" """
me_tmp.verts= None me_tmp.vertices= None
""" """
f.close() f.close()

View File

@@ -308,7 +308,7 @@ def write_file(filepath, objects, scene,
of vertices is the face's group of vertices is the face's group
""" """
weightDict = {} weightDict = {}
for vert_index in face.verts: for vert_index in face.vertices:
# for vert in face: # for vert in face:
vWeights = vWeightMap[vert_index] vWeights = vWeightMap[vert_index]
# vWeights = vWeightMap[vert] # vWeights = vWeightMap[vert]
@@ -326,7 +326,7 @@ def write_file(filepath, objects, scene,
def getVertsFromGroup(me, group_index): def getVertsFromGroup(me, group_index):
ret = [] ret = []
for i, v in enumerate(me.verts): for i, v in enumerate(me.vertices):
for g in v.groups: for g in v.groups:
if g.group == group_index: if g.group == group_index:
ret.append((i, g.weight)) ret.append((i, g.weight))
@@ -422,7 +422,7 @@ def write_file(filepath, objects, scene,
else: else:
faceuv = False faceuv = False
me_verts = me.verts[:] me_verts = me.vertices[:]
# XXX - todo, find a better way to do triangulation # XXX - todo, find a better way to do triangulation
# ...removed convert_to_triface because it relies on editmesh # ...removed convert_to_triface because it relies on editmesh
@@ -432,7 +432,7 @@ def write_file(filepath, objects, scene,
# Add a dummy object to it. # Add a dummy object to it.
has_quads = False has_quads = False
for f in me.faces: for f in me.faces:
if f.verts[3] != 0: if f.vertices[3] != 0:
has_quads = True has_quads = True
break break
@@ -454,7 +454,7 @@ def write_file(filepath, objects, scene,
else: else:
edges = [] edges = []
if not (len(face_index_pairs)+len(edges)+len(me.verts)): # Make sure there is somthing to write if not (len(face_index_pairs)+len(edges)+len(me.vertices)): # Make sure there is somthing to write
# clean up # clean up
bpy.data.meshes.remove(me) bpy.data.meshes.remove(me)
@@ -496,24 +496,24 @@ def write_file(filepath, objects, scene,
if EXPORT_KEEP_VERT_ORDER: if EXPORT_KEEP_VERT_ORDER:
pass pass
elif faceuv: elif faceuv:
face_index_pairs.sort(key=lambda a: (a[0].material_index, hash(uv_layer[a[1]].image), a[0].smooth)) face_index_pairs.sort(key=lambda a: (a[0].material_index, hash(uv_layer[a[1]].image), a[0].use_smooth))
elif len(materials) > 1: elif len(materials) > 1:
face_index_pairs.sort(key = lambda a: (a[0].material_index, a[0].smooth)) face_index_pairs.sort(key = lambda a: (a[0].material_index, a[0].use_smooth))
else: else:
# no materials # no materials
face_index_pairs.sort(key = lambda a: a[0].smooth) face_index_pairs.sort(key = lambda a: a[0].use_smooth)
# if EXPORT_KEEP_VERT_ORDER: # if EXPORT_KEEP_VERT_ORDER:
# pass # pass
# elif faceuv: # elif faceuv:
# try: faces.sort(key = lambda a: (a.mat, a.image, a.smooth)) # try: faces.sort(key = lambda a: (a.mat, a.image, a.use_smooth))
# except: faces.sort(lambda a,b: cmp((a.mat, a.image, a.smooth), (b.mat, b.image, b.smooth))) # except: faces.sort(lambda a,b: cmp((a.mat, a.image, a.use_smooth), (b.mat, b.image, b.use_smooth)))
# elif len(materials) > 1: # elif len(materials) > 1:
# try: faces.sort(key = lambda a: (a.mat, a.smooth)) # try: faces.sort(key = lambda a: (a.mat, a.use_smooth))
# except: faces.sort(lambda a,b: cmp((a.mat, a.smooth), (b.mat, b.smooth))) # except: faces.sort(lambda a,b: cmp((a.mat, a.use_smooth), (b.mat, b.use_smooth)))
# else: # else:
# # no materials # # no materials
# try: faces.sort(key = lambda a: a.smooth) # try: faces.sort(key = lambda a: a.use_smooth)
# except: faces.sort(lambda a,b: cmp(a.smooth, b.smooth)) # except: faces.sort(lambda a,b: cmp(a.use_smooth, b.use_smooth))
# Set the default mat to no material and no image. # Set the default mat to no material and no image.
contextMat = (0, 0) # Can never be this, so we will label a new material teh first chance we get. contextMat = (0, 0) # Can never be this, so we will label a new material teh first chance we get.
@@ -559,8 +559,8 @@ def write_file(filepath, objects, scene,
# NORMAL, Smooth/Non smoothed. # NORMAL, Smooth/Non smoothed.
if EXPORT_NORMALS: if EXPORT_NORMALS:
for f, f_index in face_index_pairs: for f, f_index in face_index_pairs:
if f.smooth: if f.use_smooth:
for v_idx in f.verts: for v_idx in f.vertices:
v = me_verts[v_idx] v = me_verts[v_idx]
noKey = veckey3d(v.normal) noKey = veckey3d(v.normal)
if noKey not in globalNormals: if noKey not in globalNormals:
@@ -594,13 +594,13 @@ def write_file(filepath, objects, scene,
vgroupsMap[v_idx].append((g.name, vWeight)) vgroupsMap[v_idx].append((g.name, vWeight))
for f, f_index in face_index_pairs: for f, f_index in face_index_pairs:
f_v = [me_verts[v_idx] for v_idx in f.verts] f_v = [me_verts[v_idx] for v_idx in f.vertices]
# if f.verts[3] == 0: # if f.vertices[3] == 0:
# f_v.pop() # f_v.pop()
# f_v= f.v # f_v= f.v
f_smooth= f.smooth f_smooth= f.use_smooth
f_mat = min(f.material_index, len(materialNames)-1) f_mat = min(f.material_index, len(materialNames)-1)
# f_mat = min(f.mat, len(materialNames)-1) # f_mat = min(f.mat, len(materialNames)-1)
if faceuv: if faceuv:
@@ -610,7 +610,7 @@ def write_file(filepath, objects, scene,
f_image = tface.image f_image = tface.image
f_uv = tface.uv f_uv = tface.uv
# f_uv= [tface.uv1, tface.uv2, tface.uv3] # f_uv= [tface.uv1, tface.uv2, tface.uv3]
# if len(f.verts) == 4: # if len(f.vertices) == 4:
# f_uv.append(tface.uv4) # f_uv.append(tface.uv4)
# f_image = f.image # f_image = f.image
# f_uv= f.uv # f_uv= f.uv
@@ -722,8 +722,8 @@ def write_file(filepath, objects, scene,
# Write edges. # Write edges.
if EXPORT_EDGES: if EXPORT_EDGES:
for ed in edges: for ed in edges:
if ed.loose: if ed.is_loose:
file.write('f %d %d\n' % (ed.verts[0] + totverts, ed.verts[1] + totverts)) file.write('f %d %d\n' % (ed.vertices[0] + totverts, ed.vertices[1] + totverts))
# Make the indicies global rather then per mesh # Make the indicies global rather then per mesh
totverts += len(me_verts) totverts += len(me_verts)

View File

@@ -147,7 +147,7 @@ def write(filename, scene, ob, \
# incase # incase
color = uvcoord = uvcoord_key = normal = normal_key = None color = uvcoord = uvcoord_key = normal = normal_key = None
mesh_verts = mesh.verts # save a lookup mesh_verts = mesh.vertices # save a lookup
ply_verts = [] # list of dictionaries ply_verts = [] # list of dictionaries
# vdict = {} # (index, normal, uv) -> new index # vdict = {} # (index, normal, uv) -> new index
vdict = [{} for i in range(len(mesh_verts))] vdict = [{} for i in range(len(mesh_verts))]
@@ -156,7 +156,7 @@ def write(filename, scene, ob, \
for i, f in enumerate(mesh.faces): for i, f in enumerate(mesh.faces):
smooth = f.smooth smooth = f.use_smooth
if not smooth: if not smooth:
normal = tuple(f.normal) normal = tuple(f.normal)
normal_key = rvec3d(normal) normal_key = rvec3d(normal)
@@ -168,7 +168,7 @@ def write(filename, scene, ob, \
col = active_col_layer[i] col = active_col_layer[i]
col = col.color1, col.color2, col.color3, col.color4 col = col.color1, col.color2, col.color3, col.color4
f_verts = f.verts f_verts = f.vertices
pf = ply_faces[i] pf = ply_faces[i]
for j, vidx in enumerate(f_verts): for j, vidx in enumerate(f_verts):

View File

@@ -461,7 +461,7 @@ class x3d_class:
self.writeIndented("<Shape>\n",1) self.writeIndented("<Shape>\n",1)
maters=mesh.materials maters=mesh.materials
hasImageTexture=0 hasImageTexture=0
issmooth=0 is_smooth = False
if len(maters) > 0 or mesh.active_uv_texture: if len(maters) > 0 or mesh.active_uv_texture:
# if len(maters) > 0 or mesh.faceUV: # if len(maters) > 0 or mesh.faceUV:
@@ -516,10 +516,10 @@ class x3d_class:
self.file.write("solid=\"true\" ") self.file.write("solid=\"true\" ")
for face in mesh.faces: for face in mesh.faces:
if face.smooth: if face.use_smooth:
issmooth=1 is_smooth = True
break break
if issmooth==1: if is_smooth == True:
creaseAngle=(mesh.autosmooth_angle)*(math.pi/180.0) creaseAngle=(mesh.autosmooth_angle)*(math.pi/180.0)
# creaseAngle=(mesh.degr)*(math.pi/180.0) # creaseAngle=(mesh.degr)*(math.pi/180.0)
self.file.write("creaseAngle=\"%s\" " % (round(creaseAngle,self.cp))) self.file.write("creaseAngle=\"%s\" " % (round(creaseAngle,self.cp)))
@@ -581,7 +581,7 @@ class x3d_class:
if self.writingcoords == 0: if self.writingcoords == 0:
self.file.write('coordIndex="') self.file.write('coordIndex="')
for face in mesh.faces: for face in mesh.faces:
fv = face.verts fv = face.vertices
# fv = face.v # fv = face.v
if len(fv)==3: if len(fv)==3:
@@ -604,7 +604,7 @@ class x3d_class:
# mesh.transform(ob.matrix_world) # mesh.transform(ob.matrix_world)
self.writeIndented("<Coordinate DEF=\"%s%s\" \n" % ("coord_",meshName), 1) self.writeIndented("<Coordinate DEF=\"%s%s\" \n" % ("coord_",meshName), 1)
self.file.write("\t\t\t\tpoint=\"") self.file.write("\t\t\t\tpoint=\"")
for v in mesh.verts: for v in mesh.vertices:
self.file.write("%.6f %.6f %.6f, " % tuple(v.co)) self.file.write("%.6f %.6f %.6f, " % tuple(v.co))
self.file.write("\" />") self.file.write("\" />")
self.writeIndented("\n", -1) self.writeIndented("\n", -1)
@@ -618,7 +618,7 @@ class x3d_class:
# for face in mesh.faces: # for face in mesh.faces:
# workaround, since tface.uv iteration is wrong atm # workaround, since tface.uv iteration is wrong atm
uvs = face.uv uvs = face.uv
# uvs = [face.uv1, face.uv2, face.uv3, face.uv4] if face.verts[3] else [face.uv1, face.uv2, face.uv3] # uvs = [face.uv1, face.uv2, face.uv3, face.uv4] if face.vertices[3] else [face.uv1, face.uv2, face.uv3]
for uv in uvs: for uv in uvs:
# for uv in face.uv: # for uv in face.uv:
@@ -912,7 +912,7 @@ class x3d_class:
# if EXPORT_APPLY_MODIFIERS: # if EXPORT_APPLY_MODIFIERS:
# if containerMesh: # if containerMesh:
# containerMesh.verts = None # containerMesh.vertices = None
self.cleanup() self.cleanup()
@@ -1030,7 +1030,7 @@ class x3d_class:
# print("Debug: mesh.faceUV=%d" % mesh.faceUV) # print("Debug: mesh.faceUV=%d" % mesh.faceUV)
print("Debug: mesh.hasVertexColours=%d" % (len(mesh.vertex_colors) > 0)) print("Debug: mesh.hasVertexColours=%d" % (len(mesh.vertex_colors) > 0))
# print("Debug: mesh.hasVertexColours=%d" % mesh.hasVertexColours()) # print("Debug: mesh.hasVertexColours=%d" % mesh.hasVertexColours())
print("Debug: mesh.verts=%d" % len(mesh.verts)) print("Debug: mesh.vertices=%d" % len(mesh.vertices))
print("Debug: mesh.faces=%d" % len(mesh.faces)) print("Debug: mesh.faces=%d" % len(mesh.faces))
print("Debug: mesh.materials=%d" % len(mesh.materials)) print("Debug: mesh.materials=%d" % len(mesh.materials))

View File

@@ -426,7 +426,7 @@ def bvh_node_dict2armature(context, bvh_nodes, ROT_MODE='XYZ', IMPORT_START_FRAM
bvh_node.parent and\ bvh_node.parent and\
bvh_node.parent.temp.name not in ZERO_AREA_BONES and\ bvh_node.parent.temp.name not in ZERO_AREA_BONES and\
bvh_node.parent.rest_tail_local == bvh_node.rest_head_local: bvh_node.parent.rest_tail_local == bvh_node.rest_head_local:
bvh_node.temp.connected = True bvh_node.temp.use_connect = True
# Replace the editbone with the editbone name, # Replace the editbone with the editbone name,
# to avoid memory errors accessing the editbone outside editmode # to avoid memory errors accessing the editbone outside editmode

View File

@@ -338,12 +338,12 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
if myContextMesh_vertls: if myContextMesh_vertls:
bmesh.add_geometry(len(myContextMesh_vertls)//3, 0, len(myContextMesh_facels)) bmesh.add_geometry(len(myContextMesh_vertls)//3, 0, len(myContextMesh_facels))
bmesh.verts.foreach_set("co", myContextMesh_vertls) bmesh.vertices.foreach_set("co", myContextMesh_vertls)
eekadoodle_faces = [] eekadoodle_faces = []
for v1, v2, v3 in myContextMesh_facels: for v1, v2, v3 in myContextMesh_facels:
eekadoodle_faces.extend([v3, v1, v2, 0] if v3 == 0 else [v1, v2, v3, 0]) eekadoodle_faces.extend([v3, v1, v2, 0] if v3 == 0 else [v1, v2, v3, 0])
bmesh.faces.foreach_set("verts_raw", eekadoodle_faces) bmesh.faces.foreach_set("vertices_raw", eekadoodle_faces)
if bmesh.faces and contextMeshUV: if bmesh.faces and contextMeshUV:
bmesh.add_uv_texture() bmesh.add_uv_texture()
@@ -830,7 +830,7 @@ def load_3ds(filename, context, IMPORT_CONSTRAIN_BOUNDS=10.0, IMAGE_SEARCH=True,
for ob in importedObjects: for ob in importedObjects:
if ob.type == 'MESH': if ob.type == 'MESH':
me = ob.data me = ob.data
# me.verts.delete([me.verts[0],]) # XXX, todo # me.vertices.delete([me.vertices[0],]) # XXX, todo
if not APPLY_MATRIX: if not APPLY_MATRIX:
me.transform(ob.matrix_world.copy().invert()) me.transform(ob.matrix_world.copy().invert())

View File

@@ -137,7 +137,7 @@ def BPyMesh_ngon(from_data, indices, PREF_FIX_LOOPS= True):
if type(from_data) in (tuple, list): if type(from_data) in (tuple, list):
verts= [Vector(from_data[i]) for ii, i in enumerate(indices)] verts= [Vector(from_data[i]) for ii, i in enumerate(indices)]
else: else:
verts= [from_data.verts[i].co for ii, i in enumerate(indices)] verts= [from_data.vertices[i].co for ii, i in enumerate(indices)]
for i in range(len(verts)-1, 0, -1): # same as reversed(xrange(1, len(verts))): for i in range(len(verts)-1, 0, -1): # same as reversed(xrange(1, len(verts))):
if verts[i][1]==verts[i-1][0]: if verts[i][1]==verts[i-1][0]:
@@ -154,7 +154,7 @@ def BPyMesh_ngon(from_data, indices, PREF_FIX_LOOPS= True):
if type(from_data) in (tuple, list): if type(from_data) in (tuple, list):
verts= [vert_treplet(Vector(from_data[i]), ii) for ii, i in enumerate(indices)] verts= [vert_treplet(Vector(from_data[i]), ii) for ii, i in enumerate(indices)]
else: else:
verts= [vert_treplet(from_data.verts[i].co, ii) for ii, i in enumerate(indices)] verts= [vert_treplet(from_data.vertices[i].co, ii) for ii, i in enumerate(indices)]
edges= [(i, i-1) for i in range(len(verts))] edges= [(i, i-1) for i in range(len(verts))]
if edges: if edges:
@@ -677,18 +677,18 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v
# make sure the list isnt too big # make sure the list isnt too big
for material in materials: for material in materials:
me.add_material(material) me.add_material(material)
#me.verts.extend([(0,0,0)]) # dummy vert #me.vertices.extend([(0,0,0)]) # dummy vert
me.add_geometry(len(verts_loc), 0, len(faces)) me.add_geometry(len(verts_loc), 0, len(faces))
# verts_loc is a list of (x, y, z) tuples # verts_loc is a list of (x, y, z) tuples
me.verts.foreach_set("co", unpack_list(verts_loc)) me.vertices.foreach_set("co", unpack_list(verts_loc))
# me.verts.extend(verts_loc) # me.vertices.extend(verts_loc)
# faces is a list of (vert_indices, texco_indices, ...) tuples # faces is a list of (vert_indices, texco_indices, ...) tuples
# XXX faces should contain either 3 or 4 verts # XXX faces should contain either 3 or 4 verts
# XXX no check for valid face indices # XXX no check for valid face indices
me.faces.foreach_set("verts_raw", unpack_face_list([f[0] for f in faces])) me.faces.foreach_set("vertices_raw", unpack_face_list([f[0] for f in faces]))
# face_mapping= me.faces.extend([f[0] for f in faces], indexList=True) # face_mapping= me.faces.extend([f[0] for f in faces], indexList=True)
if verts_tex and me.faces: if verts_tex and me.faces:
@@ -726,7 +726,7 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v
if context_smooth_group: if context_smooth_group:
blender_face.smooth= True blender_face.use_smooth = True
if context_material: if context_material:
if context_material_old is not context_material: if context_material_old is not context_material:
@@ -776,7 +776,7 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v
me.add_geometry(0, len(edges), 0) me.add_geometry(0, len(edges), 0)
# edges should be a list of (a, b) tuples # edges should be a list of (a, b) tuples
me.edges.foreach_set("verts", unpack_list(edges)) me.edges.foreach_set("vertices", unpack_list(edges))
# me_edges.extend( edges ) # me_edges.extend( edges )
# del me_edges # del me_edges
@@ -791,8 +791,8 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v
# if CREATE_FGONS and fgon_edges: # if CREATE_FGONS and fgon_edges:
# for fgon_edge in fgon_edges.keys(): # for fgon_edge in fgon_edges.keys():
# for ed in me.edges: # for ed in me.edges:
# if edges_match(fgon_edge, ed.verts): # if edges_match(fgon_edge, ed.vertices):
# ed.fgon = True # ed.is_fgon = True
# if CREATE_FGONS and fgon_edges: # if CREATE_FGONS and fgon_edges:
# FGON= Mesh.EdgeFlags.FGON # FGON= Mesh.EdgeFlags.FGON
@@ -805,8 +805,8 @@ def create_mesh(new_objects, has_ngons, CREATE_FGONS, CREATE_EDGES, verts_loc, v
# if unique_smooth_groups and sharp_edges: # if unique_smooth_groups and sharp_edges:
# for sharp_edge in sharp_edges.keys(): # for sharp_edge in sharp_edges.keys():
# for ed in me.edges: # for ed in me.edges:
# if edges_match(sharp_edge, ed.verts): # if edges_match(sharp_edge, ed.vertices):
# ed.sharp = True # ed.use_sharp = True
# if unique_smooth_groups and sharp_edges: # if unique_smooth_groups and sharp_edges:
# SHARP= Mesh.EdgeFlags.SHARP # SHARP= Mesh.EdgeFlags.SHARP

View File

@@ -66,7 +66,7 @@ def mdd_import(filepath, ob, scene, PREF_START_FRAME=0, PREF_JUMP=1):
ob.active_shape_key_index = len(ob.data.shape_keys.keys)-1 ob.active_shape_key_index = len(ob.data.shape_keys.keys)-1
index = len(ob.data.shape_keys.keys)-1 index = len(ob.data.shape_keys.keys)-1
ob.shape_key_lock = True ob.show_shape_key = True
verts = ob.data.shape_keys.keys[len(ob.data.shape_keys.keys)-1].data verts = ob.data.shape_keys.keys[len(ob.data.shape_keys.keys)-1].data
@@ -74,7 +74,7 @@ def mdd_import(filepath, ob, scene, PREF_START_FRAME=0, PREF_JUMP=1):
for v in verts: # 12 is the size of 3 floats for v in verts: # 12 is the size of 3 floats
v.co[:] = unpack('>3f', file.read(12)) v.co[:] = unpack('>3f', file.read(12))
#me.update() #me.update()
ob.shape_key_lock = False ob.show_shape_key = False
# insert keyframes # insert keyframes

View File

@@ -96,14 +96,14 @@ def get_transform_generators_base_info(data):
# Location # Location
def RKS_GEN_location(ksi, context, ks, data): def RKS_GEN_location(ksi, context, ks, data):
# get id-block and path info # get id-block and path info
id_block, base_path, grouping= get_transform_generators_base_info(data) id_block, base_path, grouping = get_transform_generators_base_info(data)
# add the property name to the base path # add the property name to the base path
path = path_add_property(base_path, "location") path = path_add_property(base_path, "location")
# add Keying Set entry for this... # add Keying Set entry for this...
if grouping: if grouping:
ks.paths.add(id_block, path, grouping_method='NAMED', group_name=grouping) ks.paths.add(id_block, path, group_method='NAMED', group_name=grouping)
else: else:
ks.paths.add(id_block, path) ks.paths.add(id_block, path)
@@ -123,7 +123,7 @@ def RKS_GEN_rotation(ksi, context, ks, data):
# add Keying Set entry for this... # add Keying Set entry for this...
if grouping: if grouping:
ks.paths.add(id_block, path, grouping_method='NAMED', group_name=grouping) ks.paths.add(id_block, path, group_method='NAMED', group_name=grouping)
else: else:
ks.paths.add(id_block, path) ks.paths.add(id_block, path)
@@ -137,7 +137,7 @@ def RKS_GEN_scaling(ksi, context, ks, data):
# add Keying Set entry for this... # add Keying Set entry for this...
if grouping: if grouping:
ks.paths.add(id_block, path, grouping_method='NAMED', group_name=grouping) ks.paths.add(id_block, path, group_method='NAMED', group_name=grouping)
else: else:
ks.paths.add(id_block, path) ks.paths.add(id_block, path)
@@ -147,15 +147,11 @@ def RKS_GEN_scaling(ksi, context, ks, data):
classes = [] classes = []
def register(): def register():
register = bpy.types.register pass
for cls in classes:
register(cls)
def unregister(): def unregister():
unregister = bpy.types.unregister pass
for cls in classes:
unregister(cls)
if __name__ == "__main__": if __name__ == "__main__":
register() register()

View File

@@ -77,7 +77,7 @@ def add_object_data(context, obdata, operator=None):
bpy.ops.object.mode_set(mode='EDIT') bpy.ops.object.mode_set(mode='EDIT')
else: else:
scene.objects.active = obj_new scene.objects.active = obj_new
if context.user_preferences.edit.enter_edit_mode: if context.user_preferences.edit.use_enter_edit_mode:
bpy.ops.object.mode_set(mode='EDIT') bpy.ops.object.mode_set(mode='EDIT')
return base return base

View File

@@ -224,7 +224,7 @@ _scripts = (_os.path.normpath(_scripts), )
def user_script_path(): def user_script_path():
path = _bpy.context.user_preferences.filepaths.python_scripts_directory path = _bpy.context.user_preferences.filepaths.script_directory
if path: if path:
path = _os.path.normpath(path) path = _os.path.normpath(path)
@@ -243,7 +243,7 @@ def script_paths(subdir=None, user=True):
# add user scripts dir # add user scripts dir
if user: if user:
user_script_path = _bpy.context.user_preferences.filepaths.python_scripts_directory user_script_path = _bpy.context.user_preferences.filepaths.script_directory
else: else:
user_script_path = None user_script_path = None

View File

@@ -52,7 +52,7 @@ class Library(bpy_types.ID):
# See: readblenentry.c, IDTYPE_FLAGS_ISLINKABLE, we could make this an attribute in rna. # See: readblenentry.c, IDTYPE_FLAGS_ISLINKABLE, we could make this an attribute in rna.
attr_links = "actions", "armatures", "brushes", "cameras", \ attr_links = "actions", "armatures", "brushes", "cameras", \
"curves", "gpencil", "groups", "images", \ "curves", "grease_pencil", "groups", "images", \
"lamps", "lattices", "materials", "metaballs", \ "lamps", "lattices", "materials", "metaballs", \
"meshes", "node_groups", "objects", "scenes", \ "meshes", "node_groups", "objects", "scenes", \
"sounds", "textures", "texts", "fonts", "worlds" "sounds", "textures", "texts", "fonts", "worlds"
@@ -309,11 +309,11 @@ class Mesh(bpy_types.ID):
self.add_geometry(len(verts), len(edges), len(faces)) self.add_geometry(len(verts), len(edges), len(faces))
verts_flat = [f for v in verts for f in v] verts_flat = [f for v in verts for f in v]
self.verts.foreach_set("co", verts_flat) self.vertices.foreach_set("co", verts_flat)
del verts_flat del verts_flat
edges_flat = [i for e in edges for i in e] edges_flat = [i for e in edges for i in e]
self.edges.foreach_set("verts", edges_flat) self.edges.foreach_set("vertices", edges_flat)
del edges_flat del edges_flat
def treat_face(f): def treat_face(f):
@@ -324,7 +324,7 @@ class Mesh(bpy_types.ID):
return f return f
faces_flat = [v for f in faces for v in treat_face(f)] faces_flat = [v for f in faces for v in treat_face(f)]
self.faces.foreach_set("verts_raw", faces_flat) self.faces.foreach_set("vertices_raw", faces_flat)
del faces_flat del faces_flat
@property @property
@@ -372,7 +372,7 @@ class Mesh(bpy_types.ID):
for f in faces: for f in faces:
# if len(f) == 4: # if len(f) == 4:
if f.verts_raw[3] != 0: if f.vertices_raw[3] != 0:
edge_keys = f.edge_keys edge_keys = f.edge_keys
for i, edkey in enumerate(f.edge_keys): for i, edkey in enumerate(f.edge_keys):
edges.setdefault(edkey, []).append(edge_keys[OTHER_INDEX[i]]) edges.setdefault(edkey, []).append(edge_keys[OTHER_INDEX[i]])
@@ -449,7 +449,7 @@ class Mesh(bpy_types.ID):
while edges: while edges:
current_edge = edges.pop() current_edge = edges.pop()
vert_end, vert_start = current_edge.verts[:] vert_end, vert_start = current_edge.vertices[:]
line_poly = [vert_start, vert_end] line_poly = [vert_start, vert_end]
ok = True ok = True
@@ -460,7 +460,7 @@ class Mesh(bpy_types.ID):
while i: while i:
i -= 1 i -= 1
ed = edges[i] ed = edges[i]
v1, v2 = ed.verts v1, v2 = ed.vertices
if v1 == vert_end: if v1 == vert_end:
line_poly.append(v2) line_poly.append(v2)
vert_end = line_poly[-1] vert_end = line_poly[-1]
@@ -495,7 +495,7 @@ class MeshEdge(StructRNA):
@property @property
def key(self): def key(self):
return ord_ind(*tuple(self.verts)) return ord_ind(*tuple(self.vertices))
class MeshFace(StructRNA): class MeshFace(StructRNA):
@@ -504,8 +504,8 @@ class MeshFace(StructRNA):
@property @property
def center(self): def center(self):
"""The midpoint of the face.""" """The midpoint of the face."""
face_verts = self.verts[:] face_verts = self.vertices[:]
mesh_verts = self.id_data.verts mesh_verts = self.id_data.vertices
if len(face_verts) == 3: if len(face_verts) == 3:
return (mesh_verts[face_verts[0]].co + mesh_verts[face_verts[1]].co + mesh_verts[face_verts[2]].co) / 3.0 return (mesh_verts[face_verts[0]].co + mesh_verts[face_verts[1]].co + mesh_verts[face_verts[2]].co) / 3.0
else: else:
@@ -513,7 +513,7 @@ class MeshFace(StructRNA):
@property @property
def edge_keys(self): def edge_keys(self):
verts = self.verts[:] verts = self.vertices[:]
if len(verts) == 3: if len(verts) == 3:
return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[0]) return ord_ind(verts[0], verts[1]), ord_ind(verts[1], verts[2]), ord_ind(verts[2], verts[0])

View File

@@ -163,18 +163,18 @@ if __name__ == "__main__":
ui() [ ui() [
split() [ split() [
column() [ column() [
prop(data='context.scene.render', property='stamp_time', text='Time'), prop(data='context.scene.render', property='use_stamp_time', text='Time'),
prop(data='context.scene.render', property='stamp_date', text='Date'), prop(data='context.scene.render', property='use_stamp_date', text='Date'),
prop(data='context.scene.render', property='stamp_render_time', text='RenderTime'), prop(data='context.scene.render', property='use_stamp_render_time', text='RenderTime'),
prop(data='context.scene.render', property='stamp_frame', text='Frame'), prop(data='context.scene.render', property='use_stamp_frame', text='Frame'),
prop(data='context.scene.render', property='stamp_scene', text='Scene'), prop(data='context.scene.render', property='use_stamp_scene', text='Scene'),
prop(data='context.scene.render', property='stamp_camera', text='Camera'), prop(data='context.scene.render', property='use_stamp_camera', text='Camera'),
prop(data='context.scene.render', property='stamp_filename', text='Filename'), prop(data='context.scene.render', property='use_stamp_filename', text='Filename'),
prop(data='context.scene.render', property='stamp_marker', text='Marker'), prop(data='context.scene.render', property='use_stamp_marker', text='Marker'),
prop(data='context.scene.render', property='stamp_sequencer_strip', text='Seq. Strip') prop(data='context.scene.render', property='use_stamp_sequencer_strip', text='Seq. Strip')
], ],
column() [ column() [
active(expr='context.scene.render.render_stamp'), active(expr='context.scene.render.use_stamp'),
prop(data='context.scene.render', property='stamp_foreground', slider=True), prop(data='context.scene.render', property='stamp_foreground', slider=True),
prop(data='context.scene.render', property='stamp_background', slider=True), prop(data='context.scene.render', property='stamp_background', slider=True),
separator(), separator(),
@@ -182,9 +182,9 @@ if __name__ == "__main__":
] ]
], ],
split(percentage=0.2) [ split(percentage=0.2) [
prop(data='context.scene.render', property='stamp_note', text='Note'), prop(data='context.scene.render', property='use_stamp_note', text='Note'),
row() [ row() [
active(expr='context.scene.render.stamp_note'), active(expr='context.scene.render.use_stamp_note'),
prop(data='context.scene.render', property='stamp_note_text', text='') prop(data='context.scene.render', property='stamp_note_text', text='')
] ]
] ]

View File

@@ -66,7 +66,7 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr
print("") print("")
for bone in bones: for bone in bones:
b = arm.bones[bone] b = arm.bones[bone]
print(">>", bone, ["*>", "->"][b.connected], getattr(getattr(b, "parent", ""), "name", "")) print(">>", bone, ["*>", "->"][b.use_connect], getattr(getattr(b, "parent", ""), "name", ""))
label = [bone] label = [bone]
bone = arm.bones[bone] bone = arm.bones[bone]
@@ -103,7 +103,7 @@ def graph_armature(obj, filepath, FAKE_PARENT=True, CONSTRAINTS=True, DRIVERS=Tr
parent = bone.parent parent = bone.parent
if parent: if parent:
parent_name = parent.name parent_name = parent.name
connected = bone.connected connected = bone.use_connect
elif FAKE_PARENT: elif FAKE_PARENT:
parent_name = 'Object::%s' % obj.name parent_name = 'Object::%s' % obj.name
connected = False connected = False

View File

@@ -159,8 +159,8 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
# Not needed but catches any errors before duplicating # Not needed but catches any errors before duplicating
validate_rig(context, obj_orig) validate_rig(context, obj_orig)
global_undo = context.user_preferences.edit.global_undo use_global_undo = context.user_preferences.edit.use_global_undo
context.user_preferences.edit.global_undo = False context.user_preferences.edit.use_global_undo = False
mode_orig = context.mode mode_orig = context.mode
rest_backup = obj_orig.data.pose_position rest_backup = obj_orig.data.pose_position
obj_orig.data.pose_position = 'REST' obj_orig.data.pose_position = 'REST'
@@ -282,7 +282,7 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
edit_bone.head = (0.0, 0.0, 0.0) edit_bone.head = (0.0, 0.0, 0.0)
edit_bone.tail = (0.0, 1.0, 0.0) edit_bone.tail = (0.0, 1.0, 0.0)
edit_bone.roll = 0.0 edit_bone.roll = 0.0
edit_bone.layer = ROOT_LAYERS edit_bone.layers = ROOT_LAYERS
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
# key: bone name # key: bone name
@@ -412,7 +412,7 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
else: else:
root_ebone_tmp = root_ebone root_ebone_tmp = root_ebone
ebone.connected = False ebone.use_connect = False
ebone.parent = root_ebone_tmp ebone.parent = root_ebone_tmp
''' '''
@@ -429,7 +429,7 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
con.target = obj con.target = obj
con.subtarget = bone_name con.subtarget = bone_name
if not pbone.bone.connected: if not pbone.bone.use_connect:
con = pbone.constraints.new('COPY_LOCATION') con = pbone.constraints.new('COPY_LOCATION')
con.target = obj con.target = obj
con.subtarget = bone_name con.subtarget = bone_name
@@ -445,33 +445,33 @@ def generate_rig(context, obj_orig, prefix="ORG-", META_DEF=True):
layer_second_last[30] = True layer_second_last[30] = True
for bone_name, bone in arm.bones.items(): for bone_name, bone in arm.bones.items():
bone.deform = False # Non DEF bones shouldn't deform bone.use_deform = False # Non DEF bones shouldn't deform
if bone_name.startswith(ORG_PREFIX): if bone_name.startswith(ORG_PREFIX):
bone.layer = ORG_LAYERS bone.layers = ORG_LAYERS
elif bone_name.startswith(MCH_PREFIX): # XXX fixme elif bone_name.startswith(MCH_PREFIX): # XXX fixme
bone.layer = MCH_LAYERS bone.layers = MCH_LAYERS
elif bone_name.startswith(DEF_PREFIX): # XXX fixme elif bone_name.startswith(DEF_PREFIX): # XXX fixme
bone.layer = DEF_LAYERS bone.layers = DEF_LAYERS
bone.deform = True bone.use_deform = True
else: else:
# Assign bone appearance if there is a widget for it # Assign bone appearance if there is a widget for it
obj.pose.bones[bone_name].custom_shape = context.scene.objects.get(WGT_PREFIX + bone_name) obj.pose.bones[bone_name].custom_shape = context.scene.objects.get(WGT_PREFIX + bone_name)
layer_tot[:] = [max(lay) for lay in zip(layer_tot, bone.layer)] layer_tot[:] = [max(lay) for lay in zip(layer_tot, bone.layers)]
# Only for demo'ing # Only for demo'ing
layer_show = [a and not (b or c or d) for a, b, c, d in zip(layer_tot, ORG_LAYERS, MCH_LAYERS, DEF_LAYERS)] layer_show = [a and not (b or c or d) for a, b, c, d in zip(layer_tot, ORG_LAYERS, MCH_LAYERS, DEF_LAYERS)]
arm.layer = layer_show arm.layers = layer_show
# obj.hide = True # obj.hide = True
obj.data.draw_axes = False obj.data.show_axes = False
bpy.ops.object.mode_set(mode=mode_orig) bpy.ops.object.mode_set(mode=mode_orig)
obj_orig.data.pose_position = rest_backup obj_orig.data.pose_position = rest_backup
obj.data.pose_position = 'POSE' obj.data.pose_position = 'POSE'
obj_orig.data.pose_position = 'POSE' obj_orig.data.pose_position = 'POSE'
context.user_preferences.edit.global_undo = global_undo context.user_preferences.edit.use_global_undo = use_global_undo
print("Done.\n") print("Done.\n")

View File

@@ -37,24 +37,24 @@ def metarig_template():
bone.head[:] = 0.0000, -0.0425, 0.0000 bone.head[:] = 0.0000, -0.0425, 0.0000
bone.tail[:] = 0.0942, -0.0075, 0.0333 bone.tail[:] = 0.0942, -0.0075, 0.0333
bone.roll = -0.2227 bone.roll = -0.2227
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('upper_arm') bone = arm.edit_bones.new('upper_arm')
bone.head[:] = 0.1066, -0.0076, -0.0010 bone.head[:] = 0.1066, -0.0076, -0.0010
bone.tail[:] = 0.2855, 0.0206, -0.0104 bone.tail[:] = 0.2855, 0.0206, -0.0104
bone.roll = 1.6152 bone.roll = 1.6152
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['shoulder'] bone.parent = arm.edit_bones['shoulder']
bone = arm.edit_bones.new('forearm') bone = arm.edit_bones.new('forearm')
bone.head[:] = 0.2855, 0.0206, -0.0104 bone.head[:] = 0.2855, 0.0206, -0.0104
bone.tail[:] = 0.4550, -0.0076, -0.0023 bone.tail[:] = 0.4550, -0.0076, -0.0023
bone.roll = 1.5153 bone.roll = 1.5153
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['upper_arm'] bone.parent = arm.edit_bones['upper_arm']
bone = arm.edit_bones.new('hand') bone = arm.edit_bones.new('hand')
bone.head[:] = 0.4550, -0.0076, -0.0023 bone.head[:] = 0.4550, -0.0076, -0.0023
bone.tail[:] = 0.5423, -0.0146, -0.0131 bone.tail[:] = 0.5423, -0.0146, -0.0131
bone.roll = -3.0083 bone.roll = -3.0083
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['forearm'] bone.parent = arm.edit_bones['forearm']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -78,7 +78,7 @@ def metarig_definition(obj, orig_bone_name):
hands = [] hands = []
for pbone in obj.pose.bones: for pbone in obj.pose.bones:
index = pbone.parent_index(mt.arm_p) index = pbone.parent_index(mt.arm_p)
if index == 2 and pbone.bone.connected and pbone.bone.parent.connected: if index == 2 and pbone.bone.use_connect and pbone.bone.parent.use_connect:
hands.append(pbone) hands.append(pbone)
if len(hands) != 1: if len(hands) != 1:
@@ -106,12 +106,12 @@ def ik(obj, definitions, base_names, options):
ik_chain = mt.copy(to_fmt="MCH-%s_ik", base_names=base_names, exclude_attrs=["shoulder"]) ik_chain = mt.copy(to_fmt="MCH-%s_ik", base_names=base_names, exclude_attrs=["shoulder"])
# IK needs no parent_index # IK needs no parent_index
ik_chain.hand_e.connected = False ik_chain.hand_e.use_connect = False
ik_chain.hand_e.parent = None ik_chain.hand_e.parent = None
ik_chain.hand_e.local_location = False ik_chain.hand_e.use_local_location = False
ik_chain.rename("hand", get_base_name(base_names[mt.hand]) + "_ik" + get_side_name(mt.hand)) ik_chain.rename("hand", get_base_name(base_names[mt.hand]) + "_ik" + get_side_name(mt.hand))
ik_chain.arm_e.connected = False ik_chain.arm_e.use_connect = False
ik_chain.arm_e.parent = mt.shoulder_e ik_chain.arm_e.parent = mt.shoulder_e
# Add the bone used for the arms poll target # Add the bone used for the arms poll target
@@ -119,7 +119,7 @@ def ik(obj, definitions, base_names, options):
ik.pole = add_pole_target_bone(obj, mt.forearm, "elbow_target" + get_side_name(mt.forearm), mode='ZAVERAGE') ik.pole = add_pole_target_bone(obj, mt.forearm, "elbow_target" + get_side_name(mt.forearm), mode='ZAVERAGE')
ik.update() ik.update()
ik.pole_e.local_location = False ik.pole_e.use_local_location = False
# option: elbow_parent # option: elbow_parent
elbow_parent_name = options.get("elbow_parent", "") elbow_parent_name = options.get("elbow_parent", "")
@@ -168,11 +168,11 @@ def ik(obj, definitions, base_names, options):
if "ik_layer" in options: if "ik_layer" in options:
layer = [n==options["ik_layer"] for n in range(0,32)] layer = [n==options["ik_layer"] for n in range(0,32)]
else: else:
layer = list(mt.arm_b.layer) layer = list(mt.arm_b.layers)
ik_chain.hand_b.layer = layer ik_chain.hand_b.layers = layer
ik.hand_vis_b.layer = layer ik.hand_vis_b.layers = layer
ik.pole_b.layer = layer ik.pole_b.layers = layer
ik.pole_vis_b.layer = layer ik.pole_vis_b.layers = layer
bpy.ops.object.mode_set(mode='EDIT') bpy.ops.object.mode_set(mode='EDIT')
# don't blend the shoulder # don't blend the shoulder
@@ -197,7 +197,7 @@ def fk(obj, definitions, base_names, options):
# upper arm constrains to this. # upper arm constrains to this.
ex.socket_e = copy_bone_simple(arm, mt.arm, "MCH-%s_socket" % base_names[mt.arm]) ex.socket_e = copy_bone_simple(arm, mt.arm, "MCH-%s_socket" % base_names[mt.arm])
ex.socket = ex.socket_e.name ex.socket = ex.socket_e.name
ex.socket_e.connected = False ex.socket_e.use_connect = False
ex.socket_e.parent = mt.shoulder_e ex.socket_e.parent = mt.shoulder_e
ex.socket_e.length *= 0.5 ex.socket_e.length *= 0.5
@@ -206,11 +206,11 @@ def fk(obj, definitions, base_names, options):
ex.hand_delta_e = copy_bone_simple(arm, fk_chain.hand, "MCH-delta_%s" % base_names[mt.hand], parent=True) ex.hand_delta_e = copy_bone_simple(arm, fk_chain.hand, "MCH-delta_%s" % base_names[mt.hand], parent=True)
ex.hand_delta = ex.hand_delta_e.name ex.hand_delta = ex.hand_delta_e.name
ex.hand_delta_e.length *= 0.5 ex.hand_delta_e.length *= 0.5
ex.hand_delta_e.connected = False ex.hand_delta_e.use_connect = False
if "hand_roll" in options: if "hand_roll" in options:
ex.hand_delta_e.roll += radians(options["hand_roll"]) ex.hand_delta_e.roll += radians(options["hand_roll"])
fk_chain.hand_e.connected = False fk_chain.hand_e.use_connect = False
fk_chain.hand_e.parent = ex.hand_delta_e fk_chain.hand_e.parent = ex.hand_delta_e
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -273,10 +273,10 @@ def fk(obj, definitions, base_names, options):
if "fk_layer" in options: if "fk_layer" in options:
layer = [n==options["fk_layer"] for n in range(0,32)] layer = [n==options["fk_layer"] for n in range(0,32)]
else: else:
layer = list(mt.arm_b.layer) layer = list(mt.arm_b.layers)
fk_chain.arm_b.layer = layer fk_chain.arm_b.layers = layer
fk_chain.forearm_b.layer = layer fk_chain.forearm_b.layers = layer
fk_chain.hand_b.layer = layer fk_chain.hand_b.layers = layer
# Forearm was getting wrong roll somehow. Hack to fix that. # Forearm was getting wrong roll somehow. Hack to fix that.
bpy.ops.object.mode_set(mode='EDIT') bpy.ops.object.mode_set(mode='EDIT')
@@ -295,8 +295,8 @@ def deform(obj, definitions, base_names, options):
# Create upper arm bones: two bones, each half of the upper arm. # Create upper arm bones: two bones, each half of the upper arm.
uarm1 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.01" % base_names[definitions[1]], parent=True) uarm1 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.01" % base_names[definitions[1]], parent=True)
uarm2 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.02" % base_names[definitions[1]], parent=True) uarm2 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.02" % base_names[definitions[1]], parent=True)
uarm1.connected = False uarm1.use_connect = False
uarm2.connected = False uarm2.use_connect = False
uarm2.parent = uarm1 uarm2.parent = uarm1
center = uarm1.center center = uarm1.center
uarm1.tail = center uarm1.tail = center
@@ -305,8 +305,8 @@ def deform(obj, definitions, base_names, options):
# Create forearm bones: two bones, each half of the forearm. # Create forearm bones: two bones, each half of the forearm.
farm1 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.01" % base_names[definitions[2]], parent=True) farm1 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.01" % base_names[definitions[2]], parent=True)
farm2 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.02" % base_names[definitions[2]], parent=True) farm2 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.02" % base_names[definitions[2]], parent=True)
farm1.connected = False farm1.use_connect = False
farm2.connected = False farm2.use_connect = False
farm2.parent = farm1 farm2.parent = farm1
center = farm1.center center = farm1.center
farm1.tail = center farm1.tail = center
@@ -314,7 +314,7 @@ def deform(obj, definitions, base_names, options):
# Create twist bone # Create twist bone
twist = copy_bone_simple(obj.data, definitions[2], "MCH-arm_twist") twist = copy_bone_simple(obj.data, definitions[2], "MCH-arm_twist")
twist.connected = False twist.use_connect = False
twist.parent = obj.data.edit_bones[definitions[3]] twist.parent = obj.data.edit_bones[definitions[3]]
twist.length /= 2 twist.length /= 2

View File

@@ -33,7 +33,7 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0000, 0.0000, 1.0000 bone.tail[:] = 0.0000, 0.0000, 1.0000
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
pbone = obj.pose.bones['Bone'] pbone = obj.pose.bones['Bone']
@@ -98,7 +98,7 @@ def control(obj, definitions, base_names, options):
cp.cpy_p.lock_scale = tuple(mt.cpy_p.lock_scale) cp.cpy_p.lock_scale = tuple(mt.cpy_p.lock_scale)
# Layers # Layers
cp.cpy_b.layer = list(mt.cpy_b.layer) cp.cpy_b.layers = list(mt.cpy_b.layers)
return (mt.cpy,) return (mt.cpy,)

View File

@@ -34,18 +34,18 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = -0.0000, 0.7382, 0.1895 bone.tail[:] = -0.0000, 0.7382, 0.1895
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('delta') bone = arm.edit_bones.new('delta')
bone.head[:] = -0.0497, 0.8414, 0.3530 bone.head[:] = -0.0497, 0.8414, 0.3530
bone.tail[:] = -0.2511, 1.1588, 0.9653 bone.tail[:] = -0.2511, 1.1588, 0.9653
bone.roll = 2.6044 bone.roll = 2.6044
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['bonesker'] bone.parent = arm.edit_bones['bonesker']
bone = arm.edit_bones.new('boney') bone = arm.edit_bones.new('boney')
bone.head[:] = 0.7940, 2.5592, 0.4134 bone.head[:] = 0.7940, 2.5592, 0.4134
bone.tail[:] = 0.7940, 3.3975, 0.4890 bone.tail[:] = 0.7940, 3.3975, 0.4890
bone.roll = 3.1416 bone.roll = 3.1416
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['delta'] bone.parent = arm.edit_bones['delta']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -67,7 +67,7 @@ def metarig_definition(obj, orig_bone_name):
if len(children) != 1: if len(children) != 1:
raise RigifyError("only 1 child supported for delta on bone '%s'" % delta.name) raise RigifyError("only 1 child supported for delta on bone '%s'" % delta.name)
if delta.connected: if delta.use_connect:
raise RigifyError("bone cannot be connected to its parent '%s'" % delta.name) raise RigifyError("bone cannot be connected to its parent '%s'" % delta.name)
bone_definition = [delta.name, children[0].name] bone_definition = [delta.name, children[0].name]

View File

@@ -134,7 +134,7 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0000, 0.0000, 1.0000 bone.tail[:] = 0.0000, 0.0000, 1.0000
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
pbone = obj.pose.bones['Bone'] pbone = obj.pose.bones['Bone']
@@ -379,15 +379,15 @@ def control(obj, definitions, base_names, options):
# Set layers # Set layers
#layer = list(bb[definitions[2]].layer) #layer = list(bb[definitions[2]].layers)
#bb[lid1].layer = layer #bb[lid1].layers = layer
#bb[lid2].layer = layer #bb[lid2].layers = layer
#bb[lid3].layer = layer #bb[lid3].layers = layer
#bb[lid4].layer = layer #bb[lid4].layers = layer
#bb[lid5].layer = layer #bb[lid5].layers = layer
#bb[lid6].layer = layer #bb[lid6].layers = layer
#bb[lid7].layer = layer #bb[lid7].layers = layer
#bb[lid8].layer = layer #bb[lid8].layers = layer
return (None,) return (None,)

View File

@@ -56,7 +56,7 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0000, 0.0000, 1.0000 bone.tail[:] = 0.0000, 0.0000, 1.0000
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
pbone = obj.pose.bones['Bone'] pbone = obj.pose.bones['Bone']
@@ -148,10 +148,10 @@ def deform(obj, definitions, base_names, options):
eb[dlid3].parent = eb[dlid4] eb[dlid3].parent = eb[dlid4]
eb[dlid33].parent = eb[dlid3] eb[dlid33].parent = eb[dlid3]
eb[dlid2].connected = True eb[dlid2].use_connect = True
eb[dlid22].connected = True eb[dlid22].use_connect = True
eb[dlid3].connected = True eb[dlid3].use_connect = True
eb[dlid33].connected = True eb[dlid33].use_connect = True
eb[dlid1].bbone_segments = 8 eb[dlid1].bbone_segments = 8
eb[dlid2].bbone_segments = 8 eb[dlid2].bbone_segments = 8
@@ -170,10 +170,10 @@ def deform(obj, definitions, base_names, options):
eb[dlid7].parent = eb[dlid8] eb[dlid7].parent = eb[dlid8]
eb[dlid77].parent = eb[dlid7] eb[dlid77].parent = eb[dlid7]
eb[dlid6].connected = True eb[dlid6].use_connect = True
eb[dlid66].connected = True eb[dlid66].use_connect = True
eb[dlid7].connected = True eb[dlid7].use_connect = True
eb[dlid77].connected = True eb[dlid77].use_connect = True
eb[dlid5].bbone_segments = 8 eb[dlid5].bbone_segments = 8
eb[dlid6].bbone_segments = 8 eb[dlid6].bbone_segments = 8
@@ -615,15 +615,15 @@ def control(obj, definitions, base_names, options):
# Set layers # Set layers
layer = list(bb[definitions[2]].layer) layer = list(bb[definitions[2]].layers)
bb[lid1].layer = layer bb[lid1].layers = layer
bb[lid2].layer = layer bb[lid2].layers = layer
bb[lid3].layer = layer bb[lid3].layers = layer
bb[lid4].layer = layer bb[lid4].layers = layer
bb[lid5].layer = layer bb[lid5].layers = layer
bb[lid6].layer = layer bb[lid6].layers = layer
bb[lid7].layer = layer bb[lid7].layers = layer
bb[lid8].layer = layer bb[lid8].layers = layer
return (None,) return (None,)
@@ -648,7 +648,7 @@ def make_lid_stretch_bone(obj, name, bone1, bone2, roll_alpha):
# Create the bone, pointing from bone1 to bone2 # Create the bone, pointing from bone1 to bone2
bone_e = copy_bone_simple(obj.data, bone1, name, parent=True) bone_e = copy_bone_simple(obj.data, bone1, name, parent=True)
bone_e.connected = False bone_e.use_connect = False
bone_e.tail = eb[bone2].head bone_e.tail = eb[bone2].head
bone = bone_e.name bone = bone_e.name

View File

@@ -35,18 +35,18 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0353, -0.0184, -0.0053 bone.tail[:] = 0.0353, -0.0184, -0.0053
bone.roll = -2.8722 bone.roll = -2.8722
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('finger.02') bone = arm.edit_bones.new('finger.02')
bone.head[:] = 0.0353, -0.0184, -0.0053 bone.head[:] = 0.0353, -0.0184, -0.0053
bone.tail[:] = 0.0702, -0.0364, -0.0146 bone.tail[:] = 0.0702, -0.0364, -0.0146
bone.roll = -2.7099 bone.roll = -2.7099
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger.01'] bone.parent = arm.edit_bones['finger.01']
bone = arm.edit_bones.new('finger.03') bone = arm.edit_bones.new('finger.03')
bone.head[:] = 0.0702, -0.0364, -0.0146 bone.head[:] = 0.0702, -0.0364, -0.0146
bone.tail[:] = 0.0903, -0.0461, -0.0298 bone.tail[:] = 0.0903, -0.0461, -0.0298
bone.roll = -2.1709 bone.roll = -2.1709
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger.02'] bone.parent = arm.edit_bones['finger.02']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -84,8 +84,8 @@ def deform(obj, definitions, base_names, options):
# Create base digit bones: two bones, each half of the base digit. # 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) 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) f1b = copy_bone_simple(obj.data, definitions[0], "DEF-%s.02" % base_names[definitions[0]], parent=True)
f1a.connected = False f1a.use_connect = False
f1b.connected = False f1b.use_connect = False
f1b.parent = f1a f1b.parent = f1a
center = f1a.center center = f1a.center
f1a.tail = center f1a.tail = center
@@ -182,7 +182,7 @@ def main(obj, bone_definition, base_names, options):
else: else:
tot_len = eb[org_f1].length + eb[org_f2].length 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 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].use_connect = eb[org_f1].use_connect
eb[control].parent = eb[org_f1].parent eb[control].parent = eb[org_f1].parent
eb[control].length = tot_len eb[control].length = tot_len
@@ -203,12 +203,12 @@ def main(obj, bone_definition, base_names, options):
# Set parents of the bones, interleaving the driver bones with the secondary control bones # Set parents of the bones, interleaving the driver bones with the secondary control bones
if three_digits: if three_digits:
eb[f3].connected = False eb[f3].use_connect = False
eb[df3].connected = False eb[df3].use_connect = False
eb[f2].connected = False eb[f2].use_connect = False
eb[df2].connected = False eb[df2].use_connect = False
eb[f1].connected = False eb[f1].use_connect = False
eb[df1].connected = eb[org_f1].connected eb[df1].use_connect = eb[org_f1].use_connect
if three_digits: if three_digits:
eb[f3].parent = eb[df3] eb[f3].parent = eb[df3]
@@ -223,7 +223,7 @@ def main(obj, bone_definition, base_names, options):
socket = copy_bone_simple(arm, org_f1, "MCH-socket_"+control, parent=True).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 hinge = copy_bone_simple(arm, eb[org_f1].parent.name, "MCH-hinge_"+control).name
eb[control].connected = False eb[control].use_connect = False
eb[control].parent = eb[hinge] eb[control].parent = eb[hinge]
# Create the deform rig while we're still in edit mode # Create the deform rig while we're still in edit mode
@@ -362,16 +362,16 @@ def main(obj, bone_definition, base_names, options):
if "ex_layer" in options: 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: else:
layer = list(arm.bones[bone_definition[0]].layer) layer = list(arm.bones[bone_definition[0]].layers)
#for bone_name in [f1, f2, f3]: #for bone_name in [f1, f2, f3]:
# arm.bones[bone_name].layer = layer # arm.bones[bone_name].layers = layer
arm.bones[f1].layer = layer arm.bones[f1].layers = layer
arm.bones[f2].layer = layer arm.bones[f2].layers = layer
if three_digits: if three_digits:
arm.bones[f3].layer = layer arm.bones[f3].layers = layer
layer = list(arm.bones[bone_definition[0]].layer) layer = list(arm.bones[bone_definition[0]].layers)
bb[control].layer = layer bb[control].layers = layer
# no blending the result of this # no blending the result of this
return None return None

View File

@@ -36,36 +36,36 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0000, 0.0000, 0.2506 bone.tail[:] = 0.0000, 0.0000, 0.2506
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('thigh') bone = arm.edit_bones.new('thigh')
bone.head[:] = 0.1253, 0.0000, -0.0000 bone.head[:] = 0.1253, 0.0000, -0.0000
bone.tail[:] = 0.0752, -0.0251, -0.4260 bone.tail[:] = 0.0752, -0.0251, -0.4260
bone.roll = 0.1171 bone.roll = 0.1171
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hips'] bone.parent = arm.edit_bones['hips']
bone = arm.edit_bones.new('shin') bone = arm.edit_bones.new('shin')
bone.head[:] = 0.0752, -0.0251, -0.4260 bone.head[:] = 0.0752, -0.0251, -0.4260
bone.tail[:] = 0.0752, 0.0000, -0.8771 bone.tail[:] = 0.0752, 0.0000, -0.8771
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['thigh'] bone.parent = arm.edit_bones['thigh']
bone = arm.edit_bones.new('foot') bone = arm.edit_bones.new('foot')
bone.head[:] = 0.0752, 0.0000, -0.8771 bone.head[:] = 0.0752, 0.0000, -0.8771
bone.tail[:] = 0.1013, -0.1481, -0.9773 bone.tail[:] = 0.1013, -0.1481, -0.9773
bone.roll = -0.4662 bone.roll = -0.4662
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['shin'] bone.parent = arm.edit_bones['shin']
bone = arm.edit_bones.new('toe') bone = arm.edit_bones.new('toe')
bone.head[:] = 0.1013, -0.1481, -0.9773 bone.head[:] = 0.1013, -0.1481, -0.9773
bone.tail[:] = 0.1100, -0.2479, -0.9773 bone.tail[:] = 0.1100, -0.2479, -0.9773
bone.roll = 3.1416 bone.roll = 3.1416
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['foot'] bone.parent = arm.edit_bones['foot']
bone = arm.edit_bones.new('heel') bone = arm.edit_bones.new('heel')
bone.head[:] = 0.0652, 0.0501, -1.0024 bone.head[:] = 0.0652, 0.0501, -1.0024
bone.tail[:] = 0.0927, -0.1002, -1.0024 bone.tail[:] = 0.0927, -0.1002, -1.0024
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['foot'] bone.parent = arm.edit_bones['foot']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -109,11 +109,11 @@ def metarig_definition(obj, orig_bone_name):
if len(children) != 2: if len(children) != 2:
raise RigifyError("expected the foot bone:'%s' to have 2 children" % bone.name) raise RigifyError("expected the foot bone:'%s' to have 2 children" % bone.name)
if children[0].connected == children[1].connected: if children[0].use_connect == children[1].use_connect:
raise RigifyError("expected one bone to be connected") raise RigifyError("expected one bone to be connected")
toe, heel = children toe, heel = children
if heel.connected: if heel.use_connect:
toe, heel = heel, toe toe, heel = heel, toe
@@ -154,7 +154,7 @@ def ik(obj, bone_definition, base_names, options):
ik.foot_e = copy_bone_simple(arm, mt.heel, base_foot_name + "_ik" + get_side_name(base_names[mt_chain.foot])) ik.foot_e = copy_bone_simple(arm, mt.heel, base_foot_name + "_ik" + get_side_name(base_names[mt_chain.foot]))
ik.foot = ik.foot_e.name ik.foot = ik.foot_e.name
ik.foot_e.translate(mt_chain.foot_e.head - ik.foot_e.head) ik.foot_e.translate(mt_chain.foot_e.head - ik.foot_e.head)
ik.foot_e.local_location = False ik.foot_e.use_local_location = False
# foot roll: heel pointing backwards, half length # foot roll: heel pointing backwards, half length
ik.foot_roll_e = copy_bone_simple(arm, mt.heel, base_foot_name + "_roll" + get_side_name(base_names[mt_chain.foot])) ik.foot_roll_e = copy_bone_simple(arm, mt.heel, base_foot_name + "_roll" + get_side_name(base_names[mt_chain.foot]))
@@ -180,11 +180,11 @@ def ik(obj, bone_definition, base_names, options):
# rename 'MCH-toe' --> to 'toe_ik' and make the child of ik.foot_roll_01 # rename 'MCH-toe' --> to 'toe_ik' and make the child of ik.foot_roll_01
# ------------------ FK or IK? # ------------------ FK or IK?
ik_chain.rename("toe", get_base_name(base_names[mt_chain.toe]) + "_ik" + get_side_name(base_names[mt_chain.toe])) ik_chain.rename("toe", get_base_name(base_names[mt_chain.toe]) + "_ik" + get_side_name(base_names[mt_chain.toe]))
ik_chain.toe_e.connected = False ik_chain.toe_e.use_connect = False
ik_chain.toe_e.parent = ik.foot_roll_01_e ik_chain.toe_e.parent = ik.foot_roll_01_e
# re-parent ik_chain.foot to the # re-parent ik_chain.foot to the
ik_chain.foot_e.connected = False ik_chain.foot_e.use_connect = False
ik_chain.foot_e.parent = ik.foot_roll_02_e ik_chain.foot_e.parent = ik.foot_roll_02_e
@@ -198,7 +198,7 @@ def ik(obj, bone_definition, base_names, options):
ik.knee_target_e.translate(offset) ik.knee_target_e.translate(offset)
ik.knee_target_e.length *= 0.5 ik.knee_target_e.length *= 0.5
ik.knee_target_e.parent = ik.foot_e ik.knee_target_e.parent = ik.foot_e
ik.knee_target_e.local_location = False ik.knee_target_e.use_local_location = False
# roll the bone to point up... could also point in the same direction as ik.foot_roll # roll the bone to point up... could also point in the same direction as ik.foot_roll
# ik.foot_roll_02_e.matrix * Vector((0.0, 0.0, 1.0)) # ACK!, no rest matrix in editmode # ik.foot_roll_02_e.matrix * Vector((0.0, 0.0, 1.0)) # ACK!, no rest matrix in editmode
@@ -267,11 +267,11 @@ def ik(obj, bone_definition, base_names, options):
if "ik_layer" in options: if "ik_layer" in options:
layer = [n == options["ik_layer"] for n in range(0, 32)] layer = [n == options["ik_layer"] for n in range(0, 32)]
else: else:
layer = list(mt_chain.thigh_b.layer) layer = list(mt_chain.thigh_b.layers)
for attr in ik_chain.attr_names: for attr in ik_chain.attr_names:
getattr(ik_chain, attr + "_b").layer = layer getattr(ik_chain, attr + "_b").layers = layer
for attr in ik.attr_names: for attr in ik.attr_names:
getattr(ik, attr + "_b").layer = layer getattr(ik, attr + "_b").layers = layer
bpy.ops.object.mode_set(mode='EDIT') bpy.ops.object.mode_set(mode='EDIT')
@@ -312,11 +312,11 @@ def fk(obj, bone_definition, base_names, options):
foot = foot_e.name foot = foot_e.name
foot_e.translate(mt_chain.foot_e.head - foot_e.head) foot_e.translate(mt_chain.foot_e.head - foot_e.head)
foot_e.parent = fk_chain.shin_e foot_e.parent = fk_chain.shin_e
foot_e.connected = fk_chain.foot_e.connected foot_e.use_connect = fk_chain.foot_e.use_connect
fk_chain.foot_e.connected = False fk_chain.foot_e.use_connect = False
fk_chain.foot_e.parent = foot_e fk_chain.foot_e.parent = foot_e
fk_chain.thigh_e.connected = False fk_chain.thigh_e.use_connect = False
fk_chain.thigh_e.parent = ex.thigh_hinge_e fk_chain.thigh_e.parent = ex.thigh_hinge_e
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -370,12 +370,12 @@ def fk(obj, bone_definition, base_names, options):
if "fk_layer" in options: if "fk_layer" in options:
layer = [n == options["fk_layer"] for n in range(0, 32)] layer = [n == options["fk_layer"] for n in range(0, 32)]
else: else:
layer = list(mt_chain.thigh_b.layer) layer = list(mt_chain.thigh_b.layers)
for attr in fk_chain.attr_names: for attr in fk_chain.attr_names:
getattr(fk_chain, attr + "_b").layer = layer getattr(fk_chain, attr + "_b").layers = layer
for attr in ex.attr_names: for attr in ex.attr_names:
getattr(ex, attr + "_b").layer = layer getattr(ex, attr + "_b").layers = layer
arm.bones[foot].layer = layer arm.bones[foot].layers = layer
bpy.ops.object.mode_set(mode='EDIT') bpy.ops.object.mode_set(mode='EDIT')
@@ -390,8 +390,8 @@ def deform(obj, definitions, base_names, options):
# Create upper leg bones: two bones, each half of the upper leg. # Create upper leg bones: two bones, each half of the upper leg.
uleg1 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.01" % base_names[definitions[1]], parent=True) uleg1 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.01" % base_names[definitions[1]], parent=True)
uleg2 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.02" % base_names[definitions[1]], parent=True) uleg2 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.02" % base_names[definitions[1]], parent=True)
uleg1.connected = False uleg1.use_connect = False
uleg2.connected = False uleg2.use_connect = False
uleg2.parent = uleg1 uleg2.parent = uleg1
center = uleg1.center center = uleg1.center
uleg1.tail = center uleg1.tail = center
@@ -400,8 +400,8 @@ def deform(obj, definitions, base_names, options):
# Create lower leg bones: two bones, each half of the lower leg. # Create lower leg bones: two bones, each half of the lower leg.
lleg1 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.01" % base_names[definitions[2]], parent=True) lleg1 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.01" % base_names[definitions[2]], parent=True)
lleg2 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.02" % base_names[definitions[2]], parent=True) lleg2 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.02" % base_names[definitions[2]], parent=True)
lleg1.connected = False lleg1.use_connect = False
lleg2.connected = False lleg2.use_connect = False
lleg2.parent = lleg1 lleg2.parent = lleg1
center = lleg1.center center = lleg1.center
lleg1.tail = center lleg1.tail = center
@@ -410,7 +410,7 @@ def deform(obj, definitions, base_names, options):
# Create a bone for the second lower leg deform bone to twist with # Create a bone for the second lower leg deform bone to twist with
twist = copy_bone_simple(obj.data, lleg2.name, "MCH-leg_twist") twist = copy_bone_simple(obj.data, lleg2.name, "MCH-leg_twist")
twist.length /= 4 twist.length /= 4
twist.connected = False twist.use_connect = False
twist.parent = obj.data.edit_bones[definitions[3]] twist.parent = obj.data.edit_bones[definitions[3]]
# Create foot bone # Create foot bone

View File

@@ -37,30 +37,30 @@ def metarig_template():
bone.head[:] = -0.0728, -0.2427, 0.0000 bone.head[:] = -0.0728, -0.2427, 0.0000
bone.tail[:] = -0.0728, -0.2427, 0.2427 bone.tail[:] = -0.0728, -0.2427, 0.2427
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('thigh') bone = arm.edit_bones.new('thigh')
bone.head[:] = 0.0000, 0.0000, -0.0000 bone.head[:] = 0.0000, 0.0000, -0.0000
bone.tail[:] = 0.0813, -0.2109, -0.3374 bone.tail[:] = 0.0813, -0.2109, -0.3374
bone.roll = -0.4656 bone.roll = -0.4656
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['body'] bone.parent = arm.edit_bones['body']
bone = arm.edit_bones.new('shin') bone = arm.edit_bones.new('shin')
bone.head[:] = 0.0813, -0.2109, -0.3374 bone.head[:] = 0.0813, -0.2109, -0.3374
bone.tail[:] = 0.0714, -0.0043, -0.5830 bone.tail[:] = 0.0714, -0.0043, -0.5830
bone.roll = -0.2024 bone.roll = -0.2024
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['thigh'] bone.parent = arm.edit_bones['thigh']
bone = arm.edit_bones.new('foot') bone = arm.edit_bones.new('foot')
bone.head[:] = 0.0714, -0.0043, -0.5830 bone.head[:] = 0.0714, -0.0043, -0.5830
bone.tail[:] = 0.0929, -0.0484, -0.7652 bone.tail[:] = 0.0929, -0.0484, -0.7652
bone.roll = -0.3766 bone.roll = -0.3766
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['shin'] bone.parent = arm.edit_bones['shin']
bone = arm.edit_bones.new('toe') bone = arm.edit_bones.new('toe')
bone.head[:] = 0.0929, -0.0484, -0.7652 bone.head[:] = 0.0929, -0.0484, -0.7652
bone.tail[:] = 0.1146, -0.1244, -0.7652 bone.tail[:] = 0.1146, -0.1244, -0.7652
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['foot'] bone.parent = arm.edit_bones['foot']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -120,7 +120,7 @@ def ik(obj, bone_definition, base_names, options):
ik_chain = mt_chain.copy(to_fmt="MCH-%s.ik", base_names=base_names) ik_chain = mt_chain.copy(to_fmt="MCH-%s.ik", base_names=base_names)
ik_chain.thigh_e.connected = False ik_chain.thigh_e.use_connect = False
ik_chain.thigh_e.parent = mt.hips_e ik_chain.thigh_e.parent = mt.hips_e
ik_chain.foot_e.parent = None ik_chain.foot_e.parent = None
@@ -128,10 +128,10 @@ def ik(obj, bone_definition, base_names, options):
ik_chain.rename("toe", get_base_name(base_names[bone_definition[4]]) + "_ik" + get_side_name(base_names[bone_definition[4]])) ik_chain.rename("toe", get_base_name(base_names[bone_definition[4]]) + "_ik" + get_side_name(base_names[bone_definition[4]]))
# keep the foot_ik as the parent # keep the foot_ik as the parent
ik_chain.toe_e.connected = False ik_chain.toe_e.use_connect = False
# Foot uses pose space, not local space, for translation # Foot uses pose space, not local space, for translation
ik_chain.foot_e.local_location = False ik_chain.foot_e.use_local_location = False
# must be after disconnecting the toe # must be after disconnecting the toe
ik_chain.foot_e.align_orientation(mt_chain.toe_e) ik_chain.foot_e.align_orientation(mt_chain.toe_e)
@@ -141,7 +141,7 @@ def ik(obj, bone_definition, base_names, options):
# knee rotator # knee rotator
knee_rotator = copy_bone_simple(arm, mt_chain.toe, "knee_rotator" + get_side_name(base_names[mt_chain.foot]), parent=True).name knee_rotator = copy_bone_simple(arm, mt_chain.toe, "knee_rotator" + get_side_name(base_names[mt_chain.foot]), parent=True).name
eb[knee_rotator].connected = False eb[knee_rotator].use_connect = False
eb[knee_rotator].parent = eb[mt.hips] eb[knee_rotator].parent = eb[mt.hips]
eb[knee_rotator].head = eb[ik_chain.thigh].head eb[knee_rotator].head = eb[ik_chain.thigh].head
eb[knee_rotator].tail = eb[knee_rotator].head + eb[mt_chain.toe].vector eb[knee_rotator].tail = eb[knee_rotator].head + eb[mt_chain.toe].vector
@@ -156,7 +156,7 @@ def ik(obj, bone_definition, base_names, options):
# then align it with the foot but reverse direction. # then align it with the foot but reverse direction.
ik.foot_roll_e = copy_bone_simple(arm, mt_chain.toe, get_base_name(base_names[mt_chain.foot]) + "_roll" + get_side_name(base_names[mt_chain.foot])) ik.foot_roll_e = copy_bone_simple(arm, mt_chain.toe, get_base_name(base_names[mt_chain.foot]) + "_roll" + get_side_name(base_names[mt_chain.foot]))
ik.foot_roll = ik.foot_roll_e.name ik.foot_roll = ik.foot_roll_e.name
ik.foot_roll_e.connected = False ik.foot_roll_e.use_connect = False
ik.foot_roll_e.parent = ik_chain.foot_e ik.foot_roll_e.parent = ik_chain.foot_e
ik.foot_roll_e.head -= mt_chain.toe_e.vector.normalize() * mt_chain.foot_e.length ik.foot_roll_e.head -= mt_chain.toe_e.vector.normalize() * mt_chain.foot_e.length
ik.foot_roll_e.tail = ik.foot_roll_e.head - (mt_chain.foot_e.vector.normalize() * mt_chain.toe_e.length) ik.foot_roll_e.tail = ik.foot_roll_e.head - (mt_chain.foot_e.vector.normalize() * mt_chain.toe_e.length)
@@ -175,7 +175,7 @@ def ik(obj, bone_definition, base_names, options):
ik.foot_target_e.parent = ik.foot_roll_01_e ik.foot_target_e.parent = ik.foot_roll_01_e
ik.foot_target_e.align_orientation(ik_chain.foot_e) ik.foot_target_e.align_orientation(ik_chain.foot_e)
ik.foot_target_e.length = ik_chain.foot_e.length / 2.0 ik.foot_target_e.length = ik_chain.foot_e.length / 2.0
ik.foot_target_e.connected = True ik.foot_target_e.use_connect = True
# MCH-foot.02 child of MCH-foot # MCH-foot.02 child of MCH-foot
ik.foot_roll_02_e = copy_bone_simple(arm, mt_chain.foot, "MCH-%s_02" % base_names[mt_chain.foot]) ik.foot_roll_02_e = copy_bone_simple(arm, mt_chain.foot, "MCH-%s_02" % base_names[mt_chain.foot])
@@ -289,12 +289,12 @@ def ik(obj, bone_definition, base_names, options):
if "ik_layer" in options: if "ik_layer" in options:
layer = [n==options["ik_layer"] for n in range(0,32)] layer = [n==options["ik_layer"] for n in range(0,32)]
else: else:
layer = list(mt_chain.thigh_b.layer) layer = list(mt_chain.thigh_b.layers)
for attr in ik_chain.attr_names: for attr in ik_chain.attr_names:
obj.data.bones[getattr(ik_chain, attr)].layer = layer obj.data.bones[getattr(ik_chain, attr)].layers = layer
for attr in ik.attr_names: for attr in ik.attr_names:
obj.data.bones[getattr(ik, attr)].layer = layer obj.data.bones[getattr(ik, attr)].layers = layer
obj.data.bones[knee_rotator].layer = layer obj.data.bones[knee_rotator].layers = layer
return None, ik_chain.thigh, ik_chain.shin, ik_chain.foot, ik_chain.toe return None, ik_chain.thigh, ik_chain.shin, ik_chain.foot, ik_chain.toe
@@ -325,7 +325,7 @@ def fk(obj, bone_definition, base_names, options):
eb[hinge].length = eb[mt.hips].length / 2 eb[hinge].length = eb[mt.hips].length / 2
# Make leg child of hinge # Make leg child of hinge
eb[fk_chain.thigh].connected = False eb[fk_chain.thigh].use_connect = False
eb[fk_chain.thigh].parent = eb[hinge] eb[fk_chain.thigh].parent = eb[hinge]
@@ -396,8 +396,8 @@ def deform(obj, definitions, base_names, options):
# Create upper leg bones: two bones, each half of the upper leg. # Create upper leg bones: two bones, each half of the upper leg.
uleg1 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.01" % base_names[definitions[1]], parent=True) uleg1 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.01" % base_names[definitions[1]], parent=True)
uleg2 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.02" % base_names[definitions[1]], parent=True) uleg2 = copy_bone_simple(obj.data, definitions[1], "DEF-%s.02" % base_names[definitions[1]], parent=True)
uleg1.connected = False uleg1.use_connect = False
uleg2.connected = False uleg2.use_connect = False
uleg2.parent = uleg1 uleg2.parent = uleg1
center = uleg1.center center = uleg1.center
uleg1.tail = center uleg1.tail = center
@@ -406,8 +406,8 @@ def deform(obj, definitions, base_names, options):
# Create lower leg bones: two bones, each half of the lower leg. # Create lower leg bones: two bones, each half of the lower leg.
lleg1 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.01" % base_names[definitions[2]], parent=True) lleg1 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.01" % base_names[definitions[2]], parent=True)
lleg2 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.02" % base_names[definitions[2]], parent=True) lleg2 = copy_bone_simple(obj.data, definitions[2], "DEF-%s.02" % base_names[definitions[2]], parent=True)
lleg1.connected = False lleg1.use_connect = False
lleg2.connected = False lleg2.use_connect = False
lleg2.parent = lleg1 lleg2.parent = lleg1
center = lleg1.center center = lleg1.center
lleg1.tail = center lleg1.tail = center
@@ -416,7 +416,7 @@ def deform(obj, definitions, base_names, options):
# Create a bone for the second lower leg deform bone to twist with # Create a bone for the second lower leg deform bone to twist with
twist = copy_bone_simple(obj.data, lleg2.name, "MCH-leg_twist") twist = copy_bone_simple(obj.data, lleg2.name, "MCH-leg_twist")
twist.length /= 4 twist.length /= 4
twist.connected = False twist.use_connect = False
twist.parent = obj.data.edit_bones[definitions[3]] twist.parent = obj.data.edit_bones[definitions[3]]
# Create foot bone # Create foot bone

View File

@@ -93,7 +93,7 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0000, 0.0000, 1.0000 bone.tail[:] = 0.0000, 0.0000, 1.0000
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
pbone = obj.pose.bones['Bone'] pbone = obj.pose.bones['Bone']
@@ -151,8 +151,8 @@ def deform(obj, definitions, base_names, options):
eb[spread_l_2].tail = eb[definitions[5]].head eb[spread_l_2].tail = eb[definitions[5]].head
eb[spread_l_1].roll = 0 eb[spread_l_1].roll = 0
eb[spread_l_2].roll = 0 eb[spread_l_2].roll = 0
eb[spread_l_1].connected = False eb[spread_l_1].use_connect = False
eb[spread_l_2].connected = False eb[spread_l_2].use_connect = False
eb[spread_l_1].parent = eb[definitions[6]] eb[spread_l_1].parent = eb[definitions[6]]
eb[spread_l_2].parent = eb[definitions[6]] eb[spread_l_2].parent = eb[definitions[6]]
@@ -162,8 +162,8 @@ def deform(obj, definitions, base_names, options):
eb[spread_r_2].tail = eb[definitions[3]].head eb[spread_r_2].tail = eb[definitions[3]].head
eb[spread_r_1].roll = 0 eb[spread_r_1].roll = 0
eb[spread_r_2].roll = 0 eb[spread_r_2].roll = 0
eb[spread_r_1].connected = False eb[spread_r_1].use_connect = False
eb[spread_r_2].connected = False eb[spread_r_2].use_connect = False
eb[spread_r_1].parent = eb[definitions[2]] eb[spread_r_1].parent = eb[definitions[2]]
eb[spread_r_2].parent = eb[definitions[2]] eb[spread_r_2].parent = eb[definitions[2]]
@@ -171,7 +171,7 @@ def deform(obj, definitions, base_names, options):
# Jaw open bones (for driving corrective shape keys) # Jaw open bones (for driving corrective shape keys)
jopen1 = copy_bone_simple(obj.data, jaw, "MCH-"+base_names[jaw]+".track1", parent=True).name jopen1 = copy_bone_simple(obj.data, jaw, "MCH-"+base_names[jaw]+".track1", parent=True).name
eb[jopen1].connected = False eb[jopen1].use_connect = False
eb[jopen1].head = eb[jaw].tail eb[jopen1].head = eb[jaw].tail
eb[jopen1].tail = eb[jopen1].head + Vector((0, 0, eb[jaw].length/4)) eb[jopen1].tail = eb[jopen1].head + Vector((0, 0, eb[jaw].length/4))
@@ -426,7 +426,7 @@ def control(obj, definitions, base_names, options):
# Jaw open tracker # Jaw open tracker
jopent = copy_bone_simple(obj.data, jaw_e.name, "MCH-"+base_names[jaw_e.name]+".track", parent=True).name jopent = copy_bone_simple(obj.data, jaw_e.name, "MCH-"+base_names[jaw_e.name]+".track", parent=True).name
eb[jopent].connected = False eb[jopent].use_connect = False
eb[jopent].tail = jaw_e.tail + Vector((0.0, 0.0, jaw_e.length)) eb[jopent].tail = jaw_e.tail + Vector((0.0, 0.0, jaw_e.length))
eb[jopent].head = jaw_e.tail eb[jopent].head = jaw_e.tail
@@ -684,15 +684,15 @@ def control(obj, definitions, base_names, options):
# Set layers # Set layers
layer = list(bb[definitions[2]].layer) layer = list(bb[definitions[2]].layers)
bb[lip1].layer = layer bb[lip1].layers = layer
bb[lip2].layer = layer bb[lip2].layers = layer
bb[lip3].layer = layer bb[lip3].layers = layer
bb[lip4].layer = layer bb[lip4].layers = layer
bb[lip5].layer = layer bb[lip5].layers = layer
bb[lip6].layer = layer bb[lip6].layers = layer
bb[lip7].layer = layer bb[lip7].layers = layer
bb[lip8].layer = layer bb[lip8].layers = layer
return (None,) return (None,)
@@ -717,7 +717,7 @@ def make_lip_stretch_bone(obj, name, bone1, bone2, roll_alpha):
# Create the bone, pointing from bone1 to bone2 # Create the bone, pointing from bone1 to bone2
bone_e = copy_bone_simple(obj.data, bone1, name, parent=True) bone_e = copy_bone_simple(obj.data, bone1, name, parent=True)
bone_e.connected = False bone_e.use_connect = False
bone_e.tail = eb[bone2].head bone_e.tail = eb[bone2].head
bone = bone_e.name bone = bone_e.name

View File

@@ -35,42 +35,42 @@ def metarig_template():
#bone.head[:] = 0.0000, -0.0276, -0.1328 #bone.head[:] = 0.0000, -0.0276, -0.1328
#bone.tail[:] = 0.0000, -0.0170, -0.0197 #bone.tail[:] = 0.0000, -0.0170, -0.0197
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = False #bone.use_connect = False
#bone = arm.edit_bones.new('head') #bone = arm.edit_bones.new('head')
#bone.head[:] = 0.0000, -0.0170, -0.0197 #bone.head[:] = 0.0000, -0.0170, -0.0197
#bone.tail[:] = 0.0000, 0.0726, 0.1354 #bone.tail[:] = 0.0000, 0.0726, 0.1354
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['body'] #bone.parent = arm.edit_bones['body']
#bone = arm.edit_bones.new('neck.01') #bone = arm.edit_bones.new('neck.01')
#bone.head[:] = 0.0000, -0.0170, -0.0197 #bone.head[:] = 0.0000, -0.0170, -0.0197
#bone.tail[:] = 0.0000, -0.0099, 0.0146 #bone.tail[:] = 0.0000, -0.0099, 0.0146
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = False #bone.use_connect = False
#bone.parent = arm.edit_bones['head'] #bone.parent = arm.edit_bones['head']
#bone = arm.edit_bones.new('neck.02') #bone = arm.edit_bones.new('neck.02')
#bone.head[:] = 0.0000, -0.0099, 0.0146 #bone.head[:] = 0.0000, -0.0099, 0.0146
#bone.tail[:] = 0.0000, -0.0242, 0.0514 #bone.tail[:] = 0.0000, -0.0242, 0.0514
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['neck.01'] #bone.parent = arm.edit_bones['neck.01']
#bone = arm.edit_bones.new('neck.03') #bone = arm.edit_bones.new('neck.03')
#bone.head[:] = 0.0000, -0.0242, 0.0514 #bone.head[:] = 0.0000, -0.0242, 0.0514
#bone.tail[:] = 0.0000, -0.0417, 0.0868 #bone.tail[:] = 0.0000, -0.0417, 0.0868
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['neck.02'] #bone.parent = arm.edit_bones['neck.02']
#bone = arm.edit_bones.new('neck.04') #bone = arm.edit_bones.new('neck.04')
#bone.head[:] = 0.0000, -0.0417, 0.0868 #bone.head[:] = 0.0000, -0.0417, 0.0868
#bone.tail[:] = 0.0000, -0.0509, 0.1190 #bone.tail[:] = 0.0000, -0.0509, 0.1190
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['neck.03'] #bone.parent = arm.edit_bones['neck.03']
#bone = arm.edit_bones.new('neck.05') #bone = arm.edit_bones.new('neck.05')
#bone.head[:] = 0.0000, -0.0509, 0.1190 #bone.head[:] = 0.0000, -0.0509, 0.1190
#bone.tail[:] = 0.0000, -0.0537, 0.1600 #bone.tail[:] = 0.0000, -0.0537, 0.1600
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['neck.04'] #bone.parent = arm.edit_bones['neck.04']
# #
#bpy.ops.object.mode_set(mode='OBJECT') #bpy.ops.object.mode_set(mode='OBJECT')
@@ -330,13 +330,13 @@ def main(obj, bone_definition, base_names, options):
if "ex_layer" in options: 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: else:
layer = list(arm.bones[bone_definition[1]].layer) layer = list(arm.bones[bone_definition[1]].layers)
for bone in neck: for bone in neck:
bb[bone].layer = layer bb[bone].layers = layer
layer = list(arm.bones[bone_definition[1]].layer) layer = list(arm.bones[bone_definition[1]].layers)
bb[neck_ctrl].layer = layer bb[neck_ctrl].layers = layer
bb[head_ctrl].layer = layer bb[head_ctrl].layers = layer
# no blending the result of this # no blending the result of this

View File

@@ -36,42 +36,42 @@ def metarig_template():
bone.head[:] = 0.0000, -0.0276, -0.1328 bone.head[:] = 0.0000, -0.0276, -0.1328
bone.tail[:] = 0.0000, -0.0170, -0.0197 bone.tail[:] = 0.0000, -0.0170, -0.0197
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('head') bone = arm.edit_bones.new('head')
bone.head[:] = 0.0000, -0.0170, -0.0197 bone.head[:] = 0.0000, -0.0170, -0.0197
bone.tail[:] = 0.0000, 0.0726, 0.1354 bone.tail[:] = 0.0000, 0.0726, 0.1354
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['body'] bone.parent = arm.edit_bones['body']
bone = arm.edit_bones.new('neck.01') bone = arm.edit_bones.new('neck.01')
bone.head[:] = 0.0000, -0.0170, -0.0197 bone.head[:] = 0.0000, -0.0170, -0.0197
bone.tail[:] = 0.0000, -0.0099, 0.0146 bone.tail[:] = 0.0000, -0.0099, 0.0146
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['head'] bone.parent = arm.edit_bones['head']
bone = arm.edit_bones.new('neck.02') bone = arm.edit_bones.new('neck.02')
bone.head[:] = 0.0000, -0.0099, 0.0146 bone.head[:] = 0.0000, -0.0099, 0.0146
bone.tail[:] = 0.0000, -0.0242, 0.0514 bone.tail[:] = 0.0000, -0.0242, 0.0514
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['neck.01'] bone.parent = arm.edit_bones['neck.01']
bone = arm.edit_bones.new('neck.03') bone = arm.edit_bones.new('neck.03')
bone.head[:] = 0.0000, -0.0242, 0.0514 bone.head[:] = 0.0000, -0.0242, 0.0514
bone.tail[:] = 0.0000, -0.0417, 0.0868 bone.tail[:] = 0.0000, -0.0417, 0.0868
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['neck.02'] bone.parent = arm.edit_bones['neck.02']
bone = arm.edit_bones.new('neck.04') bone = arm.edit_bones.new('neck.04')
bone.head[:] = 0.0000, -0.0417, 0.0868 bone.head[:] = 0.0000, -0.0417, 0.0868
bone.tail[:] = 0.0000, -0.0509, 0.1190 bone.tail[:] = 0.0000, -0.0509, 0.1190
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['neck.03'] bone.parent = arm.edit_bones['neck.03']
bone = arm.edit_bones.new('neck.05') bone = arm.edit_bones.new('neck.05')
bone.head[:] = 0.0000, -0.0509, 0.1190 bone.head[:] = 0.0000, -0.0509, 0.1190
bone.tail[:] = 0.0000, -0.0537, 0.1600 bone.tail[:] = 0.0000, -0.0537, 0.1600
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['neck.04'] bone.parent = arm.edit_bones['neck.04']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -156,7 +156,7 @@ def main(obj, bone_definition, base_names, options):
# Copy the head bone and offset # 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 = copy_bone_simple(arm, mt.head, "MCH-%s" % base_names[mt.head], parent=True)
ex.head_e.connected = False ex.head_e.use_connect = False
ex.head = ex.head_e.name ex.head = ex.head_e.name
# offset # offset
head_length = ex.head_e.length head_length = ex.head_e.length
@@ -165,7 +165,7 @@ def main(obj, bone_definition, base_names, options):
# Yes, use the body bone but call it a head hinge # 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 = copy_bone_simple(arm, mt.body, "MCH-%s_hinge" % base_names[mt.head], parent=False)
ex.head_hinge_e.connected = False ex.head_hinge_e.use_connect = False
ex.head_hinge = ex.head_hinge_e.name ex.head_hinge = ex.head_hinge_e.name
ex.head_hinge_e.head.y += head_length / 4.0 ex.head_hinge_e.head.y += head_length / 4.0
ex.head_hinge_e.tail.y += head_length / 4.0 ex.head_hinge_e.tail.y += head_length / 4.0
@@ -173,7 +173,7 @@ def main(obj, bone_definition, base_names, options):
# Insert the neck socket, the head copys this loation # 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_e = arm.edit_bones.new("MCH-%s_socked" % neck_chain_basename)
ex.neck_socket = ex.neck_socket_e.name ex.neck_socket = ex.neck_socket_e.name
ex.neck_socket_e.connected = False ex.neck_socket_e.use_connect = False
ex.neck_socket_e.parent = mt.body_e ex.neck_socket_e.parent = mt.body_e
ex.neck_socket_e.head = mt.head_e.head 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.tail = mt.head_e.head - Vector((0.0, neck_chain_segment_length / 2.0, 0.0))
@@ -195,9 +195,9 @@ def main(obj, bone_definition, base_names, options):
neck_e_parent.roll = mt.head_e.roll neck_e_parent.roll = mt.head_e.roll
orig_parent = neck_e.parent orig_parent = neck_e.parent
neck_e.connected = False neck_e.use_connect = False
neck_e.parent = neck_e_parent neck_e.parent = neck_e_parent
neck_e_parent.connected = False neck_e_parent.use_connect = False
if i == 0: if i == 0:
neck_e_parent.parent = mt.body_e neck_e_parent.parent = mt.body_e
@@ -334,14 +334,14 @@ def main(obj, bone_definition, base_names, options):
if "ex_layer" in options: 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: else:
layer = list(arm.bones[bone_definition[1]].layer) layer = list(arm.bones[bone_definition[1]].layers)
for attr in ex_chain.attr_names: for attr in ex_chain.attr_names:
getattr(ex_chain, attr + "_b").layer = layer getattr(ex_chain, attr + "_b").layers = layer
for attr in ex.attr_names: for attr in ex.attr_names:
getattr(ex, attr + "_b").layer = layer getattr(ex, attr + "_b").layers = layer
layer = list(arm.bones[bone_definition[1]].layer) layer = list(arm.bones[bone_definition[1]].layers)
ex.head_ctrl_b.layer = layer ex.head_ctrl_b.layers = layer
# no blending the result of this # no blending the result of this

View File

@@ -35,42 +35,42 @@ def metarig_template():
bone.head[:] = 0.0004, -0.0629, 0.0000 bone.head[:] = 0.0004, -0.0629, 0.0000
bone.tail[:] = 0.0021, -0.0209, 0.0000 bone.tail[:] = 0.0021, -0.0209, 0.0000
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('palm.03') bone = arm.edit_bones.new('palm.03')
bone.head[:] = -0.0000, 0.0000, 0.0000 bone.head[:] = -0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0025, 0.0644, -0.0065 bone.tail[:] = 0.0025, 0.0644, -0.0065
bone.roll = -3.1396 bone.roll = -3.1396
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand'] bone.parent = arm.edit_bones['hand']
bone = arm.edit_bones.new('palm.02') bone = arm.edit_bones.new('palm.02')
bone.head[:] = 0.0252, -0.0000, 0.0000 bone.head[:] = 0.0252, -0.0000, 0.0000
bone.tail[:] = 0.0324, 0.0627, -0.0065 bone.tail[:] = 0.0324, 0.0627, -0.0065
bone.roll = -3.1357 bone.roll = -3.1357
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand'] bone.parent = arm.edit_bones['hand']
bone = arm.edit_bones.new('palm.01') bone = arm.edit_bones.new('palm.01')
bone.head[:] = 0.0504, 0.0000, 0.0000 bone.head[:] = 0.0504, 0.0000, 0.0000
bone.tail[:] = 0.0703, 0.0508, -0.0065 bone.tail[:] = 0.0703, 0.0508, -0.0065
bone.roll = -3.1190 bone.roll = -3.1190
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand'] bone.parent = arm.edit_bones['hand']
bone = arm.edit_bones.new('palm.04') bone = arm.edit_bones.new('palm.04')
bone.head[:] = -0.0252, 0.0000, 0.0000 bone.head[:] = -0.0252, 0.0000, 0.0000
bone.tail[:] = -0.0286, 0.0606, -0.0065 bone.tail[:] = -0.0286, 0.0606, -0.0065
bone.roll = 3.1386 bone.roll = 3.1386
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand'] bone.parent = arm.edit_bones['hand']
bone = arm.edit_bones.new('palm.05') bone = arm.edit_bones.new('palm.05')
bone.head[:] = -0.0504, 0.0000, 0.0000 bone.head[:] = -0.0504, 0.0000, 0.0000
bone.tail[:] = -0.0669, 0.0534, -0.0065 bone.tail[:] = -0.0669, 0.0534, -0.0065
bone.roll = 3.1239 bone.roll = 3.1239
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand'] bone.parent = arm.edit_bones['hand']
bone = arm.edit_bones.new('thumb') bone = arm.edit_bones.new('thumb')
bone.head[:] = 0.0682, -0.0148, 0.0000 bone.head[:] = 0.0682, -0.0148, 0.0000
bone.tail[:] = 0.1063, 0.0242, -0.0065 bone.tail[:] = 0.1063, 0.0242, -0.0065
bone.roll = -3.0929 bone.roll = -3.0929
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand'] bone.parent = arm.edit_bones['hand']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -263,7 +263,7 @@ def main(obj, bone_definition, base_names, options):
# last step setup layers # last step setup layers
arm.bones[control_name].layer = list(arm.bones[bone_definition[1]].layer) arm.bones[control_name].layers = list(arm.bones[bone_definition[1]].layers)
# no blending the result of this # no blending the result of this

View File

@@ -74,7 +74,7 @@ def metarig_template():
#bone.head[:] = 0.0000, 0.0000, 0.0000 #bone.head[:] = 0.0000, 0.0000, 0.0000
#bone.tail[:] = 0.0000, 0.0000, 1.0000 #bone.tail[:] = 0.0000, 0.0000, 1.0000
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = False #bone.use_connect = False
# #
#bpy.ops.object.mode_set(mode='OBJECT') #bpy.ops.object.mode_set(mode='OBJECT')
#pbone = obj.pose.bones['Bone'] #pbone = obj.pose.bones['Bone']

View File

@@ -71,7 +71,7 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0000, 0.0000, 1.0000 bone.tail[:] = 0.0000, 0.0000, 1.0000
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
pbone = obj.pose.bones['Bone'] pbone = obj.pose.bones['Bone']

View File

@@ -71,7 +71,7 @@ def metarig_template():
bone.head[:] = 0.0000, 0.0000, 0.0000 bone.head[:] = 0.0000, 0.0000, 0.0000
bone.tail[:] = 0.0000, 0.0000, 1.0000 bone.tail[:] = 0.0000, 0.0000, 1.0000
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
pbone = obj.pose.bones['Bone'] pbone = obj.pose.bones['Bone']

View File

@@ -36,54 +36,54 @@ def metarig_template():
bone.head[:] = 0.0000, -0.0306, 0.1039 bone.head[:] = 0.0000, -0.0306, 0.1039
bone.tail[:] = 0.0000, -0.0306, -0.0159 bone.tail[:] = 0.0000, -0.0306, -0.0159
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('rib_cage') bone = arm.edit_bones.new('rib_cage')
bone.head[:] = 0.0000, -0.0306, 0.1039 bone.head[:] = 0.0000, -0.0306, 0.1039
bone.tail[:] = 0.0000, -0.0306, 0.2236 bone.tail[:] = 0.0000, -0.0306, 0.2236
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['pelvis'] bone.parent = arm.edit_bones['pelvis']
bone = arm.edit_bones.new('spine.01') bone = arm.edit_bones.new('spine.01')
bone.head[:] = 0.0000, 0.0000, -0.0000 bone.head[:] = 0.0000, 0.0000, -0.0000
bone.tail[:] = 0.0000, -0.0306, 0.1039 bone.tail[:] = 0.0000, -0.0306, 0.1039
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['rib_cage'] bone.parent = arm.edit_bones['rib_cage']
bone = arm.edit_bones.new('spine.02') bone = arm.edit_bones.new('spine.02')
bone.head[:] = 0.0000, -0.0306, 0.1039 bone.head[:] = 0.0000, -0.0306, 0.1039
bone.tail[:] = -0.0000, -0.0398, 0.2045 bone.tail[:] = -0.0000, -0.0398, 0.2045
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.01'] bone.parent = arm.edit_bones['spine.01']
bone = arm.edit_bones.new('spine.03') bone = arm.edit_bones.new('spine.03')
bone.head[:] = -0.0000, -0.0398, 0.2045 bone.head[:] = -0.0000, -0.0398, 0.2045
bone.tail[:] = -0.0000, -0.0094, 0.2893 bone.tail[:] = -0.0000, -0.0094, 0.2893
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.02'] bone.parent = arm.edit_bones['spine.02']
bone = arm.edit_bones.new('spine.04') bone = arm.edit_bones.new('spine.04')
bone.head[:] = -0.0000, -0.0094, 0.2893 bone.head[:] = -0.0000, -0.0094, 0.2893
bone.tail[:] = -0.0000, 0.0335, 0.3595 bone.tail[:] = -0.0000, 0.0335, 0.3595
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.03'] bone.parent = arm.edit_bones['spine.03']
bone = arm.edit_bones.new('spine.05') bone = arm.edit_bones.new('spine.05')
bone.head[:] = -0.0000, 0.0335, 0.3595 bone.head[:] = -0.0000, 0.0335, 0.3595
bone.tail[:] = -0.0000, 0.0555, 0.4327 bone.tail[:] = -0.0000, 0.0555, 0.4327
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.04'] bone.parent = arm.edit_bones['spine.04']
bone = arm.edit_bones.new('spine.06') bone = arm.edit_bones.new('spine.06')
bone.head[:] = -0.0000, 0.0555, 0.4327 bone.head[:] = -0.0000, 0.0555, 0.4327
bone.tail[:] = -0.0000, 0.0440, 0.5207 bone.tail[:] = -0.0000, 0.0440, 0.5207
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.05'] bone.parent = arm.edit_bones['spine.05']
bone = arm.edit_bones.new('spine.07') bone = arm.edit_bones.new('spine.07')
bone.head[:] = -0.0000, 0.0440, 0.5207 bone.head[:] = -0.0000, 0.0440, 0.5207
bone.tail[:] = -0.0000, 0.0021, 0.5992 bone.tail[:] = -0.0000, 0.0021, 0.5992
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.06'] bone.parent = arm.edit_bones['spine.06']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -172,7 +172,7 @@ def main(obj, bone_definition, base_names, options):
ex.pelvis_copy_e = copy_bone_simple(arm, mt.pelvis, base_names[mt.pelvis]) # no parent ex.pelvis_copy_e = copy_bone_simple(arm, mt.pelvis, base_names[mt.pelvis]) # no parent
ex.pelvis_copy = ex.pelvis_copy_e.name ex.pelvis_copy = ex.pelvis_copy_e.name
ex.pelvis_copy_e.local_location = False ex.pelvis_copy_e.use_local_location = False
# copy the pelvis, offset to make MCH-spine_rotate and MCH-ribcage_hinge # copy the pelvis, offset to make MCH-spine_rotate and MCH-ribcage_hinge
ex.ribcage_hinge_e = copy_bone_simple(arm, mt.pelvis, "MCH-%s_hinge" % base_names[mt.ribcage]) ex.ribcage_hinge_e = copy_bone_simple(arm, mt.pelvis, "MCH-%s_hinge" % base_names[mt.ribcage])
@@ -182,7 +182,7 @@ def main(obj, bone_definition, base_names, options):
ex.spine_rotate_e = copy_bone_simple(arm, mt.ribcage, "MCH-%s_rotate" % spine_chain_basename) ex.spine_rotate_e = copy_bone_simple(arm, mt.ribcage, "MCH-%s_rotate" % spine_chain_basename)
ex.spine_rotate = ex.spine_rotate_e.name ex.spine_rotate = ex.spine_rotate_e.name
ex.spine_rotate_e.translate(Vector((0.0, spine_chain_segment_length / 2.0, 0.0))) ex.spine_rotate_e.translate(Vector((0.0, spine_chain_segment_length / 2.0, 0.0)))
ex.spine_rotate_e.connected = False ex.spine_rotate_e.use_connect = False
ex.spine_rotate_e.parent = ex.pelvis_copy_e ex.spine_rotate_e.parent = ex.pelvis_copy_e
@@ -191,7 +191,7 @@ def main(obj, bone_definition, base_names, options):
ex.ribcage_copy_e = copy_bone_simple(arm, mt.ribcage, base_names[mt.ribcage]) ex.ribcage_copy_e = copy_bone_simple(arm, mt.ribcage, base_names[mt.ribcage])
ex.ribcage_copy = ex.ribcage_copy_e.name ex.ribcage_copy = ex.ribcage_copy_e.name
ex.ribcage_copy_e.connected = False ex.ribcage_copy_e.use_connect = False
ex.ribcage_copy_e.parent = ex.ribcage_hinge_e ex.ribcage_copy_e.parent = ex.ribcage_hinge_e
spine_chain = [child.name for child in spine_chain] spine_chain = [child.name for child in spine_chain]
@@ -219,7 +219,7 @@ def main(obj, bone_definition, base_names, options):
ebone = copy_bone_simple(arm, child_name, "MCH-rev_%s" % child_name_orig) ebone = copy_bone_simple(arm, child_name, "MCH-rev_%s" % child_name_orig)
setattr(rv_chain, attr, ebone.name) setattr(rv_chain, attr, ebone.name)
ebone.connected = False ebone.use_connect = False
mt_chain.update() mt_chain.update()
ex_chain.update() ex_chain.update()
@@ -230,7 +230,7 @@ def main(obj, bone_definition, base_names, options):
attr = ex_chain.attr_names[i] + "_e" attr = ex_chain.attr_names[i] + "_e"
ebone = getattr(ex_chain, attr) ebone = getattr(ex_chain, attr)
if i == 0: if i == 0:
ebone.connected = False ebone.use_connect = False
ebone.parent = ex.pelvis_copy_e ebone.parent = ex.pelvis_copy_e
else: else:
attr_parent = ex_chain.attr_names[i - 1] + "_e" attr_parent = ex_chain.attr_names[i - 1] + "_e"
@@ -255,9 +255,9 @@ def main(obj, bone_definition, base_names, options):
spine_e = getattr(ex_chain, ex_chain.attr_names[i] + "_e") spine_e = getattr(ex_chain, ex_chain.attr_names[i] + "_e")
orig_parent = spine_e.parent orig_parent = spine_e.parent
spine_e.connected = False spine_e.use_connect = False
spine_e.parent = spine_e_parent spine_e.parent = spine_e_parent
spine_e_parent.connected = False spine_e_parent.use_connect = False
spine_e_parent.parent = orig_parent spine_e_parent.parent = orig_parent
@@ -465,17 +465,17 @@ def main(obj, bone_definition, base_names, options):
if "ex_layer" in options: 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: else:
layer = list(arm.bones[bone_definition[1]].layer) layer = list(arm.bones[bone_definition[1]].layers)
for attr in ex.attr_names: for attr in ex.attr_names:
getattr(ex, attr + "_b").layer = layer getattr(ex, attr + "_b").layers = layer
for attr in ex_chain.attr_names: for attr in ex_chain.attr_names:
getattr(ex_chain, attr + "_b").layer = layer getattr(ex_chain, attr + "_b").layers = layer
for attr in rv_chain.attr_names: for attr in rv_chain.attr_names:
getattr(rv_chain, attr + "_b").layer = layer getattr(rv_chain, attr + "_b").layers = layer
layer = list(arm.bones[bone_definition[1]].layer) layer = list(arm.bones[bone_definition[1]].layers)
arm.bones[ex.pelvis_copy].layer = layer arm.bones[ex.pelvis_copy].layers = layer
arm.bones[ex.ribcage_copy].layer = layer arm.bones[ex.ribcage_copy].layers = layer
# no support for blending chains # no support for blending chains
return None return None

View File

@@ -35,7 +35,7 @@ RIG_TYPE = "stretch"
# bone.head[:] = 0.0000, 0.0000, 0.0000 # bone.head[:] = 0.0000, 0.0000, 0.0000
# bone.tail[:] = 0.0000, 0.0000, 1.0000 # bone.tail[:] = 0.0000, 0.0000, 1.0000
# bone.roll = 0.0000 # bone.roll = 0.0000
# bone.connected = False # bone.use_connect = False
# #
# bpy.ops.object.mode_set(mode='OBJECT') # bpy.ops.object.mode_set(mode='OBJECT')
# pbone = obj.pose.bones['Bone'] # pbone = obj.pose.bones['Bone']
@@ -84,7 +84,7 @@ def main(obj, bone_definition, base_names, options):
mbone2 = "ORG-" + options["to"] mbone2 = "ORG-" + options["to"]
bone_e = copy_bone_simple(obj.data, mbone1, "DEF-%s" % base_names[bone_definition[0]]) bone_e = copy_bone_simple(obj.data, mbone1, "DEF-%s" % base_names[bone_definition[0]])
bone_e.connected = False bone_e.use_connect = False
bone_e.parent = eb[mbone1] bone_e.parent = eb[mbone1]
bone_e.tail = eb[mbone2].head bone_e.tail = eb[mbone2].head
bone = bone_e.name bone = bone_e.name

View File

@@ -35,7 +35,7 @@ RIG_TYPE = "stretch_twist"
# bone.head[:] = 0.0000, 0.0000, 0.0000 # bone.head[:] = 0.0000, 0.0000, 0.0000
# bone.tail[:] = 0.0000, 0.0000, 1.0000 # bone.tail[:] = 0.0000, 0.0000, 1.0000
# bone.roll = 0.0000 # bone.roll = 0.0000
# bone.connected = False # bone.use_connect = False
# #
# bpy.ops.object.mode_set(mode='OBJECT') # bpy.ops.object.mode_set(mode='OBJECT')
# pbone = obj.pose.bones['Bone'] # pbone = obj.pose.bones['Bone']
@@ -86,20 +86,20 @@ def main(obj, bone_definition, base_names, options):
mbone2 = "ORG-" + options["to"] mbone2 = "ORG-" + options["to"]
bone_e = copy_bone_simple(obj.data, mbone1, "MCH-%s" % base_names[bone_definition[0]]) bone_e = copy_bone_simple(obj.data, mbone1, "MCH-%s" % base_names[bone_definition[0]])
bone_e.connected = False bone_e.use_connect = False
bone_e.parent = None bone_e.parent = None
bone_e.head = (eb[mbone1].head + eb[mbone2].head) / 2 bone_e.head = (eb[mbone1].head + eb[mbone2].head) / 2
bone_e.tail = (bone_e.head[0], bone_e.head[1], bone_e.head[2]+0.1) bone_e.tail = (bone_e.head[0], bone_e.head[1], bone_e.head[2]+0.1)
mid_bone = bone_e.name mid_bone = bone_e.name
bone_e = copy_bone_simple(obj.data, mbone1, "DEF-%s.01" % base_names[bone_definition[0]]) bone_e = copy_bone_simple(obj.data, mbone1, "DEF-%s.01" % base_names[bone_definition[0]])
bone_e.connected = False bone_e.use_connect = False
bone_e.parent = eb[mbone1] bone_e.parent = eb[mbone1]
bone_e.tail = eb[mid_bone].head bone_e.tail = eb[mid_bone].head
bone1 = bone_e.name bone1 = bone_e.name
bone_e = copy_bone_simple(obj.data, mbone2, "DEF-%s.02" % base_names[bone_definition[0]]) bone_e = copy_bone_simple(obj.data, mbone2, "DEF-%s.02" % base_names[bone_definition[0]])
bone_e.connected = False bone_e.use_connect = False
bone_e.parent = eb[mbone2] bone_e.parent = eb[mbone2]
bone_e.tail = eb[mid_bone].head bone_e.tail = eb[mid_bone].head
bone2 = bone_e.name bone2 = bone_e.name

View File

@@ -40,7 +40,7 @@ def metarig_template():
#bone.head[:] = 0.0000, -0.0306, 0.1039 #bone.head[:] = 0.0000, -0.0306, 0.1039
#bone.tail[:] = 0.0000, -0.0306, -0.0159 #bone.tail[:] = 0.0000, -0.0306, -0.0159
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = False #bone.use_connect = False
#bpy.ops.object.mode_set(mode='OBJECT') #bpy.ops.object.mode_set(mode='OBJECT')
#pbone = obj.pose.bones['tail.01'] #pbone = obj.pose.bones['tail.01']
@@ -85,9 +85,9 @@ def main(obj, bone_definitions, base_names, options):
for bone_def in bone_definitions: for bone_def in bone_definitions:
bone = copy_bone_simple(arm, bone_def, base_names[bone_def], parent=True).name bone = copy_bone_simple(arm, bone_def, base_names[bone_def], parent=True).name
if i == 1: # Don't change parent of first tail bone if i == 1: # Don't change parent of first tail bone
eb[bone].connected = False eb[bone].use_connect = False
eb[bone].parent = eb[hinge2] eb[bone].parent = eb[hinge2]
eb[bone].local_location = False eb[bone].use_local_location = False
i = 1 i = 1
bones += [bone] bones += [bone]

View File

@@ -37,42 +37,42 @@ def metarig_template():
#bone.head[:] = 0.0000, -0.0276, -0.1328 #bone.head[:] = 0.0000, -0.0276, -0.1328
#bone.tail[:] = 0.0000, -0.0170, -0.0197 #bone.tail[:] = 0.0000, -0.0170, -0.0197
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = False #bone.use_connect = False
#bone = arm.edit_bones.new('head') #bone = arm.edit_bones.new('head')
#bone.head[:] = 0.0000, -0.0170, -0.0197 #bone.head[:] = 0.0000, -0.0170, -0.0197
#bone.tail[:] = 0.0000, 0.0726, 0.1354 #bone.tail[:] = 0.0000, 0.0726, 0.1354
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['body'] #bone.parent = arm.edit_bones['body']
#bone = arm.edit_bones.new('neck.01') #bone = arm.edit_bones.new('neck.01')
#bone.head[:] = 0.0000, -0.0170, -0.0197 #bone.head[:] = 0.0000, -0.0170, -0.0197
#bone.tail[:] = 0.0000, -0.0099, 0.0146 #bone.tail[:] = 0.0000, -0.0099, 0.0146
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = False #bone.use_connect = False
#bone.parent = arm.edit_bones['head'] #bone.parent = arm.edit_bones['head']
#bone = arm.edit_bones.new('neck.02') #bone = arm.edit_bones.new('neck.02')
#bone.head[:] = 0.0000, -0.0099, 0.0146 #bone.head[:] = 0.0000, -0.0099, 0.0146
#bone.tail[:] = 0.0000, -0.0242, 0.0514 #bone.tail[:] = 0.0000, -0.0242, 0.0514
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['neck.01'] #bone.parent = arm.edit_bones['neck.01']
#bone = arm.edit_bones.new('neck.03') #bone = arm.edit_bones.new('neck.03')
#bone.head[:] = 0.0000, -0.0242, 0.0514 #bone.head[:] = 0.0000, -0.0242, 0.0514
#bone.tail[:] = 0.0000, -0.0417, 0.0868 #bone.tail[:] = 0.0000, -0.0417, 0.0868
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['neck.02'] #bone.parent = arm.edit_bones['neck.02']
#bone = arm.edit_bones.new('neck.04') #bone = arm.edit_bones.new('neck.04')
#bone.head[:] = 0.0000, -0.0417, 0.0868 #bone.head[:] = 0.0000, -0.0417, 0.0868
#bone.tail[:] = 0.0000, -0.0509, 0.1190 #bone.tail[:] = 0.0000, -0.0509, 0.1190
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['neck.03'] #bone.parent = arm.edit_bones['neck.03']
#bone = arm.edit_bones.new('neck.05') #bone = arm.edit_bones.new('neck.05')
#bone.head[:] = 0.0000, -0.0509, 0.1190 #bone.head[:] = 0.0000, -0.0509, 0.1190
#bone.tail[:] = 0.0000, -0.0537, 0.1600 #bone.tail[:] = 0.0000, -0.0537, 0.1600
#bone.roll = 0.0000 #bone.roll = 0.0000
#bone.connected = True #bone.use_connect = True
#bone.parent = arm.edit_bones['neck.04'] #bone.parent = arm.edit_bones['neck.04']
# #
#bpy.ops.object.mode_set(mode='OBJECT') #bpy.ops.object.mode_set(mode='OBJECT')
@@ -159,7 +159,7 @@ def main(obj, bone_definition, base_names, options):
# Copy the head bone and offset # 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 = copy_bone_simple(arm, mt.head, "MCH-%s" % base_names[mt.head], parent=True)
ex.head_e.connected = False ex.head_e.use_connect = False
ex.head = ex.head_e.name ex.head = ex.head_e.name
# offset # offset
head_length = ex.head_e.length head_length = ex.head_e.length
@@ -168,7 +168,7 @@ def main(obj, bone_definition, base_names, options):
# Yes, use the body bone but call it a head hinge # 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 = copy_bone_simple(arm, mt.body, "MCH-%s_hinge" % base_names[mt.head], parent=False)
ex.head_hinge_e.connected = False ex.head_hinge_e.use_connect = False
ex.head_hinge = ex.head_hinge_e.name ex.head_hinge = ex.head_hinge_e.name
ex.head_hinge_e.head.y += head_length / 4.0 ex.head_hinge_e.head.y += head_length / 4.0
ex.head_hinge_e.tail.y += head_length / 4.0 ex.head_hinge_e.tail.y += head_length / 4.0
@@ -176,7 +176,7 @@ def main(obj, bone_definition, base_names, options):
# Insert the neck socket, the head copys this loation # 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_e = arm.edit_bones.new("MCH-%s_socked" % neck_chain_basename)
ex.neck_socket = ex.neck_socket_e.name ex.neck_socket = ex.neck_socket_e.name
ex.neck_socket_e.connected = False ex.neck_socket_e.use_connect = False
ex.neck_socket_e.parent = mt.body_e ex.neck_socket_e.parent = mt.body_e
ex.neck_socket_e.head = mt.head_e.head 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.tail = mt.head_e.head - Vector((0.0, neck_chain_segment_length / 2.0, 0.0))
@@ -198,9 +198,9 @@ def main(obj, bone_definition, base_names, options):
neck_e_parent.roll = mt.head_e.roll neck_e_parent.roll = mt.head_e.roll
orig_parent = neck_e.parent orig_parent = neck_e.parent
neck_e.connected = False neck_e.use_connect = False
neck_e.parent = neck_e_parent neck_e.parent = neck_e_parent
neck_e_parent.connected = False neck_e_parent.use_connect = False
if i == 0: if i == 0:
neck_e_parent.parent = mt.body_e neck_e_parent.parent = mt.body_e
@@ -346,14 +346,14 @@ def main(obj, bone_definition, base_names, options):
if "ex_layer" in options: 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: else:
layer = list(arm.bones[bone_definition[1]].layer) layer = list(arm.bones[bone_definition[1]].layers)
for attr in ex_chain.attr_names: for attr in ex_chain.attr_names:
getattr(ex_chain, attr + "_b").layer = layer getattr(ex_chain, attr + "_b").layers = layer
for attr in ex.attr_names: for attr in ex.attr_names:
getattr(ex, attr + "_b").layer = layer getattr(ex, attr + "_b").layers = layer
layer = list(arm.bones[bone_definition[1]].layer) layer = list(arm.bones[bone_definition[1]].layers)
ex.head_ctrl_b.layer = layer ex.head_ctrl_b.layers = layer
# no blending the result of this # no blending the result of this

View File

@@ -35,7 +35,7 @@ RIG_TYPE = "track_dual"
# bone.head[:] = 0.0000, 0.0000, 0.0000 # bone.head[:] = 0.0000, 0.0000, 0.0000
# bone.tail[:] = 0.0000, 0.0000, 1.0000 # bone.tail[:] = 0.0000, 0.0000, 1.0000
# bone.roll = 0.0000 # bone.roll = 0.0000
# bone.connected = False # bone.use_connect = False
# #
# bpy.ops.object.mode_set(mode='OBJECT') # bpy.ops.object.mode_set(mode='OBJECT')
# pbone = obj.pose.bones['Bone'] # pbone = obj.pose.bones['Bone']
@@ -76,13 +76,13 @@ def main(obj, bone_definition, base_names, options):
mbone2 = "ORG-" + options["to"] mbone2 = "ORG-" + options["to"]
bone_e = copy_bone_simple(obj.data, mbone1, "DEF-%s.01" % base_names[bone_definition[0]]) bone_e = copy_bone_simple(obj.data, mbone1, "DEF-%s.01" % base_names[bone_definition[0]])
bone_e.connected = False bone_e.use_connect = False
bone_e.parent = eb[mbone1] bone_e.parent = eb[mbone1]
bone_e.tail = (eb[mbone1].head + eb[mbone2].head) / 2 bone_e.tail = (eb[mbone1].head + eb[mbone2].head) / 2
bone1 = bone_e.name bone1 = bone_e.name
bone_e = copy_bone_simple(obj.data, mbone2, "DEF-%s.02" % base_names[bone_definition[0]]) bone_e = copy_bone_simple(obj.data, mbone2, "DEF-%s.02" % base_names[bone_definition[0]])
bone_e.connected = False bone_e.use_connect = False
bone_e.parent = eb[mbone1] bone_e.parent = eb[mbone1]
bone_e.tail = (eb[mbone1].head + eb[mbone2].head) / 2 bone_e.tail = (eb[mbone1].head + eb[mbone2].head) / 2
bone2 = bone_e.name bone2 = bone_e.name

View File

@@ -35,7 +35,7 @@ RIG_TYPE = "track_reverse"
# bone.head[:] = 0.0000, 0.0000, 0.0000 # bone.head[:] = 0.0000, 0.0000, 0.0000
# bone.tail[:] = 0.0000, 0.0000, 1.0000 # bone.tail[:] = 0.0000, 0.0000, 1.0000
# bone.roll = 0.0000 # bone.roll = 0.0000
# bone.connected = False # bone.use_connect = False
# #
# bpy.ops.object.mode_set(mode='OBJECT') # bpy.ops.object.mode_set(mode='OBJECT')
# pbone = obj.pose.bones['Bone'] # pbone = obj.pose.bones['Bone']
@@ -78,7 +78,7 @@ def main(obj, bone_definition, base_names, options):
mbone2 = "ORG-" + options["to"] mbone2 = "ORG-" + options["to"]
bone_e = copy_bone_simple(obj.data, mbone2, "DEF-%s.02" % base_names[bone_definition[0]]) bone_e = copy_bone_simple(obj.data, mbone2, "DEF-%s.02" % base_names[bone_definition[0]])
bone_e.connected = False bone_e.use_connect = False
bone_e.parent = eb[mbone1] bone_e.parent = eb[mbone1]
bone_e.tail = eb[mbone1].head bone_e.tail = eb[mbone1].head
bone = bone_e.name bone = bone_e.name

View File

@@ -81,13 +81,13 @@ def copy_bone_simple(arm, from_bone, name, parent=False):
ebone_new = arm.edit_bones.new(name) ebone_new = arm.edit_bones.new(name)
if parent: if parent:
ebone_new.connected = ebone.connected ebone_new.use_connect = ebone.use_connect
ebone_new.parent = ebone.parent ebone_new.parent = ebone.parent
ebone_new.head = ebone.head ebone_new.head = ebone.head
ebone_new.tail = ebone.tail ebone_new.tail = ebone.tail
ebone_new.roll = ebone.roll ebone_new.roll = ebone.roll
ebone_new.layer = list(ebone.layer) ebone_new.layers = list(ebone.layers)
return ebone_new return ebone_new
@@ -276,7 +276,7 @@ def write_meta_rig(obj, func_name="metarig_template"):
code.append(" bone.head[:] = %.4f, %.4f, %.4f" % bone.head.to_tuple(4)) code.append(" bone.head[:] = %.4f, %.4f, %.4f" % bone.head.to_tuple(4))
code.append(" bone.tail[:] = %.4f, %.4f, %.4f" % bone.tail.to_tuple(4)) code.append(" bone.tail[:] = %.4f, %.4f, %.4f" % bone.tail.to_tuple(4))
code.append(" bone.roll = %.4f" % bone.roll) code.append(" bone.roll = %.4f" % bone.roll)
code.append(" bone.connected = %s" % str(bone.connected)) code.append(" bone.use_connect = %s" % str(bone.use_connect))
if bone.parent: if bone.parent:
code.append(" bone.parent = arm.edit_bones['%s']" % bone.parent.name) code.append(" bone.parent = arm.edit_bones['%s']" % bone.parent.name)

View File

@@ -302,6 +302,7 @@ class InfoFunctionRNA:
self.identifier = rna_func.identifier self.identifier = rna_func.identifier
# self.name = rna_func.name # functions have no name! # self.name = rna_func.name # functions have no name!
self.description = rna_func.description.strip() self.description = rna_func.description.strip()
self.is_classmethod = not rna_func.use_self
self.args = [] self.args = []
self.return_values = () self.return_values = ()
@@ -313,7 +314,7 @@ class InfoFunctionRNA:
for rna_prop in rna_func.parameters.values(): for rna_prop in rna_func.parameters.values():
prop = GetInfoPropertyRNA(rna_prop, parent_id) prop = GetInfoPropertyRNA(rna_prop, parent_id)
if rna_prop.use_output: if rna_prop.is_output:
self.return_values.append(prop) self.return_values.append(prop)
else: else:
self.args.append(prop) self.args.append(prop)

View File

@@ -33,426 +33,426 @@ def metarig_template():
bone.head[:] = -0.0000, -0.0145, 1.1263 bone.head[:] = -0.0000, -0.0145, 1.1263
bone.tail[:] = -0.0000, -0.0145, 0.9563 bone.tail[:] = -0.0000, -0.0145, 0.9563
bone.roll = 3.1416 bone.roll = 3.1416
bone.connected = False bone.use_connect = False
bone = arm.edit_bones.new('torso') bone = arm.edit_bones.new('torso')
bone.head[:] = -0.0000, -0.0145, 1.1263 bone.head[:] = -0.0000, -0.0145, 1.1263
bone.tail[:] = -0.0000, -0.0145, 1.2863 bone.tail[:] = -0.0000, -0.0145, 1.2863
bone.roll = 3.1416 bone.roll = 3.1416
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['pelvis'] bone.parent = arm.edit_bones['pelvis']
bone = arm.edit_bones.new('spine.01') bone = arm.edit_bones.new('spine.01')
bone.head[:] = 0.0000, 0.0394, 0.9688 bone.head[:] = 0.0000, 0.0394, 0.9688
bone.tail[:] = -0.0000, -0.0145, 1.1263 bone.tail[:] = -0.0000, -0.0145, 1.1263
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['torso'] bone.parent = arm.edit_bones['torso']
bone = arm.edit_bones.new('spine.02') bone = arm.edit_bones.new('spine.02')
bone.head[:] = -0.0000, -0.0145, 1.1263 bone.head[:] = -0.0000, -0.0145, 1.1263
bone.tail[:] = -0.0000, -0.0213, 1.2884 bone.tail[:] = -0.0000, -0.0213, 1.2884
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.01'] bone.parent = arm.edit_bones['spine.01']
bone = arm.edit_bones.new('thigh.L') bone = arm.edit_bones.new('thigh.L')
bone.head[:] = 0.0933, -0.0421, 1.0434 bone.head[:] = 0.0933, -0.0421, 1.0434
bone.tail[:] = 0.0933, -0.0516, 0.5848 bone.tail[:] = 0.0933, -0.0516, 0.5848
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['spine.01'] bone.parent = arm.edit_bones['spine.01']
bone = arm.edit_bones.new('thigh.R') bone = arm.edit_bones.new('thigh.R')
bone.head[:] = -0.0933, -0.0421, 1.0434 bone.head[:] = -0.0933, -0.0421, 1.0434
bone.tail[:] = -0.0933, -0.0516, 0.5848 bone.tail[:] = -0.0933, -0.0516, 0.5848
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['spine.01'] bone.parent = arm.edit_bones['spine.01']
bone = arm.edit_bones.new('spine.03') bone = arm.edit_bones.new('spine.03')
bone.head[:] = -0.0000, -0.0213, 1.2884 bone.head[:] = -0.0000, -0.0213, 1.2884
bone.tail[:] = -0.0000, 0.0160, 1.3705 bone.tail[:] = -0.0000, 0.0160, 1.3705
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.02'] bone.parent = arm.edit_bones['spine.02']
bone = arm.edit_bones.new('shin.L') bone = arm.edit_bones.new('shin.L')
bone.head[:] = 0.0933, -0.0516, 0.5848 bone.head[:] = 0.0933, -0.0516, 0.5848
bone.tail[:] = 0.0915, 0.0100, 0.1374 bone.tail[:] = 0.0915, 0.0100, 0.1374
bone.roll = 0.0034 bone.roll = 0.0034
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['thigh.L'] bone.parent = arm.edit_bones['thigh.L']
bone = arm.edit_bones.new('shin.R') bone = arm.edit_bones.new('shin.R')
bone.head[:] = -0.0933, -0.0516, 0.5848 bone.head[:] = -0.0933, -0.0516, 0.5848
bone.tail[:] = -0.0915, 0.0100, 0.1374 bone.tail[:] = -0.0915, 0.0100, 0.1374
bone.roll = -0.0034 bone.roll = -0.0034
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['thigh.R'] bone.parent = arm.edit_bones['thigh.R']
bone = arm.edit_bones.new('spine.04') bone = arm.edit_bones.new('spine.04')
bone.head[:] = -0.0000, 0.0160, 1.3705 bone.head[:] = -0.0000, 0.0160, 1.3705
bone.tail[:] = -0.0000, 0.0590, 1.4497 bone.tail[:] = -0.0000, 0.0590, 1.4497
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.03'] bone.parent = arm.edit_bones['spine.03']
bone = arm.edit_bones.new('foot.L') bone = arm.edit_bones.new('foot.L')
bone.head[:] = 0.0915, 0.0100, 0.1374 bone.head[:] = 0.0915, 0.0100, 0.1374
bone.tail[:] = 0.1033, -0.0968, 0.0510 bone.tail[:] = 0.1033, -0.0968, 0.0510
bone.roll = 2.8964 bone.roll = 2.8964
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['shin.L'] bone.parent = arm.edit_bones['shin.L']
bone = arm.edit_bones.new('foot.R') bone = arm.edit_bones.new('foot.R')
bone.head[:] = -0.0915, 0.0100, 0.1374 bone.head[:] = -0.0915, 0.0100, 0.1374
bone.tail[:] = -0.1033, -0.0968, 0.0510 bone.tail[:] = -0.1033, -0.0968, 0.0510
bone.roll = -2.8793 bone.roll = -2.8793
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['shin.R'] bone.parent = arm.edit_bones['shin.R']
bone = arm.edit_bones.new('neck_base') bone = arm.edit_bones.new('neck_base')
bone.head[:] = -0.0000, 0.0590, 1.4497 bone.head[:] = -0.0000, 0.0590, 1.4497
bone.tail[:] = -0.0000, 0.0401, 1.5389 bone.tail[:] = -0.0000, 0.0401, 1.5389
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['spine.04'] bone.parent = arm.edit_bones['spine.04']
bone = arm.edit_bones.new('toe.L') bone = arm.edit_bones.new('toe.L')
bone.head[:] = 0.1033, -0.0968, 0.0510 bone.head[:] = 0.1033, -0.0968, 0.0510
bone.tail[:] = 0.1136, -0.1848, 0.0510 bone.tail[:] = 0.1136, -0.1848, 0.0510
bone.roll = 0.0001 bone.roll = 0.0001
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['foot.L'] bone.parent = arm.edit_bones['foot.L']
bone = arm.edit_bones.new('heel.L') bone = arm.edit_bones.new('heel.L')
bone.head[:] = 0.0809, 0.0969, -0.0000 bone.head[:] = 0.0809, 0.0969, -0.0000
bone.tail[:] = 0.1020, -0.0846, -0.0000 bone.tail[:] = 0.1020, -0.0846, -0.0000
bone.roll = -0.0001 bone.roll = -0.0001
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['foot.L'] bone.parent = arm.edit_bones['foot.L']
bone = arm.edit_bones.new('toe.R') bone = arm.edit_bones.new('toe.R')
bone.head[:] = -0.1033, -0.0968, 0.0510 bone.head[:] = -0.1033, -0.0968, 0.0510
bone.tail[:] = -0.1136, -0.1848, 0.0510 bone.tail[:] = -0.1136, -0.1848, 0.0510
bone.roll = -0.0002 bone.roll = -0.0002
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['foot.R'] bone.parent = arm.edit_bones['foot.R']
bone = arm.edit_bones.new('heel.R') bone = arm.edit_bones.new('heel.R')
bone.head[:] = -0.0809, 0.0969, -0.0000 bone.head[:] = -0.0809, 0.0969, -0.0000
bone.tail[:] = -0.1020, -0.0846, -0.0000 bone.tail[:] = -0.1020, -0.0846, -0.0000
bone.roll = -0.0000 bone.roll = -0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['foot.R'] bone.parent = arm.edit_bones['foot.R']
bone = arm.edit_bones.new('head') bone = arm.edit_bones.new('head')
bone.head[:] = -0.0000, 0.0401, 1.5389 bone.head[:] = -0.0000, 0.0401, 1.5389
bone.tail[:] = -0.0000, 0.0401, 1.5979 bone.tail[:] = -0.0000, 0.0401, 1.5979
bone.roll = 3.1416 bone.roll = 3.1416
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['neck_base'] bone.parent = arm.edit_bones['neck_base']
bone = arm.edit_bones.new('DLT-shoulder.L') bone = arm.edit_bones.new('DLT-shoulder.L')
bone.head[:] = 0.0141, -0.0346, 1.4991 bone.head[:] = 0.0141, -0.0346, 1.4991
bone.tail[:] = 0.1226, 0.0054, 1.4991 bone.tail[:] = 0.1226, 0.0054, 1.4991
bone.roll = 0.0005 bone.roll = 0.0005
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['neck_base'] bone.parent = arm.edit_bones['neck_base']
bone = arm.edit_bones.new('DLT-shoulder.R') bone = arm.edit_bones.new('DLT-shoulder.R')
bone.head[:] = -0.0141, -0.0346, 1.4991 bone.head[:] = -0.0141, -0.0346, 1.4991
bone.tail[:] = -0.1226, 0.0054, 1.4991 bone.tail[:] = -0.1226, 0.0054, 1.4991
bone.roll = -0.0005 bone.roll = -0.0005
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['neck_base'] bone.parent = arm.edit_bones['neck_base']
bone = arm.edit_bones.new('neck.01') bone = arm.edit_bones.new('neck.01')
bone.head[:] = -0.0000, 0.0401, 1.5389 bone.head[:] = -0.0000, 0.0401, 1.5389
bone.tail[:] = -0.0000, 0.0176, 1.5916 bone.tail[:] = -0.0000, 0.0176, 1.5916
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['head'] bone.parent = arm.edit_bones['head']
bone = arm.edit_bones.new('shoulder.L') bone = arm.edit_bones.new('shoulder.L')
bone.head[:] = 0.0141, -0.0346, 1.4991 bone.head[:] = 0.0141, -0.0346, 1.4991
bone.tail[:] = 0.1226, 0.0216, 1.5270 bone.tail[:] = 0.1226, 0.0216, 1.5270
bone.roll = -0.1225 bone.roll = -0.1225
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['DLT-shoulder.L'] bone.parent = arm.edit_bones['DLT-shoulder.L']
bone = arm.edit_bones.new('shoulder.R') bone = arm.edit_bones.new('shoulder.R')
bone.head[:] = -0.0141, -0.0346, 1.4991 bone.head[:] = -0.0141, -0.0346, 1.4991
bone.tail[:] = -0.1226, 0.0216, 1.5270 bone.tail[:] = -0.1226, 0.0216, 1.5270
bone.roll = 0.0849 bone.roll = 0.0849
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['DLT-shoulder.R'] bone.parent = arm.edit_bones['DLT-shoulder.R']
bone = arm.edit_bones.new('neck.02') bone = arm.edit_bones.new('neck.02')
bone.head[:] = -0.0000, 0.0176, 1.5916 bone.head[:] = -0.0000, 0.0176, 1.5916
bone.tail[:] = -0.0000, 0.0001, 1.6499 bone.tail[:] = -0.0000, 0.0001, 1.6499
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['neck.01'] bone.parent = arm.edit_bones['neck.01']
bone = arm.edit_bones.new('DLT-upper_arm.L') bone = arm.edit_bones.new('DLT-upper_arm.L')
bone.head[:] = 0.1482, 0.0483, 1.4943 bone.head[:] = 0.1482, 0.0483, 1.4943
bone.tail[:] = 0.2586, 0.1057, 1.5124 bone.tail[:] = 0.2586, 0.1057, 1.5124
bone.roll = 1.4969 bone.roll = 1.4969
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['shoulder.L'] bone.parent = arm.edit_bones['shoulder.L']
bone = arm.edit_bones.new('DLT-upper_arm.R') bone = arm.edit_bones.new('DLT-upper_arm.R')
bone.head[:] = -0.1482, 0.0483, 1.4943 bone.head[:] = -0.1482, 0.0483, 1.4943
bone.tail[:] = -0.2586, 0.1057, 1.5124 bone.tail[:] = -0.2586, 0.1057, 1.5124
bone.roll = -1.4482 bone.roll = -1.4482
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['shoulder.R'] bone.parent = arm.edit_bones['shoulder.R']
bone = arm.edit_bones.new('neck.03') bone = arm.edit_bones.new('neck.03')
bone.head[:] = -0.0000, 0.0001, 1.6499 bone.head[:] = -0.0000, 0.0001, 1.6499
bone.tail[:] = -0.0000, 0.0001, 1.8522 bone.tail[:] = -0.0000, 0.0001, 1.8522
bone.roll = 0.0000 bone.roll = 0.0000
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['neck.02'] bone.parent = arm.edit_bones['neck.02']
bone = arm.edit_bones.new('upper_arm.L') bone = arm.edit_bones.new('upper_arm.L')
bone.head[:] = 0.1482, 0.0483, 1.4943 bone.head[:] = 0.1482, 0.0483, 1.4943
bone.tail[:] = 0.3929, 0.0522, 1.4801 bone.tail[:] = 0.3929, 0.0522, 1.4801
bone.roll = 1.6281 bone.roll = 1.6281
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['DLT-upper_arm.L'] bone.parent = arm.edit_bones['DLT-upper_arm.L']
bone = arm.edit_bones.new('upper_arm.R') bone = arm.edit_bones.new('upper_arm.R')
bone.head[:] = -0.1482, 0.0483, 1.4943 bone.head[:] = -0.1482, 0.0483, 1.4943
bone.tail[:] = -0.3929, 0.0522, 1.4801 bone.tail[:] = -0.3929, 0.0522, 1.4801
bone.roll = -1.6281 bone.roll = -1.6281
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['DLT-upper_arm.R'] bone.parent = arm.edit_bones['DLT-upper_arm.R']
bone = arm.edit_bones.new('forearm.L') bone = arm.edit_bones.new('forearm.L')
bone.head[:] = 0.3929, 0.0522, 1.4801 bone.head[:] = 0.3929, 0.0522, 1.4801
bone.tail[:] = 0.6198, 0.0364, 1.4906 bone.tail[:] = 0.6198, 0.0364, 1.4906
bone.roll = 1.5240 bone.roll = 1.5240
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['upper_arm.L'] bone.parent = arm.edit_bones['upper_arm.L']
bone = arm.edit_bones.new('forearm.R') bone = arm.edit_bones.new('forearm.R')
bone.head[:] = -0.3929, 0.0522, 1.4801 bone.head[:] = -0.3929, 0.0522, 1.4801
bone.tail[:] = -0.6198, 0.0364, 1.4906 bone.tail[:] = -0.6198, 0.0364, 1.4906
bone.roll = -1.5219 bone.roll = -1.5219
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['upper_arm.R'] bone.parent = arm.edit_bones['upper_arm.R']
bone = arm.edit_bones.new('hand.L') bone = arm.edit_bones.new('hand.L')
bone.head[:] = 0.6198, 0.0364, 1.4906 bone.head[:] = 0.6198, 0.0364, 1.4906
bone.tail[:] = 0.6592, 0.0364, 1.4853 bone.tail[:] = 0.6592, 0.0364, 1.4853
bone.roll = -3.0065 bone.roll = -3.0065
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['forearm.L'] bone.parent = arm.edit_bones['forearm.L']
bone = arm.edit_bones.new('hand.R') bone = arm.edit_bones.new('hand.R')
bone.head[:] = -0.6198, 0.0364, 1.4906 bone.head[:] = -0.6198, 0.0364, 1.4906
bone.tail[:] = -0.6592, 0.0364, 1.4853 bone.tail[:] = -0.6592, 0.0364, 1.4853
bone.roll = 3.0065 bone.roll = 3.0065
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['forearm.R'] bone.parent = arm.edit_bones['forearm.R']
bone = arm.edit_bones.new('palm.04.L') bone = arm.edit_bones.new('palm.04.L')
bone.head[:] = 0.6514, 0.0658, 1.4906 bone.head[:] = 0.6514, 0.0658, 1.4906
bone.tail[:] = 0.7287, 0.0810, 1.4747 bone.tail[:] = 0.7287, 0.0810, 1.4747
bone.roll = -3.0715 bone.roll = -3.0715
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.L'] bone.parent = arm.edit_bones['hand.L']
bone = arm.edit_bones.new('palm.03.L') bone = arm.edit_bones.new('palm.03.L')
bone.head[:] = 0.6533, 0.0481, 1.4943 bone.head[:] = 0.6533, 0.0481, 1.4943
bone.tail[:] = 0.7386, 0.0553, 1.4781 bone.tail[:] = 0.7386, 0.0553, 1.4781
bone.roll = -3.0290 bone.roll = -3.0290
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.L'] bone.parent = arm.edit_bones['hand.L']
bone = arm.edit_bones.new('palm.02.L') bone = arm.edit_bones.new('palm.02.L')
bone.head[:] = 0.6539, 0.0305, 1.4967 bone.head[:] = 0.6539, 0.0305, 1.4967
bone.tail[:] = 0.7420, 0.0250, 1.4835 bone.tail[:] = 0.7420, 0.0250, 1.4835
bone.roll = -3.0669 bone.roll = -3.0669
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.L'] bone.parent = arm.edit_bones['hand.L']
bone = arm.edit_bones.new('palm.01.L') bone = arm.edit_bones.new('palm.01.L')
bone.head[:] = 0.6514, 0.0116, 1.4961 bone.head[:] = 0.6514, 0.0116, 1.4961
bone.tail[:] = 0.7361, -0.0074, 1.4823 bone.tail[:] = 0.7361, -0.0074, 1.4823
bone.roll = -2.9422 bone.roll = -2.9422
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.L'] bone.parent = arm.edit_bones['hand.L']
bone = arm.edit_bones.new('thumb.01.L') bone = arm.edit_bones.new('thumb.01.L')
bone.head[:] = 0.6380, -0.0005, 1.4848 bone.head[:] = 0.6380, -0.0005, 1.4848
bone.tail[:] = 0.6757, -0.0408, 1.4538 bone.tail[:] = 0.6757, -0.0408, 1.4538
bone.roll = -0.7041 bone.roll = -0.7041
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.L'] bone.parent = arm.edit_bones['hand.L']
bone = arm.edit_bones.new('palm.04.R') bone = arm.edit_bones.new('palm.04.R')
bone.head[:] = -0.6514, 0.0658, 1.4906 bone.head[:] = -0.6514, 0.0658, 1.4906
bone.tail[:] = -0.7287, 0.0810, 1.4747 bone.tail[:] = -0.7287, 0.0810, 1.4747
bone.roll = 3.0715 bone.roll = 3.0715
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.R'] bone.parent = arm.edit_bones['hand.R']
bone = arm.edit_bones.new('palm.03.R') bone = arm.edit_bones.new('palm.03.R')
bone.head[:] = -0.6533, 0.0481, 1.4943 bone.head[:] = -0.6533, 0.0481, 1.4943
bone.tail[:] = -0.7386, 0.0553, 1.4781 bone.tail[:] = -0.7386, 0.0553, 1.4781
bone.roll = 3.0290 bone.roll = 3.0290
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.R'] bone.parent = arm.edit_bones['hand.R']
bone = arm.edit_bones.new('palm.02.R') bone = arm.edit_bones.new('palm.02.R')
bone.head[:] = -0.6539, 0.0305, 1.4967 bone.head[:] = -0.6539, 0.0305, 1.4967
bone.tail[:] = -0.7420, 0.0250, 1.4835 bone.tail[:] = -0.7420, 0.0250, 1.4835
bone.roll = 3.0669 bone.roll = 3.0669
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.R'] bone.parent = arm.edit_bones['hand.R']
bone = arm.edit_bones.new('thumb.01.R') bone = arm.edit_bones.new('thumb.01.R')
bone.head[:] = -0.6380, -0.0005, 1.4848 bone.head[:] = -0.6380, -0.0005, 1.4848
bone.tail[:] = -0.6757, -0.0408, 1.4538 bone.tail[:] = -0.6757, -0.0408, 1.4538
bone.roll = 0.7041 bone.roll = 0.7041
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.R'] bone.parent = arm.edit_bones['hand.R']
bone = arm.edit_bones.new('palm.01.R') bone = arm.edit_bones.new('palm.01.R')
bone.head[:] = -0.6514, 0.0116, 1.4961 bone.head[:] = -0.6514, 0.0116, 1.4961
bone.tail[:] = -0.7361, -0.0074, 1.4823 bone.tail[:] = -0.7361, -0.0074, 1.4823
bone.roll = 2.9332 bone.roll = 2.9332
bone.connected = False bone.use_connect = False
bone.parent = arm.edit_bones['hand.R'] bone.parent = arm.edit_bones['hand.R']
bone = arm.edit_bones.new('finger_pinky.01.L') bone = arm.edit_bones.new('finger_pinky.01.L')
bone.head[:] = 0.7287, 0.0810, 1.4747 bone.head[:] = 0.7287, 0.0810, 1.4747
bone.tail[:] = 0.7698, 0.0947, 1.4635 bone.tail[:] = 0.7698, 0.0947, 1.4635
bone.roll = -3.0949 bone.roll = -3.0949
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['palm.04.L'] bone.parent = arm.edit_bones['palm.04.L']
bone = arm.edit_bones.new('finger_ring.01.L') bone = arm.edit_bones.new('finger_ring.01.L')
bone.head[:] = 0.7386, 0.0553, 1.4781 bone.head[:] = 0.7386, 0.0553, 1.4781
bone.tail[:] = 0.7890, 0.0615, 1.4667 bone.tail[:] = 0.7890, 0.0615, 1.4667
bone.roll = -3.0081 bone.roll = -3.0081
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['palm.03.L'] bone.parent = arm.edit_bones['palm.03.L']
bone = arm.edit_bones.new('finger_middle.01.L') bone = arm.edit_bones.new('finger_middle.01.L')
bone.head[:] = 0.7420, 0.0250, 1.4835 bone.head[:] = 0.7420, 0.0250, 1.4835
bone.tail[:] = 0.7975, 0.0221, 1.4712 bone.tail[:] = 0.7975, 0.0221, 1.4712
bone.roll = -2.9982 bone.roll = -2.9982
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['palm.02.L'] bone.parent = arm.edit_bones['palm.02.L']
bone = arm.edit_bones.new('finger_index.01.L') bone = arm.edit_bones.new('finger_index.01.L')
bone.head[:] = 0.7361, -0.0074, 1.4823 bone.head[:] = 0.7361, -0.0074, 1.4823
bone.tail[:] = 0.7843, -0.0204, 1.4718 bone.tail[:] = 0.7843, -0.0204, 1.4718
bone.roll = -3.0021 bone.roll = -3.0021
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['palm.01.L'] bone.parent = arm.edit_bones['palm.01.L']
bone = arm.edit_bones.new('thumb.02.L') bone = arm.edit_bones.new('thumb.02.L')
bone.head[:] = 0.6757, -0.0408, 1.4538 bone.head[:] = 0.6757, -0.0408, 1.4538
bone.tail[:] = 0.6958, -0.0568, 1.4376 bone.tail[:] = 0.6958, -0.0568, 1.4376
bone.roll = -0.6963 bone.roll = -0.6963
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['thumb.01.L'] bone.parent = arm.edit_bones['thumb.01.L']
bone = arm.edit_bones.new('finger_pinky.01.R') bone = arm.edit_bones.new('finger_pinky.01.R')
bone.head[:] = -0.7287, 0.0810, 1.4747 bone.head[:] = -0.7287, 0.0810, 1.4747
bone.tail[:] = -0.7698, 0.0947, 1.4635 bone.tail[:] = -0.7698, 0.0947, 1.4635
bone.roll = 3.0949 bone.roll = 3.0949
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['palm.04.R'] bone.parent = arm.edit_bones['palm.04.R']
bone = arm.edit_bones.new('finger_ring.01.R') bone = arm.edit_bones.new('finger_ring.01.R')
bone.head[:] = -0.7386, 0.0553, 1.4781 bone.head[:] = -0.7386, 0.0553, 1.4781
bone.tail[:] = -0.7890, 0.0615, 1.4667 bone.tail[:] = -0.7890, 0.0615, 1.4667
bone.roll = 2.9892 bone.roll = 2.9892
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['palm.03.R'] bone.parent = arm.edit_bones['palm.03.R']
bone = arm.edit_bones.new('finger_middle.01.R') bone = arm.edit_bones.new('finger_middle.01.R')
bone.head[:] = -0.7420, 0.0250, 1.4835 bone.head[:] = -0.7420, 0.0250, 1.4835
bone.tail[:] = -0.7975, 0.0221, 1.4712 bone.tail[:] = -0.7975, 0.0221, 1.4712
bone.roll = 2.9816 bone.roll = 2.9816
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['palm.02.R'] bone.parent = arm.edit_bones['palm.02.R']
bone = arm.edit_bones.new('thumb.02.R') bone = arm.edit_bones.new('thumb.02.R')
bone.head[:] = -0.6757, -0.0408, 1.4538 bone.head[:] = -0.6757, -0.0408, 1.4538
bone.tail[:] = -0.6958, -0.0568, 1.4376 bone.tail[:] = -0.6958, -0.0568, 1.4376
bone.roll = 0.6963 bone.roll = 0.6963
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['thumb.01.R'] bone.parent = arm.edit_bones['thumb.01.R']
bone = arm.edit_bones.new('finger_index.01.R') bone = arm.edit_bones.new('finger_index.01.R')
bone.head[:] = -0.7361, -0.0074, 1.4823 bone.head[:] = -0.7361, -0.0074, 1.4823
bone.tail[:] = -0.7843, -0.0204, 1.4718 bone.tail[:] = -0.7843, -0.0204, 1.4718
bone.roll = 2.9498 bone.roll = 2.9498
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['palm.01.R'] bone.parent = arm.edit_bones['palm.01.R']
bone = arm.edit_bones.new('finger_pinky.02.L') bone = arm.edit_bones.new('finger_pinky.02.L')
bone.head[:] = 0.7698, 0.0947, 1.4635 bone.head[:] = 0.7698, 0.0947, 1.4635
bone.tail[:] = 0.7910, 0.1018, 1.4577 bone.tail[:] = 0.7910, 0.1018, 1.4577
bone.roll = -3.0949 bone.roll = -3.0949
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_pinky.01.L'] bone.parent = arm.edit_bones['finger_pinky.01.L']
bone = arm.edit_bones.new('finger_ring.02.L') bone = arm.edit_bones.new('finger_ring.02.L')
bone.head[:] = 0.7890, 0.0615, 1.4667 bone.head[:] = 0.7890, 0.0615, 1.4667
bone.tail[:] = 0.8177, 0.0650, 1.4600 bone.tail[:] = 0.8177, 0.0650, 1.4600
bone.roll = -3.0006 bone.roll = -3.0006
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_ring.01.L'] bone.parent = arm.edit_bones['finger_ring.01.L']
bone = arm.edit_bones.new('finger_middle.02.L') bone = arm.edit_bones.new('finger_middle.02.L')
bone.head[:] = 0.7975, 0.0221, 1.4712 bone.head[:] = 0.7975, 0.0221, 1.4712
bone.tail[:] = 0.8289, 0.0206, 1.4643 bone.tail[:] = 0.8289, 0.0206, 1.4643
bone.roll = -2.9995 bone.roll = -2.9995
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_middle.01.L'] bone.parent = arm.edit_bones['finger_middle.01.L']
bone = arm.edit_bones.new('finger_index.02.L') bone = arm.edit_bones.new('finger_index.02.L')
bone.head[:] = 0.7843, -0.0204, 1.4718 bone.head[:] = 0.7843, -0.0204, 1.4718
bone.tail[:] = 0.8117, -0.0275, 1.4660 bone.tail[:] = 0.8117, -0.0275, 1.4660
bone.roll = -3.0064 bone.roll = -3.0064
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_index.01.L'] bone.parent = arm.edit_bones['finger_index.01.L']
bone = arm.edit_bones.new('thumb.03.L') bone = arm.edit_bones.new('thumb.03.L')
bone.head[:] = 0.6958, -0.0568, 1.4376 bone.head[:] = 0.6958, -0.0568, 1.4376
bone.tail[:] = 0.7196, -0.0671, 1.4210 bone.tail[:] = 0.7196, -0.0671, 1.4210
bone.roll = -0.8072 bone.roll = -0.8072
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['thumb.02.L'] bone.parent = arm.edit_bones['thumb.02.L']
bone = arm.edit_bones.new('finger_pinky.02.R') bone = arm.edit_bones.new('finger_pinky.02.R')
bone.head[:] = -0.7698, 0.0947, 1.4635 bone.head[:] = -0.7698, 0.0947, 1.4635
bone.tail[:] = -0.7910, 0.1018, 1.4577 bone.tail[:] = -0.7910, 0.1018, 1.4577
bone.roll = 3.0949 bone.roll = 3.0949
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_pinky.01.R'] bone.parent = arm.edit_bones['finger_pinky.01.R']
bone = arm.edit_bones.new('finger_ring.02.R') bone = arm.edit_bones.new('finger_ring.02.R')
bone.head[:] = -0.7890, 0.0615, 1.4667 bone.head[:] = -0.7890, 0.0615, 1.4667
bone.tail[:] = -0.8177, 0.0650, 1.4600 bone.tail[:] = -0.8177, 0.0650, 1.4600
bone.roll = 3.0341 bone.roll = 3.0341
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_ring.01.R'] bone.parent = arm.edit_bones['finger_ring.01.R']
bone = arm.edit_bones.new('finger_middle.02.R') bone = arm.edit_bones.new('finger_middle.02.R')
bone.head[:] = -0.7975, 0.0221, 1.4712 bone.head[:] = -0.7975, 0.0221, 1.4712
bone.tail[:] = -0.8289, 0.0206, 1.4643 bone.tail[:] = -0.8289, 0.0206, 1.4643
bone.roll = 3.0291 bone.roll = 3.0291
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_middle.01.R'] bone.parent = arm.edit_bones['finger_middle.01.R']
bone = arm.edit_bones.new('thumb.03.R') bone = arm.edit_bones.new('thumb.03.R')
bone.head[:] = -0.6958, -0.0568, 1.4376 bone.head[:] = -0.6958, -0.0568, 1.4376
bone.tail[:] = -0.7196, -0.0671, 1.4210 bone.tail[:] = -0.7196, -0.0671, 1.4210
bone.roll = 0.8072 bone.roll = 0.8072
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['thumb.02.R'] bone.parent = arm.edit_bones['thumb.02.R']
bone = arm.edit_bones.new('finger_index.02.R') bone = arm.edit_bones.new('finger_index.02.R')
bone.head[:] = -0.7843, -0.0204, 1.4718 bone.head[:] = -0.7843, -0.0204, 1.4718
bone.tail[:] = -0.8117, -0.0275, 1.4660 bone.tail[:] = -0.8117, -0.0275, 1.4660
bone.roll = 3.0705 bone.roll = 3.0705
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_index.01.R'] bone.parent = arm.edit_bones['finger_index.01.R']
bone = arm.edit_bones.new('finger_pinky.03.L') bone = arm.edit_bones.new('finger_pinky.03.L')
bone.head[:] = 0.7910, 0.1018, 1.4577 bone.head[:] = 0.7910, 0.1018, 1.4577
bone.tail[:] = 0.8109, 0.1085, 1.4523 bone.tail[:] = 0.8109, 0.1085, 1.4523
bone.roll = -3.0949 bone.roll = -3.0949
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_pinky.02.L'] bone.parent = arm.edit_bones['finger_pinky.02.L']
bone = arm.edit_bones.new('finger_ring.03.L') bone = arm.edit_bones.new('finger_ring.03.L')
bone.head[:] = 0.8177, 0.0650, 1.4600 bone.head[:] = 0.8177, 0.0650, 1.4600
bone.tail[:] = 0.8396, 0.0677, 1.4544 bone.tail[:] = 0.8396, 0.0677, 1.4544
bone.roll = -2.9819 bone.roll = -2.9819
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_ring.02.L'] bone.parent = arm.edit_bones['finger_ring.02.L']
bone = arm.edit_bones.new('finger_middle.03.L') bone = arm.edit_bones.new('finger_middle.03.L')
bone.head[:] = 0.8289, 0.0206, 1.4643 bone.head[:] = 0.8289, 0.0206, 1.4643
bone.tail[:] = 0.8534, 0.0193, 1.4589 bone.tail[:] = 0.8534, 0.0193, 1.4589
bone.roll = -3.0004 bone.roll = -3.0004
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_middle.02.L'] bone.parent = arm.edit_bones['finger_middle.02.L']
bone = arm.edit_bones.new('finger_index.03.L') bone = arm.edit_bones.new('finger_index.03.L')
bone.head[:] = 0.8117, -0.0275, 1.4660 bone.head[:] = 0.8117, -0.0275, 1.4660
bone.tail[:] = 0.8331, -0.0333, 1.4615 bone.tail[:] = 0.8331, -0.0333, 1.4615
bone.roll = -3.0103 bone.roll = -3.0103
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_index.02.L'] bone.parent = arm.edit_bones['finger_index.02.L']
bone = arm.edit_bones.new('finger_pinky.03.R') bone = arm.edit_bones.new('finger_pinky.03.R')
bone.head[:] = -0.7910, 0.1018, 1.4577 bone.head[:] = -0.7910, 0.1018, 1.4577
bone.tail[:] = -0.8109, 0.1085, 1.4523 bone.tail[:] = -0.8109, 0.1085, 1.4523
bone.roll = 3.0949 bone.roll = 3.0949
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_pinky.02.R'] bone.parent = arm.edit_bones['finger_pinky.02.R']
bone = arm.edit_bones.new('finger_ring.03.R') bone = arm.edit_bones.new('finger_ring.03.R')
bone.head[:] = -0.8177, 0.0650, 1.4600 bone.head[:] = -0.8177, 0.0650, 1.4600
bone.tail[:] = -0.8396, 0.0677, 1.4544 bone.tail[:] = -0.8396, 0.0677, 1.4544
bone.roll = 2.9819 bone.roll = 2.9819
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_ring.02.R'] bone.parent = arm.edit_bones['finger_ring.02.R']
bone = arm.edit_bones.new('finger_middle.03.R') bone = arm.edit_bones.new('finger_middle.03.R')
bone.head[:] = -0.8289, 0.0206, 1.4643 bone.head[:] = -0.8289, 0.0206, 1.4643
bone.tail[:] = -0.8534, 0.0193, 1.4589 bone.tail[:] = -0.8534, 0.0193, 1.4589
bone.roll = 3.0004 bone.roll = 3.0004
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_middle.02.R'] bone.parent = arm.edit_bones['finger_middle.02.R']
bone = arm.edit_bones.new('finger_index.03.R') bone = arm.edit_bones.new('finger_index.03.R')
bone.head[:] = -0.8117, -0.0275, 1.4660 bone.head[:] = -0.8117, -0.0275, 1.4660
bone.tail[:] = -0.8331, -0.0333, 1.4615 bone.tail[:] = -0.8331, -0.0333, 1.4615
bone.roll = 2.9917 bone.roll = 2.9917
bone.connected = True bone.use_connect = True
bone.parent = arm.edit_bones['finger_index.02.R'] bone.parent = arm.edit_bones['finger_index.02.R']
bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.mode_set(mode='OBJECT')
@@ -487,11 +487,11 @@ def metarig_template():
pbone = obj.pose.bones['shoulder.L'] pbone = obj.pose.bones['shoulder.L']
pbone['type'] = 'copy' pbone['type'] = 'copy'
pbone = obj.pose.bones['shoulder.L'] pbone = obj.pose.bones['shoulder.L']
pbone['copy.layer'] = 1 pbone['copy.layers'] = 1
pbone = obj.pose.bones['shoulder.R'] pbone = obj.pose.bones['shoulder.R']
pbone['type'] = 'copy' pbone['type'] = 'copy'
pbone = obj.pose.bones['shoulder.R'] pbone = obj.pose.bones['shoulder.R']
pbone['copy.layer'] = 1 pbone['copy.layers'] = 1
pbone = obj.pose.bones['DLT-upper_arm.L'] pbone = obj.pose.bones['DLT-upper_arm.L']
pbone['type'] = 'delta' pbone['type'] = 'delta'
pbone = obj.pose.bones['DLT-upper_arm.R'] pbone = obj.pose.bones['DLT-upper_arm.R']
@@ -515,7 +515,7 @@ def metarig_template():
pbone = obj.pose.bones['palm.01.L'] pbone = obj.pose.bones['palm.01.L']
pbone['type'] = 'palm_curl' pbone['type'] = 'palm_curl'
pbone = obj.pose.bones['palm.01.L'] pbone = obj.pose.bones['palm.01.L']
pbone['palm_curl.layer'] = 5 pbone['palm_curl.layers'] = 5
pbone = obj.pose.bones['thumb.01.L'] pbone = obj.pose.bones['thumb.01.L']
pbone['type'] = 'finger_curl' pbone['type'] = 'finger_curl'
pbone = obj.pose.bones['thumb.01.L'] pbone = obj.pose.bones['thumb.01.L']
@@ -531,7 +531,7 @@ def metarig_template():
pbone = obj.pose.bones['palm.01.R'] pbone = obj.pose.bones['palm.01.R']
pbone['type'] = 'palm_curl' pbone['type'] = 'palm_curl'
pbone = obj.pose.bones['palm.01.R'] pbone = obj.pose.bones['palm.01.R']
pbone['palm_curl.layer'] = 5 pbone['palm_curl.layers'] = 5
pbone = obj.pose.bones['finger_pinky.01.L'] pbone = obj.pose.bones['finger_pinky.01.L']
pbone['type'] = 'finger_curl' pbone['type'] = 'finger_curl'
pbone = obj.pose.bones['finger_pinky.01.L'] pbone = obj.pose.bones['finger_pinky.01.L']

View File

@@ -122,8 +122,8 @@ class AddTorus(bpy.types.Operator):
mesh = bpy.data.meshes.new("Torus") mesh = bpy.data.meshes.new("Torus")
mesh.add_geometry(int(len(verts_loc) / 3), 0, int(len(faces) / 4)) mesh.add_geometry(int(len(verts_loc) / 3), 0, int(len(faces) / 4))
mesh.verts.foreach_set("co", verts_loc) mesh.vertices.foreach_set("co", verts_loc)
mesh.faces.foreach_set("verts_raw", faces) mesh.faces.foreach_set("vertices_raw", faces)
mesh.update() mesh.update()
import add_object_utils import add_object_utils

View File

@@ -7,7 +7,7 @@ def main(context):
keys = [] keys = []
for k in fcv.keyframe_points: for k in fcv.keyframe_points:
keys.append([k.handle1.copy(), k.co.copy(), k.handle2.copy()]) keys.append([k.handle_left.copy(), k.co.copy(), k.handle_right.copy()])
print(keys) print(keys)
for i in range(len(keys)): for i in range(len(keys)):
@@ -34,9 +34,9 @@ def main(context):
for i in range(len(keys)): for i in range(len(keys)):
for x in range(2): for x in range(2):
fcv.keyframe_points[i].handle1[x] = keys[i][0][x] fcv.keyframe_points[i].handle_left[x] = keys[i][0][x]
fcv.keyframe_points[i].co[x] = keys[i][1][x] fcv.keyframe_points[i].co[x] = keys[i][1][x]
fcv.keyframe_points[i].handle2[x] = keys[i][2][x] fcv.keyframe_points[i].handle_right[x] = keys[i][2][x]
flist = bpy.context.active_object.animation_data.action.fcurves flist = bpy.context.active_object.animation_data.action.fcurves
for f in flist: for f in flist:

View File

@@ -92,7 +92,7 @@ class SaveDirty(bpy.types.Operator):
def execute(self, context): def execute(self, context):
unique_paths = set() unique_paths = set()
for image in bpy.data.images: for image in bpy.data.images:
if image.dirty: if image.is_dirty:
filepath = bpy.path.abspath(image.filepath) filepath = bpy.path.abspath(image.filepath)
if "\\" not in filepath and "/" not in filepath: if "\\" not in filepath and "/" not in filepath:
self.report({'WARNING'}, "Invalid path: " + filepath) self.report({'WARNING'}, "Invalid path: " + filepath)

View File

@@ -91,7 +91,7 @@ class MeshMirrorUV(bpy.types.Operator):
mirror_gt = {} mirror_gt = {}
mirror_lt = {} mirror_lt = {}
vcos = [v.co.to_tuple(5) for v in mesh.verts] vcos = [v.co.to_tuple(5) for v in mesh.vertices]
for i, co in enumerate(vcos): for i, co in enumerate(vcos):
if co[0] > 0.0: if co[0] > 0.0:
@@ -102,7 +102,7 @@ class MeshMirrorUV(bpy.types.Operator):
mirror_gt[co] = i mirror_gt[co] = i
mirror_lt[co] = i mirror_lt[co] = i
#for i, v in enumerate(mesh.verts): #for i, v in enumerate(mesh.vertices):
vmap = {} vmap = {}
for mirror_a, mirror_b in (mirror_gt, mirror_lt), (mirror_lt, mirror_gt): for mirror_a, mirror_b in (mirror_gt, mirror_lt), (mirror_lt, mirror_gt):
for co, i in mirror_a.items(): for co, i in mirror_a.items():
@@ -130,14 +130,14 @@ class MeshMirrorUV(bpy.types.Operator):
# find mirror faces # find mirror faces
mirror_fm = {} mirror_fm = {}
for i, f in enumerate(faces): for i, f in enumerate(faces):
verts = f.verts[:] verts = f.vertices[:]
verts.sort() verts.sort()
verts = tuple(verts) verts = tuple(verts)
mirror_fm[verts] = i mirror_fm[verts] = i
fmap = {} fmap = {}
for i, f in enumerate(faces): for i, f in enumerate(faces):
verts = [vmap.get(j) for j in f.verts] verts = [vmap.get(j) for j in f.vertices]
if None not in verts: if None not in verts:
verts.sort() verts.sort()
j = mirror_fm.get(tuple(verts)) j = mirror_fm.get(tuple(verts))
@@ -159,8 +159,8 @@ class MeshMirrorUV(bpy.types.Operator):
uv2 = fuvs_cpy[j] uv2 = fuvs_cpy[j]
# get the correct rotation # get the correct rotation
v1 = faces[j].verts[:] v1 = faces[j].vertices[:]
v2 = [vmap[k] for k in faces[i].verts[:]] v2 = [vmap[k] for k in faces[i].vertices[:]]
for k in range(len(uv1)): for k in range(len(uv1)):

View File

@@ -150,7 +150,7 @@ class BakeAction(bpy.types.Operator):
def execute(self, context): def execute(self, context):
props = self.properties props = self.properties
action = bake(props.frame_start, props.frame_end, props.step, props.only_selected) action = bake(props.frame_start, props.frame_end, props.step, props.show_only_selected)
# basic cleanup, could move elsewhere # basic cleanup, could move elsewhere
for fcu in action.fcurves: for fcu in action.fcurves:

View File

@@ -256,7 +256,7 @@ class ShapeTransfer(bpy.types.Operator):
key = ob.add_shape_key(from_mix=False) # we need a rest key = ob.add_shape_key(from_mix=False) # we need a rest
key.name = name key.name = name
ob.active_shape_key_index = len(me.shape_keys.keys) - 1 ob.active_shape_key_index = len(me.shape_keys.keys) - 1
ob.shape_key_lock = True ob.show_shape_key = True
from geometry import BarycentricTransform from geometry import BarycentricTransform
from mathutils import Vector from mathutils import Vector
@@ -269,28 +269,28 @@ class ShapeTransfer(bpy.types.Operator):
orig_shape_coords = me_cos(ob_act.active_shape_key.data) orig_shape_coords = me_cos(ob_act.active_shape_key.data)
orig_normals = me_nos(me.verts) orig_normals = me_nos(me.vertices)
# orig_coords = me_cos(me.verts) # the actual mverts location isnt as relyable as the base shape :S # orig_coords = me_cos(me.vertices) # the actual mverts location isnt as relyable as the base shape :S
orig_coords = me_cos(me.shape_keys.keys[0].data) orig_coords = me_cos(me.shape_keys.keys[0].data)
for ob_other in objects: for ob_other in objects:
me_other = ob_other.data me_other = ob_other.data
if len(me_other.verts) != len(me.verts): if len(me_other.vertices) != len(me.vertices):
self.report({'WARNING'}, "Skipping '%s', vertex count differs" % ob_other.name) self.report({'WARNING'}, "Skipping '%s', vertex count differs" % ob_other.name)
continue continue
target_normals = me_nos(me_other.verts) target_normals = me_nos(me_other.vertices)
if me_other.shape_keys: if me_other.shape_keys:
target_coords = me_cos(me_other.shape_keys.keys[0].data) target_coords = me_cos(me_other.shape_keys.keys[0].data)
else: else:
target_coords = me_cos(me_other.verts) target_coords = me_cos(me_other.vertices)
ob_add_shape(ob_other, orig_key_name) ob_add_shape(ob_other, orig_key_name)
# editing the final coords, only list that stores wrapped coords # editing the final coords, only list that stores wrapped coords
target_shape_coords = [v.co for v in ob_other.active_shape_key.data] target_shape_coords = [v.co for v in ob_other.active_shape_key.data]
median_coords = [[] for i in range(len(me.verts))] median_coords = [[] for i in range(len(me.vertices))]
# Method 1, edge # Method 1, edge
if mode == 'OFFSET': if mode == 'OFFSET':
@@ -299,7 +299,7 @@ class ShapeTransfer(bpy.types.Operator):
elif mode == 'RELATIVE_FACE': elif mode == 'RELATIVE_FACE':
for face in me.faces: for face in me.faces:
i1, i2, i3, i4 = face.verts_raw i1, i2, i3, i4 = face.vertices_raw
if i4 != 0: if i4 != 0:
pt = BarycentricTransform(orig_shape_coords[i1], pt = BarycentricTransform(orig_shape_coords[i1],
orig_coords[i4], orig_coords[i1], orig_coords[i2], orig_coords[i4], orig_coords[i1], orig_coords[i2],
@@ -339,7 +339,7 @@ class ShapeTransfer(bpy.types.Operator):
elif mode == 'RELATIVE_EDGE': elif mode == 'RELATIVE_EDGE':
for ed in me.edges: for ed in me.edges:
i1, i2 = ed.verts i1, i2 = ed.vertices
v1, v2 = orig_coords[i1], orig_coords[i2] v1, v2 = orig_coords[i1], orig_coords[i2]
edge_length = (v1 - v2).length edge_length = (v1 - v2).length
n1loc = v1 + orig_normals[i1] * edge_length n1loc = v1 + orig_normals[i1] * edge_length
@@ -505,8 +505,8 @@ class MakeDupliFace(bpy.types.Operator):
mesh = bpy.data.meshes.new(data.name + "_dupli") mesh = bpy.data.meshes.new(data.name + "_dupli")
mesh.add_geometry(int(len(face_verts) / 3), 0, int(len(face_verts) / (4 * 3))) mesh.add_geometry(int(len(face_verts) / 3), 0, int(len(face_verts) / (4 * 3)))
mesh.verts.foreach_set("co", face_verts) mesh.vertices.foreach_set("co", face_verts)
mesh.faces.foreach_set("verts_raw", faces) mesh.faces.foreach_set("vertices_raw", faces)
mesh.update() # generates edge data mesh.update() # generates edge data
# pick an object to use # pick an object to use

View File

@@ -98,16 +98,16 @@ class AddPresetRender(AddPresetBase, bpy.types.Operator):
name = AddPresetBase.name name = AddPresetBase.name
preset_values = [ preset_values = [
"bpy.context.scene.render.resolution_x", "bpy.context.scene.render.field_order",
"bpy.context.scene.render.resolution_y",
"bpy.context.scene.render.pixel_aspect_x",
"bpy.context.scene.render.pixel_aspect_y",
"bpy.context.scene.render.fps", "bpy.context.scene.render.fps",
"bpy.context.scene.render.fps_base", "bpy.context.scene.render.fps_base",
"bpy.context.scene.render.pixel_aspect_x",
"bpy.context.scene.render.pixel_aspect_y",
"bpy.context.scene.render.resolution_percentage", "bpy.context.scene.render.resolution_percentage",
"bpy.context.scene.render.fields", "bpy.context.scene.render.resolution_x",
"bpy.context.scene.render.field_order", "bpy.context.scene.render.resolution_y",
"bpy.context.scene.render.fields_still", "bpy.context.scene.render.use_fields",
"bpy.context.scene.render.use_fields_still",
] ]
preset_subdir = "render" preset_subdir = "render"
@@ -145,12 +145,12 @@ class AddPresetCloth(AddPresetBase, bpy.types.Operator):
name = AddPresetBase.name name = AddPresetBase.name
preset_values = [ preset_values = [
"bpy.context.cloth.settings.quality",
"bpy.context.cloth.settings.mass",
"bpy.context.cloth.settings.structural_stiffness",
"bpy.context.cloth.settings.bending_stiffness",
"bpy.context.cloth.settings.spring_damping",
"bpy.context.cloth.settings.air_damping", "bpy.context.cloth.settings.air_damping",
"bpy.context.cloth.settings.bending_stiffness",
"bpy.context.cloth.settings.mass",
"bpy.context.cloth.settings.quality",
"bpy.context.cloth.settings.spring_damping",
"bpy.context.cloth.settings.structural_stiffness",
] ]
preset_subdir = "cloth" preset_subdir = "cloth"
@@ -163,19 +163,19 @@ class AddPresetSunSky(AddPresetBase, bpy.types.Operator):
name = AddPresetBase.name name = AddPresetBase.name
preset_values = [ preset_values = [
"bpy.context.object.data.sky.atmosphere_extinction",
"bpy.context.object.data.sky.atmosphere_inscattering",
"bpy.context.object.data.sky.atmosphere_turbidity", "bpy.context.object.data.sky.atmosphere_turbidity",
"bpy.context.object.data.sky.sky_blend_type", "bpy.context.object.data.sky.backscattered_light",
"bpy.context.object.data.sky.sky_blend",
"bpy.context.object.data.sky.horizon_brightness", "bpy.context.object.data.sky.horizon_brightness",
"bpy.context.object.data.sky.spread", "bpy.context.object.data.sky.spread",
"bpy.context.object.data.sky.sky_color_space",
"bpy.context.object.data.sky.sky_exposure",
"bpy.context.object.data.sky.sun_brightness", "bpy.context.object.data.sky.sun_brightness",
"bpy.context.object.data.sky.sun_size",
"bpy.context.object.data.sky.backscattered_light",
"bpy.context.object.data.sky.sun_intensity", "bpy.context.object.data.sky.sun_intensity",
"bpy.context.object.data.sky.atmosphere_inscattering", "bpy.context.object.data.sky.sun_size",
"bpy.context.object.data.sky.atmosphere_extinction", "bpy.context.object.data.sky.use_sky_blend",
"bpy.context.object.data.sky.use_sky_blend_type",
"bpy.context.object.data.sky.use_sky_color_space",
"bpy.context.object.data.sky.use_sky_exposure",
] ]
preset_subdir = "sunsky" preset_subdir = "sunsky"
@@ -189,16 +189,16 @@ class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
save_keyconfig = True save_keyconfig = True
preset_values = [ preset_values = [
"bpy.context.user_preferences.edit.drag_immediately", "bpy.context.user_preferences.edit.use_drag_immediately",
"bpy.context.user_preferences.edit.insertkey_xyz_to_rgb", "bpy.context.user_preferences.edit.use_insertkey_xyz_to_rgb",
"bpy.context.user_preferences.inputs.invert_mouse_wheel_zoom",
"bpy.context.user_preferences.inputs.select_mouse", "bpy.context.user_preferences.inputs.select_mouse",
"bpy.context.user_preferences.inputs.zoom_style", "bpy.context.user_preferences.inputs.use_emulate_numpad",
"bpy.context.user_preferences.inputs.zoom_axis", "bpy.context.user_preferences.inputs.use_mouse_continuous",
"bpy.context.user_preferences.inputs.view_rotation", "bpy.context.user_preferences.inputs.use_mouse_emulate_3_button",
"bpy.context.user_preferences.inputs.invert_zoom_direction", "bpy.context.user_preferences.inputs.view_rotate_method",
"bpy.context.user_preferences.inputs.emulate_numpad", "bpy.context.user_preferences.inputs.view_zoom_axis",
"bpy.context.user_preferences.inputs.emulate_3_button_mouse", "bpy.context.user_preferences.inputs.view_zoom_method",
"bpy.context.user_preferences.inputs.continuous_mouse",
] ]
preset_subdir = "interaction" preset_subdir = "interaction"

View File

@@ -79,7 +79,7 @@ class PlayRenderedAnim(bpy.types.Operator):
preset = prefs.filepaths.animation_player_preset preset = prefs.filepaths.animation_player_preset
player_path = prefs.filepaths.animation_player player_path = prefs.filepaths.animation_player
file_path = bpy.path.abspath(rd.output_path) file_path = bpy.path.abspath(rd.filepath)
is_movie = rd.is_movie_format is_movie = rd.is_movie_format
# try and guess a command line if it doesn't exist # try and guess a command line if it doesn't exist

View File

@@ -76,7 +76,7 @@ class ExportUVLayout(bpy.types.Operator):
local_image = Ellipsis local_image = Ellipsis
if context.tool_settings.uv_local_view: if context.tool_settings.show_uv_local_view:
space_data = self._space_image(context) space_data = self._space_image(context)
if space_data: if space_data:
local_image = space_data.image local_image = space_data.image

View File

@@ -26,7 +26,7 @@ import bpy
def extend(obj, operator, EXTEND_MODE): def extend(obj, operator, EXTEND_MODE):
me = obj.data me = obj.data
me_verts = me.verts me_verts = me.vertices
# script will fail without UVs # script will fail without UVs
if not me.active_uv_texture: if not me.active_uv_texture:
me.add_uv_texture() me.add_uv_texture()
@@ -54,8 +54,8 @@ def extend(obj, operator, EXTEND_MODE):
# assume a quad # assume a quad
return [(vi[0], vi[1]), (vi[1], vi[2]), (vi[2], vi[3]), (vi[3], vi[0])] return [(vi[0], vi[1]), (vi[1], vi[2]), (vi[2], vi[3]), (vi[3], vi[0])]
vidx_source = face_source.verts vidx_source = face_source.vertices
vidx_target = face_target.verts vidx_target = face_target.vertices
faceUVsource = me.active_uv_texture.data[face_source.index] faceUVsource = me.active_uv_texture.data[face_source.index]
uvs_source = [faceUVsource.uv1, faceUVsource.uv2, faceUVsource.uv3, faceUVsource.uv4] uvs_source = [faceUVsource.uv1, faceUVsource.uv2, faceUVsource.uv3, faceUVsource.uv4]
@@ -146,7 +146,7 @@ def extend(obj, operator, EXTEND_MODE):
operator.report({'ERROR'}, "No active face.") operator.report({'ERROR'}, "No active face.")
return return
face_sel = [f for f in me.faces if len(f.verts) == 4 and f.select] face_sel = [f for f in me.faces if len(f.vertices) == 4 and f.select]
face_act_local_index = -1 face_act_local_index = -1
for i, f in enumerate(face_sel): for i, f in enumerate(face_sel):
@@ -177,11 +177,9 @@ def extend(obj, operator, EXTEND_MODE):
except: except:
edge_faces[edkey] = [i] edge_faces[edkey] = [i]
#SEAM = me.edges.seam
if EXTEND_MODE == 'LENGTH': if EXTEND_MODE == 'LENGTH':
edge_loops = me.edge_loops_from_faces(face_sel, [ed.key for ed in me.edges if ed.seam]) edge_loops = me.edge_loops_from_faces(face_sel, [ed.key for ed in me.edges if ed.use_seam])
me_verts = me.verts me_verts = me.vertices
for loop in edge_loops: for loop in edge_loops:
looplen = [0.0] looplen = [0.0]
for ed in loop: for ed in loop:
@@ -192,7 +190,7 @@ def extend(obj, operator, EXTEND_MODE):
# remove seams, so we dont map accross seams. # remove seams, so we dont map accross seams.
for ed in me.edges: for ed in me.edges:
if ed.seam: if ed.use_seam:
# remove the edge pair if we can # remove the edge pair if we can
try: try:
del edge_faces[ed.key] del edge_faces[ed.key]

View File

@@ -604,7 +604,7 @@ def getUvIslands(faceGroups, me):
# Get seams so we dont cross over seams # Get seams so we dont cross over seams
edge_seams = {} # shoudl be a set edge_seams = {} # shoudl be a set
for ed in me.edges: for ed in me.edges:
if ed.seam: if ed.use_seam:
edge_seams[ed.key] = None # dummy var- use sets! edge_seams[ed.key] = None # dummy var- use sets!
# Done finding seams # Done finding seams
@@ -792,7 +792,7 @@ def VectoMat(vec):
class thickface(object): class thickface(object):
__slost__= 'v', 'uv', 'no', 'area', 'edge_keys' __slost__= 'v', 'uv', 'no', 'area', 'edge_keys'
def __init__(self, face, uvface, mesh_verts): def __init__(self, face, uvface, mesh_verts):
self.v = [mesh_verts[i] for i in face.verts] self.v = [mesh_verts[i] for i in face.vertices]
if len(self.v)==4: if len(self.v)==4:
self.uv = uvface.uv1, uvface.uv2, uvface.uv3, uvface.uv4 self.uv = uvface.uv1, uvface.uv2, uvface.uv3, uvface.uv4
else: else:
@@ -896,7 +896,7 @@ def main(context, island_margin, projection_limit):
me.add_uv_texture() me.add_uv_texture()
uv_layer = me.active_uv_texture.data uv_layer = me.active_uv_texture.data
me_verts = list(me.verts) me_verts = list(me.vertices)
if USER_ONLY_SELECTED_FACES: if USER_ONLY_SELECTED_FACES:
meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select] meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select]

View File

@@ -43,7 +43,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
#BPyMesh.meshCalcNormals(me) #BPyMesh.meshCalcNormals(me)
vert_tone = [0.0] * len(me.verts) vert_tone = [0.0] * len(me.vertices)
min_tone = 180.0 min_tone = 180.0
max_tone = 0.0 max_tone = 0.0
@@ -51,21 +51,21 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
# create lookup table for each vertex's connected vertices (via edges) # create lookup table for each vertex's connected vertices (via edges)
con = [] con = []
con = [[] for i in range(len(me.verts))] con = [[] for i in range(len(me.vertices))]
# add connected verts # add connected verts
for e in me.edges: for e in me.edges:
con[e.verts[0]].append(e.verts[1]) con[e.vertices[0]].append(e.vertices[1])
con[e.verts[1]].append(e.verts[0]) con[e.vertices[1]].append(e.vertices[0])
for i, v in enumerate(me.verts): for i, v in enumerate(me.vertices):
vec = Vector() vec = Vector()
no = v.normal no = v.normal
co = v.co co = v.co
# get the direction of the vectors between the vertex and it's connected vertices # get the direction of the vectors between the vertex and it's connected vertices
for c in con[i]: for c in con[i]:
vec += (me.verts[c].co - co).normalize() vec += (me.vertices[c].co - co).normalize()
# normalize the vector by dividing by the number of connected verts # normalize the vector by dividing by the number of connected verts
tot_con = len(con[i]) tot_con = len(con[i])
@@ -133,9 +133,9 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
f_col = [f_col.color1, f_col.color2, f_col.color3, f_col.color4] f_col = [f_col.color1, f_col.color2, f_col.color3, f_col.color4]
for j, v in enumerate(f.verts): for j, v in enumerate(f.vertices):
col = f_col[j] col = f_col[j]
tone = vert_tone[me.verts[v].index] tone = vert_tone[me.vertices[v].index]
tone = (tone - min_tone) / tone_range tone = (tone - min_tone) / tone_range
if dirt_only: if dirt_only:

View File

@@ -4,13 +4,13 @@ import bpy
wm = bpy.context.manager wm = bpy.context.manager
wm.active_keyconfig = wm.keyconfigs['Blender'] wm.active_keyconfig = wm.keyconfigs['Blender']
bpy.context.user_preferences.view.auto_depth = False bpy.context.user_preferences.view.use_mouse_auto_depth = False
bpy.context.user_preferences.view.zoom_to_mouse = False bpy.context.user_preferences.view.use_zoom_to_mouse = False
bpy.context.user_preferences.view.rotate_around_selection = False bpy.context.user_preferences.view.use_rotate_around_active = False
bpy.context.user_preferences.edit.drag_immediately = False bpy.context.user_preferences.edit.use_drag_immediately = False
bpy.context.user_preferences.edit.insertkey_xyz_to_rgb = False bpy.context.user_preferences.edit.use_insertkey_xyz_to_rgb = False
bpy.context.user_preferences.inputs.select_mouse = 'RIGHT' bpy.context.user_preferences.inputs.select_mouse = 'RIGHT'
bpy.context.user_preferences.inputs.zoom_style = 'DOLLY' bpy.context.user_preferences.inputs.view_zoom_method = 'DOLLY'
bpy.context.user_preferences.inputs.zoom_axis = 'VERTICAL' bpy.context.user_preferences.inputs.view_zoom_axis = 'VERTICAL'
bpy.context.user_preferences.inputs.view_rotation = 'TRACKBALL' bpy.context.user_preferences.inputs.view_rotate_method = 'TRACKBALL'
bpy.context.user_preferences.inputs.invert_zoom_direction = False bpy.context.user_preferences.inputs.invert_mouse_wheel_zoom = False

View File

@@ -7,7 +7,7 @@ kc = wm.add_keyconfig('Maya')
# Map 3D View # Map 3D View
km = kc.add_keymap('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False) 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 = km.items.add('view3d.show_manipulator', 'LEFTMOUSE', 'PRESS', any=True)
kmi.properties.release_confirm = True kmi.properties.release_confirm = True
kmi = km.items.add('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS') kmi = km.items.add('view3d.cursor3d', 'ACTIONMOUSE', 'PRESS')
kmi = km.items.add('view3d.rotate', 'LEFTMOUSE', 'PRESS', alt=True) kmi = km.items.add('view3d.rotate', 'LEFTMOUSE', 'PRESS', alt=True)
@@ -126,11 +126,11 @@ kmi.properties.nr = 9
kmi = km.items.add('view3d.layers', 'ZERO', 'PRESS', any=True) kmi = km.items.add('view3d.layers', 'ZERO', 'PRESS', any=True)
kmi.properties.nr = 10 kmi.properties.nr = 10
kmi = km.items.add('wm.context_toggle_enum', 'Z', 'PRESS') kmi = km.items.add('wm.context_toggle_enum', 'Z', 'PRESS')
kmi.properties.data_path = 'space_data.viewport_shading' kmi.properties.data_path = 'space_data.viewport_shade'
kmi.properties.value_1 = 'SOLID' kmi.properties.value_1 = 'SOLID'
kmi.properties.value_2 = 'WIREFRAME' kmi.properties.value_2 = 'WIREFRAME'
kmi = km.items.add('wm.context_toggle_enum', 'Z', 'PRESS', alt=True) kmi = km.items.add('wm.context_toggle_enum', 'Z', 'PRESS', alt=True)
kmi.properties.data_path = 'space_data.viewport_shading' kmi.properties.data_path = 'space_data.viewport_shade'
kmi.properties.value_1 = 'TEXTURED' kmi.properties.value_1 = 'TEXTURED'
kmi.properties.value_2 = 'SOLID' kmi.properties.value_2 = 'SOLID'
kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS') kmi = km.items.add('view3d.select', 'SELECTMOUSE', 'PRESS')
@@ -173,9 +173,9 @@ kmi = km.items.add('wm.context_set_enum', 'COMMA', 'PRESS', ctrl=True)
kmi.properties.data_path = 'space_data.pivot_point' kmi.properties.data_path = 'space_data.pivot_point'
kmi.properties.value = 'MEDIAN_POINT' kmi.properties.value = 'MEDIAN_POINT'
kmi = km.items.add('wm.context_toggle', 'COMMA', 'PRESS', alt=True) kmi = km.items.add('wm.context_toggle', 'COMMA', 'PRESS', alt=True)
kmi.properties.data_path = 'space_data.pivot_point_align' kmi.properties.data_path = 'space_data.use_pivot_point_align'
kmi = km.items.add('wm.context_toggle', 'Q', 'PRESS') kmi = km.items.add('wm.context_toggle', 'Q', 'PRESS')
kmi.properties.data_path = 'space_data.manipulator' kmi.properties.data_path = 'space_data.show_manipulator'
kmi = km.items.add('wm.context_set_enum', 'PERIOD', 'PRESS') kmi = km.items.add('wm.context_set_enum', 'PERIOD', 'PRESS')
kmi.properties.data_path = 'space_data.pivot_point' kmi.properties.data_path = 'space_data.pivot_point'
kmi.properties.value = 'CURSOR' kmi.properties.value = 'CURSOR'
@@ -212,9 +212,9 @@ kmi.properties.extend = True
km = kc.add_keymap('Object Mode', space_type='EMPTY', region_type='WINDOW', modal=False) 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 = km.items.add('wm.context_cycle_enum', 'O', 'PRESS', shift=True)
kmi.properties.data_path = 'tool_settings.proportional_editing_falloff' kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'
kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS') kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS')
kmi.properties.data_path = 'tool_settings.proportional_editing' kmi.properties.data_path = 'tool_settings.proportional_edit'
kmi.properties.value_1 = 'DISABLED' kmi.properties.value_1 = 'DISABLED'
kmi.properties.value_2 = 'ENABLED' kmi.properties.value_2 = 'ENABLED'
kmi = km.items.add('view3d.game_start', 'P', 'PRESS') kmi = km.items.add('view3d.game_start', 'P', 'PRESS')
@@ -363,13 +363,13 @@ kmi.properties.name = 'VIEW3D_MT_uv_map'
kmi = km.items.add('wm.call_menu', 'G', 'PRESS', ctrl=True) kmi = km.items.add('wm.call_menu', 'G', 'PRESS', ctrl=True)
kmi.properties.name = 'VIEW3D_MT_vertex_group' kmi.properties.name = 'VIEW3D_MT_vertex_group'
kmi = km.items.add('wm.context_cycle_enum', 'O', 'PRESS', shift=True) kmi = km.items.add('wm.context_cycle_enum', 'O', 'PRESS', shift=True)
kmi.properties.data_path = 'tool_settings.proportional_editing_falloff' kmi.properties.data_path = 'tool_settings.proportional_edit_falloff'
kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS') kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS')
kmi.properties.data_path = 'tool_settings.proportional_editing' kmi.properties.data_path = 'tool_settings.proportional_edit'
kmi.properties.value_1 = 'DISABLED' kmi.properties.value_1 = 'DISABLED'
kmi.properties.value_2 = 'ENABLED' kmi.properties.value_2 = 'ENABLED'
kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS', alt=True) kmi = km.items.add('wm.context_toggle_enum', 'O', 'PRESS', alt=True)
kmi.properties.data_path = 'tool_settings.proportional_editing' kmi.properties.data_path = 'tool_settings.proportional_edit'
kmi.properties.value_1 = 'DISABLED' kmi.properties.value_1 = 'DISABLED'
kmi.properties.value_2 = 'CONNECTED' kmi.properties.value_2 = 'CONNECTED'
kmi = km.items.add('mesh.select_all', 'SELECTMOUSE', 'CLICK') kmi = km.items.add('mesh.select_all', 'SELECTMOUSE', 'CLICK')
@@ -377,10 +377,10 @@ kmi.properties.action = 'DESELECT'
wm.active_keyconfig = kc wm.active_keyconfig = kc
bpy.context.user_preferences.edit.drag_immediately = True bpy.context.user_preferences.edit.use_drag_immediately = True
bpy.context.user_preferences.edit.insertkey_xyz_to_rgb = False bpy.context.user_preferences.edit.use_insertkey_xyz_to_rgb = False
bpy.context.user_preferences.inputs.select_mouse = 'LEFT' bpy.context.user_preferences.inputs.select_mouse = 'LEFT'
bpy.context.user_preferences.inputs.zoom_style = 'DOLLY' bpy.context.user_preferences.inputs.view_zoom_method = 'DOLLY'
bpy.context.user_preferences.inputs.zoom_axis = 'HORIZONTAL' bpy.context.user_preferences.inputs.view_zoom_axis = 'HORIZONTAL'
bpy.context.user_preferences.inputs.view_rotation = 'TURNTABLE' bpy.context.user_preferences.inputs.view_rotate_method = 'TURNTABLE'
bpy.context.user_preferences.inputs.invert_zoom_direction = True bpy.context.user_preferences.inputs.invert_mouse_wheel_zoom = True

View File

@@ -15,10 +15,10 @@ def main(context):
# adjust UVs # adjust UVs
for i, uv in enumerate(mesh.active_uv_texture.data): for i, uv in enumerate(mesh.active_uv_texture.data):
uvs = uv.uv1, uv.uv2, uv.uv3, uv.uv4 uvs = uv.uv1, uv.uv2, uv.uv3, uv.uv4
for j, v_idx in enumerate(mesh.faces[i].verts): for j, v_idx in enumerate(mesh.faces[i].vertices):
if uv.select_uv[j]: if uv.select_uv[j]:
# apply the location of the vertex as a UV # apply the location of the vertex as a UV
uvs[j][:] = mesh.verts[v_idx].co.xy uvs[j][:] = mesh.vertices[v_idx].co.xy
if is_editmode: if is_editmode:

View File

@@ -32,7 +32,7 @@ class MotionPathButtonsPanel():
def draw_settings(self, context, avs, bones=False): def draw_settings(self, context, avs, bones=False):
layout = self.layout layout = self.layout
mps = avs.motion_paths mps = avs.motion_path
layout.prop(mps, "type", expand=True) layout.prop(mps, "type", expand=True)
@@ -54,9 +54,9 @@ class MotionPathButtonsPanel():
col = split.column() col = split.column()
col.label(text="Display:") col.label(text="Display:")
col.prop(mps, "show_frame_numbers", text="Frame Numbers") col.prop(mps, "show_frame_numbers", text="Frame Numbers")
col.prop(mps, "highlight_keyframes", text="Keyframes") col.prop(mps, "show_keyframe_highlight", text="Keyframes")
if bones: if bones:
col.prop(mps, "search_all_action_keyframes", text="+ Non-Grouped Keyframes") col.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes")
col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers") col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers")
@@ -89,7 +89,7 @@ class OnionSkinButtonsPanel():
col = split.column() col = split.column()
col.label(text="Display:") col.label(text="Display:")
col.prop(arm, "ghost_only_selected", text="Selected Only") col.prop(arm, "show_only_ghost_selected", text="Selected Only")

View File

@@ -65,7 +65,7 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Layers:") col.label(text="Layers:")
col.prop(arm, "layer", text="") col.prop(arm, "layers", text="")
col.label(text="Protected Layers:") col.label(text="Protected Layers:")
col.prop(arm, "layer_protection", text="") col.prop(arm, "layer_protection", text="")
@@ -95,13 +95,13 @@ class DATA_PT_display(ArmatureButtonsPanel, bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(arm, "draw_names", text="Names") col.prop(arm, "show_names", text="Names")
col.prop(arm, "draw_axes", text="Axes") col.prop(arm, "show_axes", text="Axes")
col.prop(arm, "draw_custom_bone_shapes", text="Shapes") col.prop(arm, "show_bone_custom_shapes", text="Shapes")
col = split.column() col = split.column()
col.prop(arm, "draw_group_colors", text="Colors") col.prop(arm, "show_group_colors", text="Colors")
col.prop(ob, "x_ray", text="X-Ray") col.prop(ob, "show_x_ray", text="X-Ray")
col.prop(arm, "delay_deform", text="Delay Refresh") col.prop(arm, "delay_deform", text="Delay Refresh")
@@ -179,7 +179,7 @@ class DATA_PT_ghost(ArmatureButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Display:") col.label(text="Display:")
col.prop(arm, "ghost_only_selected", text="Selected Only") col.prop(arm, "show_only_ghost_selected", text="Selected Only")
class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel): class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
@@ -206,34 +206,34 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
simulation = (itasc.mode == 'SIMULATION') simulation = (itasc.mode == 'SIMULATION')
if simulation: if simulation:
layout.label(text="Reiteration:") layout.label(text="Reiteration:")
layout.prop(itasc, "reiteration", expand=True) layout.prop(itasc, "reiteration_method", expand=True)
split = layout.split() split = layout.split()
split.active = not simulation or itasc.reiteration != 'NEVER' split.active = not simulation or itasc.reiteration_method != 'NEVER'
col = split.column() col = split.column()
col.prop(itasc, "precision") col.prop(itasc, "precision")
col = split.column() col = split.column()
col.prop(itasc, "num_iter") col.prop(itasc, "iterations")
if simulation: if simulation:
layout.prop(itasc, "auto_step") layout.prop(itasc, "use_auto_step")
row = layout.row() row = layout.row()
if itasc.auto_step: if itasc.use_auto_step:
row.prop(itasc, "min_step", text="Min") row.prop(itasc, "step_min", text="Min")
row.prop(itasc, "max_step", text="Max") row.prop(itasc, "step_max", text="Max")
else: else:
row.prop(itasc, "num_step") row.prop(itasc, "step_count")
layout.prop(itasc, "solver") layout.prop(itasc, "solver")
if simulation: if simulation:
layout.prop(itasc, "feedback") layout.prop(itasc, "feedback")
layout.prop(itasc, "max_velocity") layout.prop(itasc, "velocity_max")
if itasc.solver == 'DLS': if itasc.solver == 'DLS':
row = layout.row() row = layout.row()
row.prop(itasc, "dampmax", text="Damp", slider=True) row.prop(itasc, "damping_max", text="Damp", slider=True)
row.prop(itasc, "dampeps", text="Eps", slider=True) row.prop(itasc, "damping_epsilon", text="Eps", slider=True)
from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel

View File

@@ -75,7 +75,7 @@ class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
row = layout.row() row = layout.row()
col = row.column() col = row.column()
col.prop(pchan, "location") col.prop(pchan, "location")
col.active = not (bone.parent and bone.connected) col.active = not (bone.parent and bone.use_connect)
col = row.column() col = row.column()
if pchan.rotation_mode == 'QUATERNION': if pchan.rotation_mode == 'QUATERNION':
@@ -111,7 +111,7 @@ class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
row = layout.row() row = layout.row()
col = row.column() col = row.column()
col.prop(pchan, "lock_location") col.prop(pchan, "lock_location")
col.active = not (bone.parent and bone.connected) col.active = not (bone.parent and bone.use_connect)
col = row.column() col = row.column()
if pchan.rotation_mode in ('QUATERNION', 'AXIS_ANGLE'): if pchan.rotation_mode in ('QUATERNION', 'AXIS_ANGLE'):
@@ -145,7 +145,7 @@ class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Layers:") col.label(text="Layers:")
col.prop(bone, "layer", text="") col.prop(bone, "layers", text="")
col.separator() col.separator()
@@ -162,12 +162,12 @@ class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
sub = col.column() sub = col.column()
sub.active = (bone.parent is not None) sub.active = (bone.parent is not None)
sub.prop(bone, "connected") sub.prop(bone, "use_connect")
sub.prop(bone, "hinge", text="Inherit Rotation") sub.prop(bone, "use_hinge", text="Inherit Rotation")
sub.prop(bone, "inherit_scale", text="Inherit Scale") sub.prop(bone, "use_inherit_scale", text="Inherit Scale")
sub = col.column() sub = col.column()
sub.active = (not bone.parent or not bone.connected) sub.active = (not bone.parent or not bone.use_connect)
sub.prop(bone, "local_location", text="Local Location") sub.prop(bone, "use_local_location", text="Local Location")
class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel): class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
@@ -194,7 +194,7 @@ class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(bone, "draw_wire", text="Wireframe") col.prop(bone, "show_wire", text="Wireframe")
col.prop(bone, "hide", text="Hide") col.prop(bone, "hide", text="Hide")
col = split.column() col = split.column()
@@ -225,68 +225,68 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
split = layout.split(percentage=0.25) split = layout.split(percentage=0.25)
split.prop(pchan, "ik_dof_x", text="X") split.prop(pchan, "ik_dof_x", text="X")
split.active = pchan.has_ik split.active = pchan.is_in_ik_chain
row = split.row() row = split.row()
row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True) row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
row.active = pchan.ik_dof_x and pchan.has_ik row.active = pchan.ik_dof_x and pchan.is_in_ik_chain
split = layout.split(percentage=0.25) split = layout.split(percentage=0.25)
sub = split.row() sub = split.row()
sub.prop(pchan, "ik_limit_x", text="Limit") sub.prop(pchan, "ik_limit_x", text="Limit")
sub.active = pchan.ik_dof_x and pchan.has_ik sub.active = pchan.ik_dof_x and pchan.is_in_ik_chain
sub = split.row(align=True) sub = split.row(align=True)
sub.prop(pchan, "ik_min_x", text="") sub.prop(pchan, "ik_min_x", text="")
sub.prop(pchan, "ik_max_x", text="") sub.prop(pchan, "ik_max_x", text="")
sub.active = pchan.ik_dof_x and pchan.ik_limit_x and pchan.has_ik sub.active = pchan.ik_dof_x and pchan.ik_limit_x and pchan.is_in_ik_chain
split = layout.split(percentage=0.25) split = layout.split(percentage=0.25)
split.prop(pchan, "ik_dof_y", text="Y") split.prop(pchan, "ik_dof_y", text="Y")
split.active = pchan.has_ik and pchan.has_ik split.active = pchan.is_in_ik_chain and pchan.is_in_ik_chain
row = split.row() row = split.row()
row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True) row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
row.active = pchan.ik_dof_y and pchan.has_ik row.active = pchan.ik_dof_y and pchan.is_in_ik_chain
split = layout.split(percentage=0.25) split = layout.split(percentage=0.25)
sub = split.row() sub = split.row()
sub.prop(pchan, "ik_limit_y", text="Limit") sub.prop(pchan, "ik_limit_y", text="Limit")
sub.active = pchan.ik_dof_y and pchan.has_ik sub.active = pchan.ik_dof_y and pchan.is_in_ik_chain
sub = split.row(align=True) sub = split.row(align=True)
sub.prop(pchan, "ik_min_y", text="") sub.prop(pchan, "ik_min_y", text="")
sub.prop(pchan, "ik_max_y", text="") sub.prop(pchan, "ik_max_y", text="")
sub.active = pchan.ik_dof_y and pchan.ik_limit_y and pchan.has_ik sub.active = pchan.ik_dof_y and pchan.ik_limit_y and pchan.is_in_ik_chain
split = layout.split(percentage=0.25) split = layout.split(percentage=0.25)
split.prop(pchan, "ik_dof_z", text="Z") split.prop(pchan, "ik_dof_z", text="Z")
split.active = pchan.has_ik and pchan.has_ik split.active = pchan.is_in_ik_chain and pchan.is_in_ik_chain
sub = split.row() sub = split.row()
sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True) sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
sub.active = pchan.ik_dof_z and pchan.has_ik sub.active = pchan.ik_dof_z and pchan.is_in_ik_chain
split = layout.split(percentage=0.25) split = layout.split(percentage=0.25)
sub = split.row() sub = split.row()
sub.prop(pchan, "ik_limit_z", text="Limit") sub.prop(pchan, "ik_limit_z", text="Limit")
sub.active = pchan.ik_dof_z and pchan.has_ik sub.active = pchan.ik_dof_z and pchan.is_in_ik_chain
sub = split.row(align=True) sub = split.row(align=True)
sub.prop(pchan, "ik_min_z", text="") sub.prop(pchan, "ik_min_z", text="")
sub.prop(pchan, "ik_max_z", text="") sub.prop(pchan, "ik_max_z", text="")
sub.active = pchan.ik_dof_z and pchan.ik_limit_z and pchan.has_ik sub.active = pchan.ik_dof_z and pchan.ik_limit_z and pchan.is_in_ik_chain
split = layout.split() split = layout.split()
split.prop(pchan, "ik_stretch", text="Stretch", slider=True) split.prop(pchan, "ik_stretch", text="Stretch", slider=True)
split.label() split.label()
split.active = pchan.has_ik split.active = pchan.is_in_ik_chain
if ob.pose.ik_solver == 'ITASC': if ob.pose.ik_solver == 'ITASC':
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(pchan, "ik_rot_control", text="Control Rotation") col.prop(pchan, "ik_rot_control", text="Control Rotation")
col.active = pchan.has_ik col.active = pchan.is_in_ik_chain
col = split.column() col = split.column()
col.prop(pchan, "ik_rot_weight", text="Weight", slider=True) col.prop(pchan, "ik_rot_weight", text="Weight", slider=True)
col.active = pchan.has_ik col.active = pchan.is_in_ik_chain
# not supported yet # not supported yet
#row = layout.row() #row = layout.row()
#row.prop(pchan, "ik_lin_control", text="Joint Size") #row.prop(pchan, "ik_lin_control", text="Joint Size")
@@ -303,7 +303,7 @@ class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
if not bone: if not bone:
bone = context.edit_bone bone = context.edit_bone
self.layout.prop(bone, "deform", text="") self.layout.prop(bone, "use_deform", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@@ -313,7 +313,7 @@ class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
if not bone: if not bone:
bone = context.edit_bone bone = context.edit_bone
layout.active = bone.deform layout.active = bone.use_deform
split = layout.split() split = layout.split()
@@ -323,7 +323,7 @@ class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
sub = col.column(align=True) sub = col.column(align=True)
sub.prop(bone, "envelope_distance", text="Distance") sub.prop(bone, "envelope_distance", text="Distance")
sub.prop(bone, "envelope_weight", text="Weight") sub.prop(bone, "envelope_weight", text="Weight")
col.prop(bone, "multiply_vertexgroup_with_envelope", text="Multiply") col.prop(bone, "use_envelope_multiply", text="Multiply")
sub = col.column(align=True) sub = col.column(align=True)
sub.label(text="Radius:") sub.label(text="Radius:")
@@ -339,7 +339,7 @@ class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
sub.prop(bone, "bbone_out", text="Ease Out") sub.prop(bone, "bbone_out", text="Ease Out")
col.label(text="Offset:") col.label(text="Offset:")
col.prop(bone, "cyclic_offset") col.prop(bone, "use_cyclic_offset")
class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel): class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):

View File

@@ -78,7 +78,7 @@ class DATA_PT_camera(CameraButtonsPanel, bpy.types.Panel):
elif cam.type == 'ORTHO': elif cam.type == 'ORTHO':
col.prop(cam, "ortho_scale") col.prop(cam, "ortho_scale")
layout.prop(cam, "panorama") layout.prop(cam, "use_panorama")
split = layout.split() split = layout.split()

View File

@@ -203,7 +203,7 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, bpy.types.Panel):
# poly's set aside since they use so few settings # poly's set aside since they use so few settings
col = split.column() col = split.column()
col.label(text="Cyclic:") col.label(text="Cyclic:")
col.prop(act_spline, "smooth") col.prop(act_spline, "use_smooth")
col = split.column() col = split.column()
col.prop(act_spline, "cyclic_u", text="U") col.prop(act_spline, "cyclic_u", text="U")
@@ -252,7 +252,7 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, bpy.types.Panel):
col.prop(act_spline, "tilt_interpolation", text="Tilt") col.prop(act_spline, "tilt_interpolation", text="Tilt")
col.prop(act_spline, "radius_interpolation", text="Radius") col.prop(act_spline, "radius_interpolation", text="Radius")
layout.prop(act_spline, "smooth") layout.prop(act_spline, "use_smooth")
class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel): class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel):
@@ -287,7 +287,7 @@ class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Text on Curve:") col.label(text="Text on Curve:")
col.prop(text, "text_on_curve", text="") col.prop(text, "follow_curve", text="")
split = layout.split() split = layout.split()
@@ -357,7 +357,7 @@ class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel):
col.operator("font.textbox_add", icon='ZOOMIN') col.operator("font.textbox_add", icon='ZOOMIN')
col = split.column() col = split.column()
for i, box in enumerate(text.textboxes): for i, box in enumerate(text.text_boxes):
boxy = layout.box() boxy = layout.box()

View File

@@ -125,7 +125,7 @@ class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
lamp = context.lamp.sky lamp = context.lamp.use_sky
row = layout.row(align=True) row = layout.row(align=True)
row.prop(lamp, "use_sky") row.prop(lamp, "use_sky")
@@ -357,9 +357,9 @@ class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.prop(lamp, "halo") col.prop(lamp, "use_halo")
sub = col.column(align=True) sub = col.column(align=True)
sub.active = lamp.halo sub.active = lamp.use_halo
sub.prop(lamp, "halo_intensity", text="Intensity") sub.prop(lamp, "halo_intensity", text="Intensity")
if lamp.shadow_method == 'BUFFER_SHADOW': if lamp.shadow_method == 'BUFFER_SHADOW':
sub.prop(lamp, "halo_step", text="Step") sub.prop(lamp, "halo_step", text="Step")

View File

@@ -78,7 +78,7 @@ class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
col.prop(lat, "interpolation_type_w", text="") col.prop(lat, "interpolation_type_w", text="")
row = layout.row() row = layout.row()
row.prop(lat, "outside") row.prop(lat, "use_outside")
row.prop_object(lat, "vertex_group", context.object, "vertex_groups", text="") row.prop_object(lat, "vertex_group", context.object, "vertex_groups", text="")

View File

@@ -98,7 +98,7 @@ class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.prop(mesh, "double_sided") col.prop(mesh, "show_double_sided")
class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel): class DATA_PT_settings(MeshButtonsPanel, bpy.types.Panel):
@@ -182,7 +182,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
enable_edit = ob.mode != 'EDIT' enable_edit = ob.mode != 'EDIT'
enable_edit_value = False enable_edit_value = False
if ob.shape_key_lock is False: if ob.show_shape_key is False:
if enable_edit or (ob.type == 'MESH' and ob.shape_key_edit_mode): if enable_edit or (ob.type == 'MESH' and ob.shape_key_edit_mode):
enable_edit_value = True enable_edit_value = True
@@ -210,7 +210,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
split = layout.split(percentage=0.4) split = layout.split(percentage=0.4)
row = split.row() row = split.row()
row.enabled = enable_edit row.enabled = enable_edit
row.prop(key, "relative") row.prop(key, "use_relative")
row = split.row() row = split.row()
row.alignment = 'RIGHT' row.alignment = 'RIGHT'
@@ -218,7 +218,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
sub = row.row(align=True) sub = row.row(align=True)
subsub = sub.row(align=True) subsub = sub.row(align=True)
subsub.active = enable_edit_value subsub.active = enable_edit_value
subsub.prop(ob, "shape_key_lock", text="") subsub.prop(ob, "show_shape_key", text="")
subsub.prop(kb, "mute", text="") subsub.prop(kb, "mute", text="")
sub.prop(ob, "shape_key_edit_mode", text="") sub.prop(ob, "shape_key_edit_mode", text="")

View File

@@ -72,7 +72,7 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
col.prop(mball, "threshold", text="Threshold") col.prop(mball, "threshold", text="Threshold")
layout.label(text="Update:") layout.label(text="Update:")
layout.prop(mball, "flag", expand=True) layout.prop(mball, "update_method", expand=True)
class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel): class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
@@ -94,7 +94,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
col = split.column(align=True) col = split.column(align=True)
col.label(text="Settings:") col.label(text="Settings:")
col.prop(metaelem, "stiffness", text="Stiffness") col.prop(metaelem, "stiffness", text="Stiffness")
col.prop(metaelem, "negative", text="Negative") col.prop(metaelem, "use_negative", text="Negative")
col.prop(metaelem, "hide", text="Hide") col.prop(metaelem, "hide", text="Hide")
col = split.column(align=True) col = split.column(align=True)

View File

@@ -264,9 +264,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.prop(md, "split_edges") col.prop(md, "split_edges")
col.prop(md, "unborn") col.prop(md, "show_unborn")
col.prop(md, "alive") col.prop(md, "show_alive")
col.prop(md, "dead") col.prop(md, "show_dead")
col.prop(md, "size") col.prop(md, "size")
layout.operator("object.explode_refresh", text="Refresh") layout.operator("object.explode_refresh", text="Refresh")
@@ -403,7 +403,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
col.operator("object.multires_subdivide", text="Subdivide") col.operator("object.multires_subdivide", text="Subdivide")
col.operator("object.multires_higher_levels_delete", text="Delete Higher") col.operator("object.multires_higher_levels_delete", text="Delete Higher")
col.operator("object.multires_reshape", text="Reshape") col.operator("object.multires_reshape", text="Reshape")
col.prop(md, "optimal_display") col.prop(md, "show_only_control_edges")
layout.separator() layout.separator()
@@ -431,9 +431,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Show Particles When:") col.label(text="Show Particles When:")
col.prop(md, "alive") col.prop(md, "show_alive")
col.prop(md, "unborn") col.prop(md, "show_unborn")
col.prop(md, "dead") col.prop(md, "show_dead")
layout.separator() layout.separator()
@@ -612,7 +612,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Options:") col.label(text="Options:")
col.prop(md, "subsurf_uv") col.prop(md, "subsurf_uv")
col.prop(md, "optimal_display") col.prop(md, "show_only_control_edges")
def SURFACE(self, layout, ob, md): def SURFACE(self, layout, ob, md):
layout.label(text="See Fields panel.") layout.label(text="See Fields panel.")
@@ -687,7 +687,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH': if md.texture_coordinates == 'MAP_UV' and ob.type == 'MESH':
layout.prop_object(md, "uv_layer", ob.data, "uv_textures") layout.prop_object(md, "uv_layer", ob.data, "uv_textures")
elif md.texture_coordinates == 'OBJECT': elif md.texture_coordinates == 'OBJECT':
layout.prop(md, "texture_coordinates_object") layout.prop(md, "texture_coords_object")
layout.separator() layout.separator()

View File

@@ -51,14 +51,14 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(game, "actor") col.prop(game, "use_actor")
col.prop(game, "ghost") col.prop(game, "use_ghost")
col.prop(ob, "hide_render", text="Invisible") # out of place but useful col.prop(ob, "hide_render", text="Invisible") # out of place but useful
col = split.column() col = split.column()
col.prop(game, "material_physics") col.prop(game, "material_physics")
col.prop(game, "rotate_from_normal") col.prop(game, "rotate_from_normal")
col.prop(game, "no_sleeping") col.prop(game, "use_sleep")
layout.separator() layout.separator()
@@ -110,8 +110,8 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
elif game.physics_type == 'SOFT_BODY': elif game.physics_type == 'SOFT_BODY':
col = layout.column() col = layout.column()
col.prop(game, "actor") col.prop(game, "use_actor")
col.prop(game, "ghost") col.prop(game, "use_ghost")
col.prop(ob, "hide_render", text="Invisible") col.prop(ob, "hide_render", text="Invisible")
layout.separator() layout.separator()
@@ -121,18 +121,18 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Attributes:") col.label(text="Attributes:")
col.prop(game, "mass") col.prop(game, "mass")
col.prop(soft, "welding") col.prop(soft, "weld_threshold")
col.prop(soft, "position_iterations") col.prop(soft, "position_iterations")
col.prop(soft, "linstiff", slider=True) col.prop(soft, "linstiff", slider=True)
col.prop(soft, "dynamic_friction", slider=True) col.prop(soft, "dynamic_friction", slider=True)
col.prop(soft, "margin", slider=True) col.prop(soft, "collision_margin", slider=True)
col.prop(soft, "bending_const", text="Bending Constraints") col.prop(soft, "bending_const", text="Bending Constraints")
col = split.column() col = split.column()
col.prop(soft, "shape_match") col.prop(soft, "shape_match")
sub = col.column() sub = col.column()
sub.active = soft.shape_match sub.active = soft.shape_match
sub.prop(soft, "threshold", slider=True) sub.prop(soft, "shape_threshold", slider=True)
col.separator() col.separator()
@@ -145,8 +145,8 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
elif game.physics_type == 'STATIC': elif game.physics_type == 'STATIC':
col = layout.column() col = layout.column()
col.prop(game, "actor") col.prop(game, "use_actor")
col.prop(game, "ghost") col.prop(game, "use_ghost")
col.prop(ob, "hide_render", text="Invisible") col.prop(ob, "hide_render", text="Invisible")
elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'): elif game.physics_type in ('SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'):
@@ -215,9 +215,9 @@ class RENDER_PT_game_player(RenderButtonsPanel, bpy.types.Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
gs = context.scene.game_data gs = context.scene.game_settings
layout.prop(gs, "fullscreen") layout.prop(gs, "show_fullscreen")
split = layout.split() split = layout.split()
@@ -248,7 +248,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
gs = context.scene.game_data gs = context.scene.game_settings
stereo_mode = gs.stereo stereo_mode = gs.stereo
# stereo options: # stereo options:
@@ -302,7 +302,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
gs = context.scene.game_data gs = context.scene.game_settings
layout.prop(gs, "material_mode", expand=True) layout.prop(gs, "material_mode", expand=True)
@@ -327,7 +327,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
gs = context.scene.game_data gs = context.scene.game_settings
split = layout.split() split = layout.split()
@@ -354,10 +354,10 @@ class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
scene = context.scene scene = context.scene
layout.prop(scene, "distance_model") layout.prop(scene, "audio_distance_model")
layout.prop(scene, "speed_of_sound", text="Speed") layout.prop(scene, "audio_doppler_speed", text="Speed")
layout.prop(scene, "doppler_factor") layout.prop(scene, "audio_doppler_factor")
class WorldButtonsPanel(): class WorldButtonsPanel():
@@ -454,7 +454,7 @@ class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
gs = context.scene.game_data gs = context.scene.game_settings
layout.prop(gs, "physics_engine") layout.prop(gs, "physics_engine")
if gs.physics_engine != 'NONE': if gs.physics_engine != 'NONE':

View File

@@ -374,7 +374,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
def draw_header(self, context): def draw_header(self, context):
raym = active_node_mat(context.material).raytrace_mirror raym = active_node_mat(context.material).raytrace_mirror
self.layout.prop(raym, "enabled", text="") self.layout.prop(raym, "use", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@@ -382,7 +382,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
mat = active_node_mat(context.material) mat = active_node_mat(context.material)
raym = mat.raytrace_mirror raym = mat.raytrace_mirror
layout.active = raym.enabled layout.active = raym.use
split = layout.split() split = layout.split()
@@ -434,7 +434,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
sss = mat.subsurface_scattering sss = mat.subsurface_scattering
self.layout.active = (not mat.shadeless) self.layout.active = (not mat.shadeless)
self.layout.prop(sss, "enabled", text="") self.layout.prop(sss, "use", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@@ -442,7 +442,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
mat = active_node_mat(context.material) mat = active_node_mat(context.material)
sss = mat.subsurface_scattering sss = mat.subsurface_scattering
layout.active = (sss.enabled) and (not mat.shadeless) layout.active = (sss.use) and (not mat.shadeless)
row = layout.row().split() row = layout.row().split()
sub = row.row(align=True).split(percentage=0.75) sub = row.row(align=True).split(percentage=0.75)

View File

@@ -151,7 +151,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
split = col.box().split() split = col.box().split()
col = split.column() col = split.column()
col.prop(group, "layer", text="Dupli") col.prop(group, "layers", text="Dupli")
col = split.column() col = split.column()
col.prop(group, "dupli_offset", text="") col.prop(group, "dupli_offset", text="")
@@ -176,23 +176,23 @@ class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
row = col.row() row = col.row()
row.prop(ob, "draw_bounds", text="Bounds") row.prop(ob, "show_bounds", text="Bounds")
sub = row.row() sub = row.row()
sub.active = ob.draw_bounds sub.active = ob.show_bounds
sub.prop(ob, "draw_bounds_type", text="") sub.prop(ob, "draw_bounds_type", text="")
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(ob, "draw_name", text="Name") col.prop(ob, "show_name", text="Name")
col.prop(ob, "draw_axis", text="Axis") col.prop(ob, "show_axis", text="Axis")
col.prop(ob, "draw_wire", text="Wire") col.prop(ob, "show_wire", text="Wire")
col.prop(ob, "color", text="Object Color") col.prop(ob, "color", text="Object Color")
col = split.column() col = split.column()
col.prop(ob, "draw_texture_space", text="Texture Space") col.prop(ob, "show_texture_space", text="Texture Space")
col.prop(ob, "x_ray", text="X-Ray") col.prop(ob, "show_x_ray", text="X-Ray")
col.prop(ob, "draw_transparent", text="Transparency") col.prop(ob, "show_transparent", text="Transparency")
class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel): class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):

View File

@@ -532,10 +532,10 @@ class ConstraintButtonsPanel():
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(con, "disable_linked_collision", text="No Collision") col.prop(con, "use_linked_collision", text="Linked Collision")
col = split.column() col = split.column()
col.prop(con, "draw_pivot", text="Display Pivot") col.prop(con, "show_pivot", text="Display Pivot")
split = layout.split() split = layout.split()

View File

@@ -27,7 +27,7 @@ from properties_physics_common import basic_force_field_falloff_ui
def particle_panel_enabled(context, psys): def particle_panel_enabled(context, psys):
return (psys.point_cache.baked is False) and (not psys.edited) and (not context.particle_system_editable) return (psys.point_cache.is_baked is False) and (not psys.edited) and (not context.particle_system_editable)
def particle_panel_poll(cls, context): def particle_panel_poll(cls, context):
@@ -116,15 +116,15 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
split = layout.split(percentage=0.65) split = layout.split(percentage=0.65)
if part.type == 'HAIR': if part.type == 'HAIR':
if psys.edited: if psys.is_edited:
split.operator("particle.edited_clear", text="Free Edit") split.operator("particle.edited_clear", text="Free Edit")
else: else:
split.label(text="") split.label(text="")
row = split.row() row = split.row()
row.enabled = particle_panel_enabled(context, psys) row.enabled = particle_panel_enabled(context, psys)
row.prop(part, "hair_step") row.prop(part, "hair_step")
if psys.edited: if psys.is_edited:
if psys.global_hair: if psys.is_global_hair:
layout.operator("particle.connect_hair") layout.operator("particle.connect_hair")
layout.label(text="Hair is disconnected.") layout.label(text="Hair is disconnected.")
else: else:
@@ -136,11 +136,6 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
split.prop(psys, "reactor_target_particle_system", text="Particle System") split.prop(psys, "reactor_target_particle_system", text="Particle System")
class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "particle_system.settings"
class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel): class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Emission" bl_label = "Emission"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -158,7 +153,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
psys = context.particle_system psys = context.particle_system
part = psys.settings part = psys.settings
layout.enabled = particle_panel_enabled(context, psys) and not psys.multiple_caches layout.enabled = particle_panel_enabled(context, psys) and not psys.has_multiple_caches
row = layout.row() row = layout.row()
row.active = part.distribution != 'GRID' row.active = part.distribution != 'GRID'
@@ -630,8 +625,8 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
row = layout.row() row = layout.row()
row.prop(rule, "name", text="") row.prop(rule, "name", text="")
#somebody make nice icons for boids here please! -jahka #somebody make nice icons for boids here please! -jahka
row.prop(rule, "in_air", icon='MOVE_UP_VEC', text="") row.prop(rule, "use_in_air", icon='MOVE_UP_VEC', text="")
row.prop(rule, "on_land", icon='MOVE_DOWN_VEC', text="") row.prop(rule, "use_on_land", icon='MOVE_DOWN_VEC', text="")
row = layout.row() row = layout.row()
@@ -697,7 +692,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
sub.prop(part, "emitter") sub.prop(part, "emitter")
sub.prop(part, "parent") sub.prop(part, "parent")
sub = split.column() sub = split.column()
sub.prop(part, "unborn") sub.prop(part, "show_unborn")
sub.prop(part, "died") sub.prop(part, "died")
row = layout.row() row = layout.row()
@@ -769,7 +764,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
if part.use_group_count and not part.whole_group: if part.use_group_count and not part.whole_group:
row = layout.row() row = layout.row()
row.template_list(part, "dupliweights", part, "active_dupliweight_index") row.template_list(part, "dupli_weights", part, "active_dupliweight_index")
col = row.column() col = row.column()
sub = col.row() sub = col.row()
@@ -871,18 +866,18 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
col = row.column() col = row.column()
col.prop(part, "show_size") col.prop(part, "show_size")
col.prop(part, "velocity") col.prop(part, "velocity")
col.prop(part, "num") col.prop(part, "show_number")
if part.physics_type == 'BOIDS': if part.physics_type == 'BOIDS':
col.prop(part, "draw_health") col.prop(part, "show_health")
col = row.column() col = row.column()
col.prop(part, "material_color", text="Use material color") col.prop(part, "show_material_color", text="Use material color")
if (path): if (path):
col.prop(part, "draw_step") col.prop(part, "draw_step")
else: else:
sub = col.column() sub = col.column()
sub.active = (part.material_color is False) sub.active = (part.show_material_color is False)
#sub.label(text="color") #sub.label(text="color")
#sub.label(text="Override material color") #sub.label(text="Override material color")
@@ -1078,6 +1073,11 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
row.prop(psys, "vertex_group_field_negate", text="") row.prop(psys, "vertex_group_field_negate", text="")
class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "particle_system.settings"
def register(): def register():
pass pass

View File

@@ -25,7 +25,7 @@ from properties_physics_common import effector_weights_ui
def cloth_panel_enabled(md): def cloth_panel_enabled(md):
return md.point_cache.baked is False return md.point_cache.is_baked is False
class CLOTH_MT_presets(bpy.types.Menu): class CLOTH_MT_presets(bpy.types.Menu):
@@ -68,7 +68,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
row = split.row(align=True) row = split.row(align=True)
row.prop(md, "render", text="") row.prop(md, "render", text="")
row.prop(md, "realtime", text="") row.prop(md, "show_viewport", text="")
else: else:
# add modifier # add modifier
split.operator("object.modifier_add", text="Add").type = 'CLOTH' split.operator("object.modifier_add", text="Add").type = 'CLOTH'

View File

@@ -29,7 +29,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
layout.set_context_pointer("point_cache", cache) layout.set_context_pointer("point_cache", cache)
row = layout.row() row = layout.row()
row.template_list(cache, "point_cache_list", cache, "active_point_cache_index", rows=2) row.template_list(cache, "point_caches", cache, "active_point_cache_index", rows=2)
col = row.column(align=True) col = row.column(align=True)
col.operator("ptcache.add", icon='ZOOMIN', text="") col.operator("ptcache.add", icon='ZOOMIN', text="")
col.operator("ptcache.remove", icon='ZOOMOUT', text="") col.operator("ptcache.remove", icon='ZOOMOUT', text="")
@@ -71,7 +71,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
sub.prop(cache, "quick_cache") sub.prop(cache, "quick_cache")
sub = col.column() sub = col.column()
sub.enabled = bpy.data.file_is_saved sub.enabled = (not bpy.data.is_dirty)
sub.prop(cache, "disk_cache") sub.prop(cache, "disk_cache")
col.label(text=cache.info) col.label(text=cache.info)
@@ -84,13 +84,13 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
col = split.column() col = split.column()
if cache.baked == True: if cache.is_baked == True:
col.operator("ptcache.free_bake", text="Free Bake") col.operator("ptcache.free_bake", text="Free Bake")
else: else:
col.operator("ptcache.bake", text="Bake").bake = True col.operator("ptcache.bake", text="Bake").bake = True
sub = col.row() sub = col.row()
sub.enabled = (cache.frames_skipped or cache.outdated) and enabled sub.enabled = (cache.frames_skipped or cache.is_outdated) and enabled
sub.operator("ptcache.bake", text="Calculate To Frame").bake = False sub.operator("ptcache.bake", text="Calculate To Frame").bake = False
sub = col.column() sub = col.column()

View File

@@ -181,7 +181,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
#row = split.row(align=True) #row = split.row(align=True)
#row.prop(md, "render", text="") #row.prop(md, "render", text="")
#row.prop(md, "realtime", text="") #row.prop(md, "show_viewport", text="")
coll = md.settings coll = md.settings
@@ -195,7 +195,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
if coll: if coll:
settings = context.object.collision settings = context.object.collision
layout.active = settings.enabled layout.active = settings.use
split = layout.split() split = layout.split()

View File

@@ -49,7 +49,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
row = split.row(align=True) row = split.row(align=True)
row.prop(md, "render", text="") row.prop(md, "render", text="")
row.prop(md, "realtime", text="") row.prop(md, "show_viewport", text="")
fluid = md.settings fluid = md.settings
@@ -65,7 +65,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
row = layout.row() row = layout.row()
row.prop(fluid, "type") row.prop(fluid, "type")
if fluid.type not in ('NONE', 'DOMAIN', 'PARTICLE'): if fluid.type not in ('NONE', 'DOMAIN', 'PARTICLE'):
row.prop(fluid, "active", text="") row.prop(fluid, "use", text="")
layout = layout.column() layout = layout.column()
if fluid.type not in ('NONE', 'DOMAIN', 'PARTICLE'): if fluid.type not in ('NONE', 'DOMAIN', 'PARTICLE'):
@@ -166,7 +166,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
col.label(text="Type:") col.label(text="Type:")
col.prop(fluid, "drops") col.prop(fluid, "drops")
col.prop(fluid, "floats") col.prop(fluid, "floats")
col.prop(fluid, "tracer") col.prop(fluid, "show_tracer")
layout.prop(fluid, "path", text="") layout.prop(fluid, "path", text="")

View File

@@ -54,7 +54,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
row = split.row(align=True) row = split.row(align=True)
row.prop(md, "render", text="") row.prop(md, "render", text="")
row.prop(md, "realtime", text="") row.prop(md, "show_viewport", text="")
else: else:
# add modifier # add modifier
@@ -113,7 +113,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
sub.label(text="Behavior:") sub.label(text="Behavior:")
sub.prop(flow, "temperature") sub.prop(flow, "temperature")
sub.prop(flow, "density") sub.prop(flow, "density")
sub.prop(flow, "absolute") sub.prop(flow, "use_absolute")
#elif md.smoke_type == 'COLLISION': #elif md.smoke_type == 'COLLISION':
# layout.separator() # layout.separator()
@@ -144,7 +144,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Collision Group:") col.label(text="Collision Group:")
col.prop(group, "coll_group", text="") col.prop(group, "collision_group", text="")
class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel): class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
@@ -165,7 +165,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
layout.label(text="Compression:") layout.label(text="Compression:")
layout.prop(md, "smoke_cache_comp", expand=True) layout.prop(md, "smoke_cache_comp", expand=True)
point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE') point_cache_ui(self, context, cache, (cache.is_baked is False), 'SMOKE')
class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel): class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
@@ -195,7 +195,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
col.label(text="Resolution:") col.label(text="Resolution:")
col.prop(md, "amplify", text="Divisions") col.prop(md, "amplify", text="Divisions")
col.prop(md, "smoothemitter") col.prop(md, "smoothemitter")
col.prop(md, "viewhighres") col.prop(md, "show_high_resolution")
col = split.column() col = split.column()
col.label(text="Noise Method:") col.label(text="Noise Method:")
@@ -221,7 +221,7 @@ class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel, bpy.types.Panel):
layout.label(text="Compression:") layout.label(text="Compression:")
layout.prop(md, "smoke_cache_high_comp", expand=True) layout.prop(md, "smoke_cache_high_comp", expand=True)
point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE') point_cache_ui(self, context, cache, (cache.is_baked is False), 'SMOKE')
class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel): class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):

View File

@@ -25,7 +25,7 @@ from properties_physics_common import effector_weights_ui
def softbody_panel_enabled(md): def softbody_panel_enabled(md):
return (md.point_cache.baked is False) return (md.point_cache.is_baked is False)
class PhysicButtonsPanel(): class PhysicButtonsPanel():
@@ -60,7 +60,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
row = split.row(align=True) row = split.row(align=True)
row.prop(md, "render", text="") row.prop(md, "render", text="")
row.prop(md, "realtime", text="") row.prop(md, "show_viewport", text="")
else: else:
# add modifier # add modifier
split.operator("object.modifier_add", text="Add").type = 'SOFT_BODY' split.operator("object.modifier_add", text="Add").type = 'SOFT_BODY'
@@ -249,7 +249,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
col.label(text="Step Size:") col.label(text="Step Size:")
col.prop(softbody, "minstep") col.prop(softbody, "minstep")
col.prop(softbody, "maxstep") col.prop(softbody, "maxstep")
col.prop(softbody, "auto_step", text="Auto-Step") col.prop(softbody, "use_auto_step", text="Auto-Step")
col = split.column() col = split.column()
col.prop(softbody, "error_limit") col.prop(softbody, "error_limit")

View File

@@ -98,9 +98,9 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
col.prop(rl, "material_override", text="Material") col.prop(rl, "material_override", text="Material")
col = split.column() col = split.column()
col.prop(rl, "visible_layers", text="Layer") col.prop(rl, "layers", text="Layer")
col.label(text="Mask Layers:") col.label(text="Mask Layers:")
col.prop(rl, "zmask_layers", text="") col.prop(rl, "layers_zmask", text="")
layout.separator() layout.separator()
@@ -109,21 +109,21 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(rl, "zmask") col.prop(rl, "use_zmask")
row = col.row() row = col.row()
row.prop(rl, "zmask_negate", text="Negate") row.prop(rl, "invert_zmask", text="Negate")
row.active = rl.zmask row.active = rl.use_zmask
col.prop(rl, "all_z") col.prop(rl, "use_all_z")
col = split.column() col = split.column()
col.prop(rl, "solid") col.prop(rl, "use_solid")
col.prop(rl, "halo") col.prop(rl, "use_halo")
col.prop(rl, "ztransp") col.prop(rl, "use_ztransp")
col.prop(rl, "sky") col.prop(rl, "use_sky")
col = split.column() col = split.column()
col.prop(rl, "edge") col.prop(rl, "use_edge_enhance")
col.prop(rl, "strand") col.prop(rl, "use_strand")
col.prop(rl, "freestyle") col.prop(rl, "freestyle")
layout.separator() layout.separator()
@@ -132,42 +132,42 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Passes:") col.label(text="Passes:")
col.prop(rl, "pass_combined") col.prop(rl, "use_pass_combined")
col.prop(rl, "pass_z") col.prop(rl, "use_pass_z")
col.prop(rl, "pass_vector") col.prop(rl, "use_pass_vector")
col.prop(rl, "pass_normal") col.prop(rl, "use_pass_normal")
col.prop(rl, "pass_uv") col.prop(rl, "use_pass_uv")
col.prop(rl, "pass_mist") col.prop(rl, "use_pass_mist")
col.prop(rl, "pass_object_index") col.prop(rl, "use_pass_object_index")
col.prop(rl, "pass_color") col.prop(rl, "use_pass_color")
col = split.column() col = split.column()
col.label() col.label()
col.prop(rl, "pass_diffuse") col.prop(rl, "use_pass_diffuse")
row = col.row() row = col.row()
row.prop(rl, "pass_specular") row.prop(rl, "use_pass_specular")
row.prop(rl, "pass_specular_exclude", text="") row.prop(rl, "exclude_specular", text="")
row = col.row() row = col.row()
row.prop(rl, "pass_shadow") row.prop(rl, "use_pass_shadow")
row.prop(rl, "pass_shadow_exclude", text="") row.prop(rl, "exclude_shadow", text="")
row = col.row() row = col.row()
row.prop(rl, "pass_emit") row.prop(rl, "use_pass_emit")
row.prop(rl, "pass_emit_exclude", text="") row.prop(rl, "exclude_emit", text="")
row = col.row() row = col.row()
row.prop(rl, "pass_ao") row.prop(rl, "use_pass_ambient_occlusion")
row.prop(rl, "pass_ao_exclude", text="") row.prop(rl, "exclude_ambient_occlusion", text="")
row = col.row() row = col.row()
row.prop(rl, "pass_environment") row.prop(rl, "use_pass_environment")
row.prop(rl, "pass_environment_exclude", text="") row.prop(rl, "exclude_environment", text="")
row = col.row() row = col.row()
row.prop(rl, "pass_indirect") row.prop(rl, "use_pass_indirect")
row.prop(rl, "pass_indirect_exclude", text="") row.prop(rl, "exclude_indirect", text="")
row = col.row() row = col.row()
row.prop(rl, "pass_reflection") row.prop(rl, "use_pass_reflection")
row.prop(rl, "pass_reflection_exclude", text="") row.prop(rl, "exclude_reflection", text="")
row = col.row() row = col.row()
row.prop(rl, "pass_refraction") row.prop(rl, "use_pass_refraction")
row.prop(rl, "pass_refraction_exclude", text="") row.prop(rl, "exclude_refraction", text="")
class RENDER_PT_freestyle(RenderButtonsPanel, bpy.types.Panel): class RENDER_PT_freestyle(RenderButtonsPanel, bpy.types.Panel):
@@ -436,8 +436,8 @@ class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
col.prop(rd, "use_envmaps", text="Environment Map") col.prop(rd, "use_envmaps", text="Environment Map")
col = split.column() col = split.column()
col.prop(rd, "use_raytracing", text="Ray Tracing") col.prop(rd, "use_raytrace", text="Ray Tracing")
col.prop(rd, "color_management") col.prop(rd, "use_color_management")
col.prop(rd, "alpha_mode", text="Alpha") col.prop(rd, "alpha_mode", text="Alpha")
@@ -467,16 +467,16 @@ class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Memory:") col.label(text="Memory:")
sub = col.column() sub = col.column()
sub.enabled = not (rd.use_border or rd.full_sample) sub.enabled = not (rd.use_border or rd.use_full_sample)
sub.prop(rd, "save_buffers") sub.prop(rd, "use_save_buffers")
sub = col.column() sub = col.column()
sub.active = rd.use_compositing sub.active = rd.use_compositing
sub.prop(rd, "free_image_textures") sub.prop(rd, "use_free_image_textures")
sub = col.column() sub = col.column()
sub.active = rd.use_raytracing sub.active = rd.use_raytrace
sub.label(text="Acceleration structure:") sub.label(text="Acceleration structure:")
sub.prop(rd, "raytrace_structure", text="") sub.prop(rd, "raytrace_method", text="")
if rd.raytrace_structure == 'OCTREE': if rd.raytrace_method == 'OCTREE':
sub.prop(rd, "octree_resolution", text="Resolution") sub.prop(rd, "octree_resolution", text="Resolution")
else: else:
sub.prop(rd, "use_instances", text="Instances") sub.prop(rd, "use_instances", text="Instances")
@@ -507,17 +507,17 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(rd, "fields", text="Fields") col.prop(rd, "use_fields", text="Fields")
sub = col.column() sub = col.column()
sub.active = rd.fields sub.active = rd.use_fields
sub.row().prop(rd, "field_order", expand=True) sub.row().prop(rd, "field_order", expand=True)
sub.prop(rd, "fields_still", text="Still") sub.prop(rd, "use_fields_still", text="Still")
col = split.column() col = split.column()
col.prop(rd, "edge") col.prop(rd, "use_edge_enhance")
sub = col.column() sub = col.column()
sub.active = rd.edge sub.active = rd.use_edge_enhance
sub.prop(rd, "edge_threshold", text="Threshold", slider=True) sub.prop(rd, "edge_threshold", text="Threshold", slider=True)
sub.prop(rd, "edge_color", text="") sub.prop(rd, "edge_color", text="")
@@ -538,7 +538,7 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
rd = context.scene.render rd = context.scene.render
file_format = rd.file_format file_format = rd.file_format
layout.prop(rd, "output_path", text="") layout.prop(rd, "filepath", text="")
split = layout.split() split = layout.split()
col = split.column() col = split.column()
@@ -594,17 +594,17 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
elif file_format in ('CINEON', 'DPX'): elif file_format in ('CINEON', 'DPX'):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(rd, "cineon_log", text="Convert to Log") col.prop(rd, "use_cineon_log", text="Convert to Log")
col = split.column(align=True) col = split.column(align=True)
col.active = rd.cineon_log col.active = rd.use_cineon_log
col.prop(rd, "cineon_black", text="Black") col.prop(rd, "cineon_black", text="Black")
col.prop(rd, "cineon_white", text="White") col.prop(rd, "cineon_white", text="White")
col.prop(rd, "cineon_gamma", text="Gamma") col.prop(rd, "cineon_gamma", text="Gamma")
elif file_format == 'TIFF': elif file_format == 'TIFF':
split = layout.split() split = layout.split()
split.prop(rd, "tiff_bit") split.prop(rd, "use_tiff_16bit")
elif file_format == 'QUICKTIME_CARBON': elif file_format == 'QUICKTIME_CARBON':
split = layout.split() split = layout.split()
@@ -717,13 +717,13 @@ class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
def draw_header(self, context): def draw_header(self, context):
rd = context.scene.render rd = context.scene.render
self.layout.prop(rd, "render_antialiasing", text="") self.layout.prop(rd, "use_antialiasing", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
rd = context.scene.render rd = context.scene.render
layout.active = rd.render_antialiasing layout.active = rd.use_antialiasing
split = layout.split() split = layout.split()
@@ -731,10 +731,10 @@ class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
col.row().prop(rd, "antialiasing_samples", expand=True) col.row().prop(rd, "antialiasing_samples", expand=True)
sub = col.row() sub = col.row()
sub.enabled = not rd.use_border sub.enabled = not rd.use_border
sub.prop(rd, "full_sample") sub.prop(rd, "use_full_sample")
col = split.column() col = split.column()
col.prop(rd, "pixel_filter", text="") col.prop(rd, "pixel_filter_type", text="")
col.prop(rd, "filter_size", text="Size") col.prop(rd, "filter_size", text="Size")
@@ -746,13 +746,13 @@ class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
def draw_header(self, context): def draw_header(self, context):
rd = context.scene.render rd = context.scene.render
self.layout.prop(rd, "motion_blur", text="") self.layout.prop(rd, "use_motion_blur", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
rd = context.scene.render rd = context.scene.render
layout.active = rd.motion_blur layout.active = rd.use_motion_blur
row = layout.row() row = layout.row()
row.prop(rd, "motion_blur_samples") row.prop(rd, "motion_blur_samples")
@@ -789,7 +789,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
row.prop(rd, "use_border", text="Border") row.prop(rd, "use_border", text="Border")
sub = row.row() sub = row.row()
sub.active = rd.use_border sub.active = rd.use_border
sub.prop(rd, "crop_to_border", text="Crop") sub.prop(rd, "use_crop_to_border", text="Crop")
col = split.column() col = split.column()
sub = col.column(align=True) sub = col.column(align=True)
@@ -811,39 +811,39 @@ class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
def draw_header(self, context): def draw_header(self, context):
rd = context.scene.render rd = context.scene.render
self.layout.prop(rd, "render_stamp", text="") self.layout.prop(rd, "use_stamp", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
rd = context.scene.render rd = context.scene.render
layout.active = rd.render_stamp layout.active = rd.use_stamp
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(rd, "stamp_time", text="Time") col.prop(rd, "use_stamp_time", text="Time")
col.prop(rd, "stamp_date", text="Date") col.prop(rd, "use_stamp_date", text="Date")
col.prop(rd, "stamp_render_time", text="RenderTime") col.prop(rd, "use_stamp_render_time", text="RenderTime")
col.prop(rd, "stamp_frame", text="Frame") col.prop(rd, "use_stamp_frame", text="Frame")
col.prop(rd, "stamp_scene", text="Scene") col.prop(rd, "use_stamp_scene", text="Scene")
col.prop(rd, "stamp_camera", text="Camera") col.prop(rd, "use_stamp_camera", text="Camera")
col.prop(rd, "stamp_filename", text="Filename") col.prop(rd, "use_stamp_filename", text="Filename")
col.prop(rd, "stamp_marker", text="Marker") col.prop(rd, "use_stamp_marker", text="Marker")
col.prop(rd, "stamp_sequencer_strip", text="Seq. Strip") col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip")
col = split.column() col = split.column()
col.active = rd.render_stamp col.active = rd.use_stamp
col.prop(rd, "stamp_foreground", slider=True) col.prop(rd, "stamp_foreground", slider=True)
col.prop(rd, "stamp_background", slider=True) col.prop(rd, "stamp_background", slider=True)
col.separator() col.separator()
col.prop(rd, "stamp_font_size", text="Font Size") col.prop(rd, "stamp_font_size", text="Font Size")
row = layout.split(percentage=0.2) row = layout.split(percentage=0.2)
row.prop(rd, "stamp_note", text="Note") row.prop(rd, "use_stamp_note", text="Note")
sub = row.row() sub = row.row()
sub.active = rd.stamp_note sub.active = rd.use_stamp_note
sub.prop(rd, "stamp_note_text", text="") sub.prop(rd, "stamp_note_text", text="")
@@ -864,24 +864,24 @@ class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
if rd.bake_type == 'NORMALS': if rd.bake_type == 'NORMALS':
layout.prop(rd, "bake_normal_space") layout.prop(rd, "bake_normal_space")
elif rd.bake_type in ('DISPLACEMENT', 'AO'): elif rd.bake_type in ('DISPLACEMENT', 'AO'):
layout.prop(rd, "bake_normalized") layout.prop(rd, "use_bake_normalize")
# col.prop(rd, "bake_aa_mode") # col.prop(rd, "bake_aa_mode")
# col.prop(rd, "bake_enable_aa") # col.prop(rd, "use_bake_antialiasing")
layout.separator() layout.separator()
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(rd, "bake_clear") col.prop(rd, "use_bake_clear")
col.prop(rd, "bake_margin") col.prop(rd, "bake_margin")
col.prop(rd, "bake_quad_split", text="Split") col.prop(rd, "bake_quad_split", text="Split")
col = split.column() col = split.column()
col.prop(rd, "bake_active") col.prop(rd, "use_bake_selected_to_active")
sub = col.column() sub = col.column()
sub.active = rd.bake_active sub.active = rd.use_bake_selected_to_active
sub.prop(rd, "bake_distance") sub.prop(rd, "bake_distance")
sub.prop(rd, "bake_bias") sub.prop(rd, "bake_bias")

View File

@@ -40,7 +40,7 @@ class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
scene = context.scene scene = context.scene
layout.prop(scene, "camera") layout.prop(scene, "camera")
layout.prop(scene, "set", text="Background") layout.prop(scene, "background_set", text="Background")
class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel): class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
@@ -83,7 +83,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
col.operator("anim.keying_set_remove", icon='ZOOMOUT', text="") col.operator("anim.keying_set_remove", icon='ZOOMOUT', text="")
ks = scene.active_keying_set ks = scene.active_keying_set
if ks and ks.absolute: if ks and ks.is_path_absolute:
row = layout.row() row = layout.row()
col = row.column() col = row.column()
@@ -96,9 +96,9 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
col = row.column() col = row.column()
col.label(text="Keyframing Settings:") col.label(text="Keyframing Settings:")
col.prop(ks, "insertkey_needed", text="Needed") col.prop(ks, "use_insertkey_needed", text="Needed")
col.prop(ks, "insertkey_visual", text="Visual") col.prop(ks, "use_insertkey_visual", text="Visual")
col.prop(ks, "insertkey_xyz_to_rgb", text="XYZ to RGB") col.prop(ks, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel): class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
@@ -106,7 +106,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
@classmethod @classmethod
def poll(cls, context): def poll(cls, context):
return (context.scene.active_keying_set and context.scene.active_keying_set.absolute) return (context.scene.active_keying_set and context.scene.active_keying_set.is_path_absolute)
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@@ -138,20 +138,20 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
col = row.column() col = row.column()
col.label(text="Array Target:") col.label(text="Array Target:")
col.prop(ksp, "entire_array") col.prop(ksp, "use_entire_array")
if ksp.entire_array is False: if ksp.use_entire_array is False:
col.prop(ksp, "array_index") col.prop(ksp, "array_index")
col = row.column() col = row.column()
col.label(text="F-Curve Grouping:") col.label(text="F-Curve Grouping:")
col.prop(ksp, "grouping") col.prop(ksp, "group_method")
if ksp.grouping == 'NAMED': if ksp.group_method == 'NAMED':
col.prop(ksp, "group") col.prop(ksp, "group")
col.label(text="Keyframing Settings:") col.label(text="Keyframing Settings:")
col.prop(ksp, "insertkey_needed", text="Needed") col.prop(ksp, "use_insertkey_needed", text="Needed")
col.prop(ksp, "insertkey_visual", text="Visual") col.prop(ksp, "use_insertkey_visual", text="Visual")
col.prop(ksp, "insertkey_xyz_to_rgb", text="XYZ to RGB") col.prop(ksp, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel): class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel):
@@ -193,7 +193,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
col.prop(rd, "simplify_subdivision", text="Subdivision") col.prop(rd, "simplify_subdivision", text="Subdivision")
col.prop(rd, "simplify_child_particles", text="Child Particles") col.prop(rd, "simplify_child_particles", text="Child Particles")
col.prop(rd, "simplify_triangulate") col.prop(rd, "use_simplify_triangulate")
col = split.column() col = split.column()
col.prop(rd, "simplify_shadow_samples", text="Shadow Samples") col.prop(rd, "simplify_shadow_samples", text="Shadow Samples")
@@ -239,13 +239,13 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
f.write("# Keying Set Level declarations\n") f.write("# Keying Set Level declarations\n")
f.write("ks= scene.add_keying_set(name=\"%s\")\n" % ks.name) f.write("ks= scene.add_keying_set(name=\"%s\")\n" % ks.name)
if ks.absolute is False: if not ks.is_path_absolute:
f.write("ks.absolute = False\n") f.write("ks.is_path_absolute = False\n")
f.write("\n") f.write("\n")
f.write("ks.insertkey_needed = %s\n" % ks.insertkey_needed) f.write("ks.use_insertkey_needed = %s\n" % ks.use_insertkey_needed)
f.write("ks.insertkey_visual = %s\n" % ks.insertkey_visual) f.write("ks.use_insertkey_visual = %s\n" % ks.use_insertkey_visual)
f.write("ks.insertkey_xyz_to_rgb = %s\n" % ks.insertkey_xyz_to_rgb) f.write("ks.use_insertkey_xyz_to_rgb = %s\n" % ks.use_insertkey_xyz_to_rgb)
f.write("\n") f.write("\n")
@@ -292,17 +292,17 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
f.write("%s, '%s'" % (id_bpy_path, ksp.data_path)) f.write("%s, '%s'" % (id_bpy_path, ksp.data_path))
# array index settings (if applicable) # array index settings (if applicable)
if ksp.entire_array: if ksp.use_entire_array:
f.write(", index=-1") f.write(", index=-1")
else: else:
f.write(", index=%d" % ksp.array_index) f.write(", index=%d" % ksp.array_index)
# grouping settings (if applicable) # grouping settings (if applicable)
# NOTE: the current default is KEYINGSET, but if this changes, change this code too # NOTE: the current default is KEYINGSET, but if this changes, change this code too
if ksp.grouping == 'NAMED': if ksp.group_method == 'NAMED':
f.write(", grouping_method='%s', group_name=\"%s\"" % (ksp.grouping, ksp.group)) f.write(", group_method='%s', group_name=\"%s\"" % (ksp.group_method, ksp.group))
elif ksp.grouping != 'KEYINGSET': elif ksp.group_method != 'KEYINGSET':
f.write(", grouping_method='%s'" % ksp.grouping) f.write(", group_method='%s'" % ksp.group_method)
# finish off # finish off
f.write(")\n") f.write(")\n")

View File

@@ -122,7 +122,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
col = split.column() col = split.column()
if not space.pin_id: if not space.pin_id:
col.prop(space, "brush_texture", text="Brush", toggle=True) col.prop(space, "show_brush_texture", text="Brush", toggle=True)
if tex: if tex:
split = layout.split(percentage=0.2) split = layout.split(percentage=0.2)
@@ -680,19 +680,6 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
col.prop(tex, "crop_max_y", text="Y") col.prop(tex, "crop_max_y", text="Y")
class TEXTURE_PT_plugin(TextureTypePanel, bpy.types.Panel):
bl_label = "Plugin"
tex_type = 'PLUGIN'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
def draw(self, context):
layout = self.layout
# tex = context.texture
layout.label(text="Nothing yet")
class TEXTURE_PT_envmap(TextureTypePanel, bpy.types.Panel): class TEXTURE_PT_envmap(TextureTypePanel, bpy.types.Panel):
bl_label = "Environment Map" bl_label = "Environment Map"
tex_type = 'ENVIRONMENT_MAP' tex_type = 'ENVIRONMENT_MAP'
@@ -863,10 +850,10 @@ class TEXTURE_PT_voxeldata(TextureButtonsPanel, bpy.types.Panel):
layout = self.layout layout = self.layout
tex = context.texture tex = context.texture
vd = tex.voxeldata vd = tex.voxel_data
layout.prop(vd, "file_format") layout.prop(vd, "file_format")
if vd.file_format in ['BLENDER_VOXEL', 'RAW_8BIT']: if vd.file_format in ('BLENDER_VOXEL', 'RAW_8BIT'):
layout.prop(vd, "source_path") layout.prop(vd, "source_path")
if vd.file_format == 'RAW_8BIT': if vd.file_format == 'RAW_8BIT':
layout.prop(vd, "resolution") layout.prop(vd, "resolution")
@@ -902,7 +889,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, bpy.types.Panel):
layout = self.layout layout = self.layout
tex = context.texture tex = context.texture
pd = tex.pointdensity pd = tex.point_density
layout.prop(pd, "point_source", expand=True) layout.prop(pd, "point_source", expand=True)
@@ -958,7 +945,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
layout = self.layout layout = self.layout
tex = context.texture tex = context.texture
pd = tex.pointdensity pd = tex.point_density
layout.prop(pd, "turbulence", text="") layout.prop(pd, "turbulence", text="")
@@ -966,7 +953,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
layout = self.layout layout = self.layout
tex = context.texture tex = context.texture
pd = tex.pointdensity pd = tex.point_density
layout.active = pd.turbulence layout.active = pd.turbulence
split = layout.split() split = layout.split()

View File

@@ -48,7 +48,7 @@ class CONSOLE_HT_header(bpy.types.Header):
row.prop(sc, "show_report_debug", text="Debug") row.prop(sc, "show_report_debug", text="Debug")
row.prop(sc, "show_report_info", text="Info") row.prop(sc, "show_report_info", text="Info")
row.prop(sc, "show_report_operator", text="Operators") row.prop(sc, "show_report_operator", text="Operators")
row.prop(sc, "show_report_warn", text="Warnings") row.prop(sc, "show_report_warning", text="Warnings")
row.prop(sc, "show_report_error", text="Errors") row.prop(sc, "show_report_error", text="Errors")
row = layout.row() row = layout.row()

View File

@@ -48,7 +48,7 @@ class DOPESHEET_HT_header(bpy.types.Header):
sub.menu("DOPESHEET_MT_key") sub.menu("DOPESHEET_MT_key")
layout.prop(st, "mode", text="") layout.prop(st, "mode", text="")
layout.prop(st.dopesheet, "display_summary", text="Summary") layout.prop(st.dopesheet, "show_summary", text="Summary")
if st.mode == 'DOPESHEET': if st.mode == 'DOPESHEET':
layout.template_dopesheet_filter(st.dopesheet) layout.template_dopesheet_filter(st.dopesheet)
@@ -56,7 +56,7 @@ class DOPESHEET_HT_header(bpy.types.Header):
layout.template_ID(st, "action", new="action.new") layout.template_ID(st, "action", new="action.new")
if st.mode != 'GPENCIL': if st.mode != 'GPENCIL':
layout.prop(st, "autosnap", text="") layout.prop(st, "auto_snap", text="")
row = layout.row(align=True) row = layout.row(align=True)
row.operator("action.copy", text="", icon='COPYDOWN') row.operator("action.copy", text="", icon='COPYDOWN')
@@ -73,10 +73,10 @@ class DOPESHEET_MT_view(bpy.types.Menu):
layout.column() layout.column()
layout.prop(st, "realtime_updates") layout.prop(st, "use_realtime_update")
layout.prop(st, "show_cframe_indicator") layout.prop(st, "show_frame_indicator")
layout.prop(st, "show_sliders") layout.prop(st, "show_sliders")
layout.prop(st, "automerge_keyframes") layout.prop(st, "use_auto_merge_keyframes")
layout.prop(st, "use_marker_sync") layout.prop(st, "use_marker_sync")
if st.show_seconds: if st.show_seconds:

View File

@@ -46,23 +46,23 @@ class FILEBROWSER_HT_header(bpy.types.Header):
row = layout.row(align=True) row = layout.row(align=True)
row.operator("file.directory_new", text="", icon='NEWFOLDER') row.operator("file.directory_new", text="", icon='NEWFOLDER')
layout.prop(params, "display", expand=True, text="") layout.prop(params, "display_type", expand=True, text="")
layout.prop(params, "sort", expand=True, text="") layout.prop(params, "sort_method", expand=True, text="")
layout.prop(params, "hide_dot", text="Hide Invisible") layout.prop(params, "show_hidden", text="Hide Invisible")
layout.prop(params, "do_filter", text="", icon='FILTER') layout.prop(params, "use_filter", text="", icon='FILTER')
row = layout.row(align=True) row = layout.row(align=True)
row.active = params.do_filter row.active = params.use_filter
row.prop(params, "filter_folder", text="") row.prop(params, "use_filter_folder", text="")
row.prop(params, "filter_blender", text="") row.prop(params, "use_filter_blender", text="")
row.prop(params, "filter_image", text="") row.prop(params, "use_filter_image", text="")
row.prop(params, "filter_movie", text="") row.prop(params, "use_filter_movie", text="")
row.prop(params, "filter_script", text="") row.prop(params, "use_filter_script", text="")
row.prop(params, "filter_font", text="") row.prop(params, "use_filter_font", text="")
row.prop(params, "filter_sound", text="") row.prop(params, "use_filter_sound", text="")
row.prop(params, "filter_text", text="") row.prop(params, "use_filter_text", text="")
def register(): def register():

View File

@@ -44,7 +44,7 @@ class GRAPH_HT_header(bpy.types.Header):
layout.template_dopesheet_filter(st.dopesheet) layout.template_dopesheet_filter(st.dopesheet)
layout.prop(st, "autosnap", text="") layout.prop(st, "auto_snap", text="")
layout.prop(st, "pivot_point", text="", icon_only=True) layout.prop(st, "pivot_point", text="", icon_only=True)
row = layout.row(align=True) row = layout.row(align=True)
@@ -71,19 +71,19 @@ class GRAPH_MT_view(bpy.types.Menu):
layout.operator("graph.properties", icon='MENU_PANEL') layout.operator("graph.properties", icon='MENU_PANEL')
layout.separator() layout.separator()
layout.prop(st, "realtime_updates") layout.prop(st, "use_realtime_update")
layout.prop(st, "show_cframe_indicator") layout.prop(st, "show_frame_indicator")
layout.prop(st, "show_cursor") layout.prop(st, "show_cursor")
layout.prop(st, "show_sliders") layout.prop(st, "show_sliders")
layout.prop(st, "automerge_keyframes") layout.prop(st, "use_auto_merge_keyframes")
layout.separator() layout.separator()
if st.show_handles: if st.show_handles:
layout.operator("graph.handles_view_toggle", icon='CHECKBOX_HLT', text="Show All Handles") layout.operator("graph.handles_view_toggle", icon='CHECKBOX_HLT', text="Show All Handles")
else: else:
layout.operator("graph.handles_view_toggle", icon='CHECKBOX_DEHLT', text="Show All Handles") layout.operator("graph.handles_view_toggle", icon='CHECKBOX_DEHLT', text="Show All Handles")
layout.prop(st, "only_selected_curves_handles") layout.prop(st, "use_only_selected_curves_handles")
layout.prop(st, "only_selected_keyframe_handles") layout.prop(st, "use_only_selected_keyframe_handles")
layout.operator("anim.time_toggle") layout.operator("anim.time_toggle")
layout.separator() layout.separator()

View File

@@ -48,10 +48,10 @@ class IMAGE_MT_view(bpy.types.Menu):
layout.separator() layout.separator()
layout.prop(sima, "update_automatically") layout.prop(sima, "use_realtime_update")
if show_uvedit: if show_uvedit:
layout.prop(toolsettings, "uv_local_view") # Numpad / layout.prop(toolsettings, "show_uv_local_view") # Numpad /
layout.prop(uv, "draw_other_objects") layout.prop(uv, "show_other_objects")
layout.separator() layout.separator()
@@ -138,13 +138,13 @@ class IMAGE_MT_image(bpy.types.Menu):
# only for dirty && specific image types, perhaps # only for dirty && specific image types, perhaps
# this could be done in operator poll too # this could be done in operator poll too
if ima.dirty: if ima.is_dirty:
if ima.source in ('FILE', 'GENERATED') and ima.type != 'MULTILAYER': if ima.source in ('FILE', 'GENERATED') and ima.type != 'MULTILAYER':
layout.operator("image.pack", text="Pack As PNG").as_png = True layout.operator("image.pack", text="Pack As PNG").as_png = True
layout.separator() layout.separator()
layout.prop(sima, "image_painting") layout.prop(sima, "use_image_paint")
class IMAGE_MT_uvs_showhide(bpy.types.Menu): class IMAGE_MT_uvs_showhide(bpy.types.Menu):
@@ -217,12 +217,12 @@ class IMAGE_MT_uvs(bpy.types.Menu):
uv = sima.uv_editor uv = sima.uv_editor
toolsettings = context.tool_settings toolsettings = context.tool_settings
layout.prop(uv, "snap_to_pixels") layout.prop(uv, "use_snap_to_pixels")
layout.prop(uv, "constrain_to_image_bounds") layout.prop(uv, "lock_bounds")
layout.separator() layout.separator()
layout.prop(uv, "live_unwrap") layout.prop(uv, "use_live_unwrap")
layout.operator("uv.unwrap") layout.operator("uv.unwrap")
layout.operator("uv.pin", text="Unpin").clear = True layout.operator("uv.pin", text="Unpin").clear = True
layout.operator("uv.pin") layout.operator("uv.pin")
@@ -244,8 +244,8 @@ class IMAGE_MT_uvs(bpy.types.Menu):
layout.separator() layout.separator()
layout.prop_menu_enum(toolsettings, "proportional_editing") layout.prop_menu_enum(toolsettings, "proportional_edit")
layout.prop_menu_enum(toolsettings, "proportional_editing_falloff") layout.prop_menu_enum(toolsettings, "proportional_edit_falloff")
layout.separator() layout.separator()
@@ -278,7 +278,7 @@ class IMAGE_HT_header(bpy.types.Header):
if show_uvedit: if show_uvedit:
sub.menu("IMAGE_MT_select") sub.menu("IMAGE_MT_select")
if ima and ima.dirty: if ima and ima.is_dirty:
sub.menu("IMAGE_MT_image", text="Image*") sub.menu("IMAGE_MT_image", text="Image*")
else: else:
sub.menu("IMAGE_MT_image", text="Image") sub.menu("IMAGE_MT_image", text="Image")
@@ -288,31 +288,31 @@ class IMAGE_HT_header(bpy.types.Header):
layout.template_ID(sima, "image", new="image.new") layout.template_ID(sima, "image", new="image.new")
if not show_render: if not show_render:
layout.prop(sima, "image_pin", text="") layout.prop(sima, "use_image_pin", text="")
# uv editing # uv editing
if show_uvedit: if show_uvedit:
uvedit = sima.uv_editor uvedit = sima.uv_editor
layout.prop(uvedit, "pivot", text="", icon_only=True) layout.prop(uvedit, "pivot_point", text="", icon_only=True)
layout.prop(toolsettings, "uv_sync_selection", text="") layout.prop(toolsettings, "use_uv_select_sync", text="")
if toolsettings.uv_sync_selection: if toolsettings.use_uv_select_sync:
row = layout.row(align=True) row = layout.row(align=True)
row.prop(toolsettings, "mesh_selection_mode", text="", index=0, icon='VERTEXSEL') row.prop(toolsettings, "mesh_select_mode", text="", index=0, icon='VERTEXSEL')
row.prop(toolsettings, "mesh_selection_mode", text="", index=1, icon='EDGESEL') row.prop(toolsettings, "mesh_select_mode", text="", index=1, icon='EDGESEL')
row.prop(toolsettings, "mesh_selection_mode", text="", index=2, icon='FACESEL') row.prop(toolsettings, "mesh_select_mode", text="", index=2, icon='FACESEL')
else: else:
layout.prop(toolsettings, "uv_selection_mode", text="", expand=True) layout.prop(toolsettings, "uv_select_mode", text="", expand=True)
layout.prop(uvedit, "sticky_selection_mode", text="", icon_only=True) layout.prop(uvedit, "sticky_select_mode", text="", icon_only=True)
row = layout.row(align=True) row = layout.row(align=True)
row.prop(toolsettings, "proportional_editing", text="", icon_only=True) row.prop(toolsettings, "proportional_edit", text="", icon_only=True)
if toolsettings.proportional_editing != 'DISABLED': if toolsettings.proportional_edit != 'DISABLED':
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True) row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
row = layout.row(align=True) row = layout.row(align=True)
row.prop(toolsettings, "snap", text="") row.prop(toolsettings, "use_snap", text="")
row.prop(toolsettings, "snap_element", text="", icon_only=True) row.prop(toolsettings, "snap_element", text="", icon_only=True)
# mesh = context.edit_object.data # mesh = context.edit_object.data
@@ -323,7 +323,7 @@ class IMAGE_HT_header(bpy.types.Header):
layout.template_image_layers(ima, iuser) layout.template_image_layers(ima, iuser)
# painting # painting
layout.prop(sima, "image_painting", text="") layout.prop(sima, "use_image_paint", text="")
# draw options # draw options
row = layout.row(align=True) row = layout.row(align=True)
@@ -335,8 +335,8 @@ class IMAGE_HT_header(bpy.types.Header):
if ima.type == 'COMPOSITE' and ima.source in ('MOVIE', 'SEQUENCE'): if ima.type == 'COMPOSITE' and ima.source in ('MOVIE', 'SEQUENCE'):
row.operator("image.play_composite", icon='PLAY') row.operator("image.play_composite", icon='PLAY')
if show_uvedit or sima.image_painting: if show_uvedit or sima.use_image_paint:
layout.prop(sima, "update_automatically", text="", icon_only=True, icon='LOCKED') layout.prop(sima, "use_realtime_update", text="", icon_only=True, icon='LOCKED')
class IMAGE_PT_image_properties(bpy.types.Panel): class IMAGE_PT_image_properties(bpy.types.Panel):
@@ -525,13 +525,13 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Coordinates:") col.label(text="Coordinates:")
col.prop(sima, "draw_repeated", text="Repeat") col.prop(sima, "show_repeat", text="Repeat")
if show_uvedit: if show_uvedit:
col.prop(uvedit, "normalized_coordinates", text="Normalized") col.prop(uvedit, "show_normalized_coords", text="Normalized")
elif show_uvedit: elif show_uvedit:
col.label(text="Coordinates:") col.label(text="Coordinates:")
col.prop(uvedit, "normalized_coordinates", text="Normalized") col.prop(uvedit, "show_normalized_coords", text="Normalized")
if show_uvedit: if show_uvedit:
@@ -545,15 +545,15 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
split = layout.split() split = layout.split()
col = split.column() col = split.column()
col.prop(uvedit, "draw_smooth_edges", text="Smooth") col.prop(uvedit, "show_smooth_edges", text="Smooth")
col.prop(uvedit, "draw_modified_edges", text="Modified") col.prop(uvedit, "show_modified_edges", text="Modified")
#col.prop(uvedit, "draw_edges") #col.prop(uvedit, "show_edges")
#col.prop(uvedit, "draw_faces") #col.prop(uvedit, "show_faces")
col = split.column() col = split.column()
col.prop(uvedit, "draw_stretch", text="Stretch") col.prop(uvedit, "show_stretch", text="Stretch")
sub = col.column() sub = col.column()
sub.active = uvedit.draw_stretch sub.active = uvedit.show_stretch
sub.row().prop(uvedit, "draw_stretch_type", expand=True) sub.row().prop(uvedit, "draw_stretch_type", expand=True)
@@ -584,15 +584,15 @@ class IMAGE_PT_paint(bpy.types.Panel):
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "size", slider=True) row.prop(brush, "size", slider=True)
row.prop(brush, "use_size_pressure", toggle=True, text="") row.prop(brush, "use_pressure_size", toggle=True, text="")
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "strength", slider=True) row.prop(brush, "strength", slider=True)
row.prop(brush, "use_strength_pressure", toggle=True, text="") row.prop(brush, "use_pressure_strength", toggle=True, text="")
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "jitter", slider=True) row.prop(brush, "jitter", slider=True)
row.prop(brush, "use_jitter_pressure", toggle=True, text="") row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col.prop(brush, "blend", text="Blend") col.prop(brush, "blend", text="Blend")
@@ -638,7 +638,7 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel):
row = layout.row(align=True) row = layout.row(align=True)
row.active = brush.use_space row.active = brush.use_space
row.prop(brush, "spacing", text="Distance", slider=True) row.prop(brush, "spacing", text="Distance", slider=True)
row.prop(brush, "use_spacing_pressure", toggle=True, text="") row.prop(brush, "use_pressure_spacing", toggle=True, text="")
layout.prop(brush, "use_wrap") layout.prop(brush, "use_wrap")

View File

@@ -48,7 +48,7 @@ class INFO_HT_header(bpy.types.Header):
sub.menu("INFO_MT_render") sub.menu("INFO_MT_render")
sub.menu("INFO_MT_help") sub.menu("INFO_MT_help")
if window.screen.fullscreen: if window.screen.show_fullscreen:
layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text="Back to Previous") layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text="Back to Previous")
layout.separator() layout.separator()
else: else:
@@ -58,7 +58,7 @@ class INFO_HT_header(bpy.types.Header):
layout.separator() layout.separator()
if rd.multiple_engines: if rd.has_multiple_engines:
layout.prop(rd, "engine", text="") layout.prop(rd, "engine", text="")
layout.separator() layout.separator()
@@ -265,7 +265,7 @@ class INFO_MT_game(bpy.types.Menu):
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
gs = context.scene.game_data gs = context.scene.game_settings
layout.operator("view3d.game_start") layout.operator("view3d.game_start")

View File

@@ -42,7 +42,7 @@ class NLA_HT_header(bpy.types.Header):
layout.template_dopesheet_filter(st.dopesheet) layout.template_dopesheet_filter(st.dopesheet)
layout.prop(st, "autosnap", text="") layout.prop(st, "auto_snap", text="")
class NLA_MT_view(bpy.types.Menu): class NLA_MT_view(bpy.types.Menu):
@@ -59,8 +59,8 @@ class NLA_MT_view(bpy.types.Menu):
layout.separator() layout.separator()
layout.prop(st, "realtime_updates") layout.prop(st, "use_realtime_update")
layout.prop(st, "show_cframe_indicator") layout.prop(st, "show_frame_indicator")
layout.operator("anim.time_toggle", text="Show Frames" if st.show_seconds else "Show Seconds") layout.operator("anim.time_toggle", text="Show Frames" if st.show_seconds else "Show Seconds")
@@ -122,7 +122,7 @@ class NLA_MT_edit(bpy.types.Menu):
layout.separator() layout.separator()
# TODO: names of these tools for 'tweakmode' need changing? # TODO: names of these tools for 'tweakmode' need changing?
if scene.nla_tweakmode_on: if scene.is_nla_tweakmode:
layout.operator("nla.tweakmode_exit", text="Stop Tweaking Strip Actions") layout.operator("nla.tweakmode_exit", text="Stop Tweaking Strip Actions")
else: else:
layout.operator("nla.tweakmode_enter", text="Start Tweaking Strip Actions") layout.operator("nla.tweakmode_enter", text="Start Tweaking Strip Actions")

View File

@@ -66,8 +66,8 @@ class NODE_HT_header(bpy.types.Header):
scene = snode.id scene = snode.id
layout.prop(scene, "use_nodes") layout.prop(scene, "use_nodes")
layout.prop(scene.render, "free_unused_nodes", text="Free Unused") layout.prop(scene.render, "use_free_unused_nodes", text="Free Unused")
layout.prop(snode, "backdrop") layout.prop(snode, "show_backdrop")
layout.separator() layout.separator()
@@ -90,7 +90,7 @@ class NODE_MT_view(bpy.types.Menu):
layout.operator("node.view_all") layout.operator("node.view_all")
if context.space_data.backdrop: if context.space_data.show_backdrop:
layout.separator() layout.separator()
layout.operator("node.backimage_move",text = "Backdrop move") layout.operator("node.backimage_move",text = "Backdrop move")

View File

@@ -42,7 +42,7 @@ class OUTLINER_HT_header(bpy.types.Header):
layout.prop(space, "display_mode", text="") layout.prop(space, "display_mode", text="")
layout.prop(space, "display_filter", icon='VIEWZOOM', text="") layout.prop(space, "filter_text", icon='VIEWZOOM', text="")
layout.separator() layout.separator()
@@ -73,7 +73,7 @@ class OUTLINER_MT_view(bpy.types.Menu):
col = layout.column() col = layout.column()
if space.display_mode not in ('DATABLOCKS', 'USER_PREFERENCES', 'KEYMAPS'): if space.display_mode not in ('DATABLOCKS', 'USER_PREFERENCES', 'KEYMAPS'):
col.prop(space, "show_restriction_columns") col.prop(space, "show_restrict_columns")
col.separator() col.separator()
col.operator("outliner.show_active") col.operator("outliner.show_active")
@@ -96,8 +96,8 @@ class OUTLINER_MT_search(bpy.types.Menu):
col = layout.column() col = layout.column()
col.prop(space, "match_case_sensitive") col.prop(space, "use_filter_case_sensitive")
col.prop(space, "match_complete") col.prop(space, "use_filter_complete")
class OUTLINER_MT_edit_datablocks(bpy.types.Menu): class OUTLINER_MT_edit_datablocks(bpy.types.Menu):

View File

@@ -143,12 +143,12 @@ class SEQUENCER_MT_view(bpy.types.Menu):
layout.operator("sequencer.view_selected") layout.operator("sequencer.view_selected")
layout.prop(st, "draw_frames") layout.prop(st, "show_frames")
layout.prop(st, "show_cframe_indicator") layout.prop(st, "show_frame_indicator")
if st.display_mode == 'IMAGE': if st.display_mode == 'IMAGE':
layout.prop(st, "draw_safe_margin") layout.prop(st, "show_safe_margin")
if st.display_mode == 'WAVEFORM': if st.display_mode == 'WAVEFORM':
layout.prop(st, "separate_color_preview") layout.prop(st, "show_separate_color")
layout.separator() layout.separator()
layout.prop(st, "use_marker_sync") layout.prop(st, "use_marker_sync")
@@ -378,7 +378,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel):
row = col.row() row = col.row()
row.label(text="Final Length: %s" % bpy.utils.smpte_from_frame(strip.frame_final_length)) row.label(text="Final Length: %s" % bpy.utils.smpte_from_frame(strip.frame_final_length))
row = col.row() row = col.row()
row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_length) row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
row.label(text="Playhead: %d" % (frame_current - strip.frame_start)) row.label(text="Playhead: %d" % (frame_current - strip.frame_start))
col.label(text="Frame Offset %d:%d" % (strip.frame_offset_start, strip.frame_offset_end)) col.label(text="Frame Offset %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
@@ -452,10 +452,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel):
sub = row.row() sub = row.row()
sub.scale_x = 2.0 sub.scale_x = 2.0
if not context.screen.animation_playing: sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY')
sub.operator("screen.animation_play", text="", icon='PLAY')
else:
sub.operator("screen.animation_play", text="", icon='PAUSE')
row.label("Cut To") row.label("Cut To")
for i in range(1, strip.channel): for i in range(1, strip.channel):
@@ -620,7 +617,7 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel):
else: else:
row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack") row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack")
row.prop(strip.sound, "caching") row.prop(strip.sound, "use_memory_cache")
layout.prop(strip, "volume") layout.prop(strip, "volume")
layout.prop(strip, "attenuation") layout.prop(strip, "attenuation")
@@ -787,9 +784,9 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy.types.Panel):
col = layout.column() col = layout.column()
if st.display_mode == 'IMAGE': if st.display_mode == 'IMAGE':
col.prop(st, "draw_overexposed") # text="Zebra" col.prop(st, "draw_overexposed") # text="Zebra"
col.prop(st, "draw_safe_margin") col.prop(st, "show_safe_margin")
if st.display_mode == 'WAVEFORM': if st.display_mode == 'WAVEFORM':
col.prop(st, "separate_color_preview") col.prop(st, "show_separate_color")
col.prop(st, "proxy_render_size") col.prop(st, "proxy_render_size")
def register(): def register():

View File

@@ -40,7 +40,7 @@ class TEXT_HT_header(bpy.types.Header):
sub.menu("TEXT_MT_edit") sub.menu("TEXT_MT_edit")
sub.menu("TEXT_MT_format") sub.menu("TEXT_MT_format")
if text and text.modified: if text and text.is_modified:
row = layout.row() row = layout.row()
# row.color(redalert) # row.color(redalert)
row.operator("text.resolve_conflict", text="", icon='HELP') row.operator("text.resolve_conflict", text="", icon='HELP')
@@ -62,7 +62,7 @@ class TEXT_HT_header(bpy.types.Header):
row = layout.row() row = layout.row()
if text.filepath: if text.filepath:
if text.dirty: if text.is_dirty:
row.label(text="File: *%s (unsaved)" % text.filepath) row.label(text="File: *%s (unsaved)" % text.filepath)
else: else:
row.label(text="File: %s" % text.filepath) row.label(text="File: %s" % text.filepath)
@@ -85,7 +85,7 @@ class TEXT_PT_properties(bpy.types.Panel):
flow.prop(st, "show_word_wrap") flow.prop(st, "show_word_wrap")
flow.prop(st, "show_syntax_highlight") flow.prop(st, "show_syntax_highlight")
flow.prop(st, "show_line_highlight") flow.prop(st, "show_line_highlight")
flow.prop(st, "live_edit") flow.prop(st, "use_live_edit")
flow = layout.column_flow() flow = layout.column_flow()
flow.prop(st, "font_size") flow.prop(st, "font_size")
@@ -93,7 +93,7 @@ class TEXT_PT_properties(bpy.types.Panel):
text = st.text text = st.text
if text: if text:
flow.prop(text, "tabs_as_spaces") flow.prop(text, "use_tabs_as_spaces")
class TEXT_PT_find(bpy.types.Panel): class TEXT_PT_find(bpy.types.Panel):
@@ -125,8 +125,8 @@ class TEXT_PT_find(bpy.types.Panel):
# settings # settings
row = layout.row() row = layout.row()
row.prop(st, "find_wrap", text="Wrap") row.prop(st, "use_find_wrap", text="Wrap")
row.prop(st, "find_all", text="All") row.prop(st, "use_find_all", text="All")
class TEXT_MT_view(bpy.types.Menu): class TEXT_MT_view(bpy.types.Menu):

View File

@@ -46,8 +46,8 @@ class TIME_HT_header(bpy.types.Header):
row.prop(scene, "frame_start", text="Start") row.prop(scene, "frame_start", text="Start")
row.prop(scene, "frame_end", text="End") row.prop(scene, "frame_end", text="End")
else: else:
row.prop(scene, "preview_range_frame_start", text="Start") row.prop(scene, "frame_preview_start", text="Start")
row.prop(scene, "preview_range_frame_end", text="End") row.prop(scene, "frame_preview_end", text="End")
layout.prop(scene, "frame_current", text="") layout.prop(scene, "frame_current", text="")
@@ -67,17 +67,17 @@ class TIME_HT_header(bpy.types.Header):
row.operator("screen.frame_jump", text="", icon='FF').end = True row.operator("screen.frame_jump", text="", icon='FF').end = True
row = layout.row(align=True) row = layout.row(align=True)
row.prop(tools, "use_auto_keying", text="", toggle=True) row.prop(tools, "use_keyframe_insert_auto", text="", toggle=True)
if screen.animation_playing and tools.use_auto_keying: if screen.animation_playing and tools.use_keyframe_insert_auto:
subsub = row.row() subsub = row.row()
subsub.prop(tools, "record_with_nla", toggle=True) subsub.prop(tools, "use_record_with_nla", toggle=True)
layout.prop(scene, "sync_mode", text="") layout.prop(scene, "sync_mode", text="")
layout.separator() layout.separator()
row = layout.row(align=True) row = layout.row(align=True)
row.prop_object(scene, "active_keying_set", scene, "all_keying_sets", text="") row.prop_object(scene, "active_keying_set", scene, "keying_sets_all", text="")
row.operator("anim.keyframe_insert", text="", icon='KEY_HLT') row.operator("anim.keyframe_insert", text="", icon='KEY_HLT')
row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT') row.operator("anim.keyframe_delete", text="", icon='KEY_DEHLT')
@@ -95,8 +95,8 @@ class TIME_MT_view(bpy.types.Menu):
layout.separator() layout.separator()
layout.prop(st, "show_cframe_indicator") layout.prop(st, "show_frame_indicator")
layout.prop(st, "only_selected") layout.prop(st, "show_only_selected")
layout.separator() layout.separator()
@@ -166,20 +166,20 @@ class TIME_MT_playback(bpy.types.Menu):
st = context.space_data st = context.space_data
scene = context.scene scene = context.scene
layout.prop(st, "play_top_left") layout.prop(st, "use_play_top_left_3d_editor")
layout.prop(st, "play_all_3d") layout.prop(st, "use_play_3d_editors")
layout.prop(st, "play_anim") layout.prop(st, "use_play_animation_editors")
layout.prop(st, "play_buttons") layout.prop(st, "use_play_properties_editors")
layout.prop(st, "play_image") layout.prop(st, "use_play_image_editors")
layout.prop(st, "play_sequencer") layout.prop(st, "use_play_sequence_editors")
layout.prop(st, "play_nodes") layout.prop(st, "use_play_node_editors")
layout.separator() layout.separator()
layout.prop(scene, "frame_drop", text="Frame Dropping") layout.prop(scene, "use_frame_drop", text="Frame Dropping")
layout.prop(scene, "sync_audio", text="AV-sync", icon='SPEAKER') layout.prop(scene, "use_audio_sync", text="AV-sync", icon='SPEAKER')
layout.prop(scene, "mute_audio") layout.prop(scene, "use_audio")
layout.prop(scene, "scrub_audio") layout.prop(scene, "use_audio_scrub")
class TIME_MT_autokey(bpy.types.Menu): class TIME_MT_autokey(bpy.types.Menu):
@@ -189,8 +189,8 @@ class TIME_MT_autokey(bpy.types.Menu):
layout = self.layout layout = self.layout
tools = context.tool_settings tools = context.tool_settings
layout.prop_enum(tools, "autokey_mode", 'ADD_REPLACE_KEYS') layout.prop_enum(tools, "auto_keying_mode", 'ADD_REPLACE_KEYS')
layout.prop_enum(tools, "autokey_mode", 'REPLACE_KEYS') layout.prop_enum(tools, "auto_keying_mode", 'REPLACE_KEYS')
def register(): def register():
pass pass

View File

@@ -45,9 +45,9 @@ def ui_items_general(col, context):
colsub = padding.column() colsub = padding.column()
colsub.row().prop(context, "text") colsub.row().prop(context, "text")
colsub.row().prop(context, "text_sel") colsub.row().prop(context, "text_sel")
colsub.prop(context, "shaded") colsub.prop(context, "show_shaded")
subsub = colsub.column(align=True) subsub = colsub.column(align=True)
subsub.active = context.shaded subsub.active = context.show_shaded
subsub.prop(context, "shadetop") subsub.prop(context, "shadetop")
subsub.prop(context, "shadedown") subsub.prop(context, "shadedown")
@@ -57,10 +57,7 @@ def ui_items_general(col, context):
def opengl_lamp_buttons(column, lamp): def opengl_lamp_buttons(column, lamp):
split = column.split(percentage=0.1) split = column.split(percentage=0.1)
if lamp.enabled == True: split.prop(lamp, "use", text="", icon='OUTLINER_OB_LAMP' if lamp.enabled else 'LAMP_DATA')
split.prop(lamp, "enabled", text="", icon='OUTLINER_OB_LAMP')
else:
split.prop(lamp, "enabled", text="", icon='LAMP_DATA')
col = split.column() col = split.column()
col.active = lamp.enabled col.active = lamp.enabled
@@ -154,12 +151,12 @@ class USERPREF_PT_interface(bpy.types.Panel):
col = row.column() col = row.column()
col.label(text="Display:") col.label(text="Display:")
col.prop(view, "tooltips") col.prop(view, "show_tooltips")
col.prop(view, "display_object_info", text="Object Info") col.prop(view, "show_object_info", text="Object Info")
col.prop(view, "use_large_cursors") col.prop(view, "show_large_cursors")
col.prop(view, "show_view_name", text="View Name") col.prop(view, "show_view_name", text="View Name")
col.prop(view, "show_playback_fps", text="Playback FPS") col.prop(view, "show_playback_fps", text="Playback FPS")
col.prop(view, "global_scene") col.prop(view, "use_global_scene")
col.prop(view, "object_origin_size") col.prop(view, "object_origin_size")
col.separator() col.separator()
@@ -178,14 +175,14 @@ class USERPREF_PT_interface(bpy.types.Panel):
col = row.column() col = row.column()
col.label(text="View Manipulation:") col.label(text="View Manipulation:")
col.prop(view, "auto_depth") col.prop(view, "use_mouse_auto_depth")
col.prop(view, "zoom_to_mouse") col.prop(view, "use_zoom_to_mouse")
col.prop(view, "rotate_around_selection") col.prop(view, "use_rotate_around_active")
col.prop(view, "global_pivot") col.prop(view, "use_global_pivot")
col.separator() col.separator()
col.prop(view, "auto_perspective") col.prop(view, "use_auto_perspective")
col.prop(view, "smooth_view") col.prop(view, "smooth_view")
col.prop(view, "rotation_angle") col.prop(view, "rotation_angle")
@@ -200,7 +197,7 @@ class USERPREF_PT_interface(bpy.types.Panel):
col.separator() col.separator()
col.label(text="2D Viewports:") col.label(text="2D Viewports:")
col.prop(view, "view2d_grid_minimum_spacing", text="Minimum Grid Spacing") col.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing")
col.prop(view, "timecode_style") col.prop(view, "timecode_style")
row.separator() row.separator()
@@ -209,13 +206,13 @@ class USERPREF_PT_interface(bpy.types.Panel):
col = row.column() col = row.column()
#Toolbox doesn't exist yet #Toolbox doesn't exist yet
#col.label(text="Toolbox:") #col.label(text="Toolbox:")
#col.prop(view, "use_column_layout") #col.prop(view, "show_column_layout")
#col.label(text="Open Toolbox Delay:") #col.label(text="Open Toolbox Delay:")
#col.prop(view, "open_left_mouse_delay", text="Hold LMB") #col.prop(view, "open_left_mouse_delay", text="Hold LMB")
#col.prop(view, "open_right_mouse_delay", text="Hold RMB") #col.prop(view, "open_right_mouse_delay", text="Hold RMB")
col.prop(view, "use_manipulator") col.prop(view, "show_manipulator")
sub = col.column() sub = col.column()
sub.active = view.use_manipulator sub.active = view.show_manipulator
sub.prop(view, "manipulator_size", text="Size") sub.prop(view, "manipulator_size", text="Size")
sub.prop(view, "manipulator_handle_size", text="Handle Size") sub.prop(view, "manipulator_handle_size", text="Handle Size")
sub.prop(view, "manipulator_hotspot", text="Hotspot") sub.prop(view, "manipulator_hotspot", text="Hotspot")
@@ -225,7 +222,7 @@ class USERPREF_PT_interface(bpy.types.Panel):
col.separator() col.separator()
col.label(text="Menus:") col.label(text="Menus:")
col.prop(view, "open_mouse_over") col.prop(view, "use_mouse_over_open")
col.label(text="Menu Open Delay:") col.label(text="Menu Open Delay:")
col.prop(view, "open_toplevel_delay", text="Top Level") col.prop(view, "open_toplevel_delay", text="Top Level")
col.prop(view, "open_sublevel_delay", text="Sub Level") col.prop(view, "open_sublevel_delay", text="Sub Level")
@@ -263,7 +260,7 @@ class USERPREF_PT_edit(bpy.types.Panel):
col.separator() col.separator()
col.label(text="New Objects:") col.label(text="New Objects:")
col.prop(edit, "enter_edit_mode") col.prop(edit, "use_enter_edit_mode")
col.label(text="Align To:") col.label(text="Align To:")
col.prop(edit, "object_align", text="") col.prop(edit, "object_align", text="")
@@ -272,7 +269,7 @@ class USERPREF_PT_edit(bpy.types.Panel):
col.separator() col.separator()
col.label(text="Undo:") col.label(text="Undo:")
col.prop(edit, "global_undo") col.prop(edit, "use_global_undo")
col.prop(edit, "undo_steps", text="Steps") col.prop(edit, "undo_steps", text="Steps")
col.prop(edit, "undo_memory_limit", text="Memory Limit") col.prop(edit, "undo_memory_limit", text="Memory Limit")
@@ -283,9 +280,9 @@ class USERPREF_PT_edit(bpy.types.Panel):
col.label(text="Grease Pencil:") col.label(text="Grease Pencil:")
col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance") col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance") col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
#col.prop(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke") #col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius") col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
col.prop(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke") col.prop(edit, "use_grease_pencil_smooth_stroke", text="Smooth Stroke")
col.separator() col.separator()
col.separator() col.separator()
col.separator() col.separator()
@@ -298,7 +295,7 @@ class USERPREF_PT_edit(bpy.types.Panel):
col = row.column() col = row.column()
col.label(text="Keyframing:") col.label(text="Keyframing:")
col.prop(edit, "use_visual_keying") col.prop(edit, "use_visual_keying")
col.prop(edit, "keyframe_insert_needed", text="Only Insert Needed") col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
col.separator() col.separator()
@@ -306,48 +303,48 @@ class USERPREF_PT_edit(bpy.types.Panel):
sub = col.column() sub = col.column()
# sub.active = edit.use_auto_keying # incorrect, timeline can enable # sub.active = edit.use_keyframe_insert_auto # incorrect, timeline can enable
sub.prop(edit, "auto_keyframe_insert_keyingset", text="Only Insert for Keying Set") sub.prop(edit, "use_keyframe_insert_keyingset", text="Only Insert for Keying Set")
sub.prop(edit, "auto_keyframe_insert_available", text="Only Insert Available") sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
col.separator() col.separator()
col.label(text="New F-Curve Defaults:") col.label(text="New F-Curve Defaults:")
col.prop(edit, "keyframe_new_interpolation_type", text="Interpolation") col.prop(edit, "keyframe_new_interpolation_type", text="Interpolation")
col.prop(edit, "keyframe_new_handle_type", text="Handles") col.prop(edit, "keyframe_new_handle_type", text="Handles")
col.prop(edit, "insertkey_xyz_to_rgb", text="XYZ to RGB") col.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
col.separator() col.separator()
col.separator() col.separator()
col.separator() col.separator()
col.label(text="Transform:") col.label(text="Transform:")
col.prop(edit, "drag_immediately") col.prop(edit, "use_drag_immediately")
row.separator() row.separator()
row.separator() row.separator()
col = row.column() col = row.column()
row = col.row(align=True) row = col.row(align=True)
row.prop(edit, "sculpt_paint_overlay_col", text="Sculpt Overlay Color") row.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color")
col.separator() col.separator()
col.separator() col.separator()
col.separator() col.separator()
col.label(text="Duplicate Data:") col.label(text="Duplicate Data:")
col.prop(edit, "duplicate_mesh", text="Mesh") col.prop(edit, "use_duplicate_mesh", text="Mesh")
col.prop(edit, "duplicate_surface", text="Surface") col.prop(edit, "use_duplicate_surface", text="Surface")
col.prop(edit, "duplicate_curve", text="Curve") col.prop(edit, "use_duplicate_curve", text="Curve")
col.prop(edit, "duplicate_text", text="Text") col.prop(edit, "use_duplicate_text", text="Text")
col.prop(edit, "duplicate_metaball", text="Metaball") col.prop(edit, "use_duplicate_metaball", text="Metaball")
col.prop(edit, "duplicate_armature", text="Armature") col.prop(edit, "use_duplicate_armature", text="Armature")
col.prop(edit, "duplicate_lamp", text="Lamp") col.prop(edit, "use_duplicate_lamp", text="Lamp")
col.prop(edit, "duplicate_material", text="Material") col.prop(edit, "use_duplicate_material", text="Material")
col.prop(edit, "duplicate_texture", text="Texture") col.prop(edit, "use_duplicate_texture", text="Texture")
#col.prop(edit, "duplicate_fcurve", text="F-Curve") #col.prop(edit, "use_duplicate_fcurve", text="F-Curve")
col.prop(edit, "duplicate_action", text="Action") col.prop(edit, "use_duplicate_action", text="Action")
col.prop(edit, "duplicate_particle", text="Particle") col.prop(edit, "use_duplicate_particle", text="Particle")
class USERPREF_PT_system(bpy.types.Panel): class USERPREF_PT_system(bpy.types.Panel):
@@ -379,8 +376,8 @@ class USERPREF_PT_system(bpy.types.Panel):
col.prop(system, "dpi") col.prop(system, "dpi")
col.prop(system, "frame_server_port") col.prop(system, "frame_server_port")
col.prop(system, "scrollback", text="Console Scrollback") col.prop(system, "scrollback", text="Console Scrollback")
col.prop(system, "auto_execute_scripts") col.prop(system, "use_scripts_auto_execute")
col.prop(system, "tabs_as_spaces") col.prop(system, "use_tabs_as_spaces")
col.separator() col.separator()
col.separator() col.separator()
@@ -390,7 +387,7 @@ class USERPREF_PT_system(bpy.types.Panel):
col.row().prop(system, "audio_device", expand=True) col.row().prop(system, "audio_device", expand=True)
sub = col.column() sub = col.column()
sub.active = system.audio_device != 'NONE' sub.active = system.audio_device != 'NONE'
#sub.prop(system, "enable_all_codecs") #sub.prop(system, "use_preview_images")
sub.prop(system, "audio_channels", text="Channels") sub.prop(system, "audio_channels", text="Channels")
sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer") sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer")
sub.prop(system, "audio_sample_rate", text="Sample Rate") sub.prop(system, "audio_sample_rate", text="Sample Rate")
@@ -413,9 +410,9 @@ class USERPREF_PT_system(bpy.types.Panel):
# No translation in 2.5 yet # No translation in 2.5 yet
#col.prop(system, "language") #col.prop(system, "language")
#col.label(text="Translate:") #col.label(text="Translate:")
#col.prop(system, "translate_tooltips", text="Tooltips") #col.prop(system, "use_translate_tooltips", text="Tooltips")
#col.prop(system, "translate_buttons", text="Labels") #col.prop(system, "use_translate_buttons", text="Labels")
#col.prop(system, "translate_toolbox", text="Toolbox") #col.prop(system, "use_translate_toolbox", text="Toolbox")
#col.separator() #col.separator()
@@ -428,9 +425,9 @@ class USERPREF_PT_system(bpy.types.Panel):
col = colsplit.column() col = colsplit.column()
col.label(text="OpenGL:") col.label(text="OpenGL:")
col.prop(system, "clip_alpha", slider=True) col.prop(system, "gl_clip_alpha", slider=True)
col.prop(system, "use_mipmaps") col.prop(system, "use_mipmaps")
col.prop(system, "use_vbos") col.prop(system, "use_vertex_buffer_objects")
#Anti-aliasing is disabled as it breaks broder/lasso select #Anti-aliasing is disabled as it breaks broder/lasso select
#col.prop(system, "use_antialiasing") #col.prop(system, "use_antialiasing")
col.label(text="Window Draw Method:") col.label(text="Window Draw Method:")
@@ -686,13 +683,13 @@ class USERPREF_PT_file(bpy.types.Panel):
sub.label(text="Animation Player:") sub.label(text="Animation Player:")
sub = col1.column() sub = col1.column()
sub.prop(paths, "fonts_directory", text="") sub.prop(paths, "font_directory", text="")
sub.prop(paths, "textures_directory", text="") sub.prop(paths, "texture_directory", text="")
sub.prop(paths, "texture_plugin_directory", text="") sub.prop(paths, "texture_plugin_directory", text="")
sub.prop(paths, "sequence_plugin_directory", text="") sub.prop(paths, "sequence_plugin_directory", text="")
sub.prop(paths, "render_output_directory", text="") sub.prop(paths, "render_output_directory", text="")
sub.prop(paths, "python_scripts_directory", text="") sub.prop(paths, "script_directory", text="")
sub.prop(paths, "sounds_directory", text="") sub.prop(paths, "sound_directory", text="")
sub.prop(paths, "temporary_directory", text="") sub.prop(paths, "temporary_directory", text="")
sub.prop(paths, "image_editor", text="") sub.prop(paths, "image_editor", text="")
subsplit = sub.split(percentage=0.3) subsplit = sub.split(percentage=0.3)
@@ -702,10 +699,10 @@ class USERPREF_PT_file(bpy.types.Panel):
col = split.column() col = split.column()
col.label(text="Save & Load:") col.label(text="Save & Load:")
col.prop(paths, "use_relative_paths") col.prop(paths, "use_relative_paths")
col.prop(paths, "compress_file") col.prop(paths, "use_file_compression")
col.prop(paths, "load_ui") col.prop(paths, "use_load_ui")
col.prop(paths, "filter_file_extensions") col.prop(paths, "use_filter_files")
col.prop(paths, "hide_dot_files_datablocks") col.prop(paths, "show_hidden_files_datablocks")
col.separator() col.separator()
col.separator() col.separator()
@@ -713,10 +710,10 @@ class USERPREF_PT_file(bpy.types.Panel):
col.label(text="Auto Save:") col.label(text="Auto Save:")
col.prop(paths, "save_version") col.prop(paths, "save_version")
col.prop(paths, "recent_files") col.prop(paths, "recent_files")
col.prop(paths, "save_preview_images") col.prop(paths, "use_save_preview_images")
col.prop(paths, "auto_save_temporary_files") col.prop(paths, "use_auto_save_temporary_files")
sub = col.column() sub = col.column()
sub.active = paths.auto_save_temporary_files sub.active = paths.use_auto_save_temporary_files
sub.prop(paths, "auto_save_time", text="Timer (mins)") sub.prop(paths, "auto_save_time", text="Timer (mins)")
from space_userpref_keymap import InputKeyMapPanel from space_userpref_keymap import InputKeyMapPanel
@@ -746,38 +743,38 @@ class USERPREF_PT_input(InputKeyMapPanel):
sub.label(text="Mouse:") sub.label(text="Mouse:")
sub1 = sub.column() sub1 = sub.column()
sub1.active = (inputs.select_mouse == 'RIGHT') sub1.active = (inputs.select_mouse == 'RIGHT')
sub1.prop(inputs, "emulate_3_button_mouse") sub1.prop(inputs, "use_mouse_emulate_3_button")
sub.prop(inputs, "continuous_mouse") sub.prop(inputs, "use_mouse_continuous")
sub.label(text="Select With:") sub.label(text="Select With:")
sub.row().prop(inputs, "select_mouse", expand=True) sub.row().prop(inputs, "select_mouse", expand=True)
sub = col.column() sub = col.column()
sub.label(text="Double Click:") sub.label(text="Double Click:")
sub.prop(inputs, "double_click_time", text="Speed") sub.prop(inputs, "mouse_double_click_time", text="Speed")
sub.separator() sub.separator()
sub.prop(inputs, "emulate_numpad") sub.prop(inputs, "use_emulate_numpad")
sub.separator() sub.separator()
sub.label(text="Orbit Style:") sub.label(text="Orbit Style:")
sub.row().prop(inputs, "view_rotation", expand=True) sub.row().prop(inputs, "view_rotate_method", expand=True)
sub.label(text="Zoom Style:") sub.label(text="Zoom Style:")
sub.row().prop(inputs, "zoom_style", text="") sub.row().prop(inputs, "view_zoom_method", text="")
if inputs.zoom_style == 'DOLLY': if inputs.view_zoom_method == 'DOLLY':
sub.row().prop(inputs, "zoom_axis", expand=True) sub.row().prop(inputs, "view_zoom_axis", expand=True)
sub.prop(inputs, "invert_zoom_direction") sub.prop(inputs, "invert_mouse_wheel_zoom")
#sub.prop(inputs, "use_middle_mouse_paste") #sub.prop(inputs, "use_mouse_mmb_paste")
#col.separator() #col.separator()
sub = col.column() sub = col.column()
sub.label(text="Mouse Wheel:") sub.label(text="Mouse Wheel:")
sub.prop(inputs, "wheel_invert_zoom", text="Invert Wheel Zoom Direction") sub.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
#sub.prop(view, "wheel_scroll_lines", text="Scroll Lines") #sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
col.separator() col.separator()
@@ -978,7 +975,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
colsub = box.column() colsub = box.column()
row = colsub.row() row = colsub.row()
row.operator("wm.addon_expand", icon='TRIA_DOWN' if info["expanded"] else 'TRIA_RIGHT', emboss=False).module = module_name row.operator("wm.addon_expand", icon='TRIA_DOWN' if info["show_expanded"] else 'TRIA_RIGHT', emboss=False).module = module_name
rowsub = row.row() rowsub = row.row()
rowsub.active = is_enabled rowsub.active = is_enabled
@@ -990,7 +987,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
row.operator("wm.addon_enable", icon='CHECKBOX_DEHLT', text="", emboss=False).module = module_name row.operator("wm.addon_enable", icon='CHECKBOX_DEHLT', text="", emboss=False).module = module_name
# Expanded UI (only if additional infos are available) # Expanded UI (only if additional infos are available)
if info["expanded"]: if info["show_expanded"]:
if info["description"]: if info["description"]:
split = colsub.row().split(percentage=0.15) split = colsub.row().split(percentage=0.15)
split.label(text='Description:') split.label(text='Description:')
@@ -1047,7 +1044,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
from bpy.props import * from bpy.props import *
def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "blender": "", "location": "", "description": "", "wiki_url": "", "tracker_url": "", "category": "", "warning": "", "expanded": False}): def addon_info_get(mod, info_basis={"name": "", "author": "", "version": "", "blender": "", "location": "", "description": "", "wiki_url": "", "tracker_url": "", "category": "", "warning": "", "show_expanded": False}):
addon_info = getattr(mod, "bl_addon_info", {}) addon_info = getattr(mod, "bl_addon_info", {})
# avoid re-initializing # avoid re-initializing
@@ -1216,7 +1213,7 @@ class WM_OT_addon_expand(bpy.types.Operator):
return {'CANCELLED'} return {'CANCELLED'}
info = addon_info_get(mod) info = addon_info_get(mod)
info["expanded"] = not info["expanded"] info["show_expanded"] = not info["show_expanded"]
return {'FINISHED'} return {'FINISHED'}

View File

@@ -167,39 +167,39 @@ class InputKeyMapPanel(bpy.types.Panel):
col = self.indented_layout(layout, level) col = self.indented_layout(layout, level)
row = col.row() row = col.row()
row.prop(km, "children_expanded", text="", emboss=False) row.prop(km, "show_expanded_children", text="", emboss=False)
row.label(text=km.name) row.label(text=km.name)
row.label() row.label()
row.label() row.label()
if km.modal: if km.is_modal:
row.label(text="", icon='LINKED') row.label(text="", icon='LINKED')
if km.user_defined: if km.is_user_defined:
op = row.operator("wm.keymap_restore", text="Restore") op = row.operator("wm.keymap_restore", text="Restore")
else: else:
op = row.operator("wm.keymap_edit", text="Edit") op = row.operator("wm.keymap_edit", text="Edit")
if km.children_expanded: if km.show_expanded_children:
if children: if children:
# Put the Parent key map's entries in a 'global' sub-category # Put the Parent key map's entries in a 'global' sub-category
# equal in hierarchy to the other children categories # equal in hierarchy to the other children categories
subcol = self.indented_layout(col, level + 1) subcol = self.indented_layout(col, level + 1)
subrow = subcol.row() subrow = subcol.row()
subrow.prop(km, "items_expanded", text="", emboss=False) subrow.prop(km, "show_expanded_items", text="", emboss=False)
subrow.label(text="%s (Global)" % km.name) subrow.label(text="%s (Global)" % km.name)
else: else:
km.items_expanded = True km.show_expanded_items = True
# Key Map items # Key Map items
if km.items_expanded: if km.show_expanded_items:
for kmi in km.items: for kmi in km.items:
self.draw_kmi(display_keymaps, kc, km, kmi, col, level + 1) self.draw_kmi(display_keymaps, kc, km, kmi, col, level + 1)
# "Add New" at end of keymap item list # "Add New" at end of keymap item list
col = self.indented_layout(col, level + 1) col = self.indented_layout(col, level + 1)
subcol = col.split(percentage=0.2).column() subcol = col.split(percentage=0.2).column()
subcol.enabled = km.user_defined subcol.enabled = km.is_user_defined
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN') op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
col.separator() col.separator()
@@ -217,7 +217,7 @@ class InputKeyMapPanel(bpy.types.Panel):
col = self.indented_layout(layout, level) col = self.indented_layout(layout, level)
if km.user_defined: if km.is_user_defined:
col = col.column(align=True) col = col.column(align=True)
box = col.box() box = col.box()
else: else:
@@ -227,19 +227,19 @@ class InputKeyMapPanel(bpy.types.Panel):
# header bar # header bar
row = split.row() row = split.row()
row.prop(kmi, "expanded", text="", emboss=False) row.prop(kmi, "show_expanded", text="", emboss=False)
row = split.row() row = split.row()
row.enabled = km.user_defined row.enabled = km.is_user_defined
row.prop(kmi, "active", text="", emboss=False) row.prop(kmi, "active", text="", emboss=False)
if km.modal: if km.is_modal:
row.prop(kmi, "propvalue", text="") row.prop(kmi, "propvalue", text="")
else: else:
row.label(text=kmi.name) row.label(text=kmi.name)
row = split.row() row = split.row()
row.enabled = km.user_defined row.enabled = km.is_user_defined
row.prop(kmi, "map_type", text="") row.prop(kmi, "map_type", text="")
if map_type == 'KEYBOARD': if map_type == 'KEYBOARD':
row.prop(kmi, "type", text="", full_event=True) row.prop(kmi, "type", text="", full_event=True)
@@ -261,16 +261,16 @@ class InputKeyMapPanel(bpy.types.Panel):
op.item_id = kmi.id op.item_id = kmi.id
# Expanded, additional event settings # Expanded, additional event settings
if kmi.expanded: if kmi.show_expanded:
box = col.box() box = col.box()
box.enabled = km.user_defined box.enabled = km.is_user_defined
if map_type not in ('TEXTINPUT', 'TIMER'): if map_type not in ('TEXTINPUT', 'TIMER'):
split = box.split(percentage=0.4) split = box.split(percentage=0.4)
sub = split.row() sub = split.row()
if km.modal: if km.is_modal:
sub.prop(kmi, "propvalue", text="") sub.prop(kmi, "propvalue", text="")
else: else:
sub.prop(kmi, "idname", text="") sub.prop(kmi, "idname", text="")
@@ -313,7 +313,7 @@ class InputKeyMapPanel(bpy.types.Panel):
display_properties(props) display_properties(props)
# Modal key maps attached to this operator # Modal key maps attached to this operator
if not km.modal: if not km.is_modal:
kmm = kc.find_keymap_modal(kmi.idname) kmm = kc.find_keymap_modal(kmi.idname)
if kmm: if kmm:
self.draw_km(display_keymaps, kc, kmm, None, layout, level + 1) self.draw_km(display_keymaps, kc, kmm, None, layout, level + 1)
@@ -335,7 +335,7 @@ class InputKeyMapPanel(bpy.types.Panel):
row.label() row.label()
row.label() row.label()
if km.user_defined: if km.is_user_defined:
op = row.operator("wm.keymap_restore", text="Restore") op = row.operator("wm.keymap_restore", text="Restore")
else: else:
op = row.operator("wm.keymap_edit", text="Edit") op = row.operator("wm.keymap_edit", text="Edit")
@@ -346,7 +346,7 @@ class InputKeyMapPanel(bpy.types.Panel):
# "Add New" at end of keymap item list # "Add New" at end of keymap item list
col = self.indented_layout(layout, 1) col = self.indented_layout(layout, 1)
subcol = col.split(percentage=0.2).column() subcol = col.split(percentage=0.2).column()
subcol.enabled = km.user_defined subcol.enabled = km.is_user_defined
op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN') op = subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
def draw_hierarchy(self, display_keymaps, layout): def draw_hierarchy(self, display_keymaps, layout):
@@ -369,13 +369,13 @@ class InputKeyMapPanel(bpy.types.Panel):
layout.set_context_pointer("keyconfig", wm.active_keyconfig) layout.set_context_pointer("keyconfig", wm.active_keyconfig)
row.operator("wm.keyconfig_remove", text="", icon='X') row.operator("wm.keyconfig_remove", text="", icon='X')
row.prop(context.space_data, "filter", icon="VIEWZOOM") row.prop(context.space_data, "filter_text", icon="VIEWZOOM")
col.separator() col.separator()
display_keymaps = _merge_keymaps(kc, defkc) display_keymaps = _merge_keymaps(kc, defkc)
if context.space_data.filter != "": if context.space_data.filter_text != "":
filter = context.space_data.filter.lower() filter_text = context.space_data.filter_text.lower()
self.draw_filtered(display_keymaps, filter, col) self.draw_filtered(display_keymaps, filter, col)
else: else:
self.draw_hierarchy(display_keymaps, col) self.draw_hierarchy(display_keymaps, col)
@@ -409,7 +409,7 @@ class WM_OT_keyconfig_test(bpy.types.Operator):
result = False result = False
def kmistr(kmi): def kmistr(kmi):
if km.modal: if km.is_modal:
s = ["kmi = km.items.add_modal(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value)] s = ["kmi = km.items.add_modal(\'%s\', \'%s\', \'%s\'" % (kmi.propvalue, kmi.type, kmi.value)]
else: else:
s = ["kmi = km.items.add(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value)] s = ["kmi = km.items.add(\'%s\', \'%s\', \'%s\'" % (kmi.idname, kmi.type, kmi.value)]
@@ -636,9 +636,9 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
km = km.active() km = km.active()
f.write("# Map %s\n" % km.name) 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)) 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.is_modal))
for kmi in km.items: for kmi in km.items:
if km.modal: if km.is_modal:
f.write("kmi = km.items.add_modal('%s', '%s', '%s'" % (kmi.propvalue, kmi.type, kmi.value)) f.write("kmi = km.items.add_modal('%s', '%s', '%s'" % (kmi.propvalue, kmi.type, kmi.value))
else: else:
f.write("kmi = km.items.add('%s', '%s', '%s'" % (kmi.idname, kmi.type, kmi.value)) f.write("kmi = km.items.add('%s', '%s', '%s'" % (kmi.idname, kmi.type, kmi.value))
@@ -733,16 +733,16 @@ class WM_OT_keyitem_add(bpy.types.Operator):
km = context.keymap km = context.keymap
kc = wm.default_keyconfig kc = wm.default_keyconfig
if km.modal: if km.is_modal:
km.items.add_modal("", 'A', 'PRESS') # kmi km.items.add_modal("", 'A', 'PRESS') # kmi
else: else:
km.items.add("none", 'A', 'PRESS') # kmi km.items.add("none", 'A', 'PRESS') # kmi
# clear filter and expand keymap so we can see the newly added item # clear filter and expand keymap so we can see the newly added item
if context.space_data.filter != '': if context.space_data.filter_text != "":
context.space_data.filter = '' context.space_data.filter_text = ""
km.items_expanded = True km.show_expanded_items = True
km.children_expanded = True km.show_expanded_children = True
return {'FINISHED'} return {'FINISHED'}
@@ -770,7 +770,7 @@ class WM_OT_keyconfig_remove(bpy.types.Operator):
@classmethod @classmethod
def poll(cls, context): def poll(cls, context):
wm = context.manager wm = context.manager
return wm.active_keyconfig.user_defined return wm.active_keyconfig.is_user_defined
def execute(self, context): def execute(self, context):
import sys import sys

View File

@@ -60,9 +60,9 @@ class VIEW3D_HT_header(bpy.types.Header):
''' '''
if obj and obj.mode == 'EDIT' and obj.type == 'MESH': if obj and obj.mode == 'EDIT' and obj.type == 'MESH':
row_sub = row.row(align=True) row_sub = row.row(align=True)
row_sub.prop(toolsettings, "mesh_selection_mode", text="", index=0, icon='VERTEXSEL') row_sub.prop(toolsettings, "mesh_select_mode", text="", index=0, icon='VERTEXSEL')
row_sub.prop(toolsettings, "mesh_selection_mode", text="", index=1, icon='EDGESEL') row_sub.prop(toolsettings, "mesh_select_mode", text="", index=1, icon='EDGESEL')
row_sub.prop(toolsettings, "mesh_selection_mode", text="", index=2, icon='FACESEL') row_sub.prop(toolsettings, "mesh_select_mode", text="", index=2, icon='FACESEL')
''' '''
if obj: if obj:
@@ -71,33 +71,33 @@ class VIEW3D_HT_header(bpy.types.Header):
row.prop(toolsettings.particle_edit, "selection_mode", text="", expand=True, toggle=True) row.prop(toolsettings.particle_edit, "selection_mode", text="", expand=True, toggle=True)
# Occlude geometry # Occlude geometry
if view.viewport_shading in ('SOLID', 'SHADED', 'TEXTURED') and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')): if view.viewport_shade in ('SOLID', 'SHADED', 'TEXTURED') and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')):
row.prop(view, "occlude_geometry", text="") row.prop(view, "use_occlude_geometry", text="")
# Proportional editing # Proportional editing
if obj.mode in ('EDIT', 'PARTICLE_EDIT'): if obj.mode in ('EDIT', 'PARTICLE_EDIT'):
row = layout.row(align=True) row = layout.row(align=True)
row.prop(toolsettings, "proportional_editing", text="", icon_only=True) row.prop(toolsettings, "proportional_edit", text="", icon_only=True)
if toolsettings.proportional_editing != 'DISABLED': if toolsettings.proportional_edit != 'DISABLED':
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True) row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
elif obj.mode == 'OBJECT': elif obj.mode == 'OBJECT':
row = layout.row(align=True) row = layout.row(align=True)
row.prop(toolsettings, "proportional_editing_objects", text="", icon_only=True) row.prop(toolsettings, "use_proportional_edit_objects", text="", icon_only=True)
if toolsettings.proportional_editing_objects: if toolsettings.use_proportional_edit_objects:
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True) row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
# Snap # Snap
row = layout.row(align=True) row = layout.row(align=True)
row.prop(toolsettings, "snap", text="") row.prop(toolsettings, "use_snap", text="")
row.prop(toolsettings, "snap_element", text="", icon_only=True) row.prop(toolsettings, "snap_element", text="", icon_only=True)
if toolsettings.snap_element != 'INCREMENT': if toolsettings.snap_element != 'INCREMENT':
row.prop(toolsettings, "snap_target", text="") row.prop(toolsettings, "snap_target", text="")
if obj and obj.mode == 'OBJECT': if obj and obj.mode == 'OBJECT':
row.prop(toolsettings, "snap_align_rotation", text="") row.prop(toolsettings, "use_snap_align_rotation", text="")
if toolsettings.snap_element == 'VOLUME': if toolsettings.snap_element == 'VOLUME':
row.prop(toolsettings, "snap_peel_object", text="") row.prop(toolsettings, "use_snap_peel_object", text="")
elif toolsettings.snap_element == 'FACE': elif toolsettings.snap_element == 'FACE':
row.prop(toolsettings, "snap_project", text="") row.prop(toolsettings, "use_snap_project", text="")
# OpenGL render # OpenGL render
row = layout.row(align=True) row = layout.row(align=True)
@@ -489,7 +489,7 @@ class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
layout.operator("mesh.select_by_number_vertices", text="Triangles").type = 'TRIANGLES' layout.operator("mesh.select_by_number_vertices", text="Triangles").type = 'TRIANGLES'
layout.operator("mesh.select_by_number_vertices", text="Quads").type = 'QUADS' layout.operator("mesh.select_by_number_vertices", text="Quads").type = 'QUADS'
if context.scene.tool_settings.mesh_selection_mode[2] == False: if context.scene.tool_settings.mesh_select_mode[2] == False:
layout.operator("mesh.select_non_manifold", text="Non Manifold") layout.operator("mesh.select_non_manifold", text="Non Manifold")
layout.operator("mesh.select_by_number_vertices", text="Loose Verts/Edges").type = 'OTHER' layout.operator("mesh.select_by_number_vertices", text="Loose Verts/Edges").type = 'OTHER'
layout.operator("mesh.select_similar", text="Similar") layout.operator("mesh.select_similar", text="Similar")
@@ -1296,9 +1296,9 @@ class VIEW3D_MT_edit_mesh(bpy.types.Menu):
layout.separator() layout.separator()
layout.prop(settings, "automerge_editing") layout.prop(settings, "use_mesh_automerge")
layout.prop_menu_enum(settings, "proportional_editing") layout.prop_menu_enum(settings, "proportional_edit")
layout.prop_menu_enum(settings, "proportional_editing_falloff") layout.prop_menu_enum(settings, "proportional_edit_falloff")
layout.separator() layout.separator()
@@ -1340,15 +1340,15 @@ class VIEW3D_MT_edit_mesh_selection_mode(bpy.types.Menu):
prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL') prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
prop.value = "(True, False, False)" prop.value = "(True, False, False)"
prop.data_path = "tool_settings.mesh_selection_mode" prop.data_path = "tool_settings.mesh_select_mode"
prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL') prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
prop.value = "(False, True, False)" prop.value = "(False, True, False)"
prop.data_path = "tool_settings.mesh_selection_mode" prop.data_path = "tool_settings.mesh_select_mode"
prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL') prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
prop.value = "(False, False, True)" prop.value = "(False, False, True)"
prop.data_path = "tool_settings.mesh_selection_mode" prop.data_path = "tool_settings.mesh_select_mode"
class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu): class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu):
@@ -1357,7 +1357,7 @@ class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu):
@staticmethod @staticmethod
def extrude_options(context): def extrude_options(context):
mesh = context.object.data mesh = context.object.data
selection_mode = context.tool_settings.mesh_selection_mode selection_mode = context.tool_settings.mesh_select_mode
totface = mesh.total_face_sel totface = mesh.total_face_sel
totedge = mesh.total_edge_sel totedge = mesh.total_edge_sel
@@ -1439,7 +1439,7 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(bpy.types.Operator):
def execute(self, context): def execute(self, context):
mesh = context.object.data mesh = context.object.data
selection_mode = context.tool_settings.mesh_selection_mode selection_mode = context.tool_settings.mesh_select_mode
totface = mesh.total_face_sel totface = mesh.total_face_sel
totedge = mesh.total_edge_sel totedge = mesh.total_edge_sel
@@ -1640,8 +1640,8 @@ def draw_curve(self, context):
layout.separator() layout.separator()
layout.prop_menu_enum(settings, "proportional_editing") layout.prop_menu_enum(settings, "proportional_edit")
layout.prop_menu_enum(settings, "proportional_editing_falloff") layout.prop_menu_enum(settings, "proportional_edit_falloff")
layout.separator() layout.separator()
@@ -1788,8 +1788,8 @@ class VIEW3D_MT_edit_meta(bpy.types.Menu):
layout.separator() layout.separator()
layout.prop_menu_enum(settings, "proportional_editing") layout.prop_menu_enum(settings, "proportional_edit")
layout.prop_menu_enum(settings, "proportional_editing_falloff") layout.prop_menu_enum(settings, "proportional_edit_falloff")
layout.separator() layout.separator()
@@ -1825,8 +1825,8 @@ class VIEW3D_MT_edit_lattice(bpy.types.Menu):
layout.separator() layout.separator()
layout.prop_menu_enum(settings, "proportional_editing") layout.prop_menu_enum(settings, "proportional_edit")
layout.prop_menu_enum(settings, "proportional_editing_falloff") layout.prop_menu_enum(settings, "proportional_edit_falloff")
class VIEW3D_MT_edit_armature(bpy.types.Menu): class VIEW3D_MT_edit_armature(bpy.types.Menu):
@@ -2012,34 +2012,34 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
layout = self.layout layout = self.layout
view = context.space_data view = context.space_data
gs = context.scene.game_data gs = context.scene.game_settings
ob = context.object ob = context.object
col = layout.column() col = layout.column()
col.prop(view, "display_render_override") col.prop(view, "show_only_render")
col = layout.column() col = layout.column()
display_all = not view.display_render_override display_all = not view.show_only_render
col.active = display_all col.active = display_all
col.prop(view, "outline_selected") col.prop(view, "show_outline_selected")
col.prop(view, "all_object_origins") col.prop(view, "show_all_objects_origin")
col.prop(view, "relationship_lines") col.prop(view, "show_relationship_lines")
if ob and ob.type == 'MESH': if ob and ob.type == 'MESH':
mesh = ob.data mesh = ob.data
col.prop(mesh, "all_edges") col.prop(mesh, "show_all_edges")
col = layout.column() col = layout.column()
col.active = display_all col.active = display_all
split = col.split(percentage=0.55) split = col.split(percentage=0.55)
split.prop(view, "display_floor", text="Grid Floor") split.prop(view, "show_floor", text="Grid Floor")
row = split.row(align=True) row = split.row(align=True)
row.prop(view, "display_x_axis", text="X", toggle=True) row.prop(view, "show_axis_x", text="X", toggle=True)
row.prop(view, "display_y_axis", text="Y", toggle=True) row.prop(view, "show_axis_y", text="Y", toggle=True)
row.prop(view, "display_z_axis", text="Z", toggle=True) row.prop(view, "show_axis_z", text="Z", toggle=True)
sub = col.column(align=True) sub = col.column(align=True)
sub.active = (display_all and view.display_floor) sub.active = (display_all and view.show_floor)
sub.prop(view, "grid_lines", text="Lines") sub.prop(view, "grid_lines", text="Lines")
sub.prop(view, "grid_spacing", text="Spacing") sub.prop(view, "grid_spacing", text="Spacing")
sub.prop(view, "grid_subdivisions", text="Subdivisions") sub.prop(view, "grid_subdivisions", text="Subdivisions")
@@ -2047,7 +2047,7 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
col = layout.column() col = layout.column()
col.label(text="Shading:") col.label(text="Shading:")
col.prop(gs, "material_mode", text="") col.prop(gs, "material_mode", text="")
col.prop(view, "textured_solid") col.prop(view, "show_textured_solid")
layout.separator() layout.separator()
@@ -2060,9 +2060,9 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
col.prop(region, "lock_rotation") col.prop(region, "lock_rotation")
row = col.row() row = col.row()
row.enabled = region.lock_rotation row.enabled = region.lock_rotation
row.prop(region, "box_preview") row.prop(region, "show_sync_view")
row = col.row() row = col.row()
row.enabled = region.lock_rotation and region.box_preview row.enabled = region.lock_rotation and region.show_sync_view
row.prop(region, "box_clip") row.prop(region, "box_clip")
@@ -2083,24 +2083,24 @@ class VIEW3D_PT_view3d_meshdisplay(bpy.types.Panel):
col = layout.column() col = layout.column()
col.label(text="Overlays:") col.label(text="Overlays:")
col.prop(mesh, "draw_edges", text="Edges") col.prop(mesh, "show_edges", text="Edges")
col.prop(mesh, "draw_faces", text="Faces") col.prop(mesh, "show_faces", text="Faces")
col.prop(mesh, "draw_creases", text="Creases") col.prop(mesh, "show_edge_crease", text="Creases")
col.prop(mesh, "draw_bevel_weights", text="Bevel Weights") col.prop(mesh, "show_edge_bevel_weight", text="Bevel Weights")
col.prop(mesh, "draw_seams", text="Seams") col.prop(mesh, "show_edge_seams", text="Seams")
col.prop(mesh, "draw_sharp", text="Sharp") col.prop(mesh, "show_edge_sharp", text="Sharp")
col.separator() col.separator()
col.label(text="Normals:") col.label(text="Normals:")
col.prop(mesh, "draw_normals", text="Face") col.prop(mesh, "show_normal_face", text="Face")
col.prop(mesh, "draw_vertex_normals", text="Vertex") col.prop(mesh, "show_normal_vertex", text="Vertex")
col.prop(context.scene.tool_settings, "normal_size", text="Normal Size") col.prop(context.scene.tool_settings, "normal_size", text="Normal Size")
col.separator() col.separator()
col.label(text="Numerics:") col.label(text="Numerics:")
col.prop(mesh, "draw_edge_length") col.prop(mesh, "show_extra_edge_length")
col.prop(mesh, "draw_edge_angle") col.prop(mesh, "show_extra_edge_angle")
col.prop(mesh, "draw_face_area") col.prop(mesh, "show_extra_face_area")
class VIEW3D_PT_view3d_curvedisplay(bpy.types.Panel): class VIEW3D_PT_view3d_curvedisplay(bpy.types.Panel):
@@ -2120,8 +2120,8 @@ class VIEW3D_PT_view3d_curvedisplay(bpy.types.Panel):
col = layout.column() col = layout.column()
col.label(text="Overlays:") col.label(text="Overlays:")
col.prop(curve, "draw_handles", text="Handles") col.prop(curve, "show_handles", text="Handles")
col.prop(curve, "draw_normals", text="Normals") col.prop(curve, "show_normal_face", text="Normals")
col.prop(context.scene.tool_settings, "normal_size", text="Normal Size") col.prop(context.scene.tool_settings, "normal_size", text="Normal Size")
@@ -2141,7 +2141,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
layout = self.layout layout = self.layout
view = context.space_data view = context.space_data
layout.prop(view, "display_background_images", text="") layout.prop(view, "show_background_images", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@@ -2152,7 +2152,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
col.operator("view3d.add_background_image", text="Add Image") col.operator("view3d.add_background_image", text="Add Image")
for i, bg in enumerate(view.background_images): for i, bg in enumerate(view.background_images):
layout.active = view.display_background_images layout.active = view.show_background_images
box = layout.box() box = layout.box()
row = box.row(align=True) row = box.row(align=True)
row.prop(bg, "show_expanded", text="", emboss=False) row.prop(bg, "show_expanded", text="", emboss=False)
@@ -2219,7 +2219,7 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
layout = self.layout layout = self.layout
toolsettings = context.scene.tool_settings toolsettings = context.scene.tool_settings
layout.prop(toolsettings, "bone_sketching", text="") layout.prop(toolsettings, "use_bone_sketching", text="")
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@@ -2227,8 +2227,8 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
col = layout.column() col = layout.column()
col.prop(toolsettings, "etch_quick") col.prop(toolsettings, "use_etch_quick")
col.prop(toolsettings, "etch_overdraw") col.prop(toolsettings, "use_etch_overdraw")
col.prop(toolsettings, "etch_convert_mode") col.prop(toolsettings, "etch_convert_mode")
@@ -2241,7 +2241,7 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
elif toolsettings.etch_convert_mode == 'RETARGET': elif toolsettings.etch_convert_mode == 'RETARGET':
col.prop(toolsettings, "etch_template") col.prop(toolsettings, "etch_template")
col.prop(toolsettings, "etch_roll_mode") col.prop(toolsettings, "etch_roll_mode")
col.prop(toolsettings, "etch_autoname") col.prop(toolsettings, "use_etch_autoname")
col.prop(toolsettings, "etch_number") col.prop(toolsettings, "etch_number")
col.prop(toolsettings, "etch_side") col.prop(toolsettings, "etch_side")
col.operator("sketch.convert", text="Convert") col.operator("sketch.convert", text="Convert")

View File

@@ -552,7 +552,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
row.prop(brush, "use_locked_size", toggle=True, text="", icon='UNLOCKED') row.prop(brush, "use_locked_size", toggle=True, text="", icon='UNLOCKED')
row.prop(brush, "size", text="Radius", slider=True) row.prop(brush, "size", text="Radius", slider=True)
row.prop(brush, "use_size_pressure", toggle=True, text="") row.prop(brush, "use_pressure_size", toggle=True, text="")
if brush.sculpt_tool not in ('SNAKE_HOOK', 'GRAB', 'ROTATE'): if brush.sculpt_tool not in ('SNAKE_HOOK', 'GRAB', 'ROTATE'):
@@ -567,7 +567,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
row.prop(brush, "use_space_atten", toggle=True, text="", icon='UNLOCKED') row.prop(brush, "use_space_atten", toggle=True, text="", icon='UNLOCKED')
row.prop(brush, "strength", text="Strength", slider=True) row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_strength_pressure", text="") row.prop(brush, "use_pressure_strength", text="")
@@ -575,7 +575,7 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
col.separator() col.separator()
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "autosmooth_factor", slider=True) row.prop(brush, "auto_smooth_factor", slider=True)
row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="") row.prop(brush, "use_inverse_smooth_pressure", toggle=True, text="")
@@ -659,15 +659,15 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "size", text="Radius", slider=True) row.prop(brush, "size", text="Radius", slider=True)
row.prop(brush, "use_size_pressure", toggle=True, text="") row.prop(brush, "use_pressure_size", toggle=True, text="")
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "strength", text="Strength", slider=True) row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_strength_pressure", toggle=True, text="") row.prop(brush, "use_pressure_strength", toggle=True, text="")
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "jitter", slider=True) row.prop(brush, "jitter", slider=True)
row.prop(brush, "use_jitter_pressure", toggle=True, text="") row.prop(brush, "use_pressure_jitter", toggle=True, text="")
col.prop(brush, "blend", text="Blend") col.prop(brush, "blend", text="Blend")
@@ -680,21 +680,21 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
elif context.weight_paint_object and brush: elif context.weight_paint_object and brush:
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight", slider=True) layout.prop(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
layout.prop(context.tool_settings, "auto_normalize", text="Auto Normalize") layout.prop(context.tool_settings, "use_auto_normalize", text="Auto Normalize")
col = layout.column() col = layout.column()
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "size", text="Radius", slider=True) row.prop(brush, "size", text="Radius", slider=True)
row.prop(brush, "use_size_pressure", toggle=True, text="") row.prop(brush, "use_pressure_size", toggle=True, text="")
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "strength", text="Strength", slider=True) row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_strength_pressure", toggle=True, text="") row.prop(brush, "use_pressure_strength", toggle=True, text="")
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "jitter", slider=True) row.prop(brush, "jitter", slider=True)
row.prop(brush, "use_jitter_pressure", toggle=True, text="") row.prop(brush, "use_pressure_jitter", toggle=True, text="")
# Vertex Paint Mode # # Vertex Paint Mode #
@@ -705,16 +705,16 @@ class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "size", text="Radius", slider=True) row.prop(brush, "size", text="Radius", slider=True)
row.prop(brush, "use_size_pressure", toggle=True, text="") row.prop(brush, "use_pressure_size", toggle=True, text="")
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "strength", text="Strength", slider=True) row.prop(brush, "strength", text="Strength", slider=True)
row.prop(brush, "use_strength_pressure", toggle=True, text="") row.prop(brush, "use_pressure_strength", toggle=True, text="")
# XXX - TODO # XXX - TODO
#row = col.row(align=True) #row = col.row(align=True)
#row.prop(brush, "jitter", slider=True) #row.prop(brush, "jitter", slider=True)
#row.prop(brush, "use_jitter_pressure", toggle=True, text="") #row.prop(brush, "use_pressure_jitter", toggle=True, text="")
class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel): class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
@@ -758,7 +758,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
col = layout.column() col = layout.column()
if not brush.use_anchor and brush.sculpt_tool not in ('GRAB', 'SNAKE_HOOK', 'THUMB', 'ROTATE') and tex_slot.map_mode in ('FIXED'): if not brush.use_anchor and brush.sculpt_tool not in ('GRAB', 'SNAKE_HOOK', 'THUMB', 'ROTATE') and tex_slot.map_mode in ('FIXED'):
col.prop(brush, "texture_angle_source", text="") col.prop(brush, "texture_angle_source_random", text="")
else: else:
col.prop(brush, "texture_angle_source_no_random", text="") col.prop(brush, "texture_angle_source_no_random", text="")
@@ -880,7 +880,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
if brush.use_anchor: if brush.use_anchor:
col.separator() col.separator()
row = col.row() row = col.row()
row.prop(brush, "edge_to_edge", "Edge To Edge") row.prop(brush, "use_edge_to_edge", "Edge To Edge")
if brush.use_airbrush: if brush.use_airbrush:
col.separator() col.separator()
@@ -893,7 +893,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
row.active = brush.use_space row.active = brush.use_space
row.prop(brush, "spacing", text="Spacing") row.prop(brush, "spacing", text="Spacing")
if brush.sculpt_tool not in ('GRAB', 'THUMB', 'SNAKE_HOOK', 'ROTATE') and (not brush.use_anchor) and (not brush.restore_mesh): if brush.sculpt_tool not in ('GRAB', 'THUMB', 'SNAKE_HOOK', 'ROTATE') and (not brush.use_anchor) and (not brush.use_restore_mesh):
col = layout.column() col = layout.column()
col.separator() col.separator()
@@ -908,7 +908,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
row = col.row(align=True) row = col.row(align=True)
row.prop(brush, "jitter", slider=True) row.prop(brush, "jitter", slider=True)
row.prop(brush, "use_jitter_pressure", toggle=True, text="") row.prop(brush, "use_pressure_jitter", toggle=True, text="")
else: else:
row = col.row() row = col.row()
@@ -947,7 +947,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
#col.separator() #col.separator()
#if texture_paint: #if texture_paint:
# row.prop(brush, "use_spacing_pressure", toggle=True, text="") # row.prop(brush, "use_pressure_spacing", toggle=True, text="")
class VIEW3D_PT_tools_brush_curve(PaintPanel, bpy.types.Panel): class VIEW3D_PT_tools_brush_curve(PaintPanel, bpy.types.Panel):
@@ -999,7 +999,7 @@ class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel):
col = split.column() col = split.column()
col.prop(sculpt, "use_openmp", text="Threaded Sculpt") col.prop(sculpt, "use_openmp", text="Threaded Sculpt")
col.prop(sculpt, "fast_navigate") col.prop(sculpt, "show_low_resolution")
col.prop(sculpt, "show_brush") col.prop(sculpt, "show_brush")
col.label(text="Unified Settings:") col.label(text="Unified Settings:")
@@ -1071,12 +1071,12 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
if context.sculpt_object and context.tool_settings.sculpt: if context.sculpt_object and context.tool_settings.sculpt:
#if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE', 'CLAY_TUBES'): #if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE', 'CLAY_TUBES'):
if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE'): if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN', 'FILL', 'SCRAPE'):
col.prop(brush, "add_col", text="Add Color") col.prop(brush, "cursor_color_add", text="Add Color")
col.prop(brush, "sub_col", text="Subtract Color") col.prop(brush, "cursor_color_subtract", text="Subtract Color")
else: else:
col.prop(brush, "add_col", text="Color") col.prop(brush, "cursor_color_add", text="Color")
else: else:
col.prop(brush, "add_col", text="Color") col.prop(brush, "cursor_color_add", text="Color")
col = layout.column() col = layout.column()
col.label(text="Icon:") col.label(text="Icon:")
@@ -1308,41 +1308,41 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, bpy.types.Panel):
if md.type == pe.type: if md.type == pe.type:
ptcache = md.point_cache ptcache = md.point_cache
if ptcache and len(ptcache.point_cache_list) > 1: if ptcache and len(ptcache.point_caches) > 1:
layout.template_list(ptcache, "point_cache_list", ptcache, "active_point_cache_index", type='ICONS') layout.template_list(ptcache, "point_caches", ptcache, "active_point_cache_index", type='ICONS')
if not pe.editable: if not pe.is_editable:
layout.label(text="Point cache must be baked") layout.label(text="Point cache must be baked")
layout.label(text="to enable editing!") layout.label(text="to enable editing!")
col = layout.column(align=True) col = layout.column(align=True)
if pe.hair: if pe.is_hair:
col.active = pe.editable col.active = pe.is_editable
col.prop(pe, "emitter_deflect", text="Deflect emitter") col.prop(pe, "emitter_deflect", text="Deflect emitter")
sub = col.row() sub = col.row()
sub.active = pe.emitter_deflect sub.active = pe.emitter_deflect
sub.prop(pe, "emitter_distance", text="Distance") sub.prop(pe, "emitter_distance", text="Distance")
col = layout.column(align=True) col = layout.column(align=True)
col.active = pe.editable col.active = pe.is_editable
col.label(text="Keep:") col.label(text="Keep:")
col.prop(pe, "keep_lengths", text="Lengths") col.prop(pe, "keep_lengths", text="Lengths")
col.prop(pe, "keep_root", text="Root") col.prop(pe, "keep_root", text="Root")
if not pe.hair: if not pe.is_hair:
col.label(text="Correct:") col.label(text="Correct:")
col.prop(pe, "auto_velocity", text="Velocity") col.prop(pe, "auto_velocity", text="Velocity")
col.prop(ob.data, "use_mirror_x") col.prop(ob.data, "use_mirror_x")
col = layout.column(align=True) col = layout.column(align=True)
col.active = pe.editable col.active = pe.is_editable
col.label(text="Draw:") col.label(text="Draw:")
col.prop(pe, "draw_step", text="Path Steps") col.prop(pe, "draw_step", text="Path Steps")
if pe.hair: if pe.is_hair:
col.prop(pe, "draw_particles", text="Children") col.prop(pe, "show_particles", text="Children")
else: else:
if pe.type == 'PARTICLES': if pe.type == 'PARTICLES':
col.prop(pe, "draw_particles", text="Particles") col.prop(pe, "show_particles", text="Particles")
col.prop(pe, "fade_time") col.prop(pe, "fade_time")
sub = col.row() sub = col.row()
sub.active = pe.fade_time sub.active = pe.fade_time

View File

@@ -48,7 +48,7 @@ static IDType idtypes[]= {
{ ID_BR, "Brush", "brushes", IDTYPE_FLAGS_ISLINKABLE}, { ID_BR, "Brush", "brushes", IDTYPE_FLAGS_ISLINKABLE},
{ ID_CA, "Camera", "cameras", IDTYPE_FLAGS_ISLINKABLE}, { ID_CA, "Camera", "cameras", IDTYPE_FLAGS_ISLINKABLE},
{ ID_CU, "Curve", "curves", IDTYPE_FLAGS_ISLINKABLE}, { ID_CU, "Curve", "curves", IDTYPE_FLAGS_ISLINKABLE},
{ ID_GD, "GPencil", "gpencil", IDTYPE_FLAGS_ISLINKABLE}, /* rename gpencil */ { ID_GD, "GPencil", "grease_pencil",IDTYPE_FLAGS_ISLINKABLE}, /* rename gpencil */
{ ID_GR, "Group", "groups", IDTYPE_FLAGS_ISLINKABLE}, { ID_GR, "Group", "groups", IDTYPE_FLAGS_ISLINKABLE},
{ ID_ID, "ID", "ids", 0}, /* plural is fake */ { ID_ID, "ID", "ids", 0}, /* plural is fake */
{ ID_IM, "Image", "images", IDTYPE_FLAGS_ISLINKABLE}, { ID_IM, "Image", "images", IDTYPE_FLAGS_ISLINKABLE},

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