This commit is contained in:
2010-08-05 08:23:26 +00:00
353 changed files with 10607 additions and 12203 deletions

View File

@@ -69,7 +69,7 @@ OPTION(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
OPTION(WITH_LCMS "Enable color correction with lcms" OFF) OPTION(WITH_LCMS "Enable color correction with lcms" OFF)
OPTION(WITH_PYTHON "Enable Embedded Python API" ON) OPTION(WITH_PYTHON "Enable Embedded Python API" ON)
OPTION(WITH_BUILDINFO "Include extra build details" ON) OPTION(WITH_BUILDINFO "Include extra build details" ON)
OPTION(WITH_ELBEEM "Enable Elbeem (Fluid Simulation)" ON) OPTION(WITH_FLUID "Enable Elbeem (Fluid Simulation)" ON)
OPTION(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" OFF) OPTION(WITH_FFTW3 "Enable FFTW3 support (Used for smoke and audio effects)" OFF)
OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON) OPTION(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
OPTION(WITH_GAMEENGINE "Enable Game Engine" ON) OPTION(WITH_GAMEENGINE "Enable Game Engine" ON)
@@ -82,10 +82,12 @@ ELSE()
ENDIF() ENDIF()
# Image format support # Image format support
OPTION(WITH_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON) OPTION(WITH_IMAGE_OPENEXR "Enable OpenEXR Support (http://www.openexr.com)" ON)
OPTION(WITH_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF) OPTION(WITH_IMAGE_OPENJPEG "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
OPTION(WITH_TIFF "Enable LibTIFF Support" ON) OPTION(WITH_IMAGE_TIFF "Enable LibTIFF Support" ON)
OPTION(WITH_DDS "Enable DDS Support" ON) OPTION(WITH_IMAGE_DDS "Enable DDS Image Support" ON)
OPTION(WITH_IMAGE_CINEON "Enable CINEON and DPX Image Support" ON)
OPTION(WITH_IMAGE_HDR "Enable HDR Image Support" ON)
# Audio format support # Audio format support
OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF) OPTION(WITH_FFMPEG "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
@@ -220,7 +222,7 @@ IF(UNIX AND NOT APPLE)
ENDIF(NOT SDL_FOUND) ENDIF(NOT SDL_FOUND)
ENDIF(WITH_SDL) ENDIF(WITH_SDL)
IF(WITH_OPENEXR) IF(WITH_IMAGE_OPENEXR)
SET(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory") SET(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
FIND_PATH(OPENEXR_INC FIND_PATH(OPENEXR_INC
ImfXdr.h ImfXdr.h
@@ -235,16 +237,16 @@ IF(UNIX AND NOT APPLE)
SET(OPENEXR_LIB Half IlmImf Iex Imath) SET(OPENEXR_LIB Half IlmImf Iex Imath)
IF(NOT OPENEXR_INC) IF(NOT OPENEXR_INC)
SET(WITH_OPENEXR OFF) SET(WITH_IMAGE_OPENEXR OFF)
ENDIF(NOT OPENEXR_INC) ENDIF(NOT OPENEXR_INC)
ENDIF(WITH_OPENEXR) ENDIF(WITH_IMAGE_OPENEXR)
IF(WITH_TIFF) IF(WITH_IMAGE_TIFF)
FIND_PACKAGE(TIFF) FIND_PACKAGE(TIFF)
IF(NOT TIFF_FOUND) IF(NOT TIFF_FOUND)
SET(WITH_TIFF OFF) SET(WITH_IMAGE_TIFF OFF)
ENDIF(NOT TIFF_FOUND) ENDIF(NOT TIFF_FOUND)
ENDIF(WITH_TIFF) ENDIF(WITH_IMAGE_TIFF)
FIND_PACKAGE(JPEG REQUIRED) FIND_PACKAGE(JPEG REQUIRED)
@@ -497,7 +499,7 @@ IF(WIN32)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib) SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
ENDIF(WITH_FFMPEG) ENDIF(WITH_FFMPEG)
IF(WITH_OPENEXR) IF(WITH_IMAGE_OPENEXR)
SET(OPENEXR ${LIBDIR}/openexr) SET(OPENEXR ${LIBDIR}/openexr)
SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath) SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
@@ -509,14 +511,14 @@ IF(WIN32)
IF (MSVC90) IF (MSVC90)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008) SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
ENDIF(MSVC90) ENDIF(MSVC90)
ENDIF(WITH_OPENEXR) ENDIF(WITH_IMAGE_OPENEXR)
IF(WITH_TIFF) IF(WITH_IMAGE_TIFF)
SET(TIFF ${LIBDIR}/tiff) SET(TIFF ${LIBDIR}/tiff)
SET(TIFF_LIBRARY libtiff) SET(TIFF_LIBRARY libtiff)
SET(TIFF_INCLUDE_DIR ${TIFF}/include) SET(TIFF_INCLUDE_DIR ${TIFF}/include)
SET(TIFF_LIBPATH ${TIFF}/lib) SET(TIFF_LIBPATH ${TIFF}/lib)
ENDIF(WITH_TIFF) ENDIF(WITH_IMAGE_TIFF)
IF(WITH_JACK) IF(WITH_JACK)
SET(JACK ${LIBDIR}/jack) SET(JACK ${LIBDIR}/jack)
@@ -607,19 +609,19 @@ IF(WIN32)
SET(FFMPEG_LIBPATH ${FFMPEG}/lib) SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
ENDIF(WITH_FFMPEG) ENDIF(WITH_FFMPEG)
IF(WITH_OPENEXR) IF(WITH_IMAGE_OPENEXR)
SET(OPENEXR ${LIBDIR}/gcc/openexr) SET(OPENEXR ${LIBDIR}/gcc/openexr)
SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR) SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
SET(OPENEXR_LIB Half IlmImf Imath IlmThread) SET(OPENEXR_LIB Half IlmImf Imath IlmThread)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib) SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
ENDIF(WITH_OPENEXR) ENDIF(WITH_IMAGE_OPENEXR)
IF(WITH_TIFF) IF(WITH_IMAGE_TIFF)
SET(TIFF ${LIBDIR}/gcc/tiff) SET(TIFF ${LIBDIR}/gcc/tiff)
SET(TIFF_LIBRARY tiff) SET(TIFF_LIBRARY tiff)
SET(TIFF_INCLUDE_DIR ${TIFF}/include) SET(TIFF_INCLUDE_DIR ${TIFF}/include)
SET(TIFF_LIBPATH ${TIFF}/lib) SET(TIFF_LIBPATH ${TIFF}/lib)
ENDIF(WITH_TIFF) ENDIF(WITH_IMAGE_TIFF)
IF(WITH_JACK) IF(WITH_JACK)
SET(JACK ${LIBDIR}/jack) SET(JACK ${LIBDIR}/jack)
@@ -727,12 +729,12 @@ IF(APPLE)
SET(FREETYPE_LIBPATH ${FREETYPE}/lib) SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
SET(FREETYPE_LIBRARY freetype) SET(FREETYPE_LIBRARY freetype)
IF(WITH_OPENEXR) IF(WITH_IMAGE_OPENEXR)
SET(OPENEXR ${LIBDIR}/openexr) SET(OPENEXR ${LIBDIR}/openexr)
SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include) SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread) SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
SET(OPENEXR_LIBPATH ${OPENEXR}/lib) SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
ENDIF(WITH_OPENEXR) ENDIF(WITH_IMAGE_OPENEXR)
IF(WITH_LCMS) IF(WITH_LCMS)
SET(LCMS ${LIBDIR}/lcms) SET(LCMS ${LIBDIR}/lcms)
@@ -810,12 +812,12 @@ IF(APPLE)
SET(JPEG_INC "${JPEG}/include") SET(JPEG_INC "${JPEG}/include")
SET(JPEG_LIBPATH ${JPEG}/lib) SET(JPEG_LIBPATH ${JPEG}/lib)
IF(WITH_TIFF) IF(WITH_IMAGE_TIFF)
SET(TIFF ${LIBDIR}/tiff) SET(TIFF ${LIBDIR}/tiff)
SET(TIFF_INCLUDE_DIR ${TIFF}/include) SET(TIFF_INCLUDE_DIR ${TIFF}/include)
SET(TIFF_LIBRARY tiff) SET(TIFF_LIBRARY tiff)
SET(TIFF_LIBPATH ${TIFF}/lib) SET(TIFF_LIBPATH ${TIFF}/lib)
ENDIF(WITH_TIFF) ENDIF(WITH_IMAGE_TIFF)
IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD) IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
SET(PLATFORM_CFLAGS " -msse -msse2 ${PLATFORM_CFLAGS}") SET(PLATFORM_CFLAGS " -msse -msse2 ${PLATFORM_CFLAGS}")
@@ -869,11 +871,11 @@ ENDIF(WITH_BUILDINFO)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Common. # Common.
IF(WITH_OPENJPEG) IF(WITH_IMAGE_OPENJPEG)
set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg) set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg)
set(OPENJPEG_INC ${OPENJPEG}) set(OPENJPEG_INC ${OPENJPEG})
set(OPENJPEG_LIb extern_libopenjpeg) set(OPENJPEG_LIb extern_libopenjpeg)
ENDIF(WITH_OPENJPEG) ENDIF(WITH_IMAGE_OPENJPEG)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Blender WebPlugin # Blender WebPlugin

View File

@@ -210,14 +210,36 @@ SetOption('num_jobs', int(env['BF_NUMJOBS']))
print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs')) print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG']) print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
# BLENDERPATH is a unix only option to enable typical style paths this is if 'blenderlite' in B.targets:
# spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR target_env_defs = {}
# because the blender binary is installed in $BF_INSTALLDIR/bin/blender target_env_defs['WITH_BF_GAMEENGINE'] = False
target_env_defs['WITH_BF_OPENAL'] = False
target_env_defs['WITH_BF_OPENEXR'] = False
target_env_defs['WITH_BF_OPENMP'] = False
target_env_defs['WITH_BF_ICONV'] = False
target_env_defs['WITH_BF_INTERNATIONAL'] = False
target_env_defs['WITH_BF_OPENJPEG'] = False
target_env_defs['WITH_BF_FFMPEG'] = False
target_env_defs['WITH_BF_QUICKTIME'] = False
target_env_defs['WITH_BF_REDCODE'] = False
target_env_defs['WITH_BF_DDS'] = False
target_env_defs['WITH_BF_CINEON'] = False
target_env_defs['WITH_BF_HDR'] = False
target_env_defs['WITH_BF_ZLIB'] = False
target_env_defs['WITH_BF_SDL'] = False
target_env_defs['WITH_BF_JPEG'] = False
target_env_defs['WITH_BF_PNG'] = False
target_env_defs['WITH_BF_BULLET'] = False
target_env_defs['WITH_BF_BINRELOC'] = False
target_env_defs['BF_BUILDINFO'] = False
target_env_defs['BF_NO_ELBEEM'] = True
target_env_defs['WITH_BF_PYTHON'] = False
# Merge blenderlite, let command line to override
for k,v in target_env_defs.iteritems():
if k not in B.arguments:
env[k] = v
if env['WITH_BF_FHS']:
BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
else:
BLENDERPATH = env['BF_INSTALLDIR']
if env['WITH_BF_OPENMP'] == 1: if env['WITH_BF_OPENMP'] == 1:
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
@@ -271,34 +293,6 @@ if 'blenderplayer' in B.targets:
if 'blendernogame' in B.targets: if 'blendernogame' in B.targets:
env['WITH_BF_GAMEENGINE'] = False env['WITH_BF_GAMEENGINE'] = False
if 'blenderlite' in B.targets:
target_env_defs = {}
target_env_defs['WITH_BF_GAMEENGINE'] = False
target_env_defs['WITH_BF_OPENAL'] = False
target_env_defs['WITH_BF_OPENEXR'] = False
target_env_defs['WITH_BF_OPENMP'] = False
target_env_defs['WITH_BF_ICONV'] = False
target_env_defs['WITH_BF_INTERNATIONAL'] = False
target_env_defs['WITH_BF_OPENJPEG'] = False
target_env_defs['WITH_BF_FFMPEG'] = False
target_env_defs['WITH_BF_QUICKTIME'] = False
target_env_defs['WITH_BF_REDCODE'] = False
target_env_defs['WITH_BF_DDS'] = False
target_env_defs['WITH_BF_ZLIB'] = False
target_env_defs['WITH_BF_SDL'] = False
target_env_defs['WITH_BF_JPEG'] = False
target_env_defs['WITH_BF_PNG'] = False
target_env_defs['WITH_BF_BULLET'] = False
target_env_defs['WITH_BF_BINRELOC'] = False
target_env_defs['BF_BUILDINFO'] = False
target_env_defs['BF_NO_ELBEEM'] = True
target_env_defs['WITH_BF_PYTHON'] = False
# Merge blenderlite, let command line to override
for k,v in target_env_defs.iteritems():
if k not in B.arguments:
env[k] = v
# disable elbeem (fluidsim) compilation? # disable elbeem (fluidsim) compilation?
if env['BF_NO_ELBEEM'] == 1: if env['BF_NO_ELBEEM'] == 1:
env['CPPFLAGS'].append('-DDISABLE_ELBEEM') env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
@@ -311,7 +305,7 @@ if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-min
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
B.root_build_dir = env['BF_BUILDDIR'] B.root_build_dir = env['BF_BUILDDIR']
B.doc_build_dir = os.path.join(BLENDERPATH, 'doc') B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
if not B.root_build_dir[-1]==os.sep: if not B.root_build_dir[-1]==os.sep:
B.root_build_dir += os.sep B.root_build_dir += os.sep
if not B.doc_build_dir[-1]==os.sep: if not B.doc_build_dir[-1]==os.sep:
@@ -366,8 +360,9 @@ if not os.path.isdir ( B.root_build_dir):
os.makedirs ( B.root_build_dir + 'extern' ) os.makedirs ( B.root_build_dir + 'extern' )
os.makedirs ( B.root_build_dir + 'lib' ) os.makedirs ( B.root_build_dir + 'lib' )
os.makedirs ( B.root_build_dir + 'bin' ) os.makedirs ( B.root_build_dir + 'bin' )
if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']: # # Docs not working with epy anymore
os.makedirs ( B.doc_build_dir ) # if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
# os.makedirs ( B.doc_build_dir )
Help(opts.GenerateHelpText(env)) Help(opts.GenerateHelpText(env))
@@ -436,10 +431,7 @@ if env['OURPLATFORM']=='darwin':
source=[dp+os.sep+f for f in df] source=[dp+os.sep+f for f in df]
blenderinstall.append(env.Install(dir=dir,source=source)) blenderinstall.append(env.Install(dir=dir,source=source))
else: else:
if env['WITH_BF_FHS']: dir= os.path.join(env['BF_INSTALLDIR'], 'bin') blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
else: dir= env['BF_INSTALLDIR']
blenderinstall = env.Install(dir=dir, source=B.program_list)
#-- local path = config files in install dir: installdir\VERSION #-- local path = config files in install dir: installdir\VERSION
#- dont do config and scripts for darwin, it is already in the bundle #- dont do config and scripts for darwin, it is already in the bundle
@@ -466,15 +458,12 @@ if env['OURPLATFORM']!='darwin':
if 'locale' in dp: if 'locale' in dp:
datafileslist.append(os.path.join(dp,f)) datafileslist.append(os.path.join(dp,f))
if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['datafiles'] + dp.split(os.sep)[2:])) # skip bin/.blender dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
datafilestargetlist.append(dir + os.sep + f) datafilestargetlist.append(dir + os.sep + f)
else: else:
dotblendlist.append(os.path.join(dp, f)) dotblendlist.append(os.path.join(dp, f))
if env['WITH_BF_FHS']: dir= os.path.join(*([BLENDERPATH] + ['config'] + dp.split(os.sep)[2:])) # skip bin/.blender dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
else: dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['config'] + dp.split(os.sep)[1:])) # skip bin
dottargetlist.append(dir + os.sep + f) dottargetlist.append(dir + os.sep + f)
dotblenderinstall = [] dotblenderinstall = []
@@ -493,8 +482,7 @@ if env['OURPLATFORM']!='darwin':
if '.svn' in dn: if '.svn' in dn:
dn.remove('.svn') dn.remove('.svn')
if env['WITH_BF_FHS']: dir = BLENDERPATH dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
else: dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):] dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc'] source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
@@ -510,7 +498,7 @@ if env['OURPLATFORM']=='linux2':
tn.remove('.svn') tn.remove('.svn')
for f in tf: for f in tf:
iconlist.append(os.path.join(tp, f)) iconlist.append(os.path.join(tp, f))
icontargetlist.append( os.path.join(*([BLENDERPATH] + tp.split(os.sep)[2:] + [f])) ) icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) )
iconinstall = [] iconinstall = []
for targetdir,srcfile in zip(icontargetlist, iconlist): for targetdir,srcfile in zip(icontargetlist, iconlist):
@@ -537,24 +525,24 @@ for tp, tn, tf in os.walk('release/plugins'):
df = tp[8:] # remove 'release/' df = tp[8:] # remove 'release/'
for f in tf: for f in tf:
pluglist.append(os.path.join(tp, f)) pluglist.append(os.path.join(tp, f))
plugtargetlist.append( os.path.join(BLENDERPATH, df, f) ) plugtargetlist.append( os.path.join(env['BF_INSTALLDIR'], df, f) )
# header files for plugins # header files for plugins
pluglist.append('source/blender/blenpluginapi/documentation.h') pluglist.append('source/blender/blenpluginapi/documentation.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'documentation.h')) plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'documentation.h'))
pluglist.append('source/blender/blenpluginapi/externdef.h') pluglist.append('source/blender/blenpluginapi/externdef.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'externdef.h')) plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'externdef.h'))
pluglist.append('source/blender/blenpluginapi/floatpatch.h') pluglist.append('source/blender/blenpluginapi/floatpatch.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'floatpatch.h')) plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'floatpatch.h'))
pluglist.append('source/blender/blenpluginapi/iff.h') pluglist.append('source/blender/blenpluginapi/iff.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'iff.h')) plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'iff.h'))
pluglist.append('source/blender/blenpluginapi/plugin.h') pluglist.append('source/blender/blenpluginapi/plugin.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.h')) plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'plugin.h'))
pluglist.append('source/blender/blenpluginapi/util.h') pluglist.append('source/blender/blenpluginapi/util.h')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'util.h')) plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'util.h'))
pluglist.append('source/blender/blenpluginapi/plugin.DEF') pluglist.append('source/blender/blenpluginapi/plugin.DEF')
plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.def')) plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'plugin.def'))
plugininstall = [] plugininstall = []
for targetdir,srcfile in zip(plugtargetlist, pluglist): for targetdir,srcfile in zip(plugtargetlist, pluglist):
@@ -569,7 +557,7 @@ for tp, tn, tf in os.walk('release/text'):
for f in tf: for f in tf:
textlist.append(tp+os.sep+f) textlist.append(tp+os.sep+f)
textinstall = env.Install(dir=BLENDERPATH, source=textlist) textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
if env['OURPLATFORM']=='darwin': if env['OURPLATFORM']=='darwin':
allinstall = [blenderinstall, plugininstall, textinstall] allinstall = [blenderinstall, plugininstall, textinstall]
@@ -662,17 +650,3 @@ Default(B.program_list)
if not env['WITHOUT_BF_INSTALL']: if not env['WITHOUT_BF_INSTALL']:
Default(installtarget) Default(installtarget)
#------------ EPYDOC
if env['WITH_BF_DOCS']:
try:
import epydoc
except ImportError:
epydoc = None
if epydoc:
SConscript('source/gameengine/PyDoc/SConscript')
else:
print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "

View File

@@ -58,12 +58,12 @@ MACRO(SETUP_LIBDIRS)
IF(WITH_FFMPEG) IF(WITH_FFMPEG)
LINK_DIRECTORIES(${FFMPEG_LIBPATH}) LINK_DIRECTORIES(${FFMPEG_LIBPATH})
ENDIF(WITH_FFMPEG) ENDIF(WITH_FFMPEG)
IF(WITH_OPENEXR) IF(WITH_IMAGE_OPENEXR)
LINK_DIRECTORIES(${OPENEXR_LIBPATH}) LINK_DIRECTORIES(${OPENEXR_LIBPATH})
ENDIF(WITH_OPENEXR) ENDIF(WITH_IMAGE_OPENEXR)
IF(WITH_TIFF) IF(WITH_IMAGE_TIFF)
LINK_DIRECTORIES(${TIFF_LIBPATH}) LINK_DIRECTORIES(${TIFF_LIBPATH})
ENDIF(WITH_TIFF) ENDIF(WITH_IMAGE_TIFF)
IF(WITH_LCMS) IF(WITH_LCMS)
LINK_DIRECTORIES(${LCMS_LIBPATH}) LINK_DIRECTORIES(${LCMS_LIBPATH})
ENDIF(WITH_LCMS) ENDIF(WITH_LCMS)
@@ -140,10 +140,10 @@ MACRO(SETUP_LIBLINKS
IF(WITH_QUICKTIME) IF(WITH_QUICKTIME)
TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB}) TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
ENDIF(WITH_QUICKTIME) ENDIF(WITH_QUICKTIME)
IF(WITH_TIFF) IF(WITH_IMAGE_TIFF)
TARGET_LINK_LIBRARIES(${target} ${TIFF_LIBRARY}) TARGET_LINK_LIBRARIES(${target} ${TIFF_LIBRARY})
ENDIF(WITH_TIFF) ENDIF(WITH_IMAGE_TIFF)
IF(WITH_OPENEXR) IF(WITH_IMAGE_OPENEXR)
IF(WIN32) IF(WIN32)
FOREACH(loop_var ${OPENEXR_LIB}) FOREACH(loop_var ${OPENEXR_LIB})
TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d) TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
@@ -152,7 +152,7 @@ MACRO(SETUP_LIBLINKS
ELSE(WIN32) ELSE(WIN32)
TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB}) TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
ENDIF(WIN32) ENDIF(WIN32)
ENDIF(WITH_OPENEXR) ENDIF(WITH_IMAGE_OPENEXR)
IF(WITH_LCMS) IF(WITH_LCMS)
TARGET_LINK_LIBRARIES(${target} ${LCMS_LIBRARY}) TARGET_LINK_LIBRARIES(${target} ${LCMS_LIBRARY})
ENDIF(WITH_LCMS) ENDIF(WITH_LCMS)
@@ -198,6 +198,7 @@ MACRO(TEST_SSE_SUPPORT)
SUPPORT_SSE_BUILD) SUPPORT_SSE_BUILD)
ENDMACRO(TEST_SSE_SUPPORT) ENDMACRO(TEST_SSE_SUPPORT)
MACRO(GET_BLENDER_VERSION) MACRO(GET_BLENDER_VERSION)
FILE(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT) FILE(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT)
STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}") STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")

View File

@@ -89,7 +89,6 @@ ifeq ($(OS),darwin)
CCFLAGS += -pipe -fPIC -funsigned-char CCFLAGS += -pipe -fPIC -funsigned-char
endif endif
CFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS) CFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS)
CCFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS) CCFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS)

View File

@@ -159,6 +159,13 @@ ifndef CONFIG_GUESS
endif endif
export WITH_TIFF ?= true export WITH_TIFF ?= true
#enable raytracing optimization (currently only for i386 and x86_64)
export WITH_BF_RAYOPTIMIZATION ?= true
export WITH_LCMS ?= false
export WITH_CINEON ?= true
export WITH_HDR ?= true
# Compare recreated .mo files with committed ones # Compare recreated .mo files with committed ones
export BF_VERIFY_MO_FILES ?= true export BF_VERIFY_MO_FILES ?= true
@@ -622,6 +629,11 @@ ifndef CONFIG_GUESS
# default tiff libs # default tiff libs
export NAN_TIFF_LIBS ?= $(NAN_TIFF)/lib/libtiff.a export NAN_TIFF_LIBS ?= $(NAN_TIFF)/lib/libtiff.a
# default path to lcms, may be overidden in platform sections above or in user-def.mk
export BF_LCMS ?= $(LCGDIR)/lcms
export BF_LCMS_INC ?= $(BF_LCMS)/include
export BF_LCMS_LIBS ?= $(BF_LCMS)/lib/liblcms.a
endif # CONFIG_GUESS endif # CONFIG_GUESS
# Don't want to build the gameengine? # Don't want to build the gameengine?

View File

@@ -195,4 +195,8 @@ ifeq ($(WITH_TIFF),true)
LLIBS += $(NAN_TIFF_LIBS) LLIBS += $(NAN_TIFF_LIBS)
endif endif
ifeq ($(WITH_LCMS),true)
LLIBS += $(BF_LCMS_LIBS)
endif
LLIBS += $(NAN_PYTHON_LIB) LLIBS += $(NAN_PYTHON_LIB)

View File

@@ -194,8 +194,6 @@ CXX_WARN = []
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid'] LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
WITH_BF_DOCS=False
BF_DEBUG=False BF_DEBUG=False
BF_BSC=False BF_BSC=False

View File

@@ -501,10 +501,7 @@ def AppIt(target=None, source=None, env=None):
installdir = env['BF_INSTALLDIR'] installdir = env['BF_INSTALLDIR']
print("compiled architecture: %s"%(osxarch)) print("compiled architecture: %s"%(osxarch))
print("Installing to %s"%(installdir)) print("Installing to %s"%(installdir))
if libdir == '../lib/darwin-9.x.universal': python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip
python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip
else:
python_zip = 'python.zip' # compatibility for darwin8 python.zip
print("unzipping to app-bundle: %s"%(python_zip)) print("unzipping to app-bundle: %s"%(python_zip))
bldroot = env.Dir('.').abspath bldroot = env.Dir('.').abspath
binary = env['BINARYKIND'] binary = env['BINARYKIND']
@@ -570,10 +567,9 @@ def UnixPyBundle(target=None, source=None, env=None):
def run(cmd): def run(cmd):
print 'Install command:', cmd print 'Install command:', cmd
commands.getoutput(cmd) commands.getoutput(cmd)
if env['WITH_BF_FHS']: dir = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION']) # BLENDERPATH dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
else: dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] ) py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] )
py_target = env.subst( dir + '/python/lib/python'+env['BF_PYTHON_VERSION'] ) py_target = env.subst( dir + '/python/lib/python'+env['BF_PYTHON_VERSION'] )

View File

@@ -36,7 +36,7 @@ def validate_arguments(args, bc):
'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH', 'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH',
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH', 'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC', 'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC',
'WITH_BF_DDS', 'WITH_BF_DDS', 'WITH_BF_CINEON', 'WITH_BF_HDR',
'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG', 'BF_FFMPEG_INC', 'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG', 'BF_FFMPEG_INC',
'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB', 'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB',
'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH', 'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH',
@@ -78,7 +78,6 @@ def validate_arguments(args, bc):
'WITH_BF_DOCS', 'WITH_BF_DOCS',
'BF_NUMJOBS', 'BF_NUMJOBS',
'BF_MSVS', 'BF_MSVS',
'WITH_BF_FHS',
'BF_VERSION', 'BF_VERSION',
'BF_GHOST_DEBUG', 'BF_GHOST_DEBUG',
'WITH_BF_RAYOPTIMIZATION', 'WITH_BF_RAYOPTIMIZATION',
@@ -224,7 +223,11 @@ def read_opts(env, cfg, args):
('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''), ('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''),
('BF_OPENEXR_LIB_STATIC', 'OPENEXR static library', ''), ('BF_OPENEXR_LIB_STATIC', 'OPENEXR static library', ''),
(BoolVariable('WITH_BF_DDS', 'Use DDS if true', True)), (BoolVariable('WITH_BF_DDS', 'Support DDS image format if true', True)),
(BoolVariable('WITH_BF_CINEON', 'Support CINEON and DPX image formats if true', True)),
(BoolVariable('WITH_BF_HDR', 'Support HDR image formats if true', True)),
(BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)), (BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
('BF_FFMPEG', 'FFMPEG base path', ''), ('BF_FFMPEG', 'FFMPEG base path', ''),
@@ -428,13 +431,12 @@ def read_opts(env, cfg, args):
('BF_X264_CONFIG', 'configuration flags for x264', ''), ('BF_X264_CONFIG', 'configuration flags for x264', ''),
('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''), ('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
(BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)), # (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'), ('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
('BF_NUMJOBS', 'Number of build processes to spawn', '1'), ('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
('BF_MSVS', 'Generate MSVS project files and solution', False), ('BF_MSVS', 'Generate MSVS project files and solution', False),
(BoolVariable('WITH_BF_FHS', 'Use the Unix "Filesystem Hierarchy Standard" rather then a redistributable directory layout', False)),
('BF_VERSION', 'The root path for Unix (non-apple)', '2.5'), ('BF_VERSION', 'The root path for Unix (non-apple)', '2.5'),
(BoolVariable('BF_UNIT_TEST', 'Build with unit test support.', False)), (BoolVariable('BF_UNIT_TEST', 'Build with unit test support.', False)),

View File

@@ -34,9 +34,9 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ADD_SUBDIRECTORY(glew) ADD_SUBDIRECTORY(glew)
IF(WITH_OPENJPEG) IF(WITH_IMAGE_OPENJPEG)
ADD_SUBDIRECTORY(libopenjpeg) ADD_SUBDIRECTORY(libopenjpeg)
ENDIF(WITH_OPENJPEG) ENDIF(WITH_IMAGE_OPENJPEG)
IF(WITH_LZO) IF(WITH_LZO)
ADD_SUBDIRECTORY(lzo) ADD_SUBDIRECTORY(lzo)

View File

@@ -38,8 +38,8 @@ ADD_SUBDIRECTORY(boolop)
ADD_SUBDIRECTORY(opennl) ADD_SUBDIRECTORY(opennl)
ADD_SUBDIRECTORY(smoke) ADD_SUBDIRECTORY(smoke)
IF(WITH_ELBEEM) IF(WITH_FLUID)
ADD_SUBDIRECTORY(elbeem) ADD_SUBDIRECTORY(elbeem)
ENDIF(WITH_ELBEEM) ENDIF(WITH_FLUID)
ADD_SUBDIRECTORY(bsp) ADD_SUBDIRECTORY(bsp)

File diff suppressed because it is too large Load Diff

View File

@@ -1138,7 +1138,6 @@ class Export3DS(bpy.types.Operator):
def poll(self, context): # Poll isnt working yet def poll(self, context): # Poll isnt working yet
return context.active_object != None return context.active_object != None
# Add to a menu # Add to a menu
def menu_func(self, context): def menu_func(self, context):
default_path = os.path.splitext(bpy.data.filepath)[0] + ".3ds" default_path = os.path.splitext(bpy.data.filepath)[0] + ".3ds"
@@ -1146,11 +1145,9 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(Export3DS)
bpy.types.INFO_MT_file_export.append(menu_func) bpy.types.INFO_MT_file_export.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(Export3DS)
bpy.types.INFO_MT_file_export.remove(menu_func) bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -3439,12 +3439,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(ExportFBX)
bpy.types.INFO_MT_file_export.append(menu_func) bpy.types.INFO_MT_file_export.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(ExportFBX)
bpy.types.INFO_MT_file_export.remove(menu_func) bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -189,12 +189,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(ExportMDD)
bpy.types.INFO_MT_file_export.append(menu_func) bpy.types.INFO_MT_file_export.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(ExportMDD)
bpy.types.INFO_MT_file_export.remove(menu_func) bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -18,13 +18,6 @@
# <pep8 compliant> # <pep8 compliant>
"""
Name: 'Wavefront (.obj)...'
Blender: 248
Group: 'Export'
Tooltip: 'Save a Wavefront OBJ File'
"""
__author__ = "Campbell Barton, Jiri Hnidek, Paolo Ciccone" __author__ = "Campbell Barton, Jiri Hnidek, Paolo Ciccone"
__url__ = ['http://wiki.blender.org/index.php/Scripts/Manual/Export/wavefront_obj', 'www.blender.org', 'blenderartists.org'] __url__ = ['http://wiki.blender.org/index.php/Scripts/Manual/Export/wavefront_obj', 'www.blender.org', 'blenderartists.org']
__version__ = "1.21" __version__ = "1.21"
@@ -970,11 +963,9 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(ExportOBJ)
bpy.types.INFO_MT_file_export.append(menu_func) bpy.types.INFO_MT_file_export.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(ExportOBJ)
bpy.types.INFO_MT_file_export.remove(menu_func) bpy.types.INFO_MT_file_export.remove(menu_func)

View File

@@ -317,12 +317,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(ExportPLY)
bpy.types.INFO_MT_file_export.append(menu_func) bpy.types.INFO_MT_file_export.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(ExportPLY)
bpy.types.INFO_MT_file_export.remove(menu_func) bpy.types.INFO_MT_file_export.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -1248,11 +1248,9 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(ExportX3D)
bpy.types.INFO_MT_file_export.append(menu_func) bpy.types.INFO_MT_file_export.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(ExportX3D)
bpy.types.INFO_MT_file_export.remove(menu_func) bpy.types.INFO_MT_file_export.remove(menu_func)
# NOTES # NOTES

View File

@@ -612,12 +612,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(BvhImporter)
bpy.types.INFO_MT_file_import.append(menu_func) bpy.types.INFO_MT_file_import.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(BvhImporter)
bpy.types.INFO_MT_file_import.remove(menu_func) bpy.types.INFO_MT_file_import.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -1032,11 +1032,9 @@ def menu_func(self, context):
self.layout.operator(IMPORT_OT_autodesk_3ds.bl_idname, text="3D Studio (.3ds)") self.layout.operator(IMPORT_OT_autodesk_3ds.bl_idname, text="3D Studio (.3ds)")
def register(): def register():
bpy.types.register(IMPORT_OT_autodesk_3ds)
bpy.types.INFO_MT_file_import.append(menu_func) bpy.types.INFO_MT_file_import.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(IMPORT_OT_autodesk_3ds)
bpy.types.INFO_MT_file_import.remove(menu_func) bpy.types.INFO_MT_file_import.remove(menu_func)
# NOTES: # NOTES:

View File

@@ -1606,11 +1606,9 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(IMPORT_OT_obj)
bpy.types.INFO_MT_file_import.append(menu_func) bpy.types.INFO_MT_file_import.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(IMPORT_OT_obj)
bpy.types.INFO_MT_file_import.remove(menu_func) bpy.types.INFO_MT_file_import.remove(menu_func)

View File

@@ -143,12 +143,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(importMDD)
bpy.types.INFO_MT_file_import.append(menu_func) bpy.types.INFO_MT_file_import.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(importMDD)
bpy.types.INFO_MT_file_import.remove(menu_func) bpy.types.INFO_MT_file_import.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -189,7 +189,6 @@ def clientSendJob(conn, scene, anim = False):
def requestResult(conn, job_id, frame): def requestResult(conn, job_id, frame):
conn.request("GET", renderURL(job_id, frame)) conn.request("GET", renderURL(job_id, frame))
@rnaType
class NetworkRenderEngine(bpy.types.RenderEngine): class NetworkRenderEngine(bpy.types.RenderEngine):
bl_idname = 'NET_RENDER' bl_idname = 'NET_RENDER'
bl_label = "Network Render" bl_label = "Network Render"

View File

@@ -26,7 +26,6 @@ from netrender.utils import *
import netrender.client as client import netrender.client as client
import netrender.model import netrender.model
@rnaType
class RENDER_OT_netslave_bake(bpy.types.Operator): class RENDER_OT_netslave_bake(bpy.types.Operator):
'''NEED DESCRIPTION''' '''NEED DESCRIPTION'''
bl_idname = "render.netslavebake" bl_idname = "render.netslavebake"
@@ -84,7 +83,6 @@ class RENDER_OT_netslave_bake(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientanim(bpy.types.Operator): class RENDER_OT_netclientanim(bpy.types.Operator):
'''Start rendering an animation on network''' '''Start rendering an animation on network'''
bl_idname = "render.netclientanim" bl_idname = "render.netclientanim"
@@ -111,7 +109,6 @@ class RENDER_OT_netclientanim(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientrun(bpy.types.Operator): class RENDER_OT_netclientrun(bpy.types.Operator):
'''Start network rendering service''' '''Start network rendering service'''
bl_idname = "render.netclientstart" bl_idname = "render.netclientstart"
@@ -128,7 +125,6 @@ class RENDER_OT_netclientrun(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientsend(bpy.types.Operator): class RENDER_OT_netclientsend(bpy.types.Operator):
'''Send Render Job to the Network''' '''Send Render Job to the Network'''
bl_idname = "render.netclientsend" bl_idname = "render.netclientsend"
@@ -158,7 +154,6 @@ class RENDER_OT_netclientsend(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientsendframe(bpy.types.Operator): class RENDER_OT_netclientsendframe(bpy.types.Operator):
'''Send Render Job with current frame to the Network''' '''Send Render Job with current frame to the Network'''
bl_idname = "render.netclientsendframe" bl_idname = "render.netclientsendframe"
@@ -188,7 +183,6 @@ class RENDER_OT_netclientsendframe(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientstatus(bpy.types.Operator): class RENDER_OT_netclientstatus(bpy.types.Operator):
'''Refresh the status of the current jobs''' '''Refresh the status of the current jobs'''
bl_idname = "render.netclientstatus" bl_idname = "render.netclientstatus"
@@ -228,7 +222,6 @@ class RENDER_OT_netclientstatus(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientblacklistslave(bpy.types.Operator): class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
'''Operator documentation text, will be used for the operator tooltip and python docs.''' '''Operator documentation text, will be used for the operator tooltip and python docs.'''
bl_idname = "render.netclientblacklistslave" bl_idname = "render.netclientblacklistslave"
@@ -258,7 +251,6 @@ class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientwhitelistslave(bpy.types.Operator): class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
'''Operator documentation text, will be used for the operator tooltip and python docs.''' '''Operator documentation text, will be used for the operator tooltip and python docs.'''
bl_idname = "render.netclientwhitelistslave" bl_idname = "render.netclientwhitelistslave"
@@ -289,7 +281,6 @@ class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientslaves(bpy.types.Operator): class RENDER_OT_netclientslaves(bpy.types.Operator):
'''Refresh status about available Render slaves''' '''Refresh status about available Render slaves'''
bl_idname = "render.netclientslaves" bl_idname = "render.netclientslaves"
@@ -334,7 +325,6 @@ class RENDER_OT_netclientslaves(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientcancel(bpy.types.Operator): class RENDER_OT_netclientcancel(bpy.types.Operator):
'''Cancel the selected network rendering job.''' '''Cancel the selected network rendering job.'''
bl_idname = "render.netclientcancel" bl_idname = "render.netclientcancel"
@@ -363,7 +353,6 @@ class RENDER_OT_netclientcancel(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class RENDER_OT_netclientcancelall(bpy.types.Operator): class RENDER_OT_netclientcancelall(bpy.types.Operator):
'''Cancel all running network rendering jobs.''' '''Cancel all running network rendering jobs.'''
bl_idname = "render.netclientcancelall" bl_idname = "render.netclientcancelall"
@@ -390,7 +379,6 @@ class RENDER_OT_netclientcancelall(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class netclientdownload(bpy.types.Operator): class netclientdownload(bpy.types.Operator):
'''Download render results from the network''' '''Download render results from the network'''
bl_idname = "render.netclientdownload" bl_idname = "render.netclientdownload"
@@ -435,7 +423,6 @@ class netclientdownload(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class netclientscan(bpy.types.Operator): class netclientscan(bpy.types.Operator):
'''Listen on network for master server broadcasting its address and port.''' '''Listen on network for master server broadcasting its address and port.'''
bl_idname = "render.netclientscan" bl_idname = "render.netclientscan"
@@ -458,7 +445,6 @@ class netclientscan(bpy.types.Operator):
def invoke(self, context, event): def invoke(self, context, event):
return self.execute(context) return self.execute(context)
@rnaType
class netclientweb(bpy.types.Operator): class netclientweb(bpy.types.Operator):
'''Open new window with information about running rendering jobs''' '''Open new window with information about running rendering jobs'''
bl_idname = "render.netclientweb" bl_idname = "render.netclientweb"

View File

@@ -87,7 +87,6 @@ class RenderButtonsPanel():
return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES) return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
# Setting panel, use in the scene for now. # Setting panel, use in the scene for now.
@rnaType
class RENDER_PT_network_settings(bpy.types.Panel, RenderButtonsPanel): class RENDER_PT_network_settings(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Network Settings" bl_label = "Network Settings"
COMPAT_ENGINES = {'NET_RENDER'} COMPAT_ENGINES = {'NET_RENDER'}
@@ -122,7 +121,6 @@ class RENDER_PT_network_settings(bpy.types.Panel, RenderButtonsPanel):
layout.operator("render.netclientweb", icon='QUESTION') layout.operator("render.netclientweb", icon='QUESTION')
@rnaType
class RENDER_PT_network_slave_settings(bpy.types.Panel, RenderButtonsPanel): class RENDER_PT_network_slave_settings(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Slave Settings" bl_label = "Slave Settings"
COMPAT_ENGINES = {'NET_RENDER'} COMPAT_ENGINES = {'NET_RENDER'}
@@ -147,7 +145,7 @@ class RENDER_PT_network_slave_settings(bpy.types.Panel, RenderButtonsPanel):
sub = layout.column() sub = layout.column()
sub.enabled = rd.threads_mode == 'FIXED' sub.enabled = rd.threads_mode == 'FIXED'
sub.prop(rd, "threads") sub.prop(rd, "threads")
@rnaType
class RENDER_PT_network_master_settings(bpy.types.Panel, RenderButtonsPanel): class RENDER_PT_network_master_settings(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Master Settings" bl_label = "Master Settings"
COMPAT_ENGINES = {'NET_RENDER'} COMPAT_ENGINES = {'NET_RENDER'}
@@ -166,7 +164,6 @@ class RENDER_PT_network_master_settings(bpy.types.Panel, RenderButtonsPanel):
layout.prop(netsettings, "master_broadcast") layout.prop(netsettings, "master_broadcast")
layout.prop(netsettings, "master_clear") layout.prop(netsettings, "master_clear")
@rnaType
class RENDER_PT_network_job(bpy.types.Panel, RenderButtonsPanel): class RENDER_PT_network_job(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Job Settings" bl_label = "Job Settings"
COMPAT_ENGINES = {'NET_RENDER'} COMPAT_ENGINES = {'NET_RENDER'}
@@ -207,7 +204,6 @@ class RENDER_PT_network_job(bpy.types.Panel, RenderButtonsPanel):
row.prop(netsettings, "priority") row.prop(netsettings, "priority")
row.prop(netsettings, "chunks") row.prop(netsettings, "chunks")
@rnaType
class RENDER_PT_network_slaves(bpy.types.Panel, RenderButtonsPanel): class RENDER_PT_network_slaves(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Slaves Status" bl_label = "Slaves Status"
COMPAT_ENGINES = {'NET_RENDER'} COMPAT_ENGINES = {'NET_RENDER'}
@@ -246,7 +242,6 @@ class RENDER_PT_network_slaves(bpy.types.Panel, RenderButtonsPanel):
layout.label(text="Seen: " + time.ctime(slave.last_seen)) layout.label(text="Seen: " + time.ctime(slave.last_seen))
layout.label(text="Stats: " + slave.stats) layout.label(text="Stats: " + slave.stats)
@rnaType
class RENDER_PT_network_slaves_blacklist(bpy.types.Panel, RenderButtonsPanel): class RENDER_PT_network_slaves_blacklist(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Slaves Blacklist" bl_label = "Slaves Blacklist"
COMPAT_ENGINES = {'NET_RENDER'} COMPAT_ENGINES = {'NET_RENDER'}
@@ -284,7 +279,6 @@ class RENDER_PT_network_slaves_blacklist(bpy.types.Panel, RenderButtonsPanel):
layout.label(text="Seen: " + time.ctime(slave.last_seen)) layout.label(text="Seen: " + time.ctime(slave.last_seen))
layout.label(text="Stats: " + slave.stats) layout.label(text="Stats: " + slave.stats)
@rnaType
class RENDER_PT_network_jobs(bpy.types.Panel, RenderButtonsPanel): class RENDER_PT_network_jobs(bpy.types.Panel, RenderButtonsPanel):
bl_label = "Jobs" bl_label = "Jobs"
COMPAT_ENGINES = {'NET_RENDER'} COMPAT_ENGINES = {'NET_RENDER'}
@@ -325,15 +319,12 @@ class RENDER_PT_network_jobs(bpy.types.Panel, RenderButtonsPanel):
layout.label(text="Done: %04i" % job.results[DONE]) layout.label(text="Done: %04i" % job.results[DONE])
layout.label(text="Error: %04i" % job.results[ERROR]) layout.label(text="Error: %04i" % job.results[ERROR])
@rnaType
class NetRenderSettings(bpy.types.IDPropertyGroup): class NetRenderSettings(bpy.types.IDPropertyGroup):
pass pass
@rnaType
class NetRenderSlave(bpy.types.IDPropertyGroup): class NetRenderSlave(bpy.types.IDPropertyGroup):
pass pass
@rnaType
class NetRenderJob(bpy.types.IDPropertyGroup): class NetRenderJob(bpy.types.IDPropertyGroup):
pass pass

View File

@@ -57,10 +57,6 @@ FRAME_STATUS_TEXT = {
ERROR: "Error" ERROR: "Error"
} }
def rnaType(rna_type):
if bpy: bpy.types.register(rna_type)
return rna_type
def reporting(report, message, errorType = None): def reporting(report, message, errorType = None):
if errorType: if errorType:
t = 'ERROR' t = 'ERROR'

View File

@@ -30,7 +30,6 @@ import sys as _sys
from _bpy import blend_paths from _bpy import blend_paths
from _bpy import script_paths as _bpy_script_paths from _bpy import script_paths as _bpy_script_paths
def _test_import(module_name, loaded_modules): def _test_import(module_name, loaded_modules):
import traceback import traceback
import time import time
@@ -84,9 +83,9 @@ def modules_from_path(path, loaded_modules):
modules.append(mod) modules.append(mod)
return modules return modules
_loaded = [] # store loaded modules for reloading. _global_loaded_modules = [] # store loaded module names for reloading.
_bpy_types = __import__("bpy_types") # keep for comparisons, never ever reload this. import bpy_types as _bpy_types # keep for comparisons, never ever reload this.
def load_scripts(reload_scripts=False, refresh_scripts=False): def load_scripts(reload_scripts=False, refresh_scripts=False):
@@ -101,12 +100,39 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
import traceback import traceback
import time import time
# must be set back to True on exits
_bpy_types._register_immediate = False
t_main = time.time() t_main = time.time()
loaded_modules = set() loaded_modules = set()
if refresh_scripts: if refresh_scripts:
original_modules = _sys.modules.values() original_modules = _sys.modules.values()
if reload_scripts:
_bpy_types.TypeMap.clear()
_bpy_types.PropertiesMap.clear()
def register_module_call(mod):
_bpy_types._register_module(mod.__name__)
register = getattr(mod, "register", None)
if register:
try:
register()
except:
traceback.print_exc()
else:
print("\nWarning! '%s' has no register function, this is now a requirement for registerable scripts." % mod.__file__)
def unregister_module_call(mod):
_bpy_types._unregister_module(mod.__name__)
unregister = getattr(mod, "unregister", None)
if unregister:
try:
unregister()
except:
traceback.print_exc()
def sys_path_ensure(path): def sys_path_ensure(path):
if path not in _sys.path: # reloading would add twice if path not in _sys.path: # reloading would add twice
@@ -134,48 +160,23 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
mod = test_reload(mod) mod = test_reload(mod)
if mod: if mod:
register = getattr(mod, "register", None) register_module_call(mod)
if register: _global_loaded_modules.append(mod.__name__)
try:
register()
except:
traceback.print_exc()
else:
print("\nWarning! '%s' has no register function, this is now a requirement for registerable scripts." % mod.__file__)
_loaded.append(mod)
if reload_scripts: if reload_scripts:
# TODO, this is broken but should work, needs looking into # module names -> modules
''' _global_loaded_modules[:] = [_sys.modules[mod_name] for mod_name in _global_loaded_modules]
# reload modules that may not be directly included
for type_class_name in dir(_bpy.types):
type_class = getattr(_bpy.types, type_class_name)
module_name = getattr(type_class, "__module__", "")
if module_name and module_name != "bpy.types": # hard coded for C types
loaded_modules.add(module_name)
# sorting isnt needed but rather it be pradictable
for module_name in sorted(loaded_modules):
print("Reloading:", module_name)
test_reload(_sys.modules[module_name])
'''
# loop over and unload all scripts # loop over and unload all scripts
_loaded.reverse() _global_loaded_modules.reverse()
for mod in _loaded: for mod in _global_loaded_modules:
unregister = getattr(mod, "unregister", None) unregister_module_call(mod)
if unregister:
try:
unregister()
except:
traceback.print_exc()
for mod in _loaded: for mod in _global_loaded_modules:
reload(mod) test_reload(mod)
_loaded[:] = [] _global_loaded_modules[:] = []
user_path = user_script_path() user_path = user_script_path()
@@ -197,7 +198,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
# load addons # load addons
used_ext = {ext.module for ext in _bpy.context.user_preferences.addons} used_ext = {ext.module for ext in _bpy.context.user_preferences.addons}
paths = script_paths("addons") paths = script_paths("addons") + script_paths("addons_contrib")
for path in paths: for path in paths:
sys_path_ensure(path) sys_path_ensure(path)
@@ -211,6 +212,8 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
if _bpy.app.debug: if _bpy.app.debug:
print("Python Script Load Time %.4f" % (time.time() - t_main)) print("Python Script Load Time %.4f" % (time.time() - t_main))
_bpy_types._register_immediate = True
def expandpath(path): def expandpath(path):
@@ -336,7 +339,7 @@ _presets = _os.path.join(_scripts[0], "presets") # FIXME - multiple paths
def preset_paths(subdir): def preset_paths(subdir):
''' '''
Returns a list of paths for a spesific preset. Returns a list of paths for a specific preset.
''' '''
return (_os.path.join(_presets, subdir), ) return (_os.path.join(_presets, subdir), )

View File

@@ -19,6 +19,7 @@
# <pep8 compliant> # <pep8 compliant>
from _bpy import types as bpy_types from _bpy import types as bpy_types
import _bpy
from mathutils import Vector from mathutils import Vector
StructRNA = bpy_types.Struct.__bases__[0] StructRNA = bpy_types.Struct.__bases__[0]
@@ -539,8 +540,83 @@ class Text(bpy_types.ID):
import collections import collections
TypeMap = {}
# Properties (IDPropertyGroup) are different from types because they need to be registered
# before adding sub properties to them, so they are registered on definition
# and unregistered on unload
PropertiesMap = {}
class OrderedMeta(type): # Using our own loading function we set this to false
# so when running a script directly in the text editor
# registers moduals instantly.
_register_immediate = True
def _unregister_module(module, free=True):
for t in TypeMap.get(module, ()):
try:
bpy_types.unregister(t)
except:
import traceback
print("bpy.utils._unregister_module(): Module '%s' failed to unregister class '%s.%s'" % (module, t.__module__, t.__name__))
traceback.print_exc()
if free == True and module in TypeMap:
del TypeMap[module]
for t in PropertiesMap.get(module, ()):
try:
bpy_types.unregister(t)
except:
import traceback
print("bpy.utils._unload_module(): Module '%s' failed to unregister class '%s.%s'" % (module, t.__module__, t.__name__))
traceback.print_exc()
if free == True and module in PropertiesMap:
del PropertiesMap[module]
def _register_module(module):
for t in TypeMap.get(module, ()):
try:
bpy_types.register(t)
except:
import traceback
print("bpy.utils._register_module(): Module '%s' failed to register class '%s.%s'" % (module, t.__module__, t.__name__))
traceback.print_exc()
class RNAMeta(type):
@classmethod
def _register_immediate(cls):
return _register_immediate
def __new__(cls, name, bases, classdict, **args):
result = type.__new__(cls, name, bases, classdict)
if bases and bases[0] != StructRNA:
module = result.__module__
ClassMap = TypeMap
# Register right away if needed
if cls._register_immediate():
bpy_types.register(result)
ClassMap = PropertiesMap
# first part of packages only
if "." in module:
module = module[:module.index(".")]
ClassMap.setdefault(module, []).append(result)
return result
class RNAMetaRegister(RNAMeta):
@classmethod
def _register_immediate(cls):
return True
class OrderedMeta(RNAMeta):
def __init__(cls, name, bases, attributes): def __init__(cls, name, bases, attributes):
super(OrderedMeta, cls).__init__(name, bases, attributes) super(OrderedMeta, cls).__init__(name, bases, attributes)
@@ -549,7 +625,6 @@ class OrderedMeta(type):
def __prepare__(name, bases, **kwargs): def __prepare__(name, bases, **kwargs):
return collections.OrderedDict() return collections.OrderedDict()
# Only defined so operators members can be used by accessing self.order # Only defined so operators members can be used by accessing self.order
class Operator(StructRNA, metaclass=OrderedMeta): class Operator(StructRNA, metaclass=OrderedMeta):
__slots__ = () __slots__ = ()
@@ -564,7 +639,12 @@ class Macro(StructRNA, metaclass=OrderedMeta):
def define(self, opname): def define(self, opname):
from _bpy import ops from _bpy import ops
return ops.macro_define(self, opname) return ops.macro_define(self, opname)
class IDPropertyGroup(StructRNA, metaclass=RNAMetaRegister):
__slots__ = ()
class RenderEngine(StructRNA, metaclass=RNAMeta):
__slots__ = ()
class _GenericUI: class _GenericUI:
__slots__ = () __slots__ = ()
@@ -606,15 +686,15 @@ class _GenericUI:
pass pass
class Panel(StructRNA, _GenericUI): class Panel(StructRNA, _GenericUI, metaclass=RNAMeta):
__slots__ = () __slots__ = ()
class Header(StructRNA, _GenericUI): class Header(StructRNA, _GenericUI, metaclass=RNAMeta):
__slots__ = () __slots__ = ()
class Menu(StructRNA, _GenericUI): class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
__slots__ = () __slots__ = ()
def path_menu(self, searchpaths, operator, props_default={}): def path_menu(self, searchpaths, operator, props_default={}):

View File

@@ -124,7 +124,7 @@ def draw(layout, context, context_member, use_edit=True):
assign_props(prop, val_draw, key) assign_props(prop, val_draw, key)
class PropertyPanel(bpy.types.Panel): class PropertyPanel():
""" """
The subclass should have its own poll function The subclass should have its own poll function
and the variable '_context_path' MUST be set. and the variable '_context_path' MUST be set.
@@ -135,130 +135,3 @@ class PropertyPanel(bpy.types.Panel):
def draw(self, context): def draw(self, context):
draw(self.layout, context, self._context_path) draw(self.layout, context, self._context_path)
from bpy.props import *
rna_path = StringProperty(name="Property Edit",
description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'})
rna_value = StringProperty(name="Property Value",
description="Property value edit", maxlen=1024, default="")
rna_property = StringProperty(name="Property Name",
description="Property name edit", maxlen=1024, default="")
rna_min = FloatProperty(name="Min", default=0.0, precision=3)
rna_max = FloatProperty(name="Max", default=1.0, precision=3)
class WM_OT_properties_edit(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_edit"
bl_label = "Edit Property"
data_path = rna_path
property = rna_property
value = rna_value
min = rna_min
max = rna_max
description = StringProperty(name="Tip", default="")
def execute(self, context):
data_path = self.properties.data_path
value = self.properties.value
prop = self.properties.property
prop_old = self._last_prop[0]
try:
value_eval = eval(value)
except:
value_eval = value
# First remove
item = eval("context.%s" % data_path)
rna_idprop_ui_prop_clear(item, prop_old)
exec_str = "del item['%s']" % prop_old
# print(exec_str)
exec(exec_str)
# Reassign
exec_str = "item['%s'] = %s" % (prop, repr(value_eval))
# print(exec_str)
exec(exec_str)
self._last_prop[:] = [prop]
prop_type = type(item[prop])
prop_ui = rna_idprop_ui_prop_get(item, prop)
if prop_type in (float, int):
prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.properties.min)
prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.properties.max)
prop_ui['description'] = self.properties.description
return {'FINISHED'}
def invoke(self, context, event):
self._last_prop = [self.properties.property]
item = eval("context.%s" % self.properties.data_path)
# setup defaults
prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
if prop_ui:
self.properties.min = prop_ui.get("min", -1000000000)
self.properties.max = prop_ui.get("max", 1000000000)
self.properties.description = prop_ui.get("description", "")
wm = context.manager
# This crashes, TODO - fix
#return wm.invoke_props_popup(self, event)
wm.invoke_props_popup(self, event)
return {'RUNNING_MODAL'}
class WM_OT_properties_add(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_add"
bl_label = "Add Property"
data_path = rna_path
def execute(self, context):
item = eval("context.%s" % self.properties.data_path)
def unique_name(names):
prop = 'prop'
prop_new = prop
i = 1
while prop_new in names:
prop_new = prop + str(i)
i += 1
return prop_new
property = unique_name(item.keys())
item[property] = 1.0
return {'FINISHED'}
class WM_OT_properties_remove(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_remove"
bl_label = "Remove Property"
data_path = rna_path
property = rna_property
def execute(self, context):
item = eval("context.%s" % self.properties.data_path)
del item[self.properties.property]
return {'FINISHED'}

View File

@@ -606,12 +606,10 @@ menu_func = (lambda self, context: self.layout.operator(AddHuman.bl_idname,
def register(): def register():
bpy.types.register(AddHuman)
bpy.types.INFO_MT_armature_add.append(menu_func) bpy.types.INFO_MT_armature_add.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(AddHuman)
bpy.types.INFO_MT_armature_add.remove(menu_func) bpy.types.INFO_MT_armature_add.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -137,12 +137,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(AddTorus)
bpy.types.INFO_MT_mesh_add.append(menu_func) bpy.types.INFO_MT_mesh_add.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(AddTorus)
bpy.types.INFO_MT_mesh_add.remove(menu_func) bpy.types.INFO_MT_mesh_add.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -44,16 +44,17 @@ def get_console(console_id):
from code import InteractiveConsole from code import InteractiveConsole
consoles = getattr(get_console, "consoles", None) consoles = getattr(get_console, "consoles", None)
hash_next = hash(bpy.context.manager)
if consoles is None: if consoles is None:
consoles = get_console.consoles = {} consoles = get_console.consoles = {}
get_console.consoles_namespace_hash = hash_next
else: else:
# check if clearning the namespace is needed to avoid a memory leak. # check if clearning the namespace is needed to avoid a memory leak.
# the window manager is normally loaded with new blend files # the window manager is normally loaded with new blend files
# so this is a reasonable way to deal with namespace clearing. # so this is a reasonable way to deal with namespace clearing.
# bpy.data hashing is reset by undo so cant be used. # bpy.data hashing is reset by undo so cant be used.
hash_prev = getattr(get_console, "consoles_namespace_hash", 0) hash_prev = getattr(get_console, "consoles_namespace_hash", 0)
hash_next = hash(bpy.context.manager)
if hash_prev != hash_next: if hash_prev != hash_next:
get_console.consoles_namespace_hash = hash_next get_console.consoles_namespace_hash = hash_next

View File

@@ -56,10 +56,10 @@ class DiscontFilterOp(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
def register(): def register():
bpy.types.register(DiscontFilterOp) pass
def unregister(): def unregister():
bpy.types.unregister(DiscontFilterOp) pass
if __name__ == "__main__": if __name__ == "__main__":
register() register()

View File

@@ -56,13 +56,15 @@ class EditExternally(bpy.types.Operator):
return image_editor return image_editor
def execute(self, context): def execute(self, context):
import os
import subprocess import subprocess
filepath = self.properties.filepath filepath = bpy.utils.expandpath(self.properties.filepath)
image_editor = self._editor_guess(context)
cmd = [] if not os.path.exists(filepath):
cmd.extend(image_editor) self.report('ERROR', "Image path '%s' not found." % filepath)
cmd.append(bpy.utils.expandpath(filepath)) return {'CANCELLED'}
cmd = self._editor_guess(context) + [filepath]
subprocess.Popen(cmd) subprocess.Popen(cmd)
@@ -186,23 +188,12 @@ class ProjectApply(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
classes = [
EditExternally,
SaveDirty,
ProjectEdit,
ProjectApply]
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

@@ -172,22 +172,12 @@ class MeshMirrorUV(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
# Register the operator
classes = [
MeshSelectInteriorFaces,
MeshMirrorUV]
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

@@ -178,12 +178,12 @@ class BakeAction(bpy.types.Operator):
def register(): def register():
bpy.types.register(BakeAction) pass
# bpy.types.INFO_MT_mesh_add.append(menu_func) # bpy.types.INFO_MT_mesh_add.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(BakeAction) pass
# bpy.types.INFO_MT_mesh_add.remove(menu_func) # bpy.types.INFO_MT_mesh_add.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -558,28 +558,12 @@ class ClearAllRestrictRender(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
classes = [
SelectPattern,
SelectCamera,
SelectHierarchy,
SubdivisionSet,
ShapeTransfer,
JoinUVs,
IsolateTypeRender,
MakeDupliFace,
ClearAllRestrictRender]
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

@@ -286,12 +286,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(AlignObjects)
bpy.types.VIEW3D_MT_transform.append(menu_func) bpy.types.VIEW3D_MT_transform.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(AlignObjects)
bpy.types.VIEW3D_MT_transform.remove(menu_func) bpy.types.VIEW3D_MT_transform.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -140,12 +140,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(RandomizeLocRotSize)
bpy.types.VIEW3D_MT_transform.append(menu_func) bpy.types.VIEW3D_MT_transform.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(RandomizeLocRotSize)
bpy.types.VIEW3D_MT_transform.remove(menu_func) bpy.types.VIEW3D_MT_transform.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -22,7 +22,7 @@ import bpy
import os import os
class AddPresetBase(bpy.types.Operator): class AddPresetBase():
'''Base preset class, only for subclassing '''Base preset class, only for subclassing
subclasses must define subclasses must define
- preset_values - preset_values
@@ -91,7 +91,7 @@ class ExecutePreset(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
class AddPresetRender(AddPresetBase): class AddPresetRender(AddPresetBase, bpy.types.Operator):
'''Add a Render Preset''' '''Add a Render Preset'''
bl_idname = "render.preset_add" bl_idname = "render.preset_add"
bl_label = "Add Render Preset" bl_label = "Add Render Preset"
@@ -113,7 +113,7 @@ class AddPresetRender(AddPresetBase):
preset_subdir = "render" preset_subdir = "render"
class AddPresetSSS(AddPresetBase): class AddPresetSSS(AddPresetBase, bpy.types.Operator):
'''Add a Subsurface Scattering Preset''' '''Add a Subsurface Scattering Preset'''
bl_idname = "material.sss_preset_add" bl_idname = "material.sss_preset_add"
bl_label = "Add SSS Preset" bl_label = "Add SSS Preset"
@@ -138,7 +138,7 @@ class AddPresetSSS(AddPresetBase):
preset_subdir = "sss" preset_subdir = "sss"
class AddPresetCloth(AddPresetBase): class AddPresetCloth(AddPresetBase, bpy.types.Operator):
'''Add a Cloth Preset''' '''Add a Cloth Preset'''
bl_idname = "cloth.preset_add" bl_idname = "cloth.preset_add"
bl_label = "Add Cloth Preset" bl_label = "Add Cloth Preset"
@@ -156,7 +156,7 @@ class AddPresetCloth(AddPresetBase):
preset_subdir = "cloth" preset_subdir = "cloth"
class AddPresetSunSky(AddPresetBase): class AddPresetSunSky(AddPresetBase, bpy.types.Operator):
'''Add a Sky & Atmosphere Preset''' '''Add a Sky & Atmosphere Preset'''
bl_idname = "lamp.sunsky_preset_add" bl_idname = "lamp.sunsky_preset_add"
bl_label = "Add Sunsky Preset" bl_label = "Add Sunsky Preset"
@@ -181,7 +181,7 @@ class AddPresetSunSky(AddPresetBase):
preset_subdir = "sunsky" preset_subdir = "sunsky"
class AddPresetInteraction(AddPresetBase): class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
'''Add an Application Interaction Preset''' '''Add an Application Interaction Preset'''
bl_idname = "wm.interaction_preset_add" bl_idname = "wm.interaction_preset_add"
bl_label = "Add Interaction Preset" bl_label = "Add Interaction Preset"
@@ -203,25 +203,12 @@ class AddPresetInteraction(AddPresetBase):
preset_subdir = "interaction" preset_subdir = "interaction"
classes = [
ExecutePreset,
AddPresetRender,
AddPresetSSS,
AddPresetCloth,
AddPresetSunSky,
AddPresetInteraction]
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

@@ -144,11 +144,11 @@ class PlayRenderedAnim(bpy.types.Operator):
def register(): def register():
bpy.types.register(PlayRenderedAnim) pass
def unregister(): def unregister():
bpy.types.unregister(PlayRenderedAnim) pass
if __name__ == "__main__": if __name__ == "__main__":
register() register()

View File

@@ -132,19 +132,11 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
def register(): def register():
register = bpy.types.register pass
register(SequencerCrossfadeSounds)
register(SequencerCutMulticam)
register(SequencerDeinterlaceSelectedMovies)
def unregister(): def unregister():
unregister = bpy.types.unregister pass
unregister(SequencerCrossfadeSounds)
unregister(SequencerCutMulticam)
unregister(SequencerDeinterlaceSelectedMovies)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -216,12 +216,10 @@ def menu_func(self, context):
def register(): def register():
bpy.types.register(ExportUVLayout)
bpy.types.IMAGE_MT_uvs.append(menu_func) bpy.types.IMAGE_MT_uvs.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(ExportUVLayout)
bpy.types.IMAGE_MT_uvs.remove(menu_func) bpy.types.IMAGE_MT_uvs.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -263,12 +263,10 @@ menu_func = (lambda self, context: self.layout.operator(FollowActiveQuads.bl_idn
def register(): def register():
bpy.types.register(FollowActiveQuads)
bpy.types.VIEW3D_MT_uv_map.append(menu_func) bpy.types.VIEW3D_MT_uv_map.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(FollowActiveQuads)
bpy.types.VIEW3D_MT_uv_map.remove(menu_func) bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -1138,12 +1138,10 @@ menu_func = (lambda self, context: self.layout.operator(SmartProject.bl_idname,
def register(): def register():
bpy.types.register(SmartProject)
bpy.types.VIEW3D_MT_uv_map.append(menu_func) bpy.types.VIEW3D_MT_uv_map.append(menu_func)
def unregister(): def unregister():
bpy.types.unregister(SmartProject)
bpy.types.VIEW3D_MT_uv_map.remove(menu_func) bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -180,11 +180,11 @@ class VertexPaintDirt(bpy.types.Operator):
def register(): def register():
bpy.types.register(VertexPaintDirt) pass
def unregister(): def unregister():
bpy.types.unregister(VertexPaintDirt) pass
if __name__ == "__main__": if __name__ == "__main__":
register() register()

View File

@@ -21,7 +21,7 @@
import bpy import bpy
from bpy.props import * from bpy.props import *
from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear
class MESH_OT_delete_edgeloop(bpy.types.Operator): class MESH_OT_delete_edgeloop(bpy.types.Operator):
'''Delete an edge loop by merging the faces on each side to a single face loop''' '''Delete an edge loop by merging the faces on each side to a single face loop'''
@@ -325,6 +325,42 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
exec("context.%s=advance_enum" % self.properties.data_path) exec("context.%s=advance_enum" % self.properties.data_path)
return {'FINISHED'} return {'FINISHED'}
class WM_OT_context_set_id(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_set_id"
bl_label = "Set Library ID"
bl_options = {'UNDO'}
data_path = rna_path_prop
value = StringProperty(name="Value",
description="Assign value", maxlen=1024, default="")
def execute(self, context):
value = self.properties.value
data_path = self.properties.data_path
# match the pointer type from the target property to bpy.data.*
# so we lookup the correct list.
data_path_base, data_path_prop = data_path.rsplit(".", 1)
data_prop_rna = eval("context.%s" % data_path_base).rna_type.properties[data_path_prop]
data_prop_rna_type = data_prop_rna.fixed_type
id_iter = None
for prop in bpy.data.rna_type.properties:
if prop.rna_type.identifier == "CollectionProperty":
if prop.fixed_type == data_prop_rna_type:
id_iter = prop.identifier
break
if id_iter:
value_id = getattr(bpy.data, id_iter).get(value)
exec("context.%s=value_id" % data_path)
return {'FINISHED'}
doc_id = StringProperty(name="Doc ID", doc_id = StringProperty(name="Doc ID",
description="", maxlen=1024, default="", options={'HIDDEN'}) description="", maxlen=1024, default="", options={'HIDDEN'})
@@ -576,46 +612,139 @@ class WM_OT_doc_edit(bpy.types.Operator):
return wm.invoke_props_dialog(self, width=600) return wm.invoke_props_dialog(self, width=600)
import rna_prop_ui from bpy.props import *
classes = [
MESH_OT_delete_edgeloop,
WM_OT_context_set_boolean, rna_path = StringProperty(name="Property Edit",
WM_OT_context_set_int, description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'})
WM_OT_context_scale_int,
WM_OT_context_set_float,
WM_OT_context_set_string,
WM_OT_context_set_enum,
WM_OT_context_set_value,
WM_OT_context_toggle,
WM_OT_context_toggle_enum,
WM_OT_context_cycle_enum,
WM_OT_context_cycle_int,
WM_OT_context_modal_mouse,
WM_OT_url_open, rna_value = StringProperty(name="Property Value",
WM_OT_path_open, description="Property value edit", maxlen=1024, default="")
WM_OT_doc_view, rna_property = StringProperty(name="Property Name",
WM_OT_doc_edit, description="Property name edit", maxlen=1024, default="")
# experemental! rna_min = FloatProperty(name="Min", default=0.0, precision=3)
rna_prop_ui.WM_OT_properties_edit, rna_max = FloatProperty(name="Max", default=1.0, precision=3)
rna_prop_ui.WM_OT_properties_add,
rna_prop_ui.WM_OT_properties_remove]
class WM_OT_properties_edit(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_edit"
bl_label = "Edit Property"
data_path = rna_path
property = rna_property
value = rna_value
min = rna_min
max = rna_max
description = StringProperty(name="Tip", default="")
def execute(self, context):
data_path = self.properties.data_path
value = self.properties.value
prop = self.properties.property
prop_old = self._last_prop[0]
try:
value_eval = eval(value)
except:
value_eval = value
# First remove
item = eval("context.%s" % data_path)
rna_idprop_ui_prop_clear(item, prop_old)
exec_str = "del item['%s']" % prop_old
# print(exec_str)
exec(exec_str)
# Reassign
exec_str = "item['%s'] = %s" % (prop, repr(value_eval))
# print(exec_str)
exec(exec_str)
self._last_prop[:] = [prop]
prop_type = type(item[prop])
prop_ui = rna_idprop_ui_prop_get(item, prop)
if prop_type in (float, int):
prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.properties.min)
prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.properties.max)
prop_ui['description'] = self.properties.description
return {'FINISHED'}
def invoke(self, context, event):
self._last_prop = [self.properties.property]
item = eval("context.%s" % self.properties.data_path)
# setup defaults
prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
if prop_ui:
self.properties.min = prop_ui.get("min", -1000000000)
self.properties.max = prop_ui.get("max", 1000000000)
self.properties.description = prop_ui.get("description", "")
wm = context.manager
# This crashes, TODO - fix
#return wm.invoke_props_popup(self, event)
wm.invoke_props_popup(self, event)
return {'RUNNING_MODAL'}
class WM_OT_properties_add(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_add"
bl_label = "Add Property"
data_path = rna_path
def execute(self, context):
item = eval("context.%s" % self.properties.data_path)
def unique_name(names):
prop = 'prop'
prop_new = prop
i = 1
while prop_new in names:
prop_new = prop + str(i)
i += 1
return prop_new
property = unique_name(item.keys())
item[property] = 1.0
return {'FINISHED'}
class WM_OT_properties_remove(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_remove"
bl_label = "Remove Property"
data_path = rna_path
property = rna_property
def execute(self, context):
item = eval("context.%s" % self.properties.data_path)
del item[self.properties.property]
return {'FINISHED'}
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

@@ -54,9 +54,6 @@ class ExportSomeData(bpy.types.Operator):
return self.execute(context) return self.execute(context)
bpy.types.register(ExportSomeData)
# Only needed if you want to add into a dynamic menu # Only needed if you want to add into a dynamic menu
menu_func = lambda self, context: self.layout.operator("export.some_data", text="Example Exporter...") menu_func = lambda self, context: self.layout.operator("export.some_data", text="Example Exporter...")
bpy.types.INFO_MT_file_export.append(menu_func) bpy.types.INFO_MT_file_export.append(menu_func)

View File

@@ -34,7 +34,5 @@ class ModalOperator(bpy.types.Operator):
return {'CANCELLED'} return {'CANCELLED'}
bpy.types.register(ModalOperator)
if __name__ == "__main__": if __name__ == "__main__":
bpy.ops.object.modal_operator() bpy.ops.object.modal_operator()

View File

@@ -64,15 +64,3 @@ class ModalDrawOperator(bpy.types.Operator):
else: else:
self.report({'WARNING'}, "View3D not found, cannot run operator") self.report({'WARNING'}, "View3D not found, cannot run operator")
return {'CANCELLED'} return {'CANCELLED'}
def register():
bpy.types.register(ModalDrawOperator)
def unregister():
bpy.types.unregister(ModalDrawOperator)
if __name__ == "__main__":
register()

View File

@@ -51,6 +51,3 @@ class ViewOperator(bpy.types.Operator):
else: else:
self.report({'WARNING'}, "Active space must be a View3d") self.report({'WARNING'}, "Active space must be a View3d")
return {'CANCELLED'} return {'CANCELLED'}
bpy.types.register(ViewOperator)

View File

@@ -16,11 +16,6 @@ class SimpleOperator(bpy.types.Operator):
main(context) main(context)
return {'FINISHED'} return {'FINISHED'}
def register():
bpy.types.register(SimpleOperator)
def unregister():
bpy.types.unregister(SimpleOperator)
if __name__ == "__main__": if __name__ == "__main__":
register() bpy.ops.object.simple_operator()

View File

@@ -24,8 +24,9 @@ def main(context):
if is_editmode: if is_editmode:
bpy.ops.object.mode_set(mode='EDIT', toggle=False) bpy.ops.object.mode_set(mode='EDIT', toggle=False)
class UvOperator(bpy.types.Operator): class UvOperator(bpy.types.Operator):
'''''' '''UV Operator description'''
bl_idname = "uv.simple_operator" bl_idname = "uv.simple_operator"
bl_label = "Simple UV Operator" bl_label = "Simple UV Operator"
@@ -37,7 +38,6 @@ class UvOperator(bpy.types.Operator):
main(context) main(context)
return {'FINISHED'} return {'FINISHED'}
bpy.types.register(UvOperator)
if __name__ == "__main__": if __name__ == "__main__":
bpy.ops.uv.simple_operator() bpy.ops.uv.simple_operator()

View File

@@ -18,5 +18,3 @@ class OBJECT_PT_hello(bpy.types.Panel):
row.label(text="Active object is: " + obj.name) row.label(text="Active object is: " + obj.name)
row = layout.row() row = layout.row()
row.prop(obj, "name") row.prop(obj, "name")
bpy.types.register(OBJECT_PT_hello)

View File

@@ -25,7 +25,7 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
# Generic Panels (Independent of DataType) # Generic Panels (Independent of DataType)
class MotionPathButtonsPanel(bpy.types.Panel): class MotionPathButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_label = "Motion Paths" bl_label = "Motion Paths"
@@ -67,7 +67,7 @@ class MotionPathButtonsPanel(bpy.types.Panel):
# FIXME: this panel still needs to be ported so that it will work correctly with animviz # FIXME: this panel still needs to be ported so that it will work correctly with animviz
class OnionSkinButtonsPanel(bpy.types.Panel): class OnionSkinButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_label = "Onion Skinning" bl_label = "Onion Skinning"
@@ -102,119 +102,19 @@ class OnionSkinButtonsPanel(bpy.types.Panel):
col.label(text="Display:") col.label(text="Display:")
col.prop(arm, "ghost_only_selected", text="Selected Only") col.prop(arm, "ghost_only_selected", text="Selected Only")
################################################
# Specific Panels for DataTypes
class OBJECT_PT_motion_paths(MotionPathButtonsPanel):
#bl_label = "Object Motion Paths"
bl_context = "object"
def poll(self, context):
return (context.object)
def draw(self, context):
layout = self.layout
ob = context.object
wide_ui = context.region.width > narrowui
self.draw_settings(context, ob.animation_visualisation, wide_ui)
layout.separator()
split = layout.split()
col = split.column()
col.operator("object.paths_calculate", text="Calculate Paths")
if wide_ui:
col = split.column()
col.operator("object.paths_clear", text="Clear Paths")
class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel):
#bl_label = "Object Onion Skinning"
bl_context = "object"
def poll(self, context):
return (context.object)
def draw(self, context):
layout = self.layout
ob = context.object
wide_ui = context.region.width > narrowui
self.draw_settings(context, ob.animation_visualisation, wide_ui)
class DATA_PT_motion_paths(MotionPathButtonsPanel):
#bl_label = "Bones Motion Paths"
bl_context = "data"
def poll(self, context):
# XXX: include posemode check?
return (context.object) and (context.armature)
def draw(self, context):
layout = self.layout
ob = context.object
wide_ui = context.region.width > narrowui
self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
layout.separator()
split = layout.split()
col = split.column()
col.operator("pose.paths_calculate", text="Calculate Paths")
if wide_ui:
col = split.column()
col.operator("pose.paths_clear", text="Clear Paths")
class DATA_PT_onion_skinning(OnionSkinButtonsPanel):
#bl_label = "Bones Onion Skinning"
bl_context = "data"
def poll(self, context):
# XXX: include posemode check?
return (context.object) and (context.armature)
def draw(self, context):
layout = self.layout
ob = context.object
wide_ui = context.region.width > narrowui
self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
# NOTE: # NOTE:
# The specialised panel types defined here (i.e. OBJECT_PT_*, etc.) # The specialised panel types are derived in their respective UI modules
# aren't registered here, but are rather imported to (and registered)
# in the files defining the contexts where they reside. Otherwise,
# these panels appear at the top of the lists by default.
#
# However, we keep these empty register funcs here just in case
# something will need them again one day, and also to make
# it easier to maintain these scripts.
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

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "data" bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.armature return context.armature
class DATA_PT_context_arm(DataButtonsPanel): class DATA_PT_context_arm(DataButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
@@ -56,11 +56,11 @@ class DATA_PT_context_arm(DataButtonsPanel):
layout.template_ID(ob, "data") layout.template_ID(ob, "data")
class DATA_PT_custom_props_arm(DataButtonsPanel, PropertyPanel): class DATA_PT_custom_props_arm(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data" _context_path = "object.data"
class DATA_PT_skeleton(DataButtonsPanel): class DATA_PT_skeleton(DataButtonsPanel, bpy.types.Panel):
bl_label = "Skeleton" bl_label = "Skeleton"
def draw(self, context): def draw(self, context):
@@ -95,7 +95,7 @@ class DATA_PT_skeleton(DataButtonsPanel):
col.prop(arm, "deform_quaternion", text="Quaternion") col.prop(arm, "deform_quaternion", text="Quaternion")
class DATA_PT_display(DataButtonsPanel): class DATA_PT_display(DataButtonsPanel, bpy.types.Panel):
bl_label = "Display" bl_label = "Display"
def draw(self, context): def draw(self, context):
@@ -124,7 +124,7 @@ class DATA_PT_display(DataButtonsPanel):
col.prop(arm, "delay_deform", text="Delay Refresh") col.prop(arm, "delay_deform", text="Delay Refresh")
class DATA_PT_bone_groups(DataButtonsPanel): class DATA_PT_bone_groups(DataButtonsPanel, bpy.types.Panel):
bl_label = "Bone Groups" bl_label = "Bone Groups"
def poll(self, context): def poll(self, context):
@@ -174,7 +174,7 @@ class DATA_PT_bone_groups(DataButtonsPanel):
# TODO: this panel will soon be depreceated too # TODO: this panel will soon be depreceated too
class DATA_PT_ghost(DataButtonsPanel): class DATA_PT_ghost(DataButtonsPanel, bpy.types.Panel):
bl_label = "Ghost" bl_label = "Ghost"
def draw(self, context): def draw(self, context):
@@ -207,7 +207,7 @@ class DATA_PT_ghost(DataButtonsPanel):
col.prop(arm, "ghost_only_selected", text="Selected Only") col.prop(arm, "ghost_only_selected", text="Selected Only")
class DATA_PT_iksolver_itasc(DataButtonsPanel): class DATA_PT_iksolver_itasc(DataButtonsPanel, bpy.types.Panel):
bl_label = "iTaSC parameters" bl_label = "iTaSC parameters"
bl_default_closed = True bl_default_closed = True
@@ -261,33 +261,58 @@ class DATA_PT_iksolver_itasc(DataButtonsPanel):
row.prop(itasc, "dampmax", text="Damp", slider=True) row.prop(itasc, "dampmax", text="Damp", slider=True)
row.prop(itasc, "dampeps", text="Eps", slider=True) row.prop(itasc, "dampeps", text="Eps", slider=True)
# import generic panels from other files from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
from properties_animviz import DATA_PT_motion_paths, DATA_PT_onion_skinning
classes = [ class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
DATA_PT_context_arm, #bl_label = "Bones Motion Paths"
DATA_PT_skeleton, bl_context = "data"
DATA_PT_display,
DATA_PT_bone_groups,
DATA_PT_ghost,
DATA_PT_iksolver_itasc,
DATA_PT_motion_paths, def poll(self, context):
#DATA_PT_onion_skinning, # XXX: include posemode check?
return (context.object) and (context.armature)
DATA_PT_custom_props_arm] def draw(self, context):
layout = self.layout
ob = context.object
wide_ui = context.region.width > narrowui
self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
layout.separator()
split = layout.split()
col = split.column()
col.operator("pose.paths_calculate", text="Calculate Paths")
if wide_ui:
col = split.column()
col.operator("pose.paths_clear", text="Clear Paths")
class DATA_PT_onion_skinning(OnionSkinButtonsPanel): #, bpy.types.Panel): # inherit from panel when ready
#bl_label = "Bones Onion Skinning"
bl_context = "data"
def poll(self, context):
# XXX: include posemode check?
return (context.object) and (context.armature)
def draw(self, context):
layout = self.layout
ob = context.object
wide_ui = context.region.width > narrowui
self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
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

@@ -307,33 +307,11 @@ class INFO_MT_armature_metarig_add(bpy.types.Menu):
text = bpy.utils.display_name(submodule_type) text = bpy.utils.display_name(submodule_type)
layout.operator("pose.metarig_sample_add", text=text, icon='OUTLINER_OB_ARMATURE').metarig_type = submodule_type layout.operator("pose.metarig_sample_add", text=text, icon='OUTLINER_OB_ARMATURE').metarig_type = submodule_type
classes = [
DATA_PT_template,
PoseTemplateSettings,
PoseTemplate,
Reload,
Generate,
Validate,
Sample,
Graph,
AsScript,
ActiveAssign,
ActiveClear,
INFO_MT_armature_metarig_add]
menu_func = (lambda self, context: self.layout.menu("INFO_MT_armature_metarig_add", icon='OUTLINER_OB_ARMATURE')) menu_func = (lambda self, context: self.layout.menu("INFO_MT_armature_metarig_add", icon='OUTLINER_OB_ARMATURE'))
import space_info # ensure the menu is loaded first import space_info # ensure the menu is loaded first
def register(): def register():
register = bpy.types.register
for cls in classes:
register(cls)
PoseTemplate.StringProperty(attr="name", PoseTemplate.StringProperty(attr="name",
name="Name of the slave", name="Name of the slave",
description="", description="",
@@ -361,10 +339,6 @@ def register():
def unregister(): def unregister():
bpy.types.Scene.RemoveProperty("pose_templates") bpy.types.Scene.RemoveProperty("pose_templates")
unregister = bpy.types.unregister
for cls in classes:
unregister(cls)
space_info.INFO_MT_armature_add.remove(menu_func) space_info.INFO_MT_armature_add.remove(menu_func)
if __name__ == "__main__": if __name__ == "__main__":

View File

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class BoneButtonsPanel(bpy.types.Panel): class BoneButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "bone" bl_context = "bone"
@@ -32,7 +32,7 @@ class BoneButtonsPanel(bpy.types.Panel):
return (context.bone or context.edit_bone) return (context.bone or context.edit_bone)
class BONE_PT_context_bone(BoneButtonsPanel): class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
@@ -48,7 +48,7 @@ class BONE_PT_context_bone(BoneButtonsPanel):
row.prop(bone, "name", text="") row.prop(bone, "name", text="")
class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel): class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):
@property @property
def _context_path(self): def _context_path(self):
@@ -59,7 +59,7 @@ class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel):
return "active_bone" return "active_bone"
class BONE_PT_transform(BoneButtonsPanel): class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Transform" bl_label = "Transform"
def draw(self, context): def draw(self, context):
@@ -128,7 +128,7 @@ class BONE_PT_transform(BoneButtonsPanel):
col.prop(pchan, "scale") col.prop(pchan, "scale")
class BONE_PT_transform_locks(BoneButtonsPanel): class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Transform Locks" bl_label = "Transform Locks"
bl_default_closed = True bl_default_closed = True
@@ -159,7 +159,7 @@ class BONE_PT_transform_locks(BoneButtonsPanel):
row.column().prop(pchan, "lock_scale") row.column().prop(pchan, "lock_scale")
class BONE_PT_relations(BoneButtonsPanel): class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Relations" bl_label = "Relations"
def draw(self, context): def draw(self, context):
@@ -206,7 +206,7 @@ class BONE_PT_relations(BoneButtonsPanel):
sub.prop(bone, "local_location", text="Local Location") sub.prop(bone, "local_location", text="Local Location")
class BONE_PT_display(BoneButtonsPanel): class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Display" bl_label = "Display"
def poll(self, context): def poll(self, context):
@@ -242,7 +242,7 @@ class BONE_PT_display(BoneButtonsPanel):
col.prop_object(pchan, "custom_shape_transform", ob.pose, "bones", text="At") col.prop_object(pchan, "custom_shape_transform", ob.pose, "bones", text="At")
class BONE_PT_inverse_kinematics(BoneButtonsPanel): class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Inverse Kinematics" bl_label = "Inverse Kinematics"
bl_default_closed = True bl_default_closed = True
@@ -340,7 +340,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel):
#row.prop(pchan, "ik_lin_weight", text="Weight", slider=True) #row.prop(pchan, "ik_lin_weight", text="Weight", slider=True)
class BONE_PT_deform(BoneButtonsPanel): class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
bl_label = "Deform" bl_label = "Deform"
bl_default_closed = True bl_default_closed = True
@@ -390,28 +390,13 @@ class BONE_PT_deform(BoneButtonsPanel):
col.label(text="Offset:") col.label(text="Offset:")
col.prop(bone, "cyclic_offset") col.prop(bone, "cyclic_offset")
classes = [
BONE_PT_context_bone,
BONE_PT_transform,
BONE_PT_transform_locks,
BONE_PT_relations,
BONE_PT_display,
BONE_PT_inverse_kinematics,
BONE_PT_deform,
BONE_PT_custom_props]
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

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "data" bl_context = "data"
@@ -33,7 +33,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.camera and (engine in self.COMPAT_ENGINES) return context.camera and (engine in self.COMPAT_ENGINES)
class DATA_PT_context_camera(DataButtonsPanel): class DATA_PT_context_camera(DataButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -61,12 +61,12 @@ class DATA_PT_context_camera(DataButtonsPanel):
layout.template_ID(space, "pin_id") layout.template_ID(space, "pin_id")
class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel): class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data" _context_path = "object.data"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
class DATA_PT_camera(DataButtonsPanel): class DATA_PT_camera(DataButtonsPanel, bpy.types.Panel):
bl_label = "Lens" bl_label = "Lens"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -127,7 +127,7 @@ class DATA_PT_camera(DataButtonsPanel):
col.prop(cam, "dof_distance", text="Distance") col.prop(cam, "dof_distance", text="Distance")
class DATA_PT_camera_display(DataButtonsPanel): class DATA_PT_camera_display(DataButtonsPanel, bpy.types.Panel):
bl_label = "Display" bl_label = "Display"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -155,24 +155,12 @@ class DATA_PT_camera_display(DataButtonsPanel):
sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True) sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
classes = [
DATA_PT_context_camera,
DATA_PT_camera,
DATA_PT_camera_display,
DATA_PT_custom_props_camera]
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

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "data" bl_context = "data"
@@ -47,7 +47,7 @@ class DataButtonsPanelActive(DataButtonsPanel):
return (curve and type(curve) is not bpy.types.TextCurve and curve.splines.active) return (curve and type(curve) is not bpy.types.TextCurve and curve.splines.active)
class DATA_PT_context_curve(DataButtonsPanel): class DATA_PT_context_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
@@ -73,11 +73,11 @@ class DATA_PT_context_curve(DataButtonsPanel):
layout.template_ID(ob, "data") layout.template_ID(ob, "data")
class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel): class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data" _context_path = "object.data"
class DATA_PT_shape_curve(DataButtonsPanel): class DATA_PT_shape_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "Shape" bl_label = "Shape"
def draw(self, context): def draw(self, context):
@@ -130,7 +130,7 @@ class DATA_PT_shape_curve(DataButtonsPanel):
col.prop(curve, "auto_texspace") col.prop(curve, "auto_texspace")
class DATA_PT_geometry_curve(DataButtonsPanel): class DATA_PT_geometry_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "Geometry" bl_label = "Geometry"
def poll(self, context): def poll(self, context):
@@ -164,7 +164,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
col.prop(curve, "bevel_object", text="") col.prop(curve, "bevel_object", text="")
class DATA_PT_pathanim(DataButtonsPanelCurve): class DATA_PT_pathanim(DataButtonsPanelCurve, bpy.types.Panel):
bl_label = "Path Animation" bl_label = "Path Animation"
def draw_header(self, context): def draw_header(self, context):
@@ -196,7 +196,7 @@ class DATA_PT_pathanim(DataButtonsPanelCurve):
col.prop(curve, "use_time_offset", text="Offset Children") col.prop(curve, "use_time_offset", text="Offset Children")
class DATA_PT_active_spline(DataButtonsPanelActive): class DATA_PT_active_spline(DataButtonsPanelActive, bpy.types.Panel):
bl_label = "Active Spline" bl_label = "Active Spline"
def draw(self, context): def draw(self, context):
@@ -267,7 +267,7 @@ class DATA_PT_active_spline(DataButtonsPanelActive):
layout.prop(act_spline, "smooth") layout.prop(act_spline, "smooth")
class DATA_PT_font(DataButtonsPanel): class DATA_PT_font(DataButtonsPanel, bpy.types.Panel):
bl_label = "Font" bl_label = "Font"
def poll(self, context): def poll(self, context):
@@ -329,7 +329,7 @@ class DATA_PT_font(DataButtonsPanel):
col.prop(char, "use_small_caps") col.prop(char, "use_small_caps")
class DATA_PT_paragraph(DataButtonsPanel): class DATA_PT_paragraph(DataButtonsPanel, bpy.types.Panel):
bl_label = "Paragraph" bl_label = "Paragraph"
def poll(self, context): def poll(self, context):
@@ -362,7 +362,7 @@ class DATA_PT_paragraph(DataButtonsPanel):
col.prop(text, "offset_y", text="Y") col.prop(text, "offset_y", text="Y")
class DATA_PT_textboxes(DataButtonsPanel): class DATA_PT_textboxes(DataButtonsPanel, bpy.types.Panel):
bl_label = "Text Boxes" bl_label = "Text Boxes"
def poll(self, context): def poll(self, context):
@@ -404,29 +404,12 @@ class DATA_PT_textboxes(DataButtonsPanel):
row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
classes = [
DATA_PT_context_curve,
DATA_PT_shape_curve,
DATA_PT_geometry_curve,
DATA_PT_pathanim,
DATA_PT_active_spline,
DATA_PT_font,
DATA_PT_paragraph,
DATA_PT_textboxes,
DATA_PT_custom_props_curve]
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

@@ -22,7 +22,7 @@ import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "data" bl_context = "data"
@@ -31,7 +31,7 @@ class DataButtonsPanel(bpy.types.Panel):
return (context.object and context.object.type == 'EMPTY') return (context.object and context.object.type == 'EMPTY')
class DATA_PT_empty(DataButtonsPanel): class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
bl_label = "Empty" bl_label = "Empty"
def draw(self, context): def draw(self, context):
@@ -48,20 +48,13 @@ class DATA_PT_empty(DataButtonsPanel):
layout.prop(ob, "empty_draw_size", text="Size") layout.prop(ob, "empty_draw_size", text="Size")
classes = [
DATA_PT_empty]
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

@@ -31,7 +31,7 @@ class LAMP_MT_sunsky_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset draw = bpy.types.Menu.draw_preset
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "data" bl_context = "data"
@@ -40,16 +40,14 @@ class DataButtonsPanel(bpy.types.Panel):
engine = context.scene.render.engine engine = context.scene.render.engine
return context.lamp and (engine in self.COMPAT_ENGINES) return context.lamp and (engine in self.COMPAT_ENGINES)
class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
class DATA_PT_preview(DataButtonsPanel):
bl_label = "Preview" bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
def draw(self, context): def draw(self, context):
self.layout.template_preview(context.lamp) self.layout.template_preview(context.lamp)
class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
class DATA_PT_context_lamp(DataButtonsPanel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -77,12 +75,12 @@ class DATA_PT_context_lamp(DataButtonsPanel):
layout.template_ID(space, "pin_id") layout.template_ID(space, "pin_id")
class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel): class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data" _context_path = "object.data"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
class DATA_PT_lamp(DataButtonsPanel): class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
bl_label = "Lamp" bl_label = "Lamp"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -129,7 +127,7 @@ class DATA_PT_lamp(DataButtonsPanel):
col.prop(lamp, "diffuse") col.prop(lamp, "diffuse")
class DATA_PT_sunsky(DataButtonsPanel): class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
bl_label = "Sky & Atmosphere" bl_label = "Sky & Atmosphere"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -202,7 +200,7 @@ class DATA_PT_sunsky(DataButtonsPanel):
sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction") sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
class DATA_PT_shadow(DataButtonsPanel): class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
bl_label = "Shadow" bl_label = "Shadow"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -327,7 +325,7 @@ class DATA_PT_shadow(DataButtonsPanel):
sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End") sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End")
class DATA_PT_area(DataButtonsPanel): class DATA_PT_area(DataButtonsPanel, bpy.types.Panel):
bl_label = "Area Shape" bl_label = "Area Shape"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -354,7 +352,7 @@ class DATA_PT_area(DataButtonsPanel):
sub.prop(lamp, "size_y", text="Size Y") sub.prop(lamp, "size_y", text="Size Y")
class DATA_PT_spot(DataButtonsPanel): class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
bl_label = "Spot Shape" bl_label = "Spot Shape"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -390,7 +388,7 @@ class DATA_PT_spot(DataButtonsPanel):
sub.prop(lamp, "halo_step", text="Step") sub.prop(lamp, "halo_step", text="Step")
class DATA_PT_falloff_curve(DataButtonsPanel): class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel):
bl_label = "Falloff Curve" bl_label = "Falloff Curve"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -407,31 +405,12 @@ class DATA_PT_falloff_curve(DataButtonsPanel):
self.layout.template_curve_mapping(lamp, "falloff_curve") self.layout.template_curve_mapping(lamp, "falloff_curve")
classes = [
LAMP_MT_sunsky_presets,
DATA_PT_context_lamp,
DATA_PT_preview,
DATA_PT_lamp,
DATA_PT_falloff_curve,
DATA_PT_area,
DATA_PT_spot,
DATA_PT_shadow,
DATA_PT_sunsky,
DATA_PT_custom_props_lamp]
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

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "data" bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.lattice return context.lattice
class DATA_PT_context_lattice(DataButtonsPanel): class DATA_PT_context_lattice(DataButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
@@ -59,11 +59,11 @@ class DATA_PT_context_lattice(DataButtonsPanel):
layout.template_ID(space, "pin_id") layout.template_ID(space, "pin_id")
class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel): class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data" _context_path = "object.data"
class DATA_PT_lattice(DataButtonsPanel): class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
bl_label = "Lattice" bl_label = "Lattice"
def draw(self, context): def draw(self, context):
@@ -98,23 +98,12 @@ class DATA_PT_lattice(DataButtonsPanel):
row.prop_object(lat, "vertex_group", context.object, "vertex_groups", text="") row.prop_object(lat, "vertex_group", context.object, "vertex_groups", text="")
classes = [
DATA_PT_context_lattice,
DATA_PT_lattice,
DATA_PT_custom_props_lattice]
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

@@ -49,7 +49,7 @@ class MESH_MT_shape_key_specials(bpy.types.Menu):
layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT') layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "data" bl_context = "data"
@@ -59,7 +59,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.mesh and (engine in self.COMPAT_ENGINES) return context.mesh and (engine in self.COMPAT_ENGINES)
class DATA_PT_context_mesh(DataButtonsPanel): class DATA_PT_context_mesh(DataButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -87,12 +87,12 @@ class DATA_PT_context_mesh(DataButtonsPanel):
layout.template_ID(space, "pin_id") layout.template_ID(space, "pin_id")
class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel): class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data" _context_path = "object.data"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
class DATA_PT_normals(DataButtonsPanel): class DATA_PT_normals(DataButtonsPanel, bpy.types.Panel):
bl_label = "Normals" bl_label = "Normals"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -117,7 +117,7 @@ class DATA_PT_normals(DataButtonsPanel):
col.prop(mesh, "double_sided") col.prop(mesh, "double_sided")
class DATA_PT_settings(DataButtonsPanel): class DATA_PT_settings(DataButtonsPanel, bpy.types.Panel):
bl_label = "Settings" bl_label = "Settings"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -129,7 +129,7 @@ class DATA_PT_settings(DataButtonsPanel):
layout.prop(mesh, "texture_mesh") layout.prop(mesh, "texture_mesh")
class DATA_PT_vertex_groups(DataButtonsPanel): class DATA_PT_vertex_groups(DataButtonsPanel, bpy.types.Panel):
bl_label = "Vertex Groups" bl_label = "Vertex Groups"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -176,7 +176,7 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight") layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
class DATA_PT_shape_keys(DataButtonsPanel): class DATA_PT_shape_keys(DataButtonsPanel, bpy.types.Panel):
bl_label = "Shape Keys" bl_label = "Shape Keys"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -274,7 +274,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
row.prop(key, "slurph") row.prop(key, "slurph")
class DATA_PT_uv_texture(DataButtonsPanel): class DATA_PT_uv_texture(DataButtonsPanel, bpy.types.Panel):
bl_label = "UV Texture" bl_label = "UV Texture"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -344,7 +344,7 @@ class DATA_PT_texface(DataButtonsPanel):
col.label(text="No UV Texture") col.label(text="No UV Texture")
class DATA_PT_vertex_colors(DataButtonsPanel): class DATA_PT_vertex_colors(DataButtonsPanel, bpy.types.Panel):
bl_label = "Vertex Colors" bl_label = "Vertex Colors"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -367,32 +367,12 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
layout.prop(lay, "name") layout.prop(lay, "name")
classes = [
MESH_MT_vertex_group_specials,
MESH_MT_shape_key_specials,
DATA_PT_context_mesh,
DATA_PT_normals,
DATA_PT_settings,
DATA_PT_vertex_groups,
DATA_PT_shape_keys,
DATA_PT_uv_texture,
DATA_PT_texface,
DATA_PT_vertex_colors,
DATA_PT_custom_props_mesh]
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

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "data" bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
return context.meta_ball return context.meta_ball
class DATA_PT_context_metaball(DataButtonsPanel): class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
@@ -59,11 +59,11 @@ class DATA_PT_context_metaball(DataButtonsPanel):
layout.template_ID(space, "pin_id") layout.template_ID(space, "pin_id")
class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel): class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object.data" _context_path = "object.data"
class DATA_PT_metaball(DataButtonsPanel): class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
bl_label = "Metaball" bl_label = "Metaball"
def draw(self, context): def draw(self, context):
@@ -92,7 +92,7 @@ class DATA_PT_metaball(DataButtonsPanel):
layout.prop(mball, "flag", text="") layout.prop(mball, "flag", text="")
class DATA_PT_metaball_element(DataButtonsPanel): class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
bl_label = "Active Element" bl_label = "Active Element"
def poll(self, context): def poll(self, context):
@@ -136,24 +136,12 @@ class DATA_PT_metaball_element(DataButtonsPanel):
col.prop(metaelem, "size_y", text="Y") col.prop(metaelem, "size_y", text="Y")
classes = [
DATA_PT_context_metaball,
DATA_PT_metaball,
DATA_PT_metaball_element,
DATA_PT_custom_props_metaball]
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

@@ -23,13 +23,13 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
narrowmod = 260 narrowmod = 260
class DataButtonsPanel(bpy.types.Panel): class DataButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "modifier" bl_context = "modifier"
class DATA_PT_modifiers(DataButtonsPanel): class DATA_PT_modifiers(DataButtonsPanel, bpy.types.Panel):
bl_label = "Modifiers" bl_label = "Modifiers"
def draw(self, context): def draw(self, context):
@@ -766,20 +766,12 @@ class DATA_PT_modifiers(DataButtonsPanel):
col.prop(md, "narrowness", slider=True) col.prop(md, "narrowness", slider=True)
classes = [
DATA_PT_modifiers]
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

@@ -22,7 +22,7 @@ import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class PhysicsButtonsPanel(bpy.types.Panel): class PhysicsButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "physics" bl_context = "physics"
@@ -33,7 +33,7 @@ class PhysicsButtonsPanel(bpy.types.Panel):
return ob and ob.game and (rd.engine in self.COMPAT_ENGINES) return ob and ob.game and (rd.engine in self.COMPAT_ENGINES)
class PHYSICS_PT_game_physics(PhysicsButtonsPanel): class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
bl_label = "Physics" bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -162,7 +162,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
layout.prop(ob, "hide_render", text="Invisible") layout.prop(ob, "hide_render", text="Invisible")
class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel): class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
bl_label = "Collision Bounds" bl_label = "Collision Bounds"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -198,7 +198,7 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
col.prop(game, "collision_compound", text="Compound") col.prop(game, "collision_compound", text="Compound")
class RenderButtonsPanel(bpy.types.Panel): class RenderButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "render" bl_context = "render"
@@ -208,7 +208,7 @@ class RenderButtonsPanel(bpy.types.Panel):
return (rd.engine in self.COMPAT_ENGINES) return (rd.engine in self.COMPAT_ENGINES)
class RENDER_PT_game(RenderButtonsPanel): class RENDER_PT_game(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Game" bl_label = "Game"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -220,7 +220,7 @@ class RENDER_PT_game(RenderButtonsPanel):
row.label() row.label()
class RENDER_PT_game_player(RenderButtonsPanel): class RENDER_PT_game_player(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Standalone Player" bl_label = "Standalone Player"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -258,7 +258,7 @@ class RENDER_PT_game_player(RenderButtonsPanel):
col.prop(gs, "framing_color", text="") col.prop(gs, "framing_color", text="")
class RENDER_PT_game_stereo(RenderButtonsPanel): class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Stereo" bl_label = "Stereo"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -318,7 +318,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel):
layout.prop(gs, "dome_text") layout.prop(gs, "dome_text")
class RENDER_PT_game_shading(RenderButtonsPanel): class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Shading" bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -347,7 +347,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel):
col.prop(gs, "glsl_extra_textures", text="Extra Textures") col.prop(gs, "glsl_extra_textures", text="Extra Textures")
class RENDER_PT_game_performance(RenderButtonsPanel): class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Performance" bl_label = "Performance"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -373,7 +373,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel):
col.prop(gs, "use_display_lists") col.prop(gs, "use_display_lists")
class RENDER_PT_game_sound(RenderButtonsPanel): class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Sound" bl_label = "Sound"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -391,7 +391,7 @@ class RENDER_PT_game_sound(RenderButtonsPanel):
layout.prop(scene, "doppler_factor") layout.prop(scene, "doppler_factor")
class WorldButtonsPanel(bpy.types.Panel): class WorldButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "world" bl_context = "world"
@@ -401,7 +401,7 @@ class WorldButtonsPanel(bpy.types.Panel):
return (scene.render.engine in self.COMPAT_ENGINES) and (scene.world is not None) return (scene.render.engine in self.COMPAT_ENGINES) and (scene.world is not None)
class WORLD_PT_game_context_world(WorldButtonsPanel): class WORLD_PT_game_context_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -431,7 +431,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel):
layout.template_ID(space, "pin_id") layout.template_ID(space, "pin_id")
class WORLD_PT_game_world(WorldButtonsPanel): class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = "World" bl_label = "World"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -451,7 +451,7 @@ class WORLD_PT_game_world(WorldButtonsPanel):
col.prop(world, "ambient_color") col.prop(world, "ambient_color")
class WORLD_PT_game_mist(WorldButtonsPanel): class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Mist" bl_label = "Mist"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -477,7 +477,7 @@ class WORLD_PT_game_mist(WorldButtonsPanel):
col.prop(world.mist, "depth") col.prop(world.mist, "depth")
class WORLD_PT_game_physics(WorldButtonsPanel): class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Physics" bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -523,33 +523,12 @@ class WORLD_PT_game_physics(WorldButtonsPanel):
col.prop(gs, "logic_step_max", text="Max") col.prop(gs, "logic_step_max", text="Max")
classes = [
PHYSICS_PT_game_physics,
PHYSICS_PT_game_collision_bounds,
RENDER_PT_game,
RENDER_PT_game_player,
RENDER_PT_game_stereo,
RENDER_PT_game_shading,
RENDER_PT_game_performance,
RENDER_PT_game_sound,
WORLD_PT_game_context_world,
WORLD_PT_game_world,
WORLD_PT_game_mist,
WORLD_PT_game_physics]
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

@@ -54,7 +54,7 @@ class MATERIAL_MT_specials(bpy.types.Menu):
layout.operator("material.paste", icon='PASTEDOWN') layout.operator("material.paste", icon='PASTEDOWN')
class MaterialButtonsPanel(bpy.types.Panel): class MaterialButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "material" bl_context = "material"
@@ -66,7 +66,7 @@ class MaterialButtonsPanel(bpy.types.Panel):
return mat and (engine in self.COMPAT_ENGINES) return mat and (engine in self.COMPAT_ENGINES)
class MATERIAL_PT_preview(MaterialButtonsPanel): class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Preview" bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -74,7 +74,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel):
self.layout.template_preview(context.material) self.layout.template_preview(context.material)
class MATERIAL_PT_context_material(MaterialButtonsPanel): class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -141,12 +141,12 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
layout.prop(mat, "type", text="") layout.prop(mat, "type", text="")
class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel): class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "material" _context_path = "material"
class MATERIAL_PT_shading(MaterialButtonsPanel): class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Shading" bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -184,7 +184,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel):
layout.prop(mat, "alpha") layout.prop(mat, "alpha")
class MATERIAL_PT_strand(MaterialButtonsPanel): class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Strand" bl_label = "Strand"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -233,7 +233,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel):
sub.prop(tan, "blend_distance", text="Distance") sub.prop(tan, "blend_distance", text="Distance")
class MATERIAL_PT_physics(MaterialButtonsPanel): class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Physics" bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -257,14 +257,14 @@ class MATERIAL_PT_physics(MaterialButtonsPanel):
col.prop(phys, "damp", slider=True) col.prop(phys, "damp", slider=True)
class MATERIAL_PT_options(MaterialButtonsPanel): class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Options" bl_label = "Options"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
def poll(self, context): def poll(self, context):
mat = active_node_mat(context.material) mat = active_node_mat(context.material)
engine = context.scene.render.engine engine = context.scene.render.engine
return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES) return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@@ -302,7 +302,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
col.prop(mat, "object_color") col.prop(mat, "object_color")
class MATERIAL_PT_shadow(MaterialButtonsPanel): class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Shadow" bl_label = "Shadow"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -339,8 +339,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
sub.prop(mat, "shadow_ray_bias", text="Ray Bias") sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
col.prop(mat, "cast_approximate") col.prop(mat, "cast_approximate")
class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
class MATERIAL_PT_diffuse(MaterialButtonsPanel):
bl_label = "Diffuse" bl_label = "Diffuse"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -411,7 +410,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
row.prop(mat, "diffuse_ramp_factor", text="Factor") row.prop(mat, "diffuse_ramp_factor", text="Factor")
class MATERIAL_PT_specular(MaterialButtonsPanel): class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Specular" bl_label = "Specular"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -480,7 +479,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
row.prop(mat, "specular_ramp_factor", text="Factor") row.prop(mat, "specular_ramp_factor", text="Factor")
class MATERIAL_PT_sss(MaterialButtonsPanel): class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Subsurface Scattering" bl_label = "Subsurface Scattering"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -532,7 +531,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
col.prop(sss, "error_tolerance", text="Error") col.prop(sss, "error_tolerance", text="Error")
class MATERIAL_PT_mirror(MaterialButtonsPanel): class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Mirror" bl_label = "Mirror"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -592,7 +591,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
sub.prop(raym, "gloss_anisotropic", text="Anisotropic") sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
class MATERIAL_PT_transp(MaterialButtonsPanel): class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Transparency" bl_label = "Transparency"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -659,7 +658,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
sub.prop(rayt, "gloss_samples", text="Samples") sub.prop(rayt, "gloss_samples", text="Samples")
class MATERIAL_PT_transp_game(MaterialButtonsPanel): class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Transparency" bl_label = "Transparency"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -694,7 +693,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel):
col.prop(mat, "alpha") col.prop(mat, "alpha")
class MATERIAL_PT_halo(MaterialButtonsPanel): class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Halo" bl_label = "Halo"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -744,7 +743,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
sub.prop(halo, "star_tips") sub.prop(halo, "star_tips")
class MATERIAL_PT_flare(MaterialButtonsPanel): class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel):
bl_label = "Flare" bl_label = "Flare"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -779,7 +778,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel):
col.prop(halo, "flare_subsize", text="Subsize") col.prop(halo, "flare_subsize", text="Subsize")
class VolumeButtonsPanel(bpy.types.Panel): class VolumeButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "material" bl_context = "material"
@@ -790,7 +789,7 @@ class VolumeButtonsPanel(bpy.types.Panel):
return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES) return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES)
class MATERIAL_PT_volume_density(VolumeButtonsPanel): class MATERIAL_PT_volume_density(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Density" bl_label = "Density"
bl_default_closed = False bl_default_closed = False
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -810,7 +809,7 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel):
col.prop(vol, "density_scale") col.prop(vol, "density_scale")
class MATERIAL_PT_volume_shading(VolumeButtonsPanel): class MATERIAL_PT_volume_shading(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Shading" bl_label = "Shading"
bl_default_closed = False bl_default_closed = False
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -838,7 +837,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
sub.prop(vol, "reflection_color", text="") sub.prop(vol, "reflection_color", text="")
class MATERIAL_PT_volume_lighting(VolumeButtonsPanel): class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Lighting" bl_label = "Lighting"
bl_default_closed = False bl_default_closed = False
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -876,7 +875,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
sub.prop(vol, "ms_intensity") sub.prop(vol, "ms_intensity")
class MATERIAL_PT_volume_transp(VolumeButtonsPanel): class MATERIAL_PT_volume_transp(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Transparency" bl_label = "Transparency"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -892,7 +891,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
layout.prop(mat, "transparency_method", text="") layout.prop(mat, "transparency_method", text="")
class MATERIAL_PT_volume_integration(VolumeButtonsPanel): class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Integration" bl_label = "Integration"
bl_default_closed = False bl_default_closed = False
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -917,7 +916,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
col.prop(vol, "depth_cutoff") col.prop(vol, "depth_cutoff")
class MATERIAL_PT_volume_options(VolumeButtonsPanel): class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
bl_label = "Options" bl_label = "Options"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
bl_default_closed = True bl_default_closed = True
@@ -943,46 +942,12 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel):
row.prop(mat, "light_group_exclusive", text="Exclusive") row.prop(mat, "light_group_exclusive", text="Exclusive")
classes = [
MATERIAL_PT_context_material,
MATERIAL_PT_preview,
MATERIAL_PT_diffuse,
MATERIAL_PT_specular,
MATERIAL_PT_shading,
MATERIAL_PT_transp,
MATERIAL_PT_mirror,
MATERIAL_PT_sss,
MATERIAL_PT_halo,
MATERIAL_PT_flare,
MATERIAL_PT_physics,
MATERIAL_PT_strand,
MATERIAL_PT_options,
MATERIAL_PT_shadow,
MATERIAL_PT_transp_game,
MATERIAL_MT_sss_presets,
MATERIAL_MT_specials,
MATERIAL_PT_volume_density,
MATERIAL_PT_volume_shading,
MATERIAL_PT_volume_lighting,
MATERIAL_PT_volume_transp,
MATERIAL_PT_volume_integration,
MATERIAL_PT_volume_options,
MATERIAL_PT_custom_props]
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

@@ -23,13 +23,13 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class ObjectButtonsPanel(bpy.types.Panel): class ObjectButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "object" bl_context = "object"
class OBJECT_PT_context_object(ObjectButtonsPanel): class OBJECT_PT_context_object(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
@@ -46,11 +46,7 @@ class OBJECT_PT_context_object(ObjectButtonsPanel):
row.prop(ob, "name", text="") row.prop(ob, "name", text="")
class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel): class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
_context_path = "object"
class OBJECT_PT_transform(ObjectButtonsPanel):
bl_label = "Transform" bl_label = "Transform"
def draw(self, context): def draw(self, context):
@@ -90,7 +86,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel):
col.prop(ob, "scale") col.prop(ob, "scale")
class OBJECT_PT_transform_locks(ObjectButtonsPanel): class OBJECT_PT_transform_locks(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Transform Locks" bl_label = "Transform Locks"
bl_default_closed = True bl_default_closed = True
@@ -117,7 +113,7 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel):
row.column().prop(ob, "lock_scale", text="Scale") row.column().prop(ob, "lock_scale", text="Scale")
class OBJECT_PT_relations(ObjectButtonsPanel): class OBJECT_PT_relations(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Relations" bl_label = "Relations"
def draw(self, context): def draw(self, context):
@@ -146,7 +142,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel):
sub.active = (parent is not None) sub.active = (parent is not None)
class OBJECT_PT_groups(ObjectButtonsPanel): class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Groups" bl_label = "Groups"
def draw(self, context): def draw(self, context):
@@ -187,7 +183,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
index += 1 index += 1
class OBJECT_PT_display(ObjectButtonsPanel): class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Display" bl_label = "Display"
def draw(self, context): def draw(self, context):
@@ -223,7 +219,7 @@ class OBJECT_PT_display(ObjectButtonsPanel):
col.prop(ob, "draw_transparent", text="Transparency") col.prop(ob, "draw_transparent", text="Transparency")
class OBJECT_PT_duplication(ObjectButtonsPanel): class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
bl_label = "Duplication" bl_label = "Duplication"
def draw(self, context): def draw(self, context):
@@ -272,8 +268,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
# XXX: the following options are all quite buggy, ancient hacks that should be dropped # XXX: the following options are all quite buggy, ancient hacks that should be dropped
class OBJECT_PT_animation(ObjectButtonsPanel, bpy.types.Panel):
class OBJECT_PT_animation(ObjectButtonsPanel):
bl_label = "Animation Hacks" bl_label = "Animation Hacks"
bl_default_closed = True bl_default_closed = True
@@ -306,36 +301,60 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
col.prop(ob, "track_axis", text="Axis") col.prop(ob, "track_axis", text="Axis")
col.prop(ob, "up_axis", text="Up Axis") col.prop(ob, "up_axis", text="Up Axis")
from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
# import generic panels from other files
from properties_animviz import OBJECT_PT_motion_paths, OBJECT_PT_onion_skinning
classes = [ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
OBJECT_PT_context_object, #bl_label = "Object Motion Paths"
OBJECT_PT_transform, bl_context = "object"
OBJECT_PT_transform_locks,
OBJECT_PT_relations,
OBJECT_PT_groups,
OBJECT_PT_display,
OBJECT_PT_duplication,
OBJECT_PT_animation, # XXX: panel of old hacks pending to be removed...
OBJECT_PT_motion_paths, def poll(self, context):
#OBJECT_PT_onion_skinning, return (context.object)
OBJECT_PT_custom_props] def draw(self, context):
layout = self.layout
ob = context.object
wide_ui = context.region.width > narrowui
self.draw_settings(context, ob.animation_visualisation, wide_ui)
layout.separator()
split = layout.split()
col = split.column()
col.operator("object.paths_calculate", text="Calculate Paths")
if wide_ui:
col = split.column()
col.operator("object.paths_clear", text="Clear Paths")
class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): #, bpy.types.Panel): # inherit from panel when ready
#bl_label = "Object Onion Skinning"
bl_context = "object"
def poll(self, context):
return (context.object)
def draw(self, context):
layout = self.layout
ob = context.object
wide_ui = context.region.width > narrowui
self.draw_settings(context, ob.animation_visualisation, wide_ui)
class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "object"
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

@@ -23,7 +23,7 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
narrowcon = 260 narrowcon = 260
class ConstraintButtonsPanel(bpy.types.Panel): class ConstraintButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "constraint" bl_context = "constraint"
@@ -749,8 +749,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
col = layout.column() col = layout.column()
col.prop(con, "enabled_rotation_range", text="Pivot When") col.prop(con, "enabled_rotation_range", text="Pivot When")
class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
class OBJECT_PT_constraints(ConstraintButtonsPanel):
bl_label = "Object Constraints" bl_label = "Object Constraints"
bl_context = "constraint" bl_context = "constraint"
@@ -768,7 +767,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
self.draw_constraint(context, con) self.draw_constraint(context, con)
class BONE_PT_constraints(ConstraintButtonsPanel): class BONE_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
bl_label = "Bone Constraints" bl_label = "Bone Constraints"
bl_context = "bone_constraint" bl_context = "bone_constraint"
@@ -784,21 +783,12 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
self.draw_constraint(context, con) self.draw_constraint(context, con)
classes = [
OBJECT_PT_constraints,
BONE_PT_constraints]
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

@@ -42,7 +42,7 @@ def particle_panel_poll(panel, context):
return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR') and (engine in panel.COMPAT_ENGINES) return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR') and (engine in panel.COMPAT_ENGINES)
class ParticleButtonsPanel(bpy.types.Panel): class ParticleButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "particle" bl_context = "particle"
@@ -51,7 +51,7 @@ class ParticleButtonsPanel(bpy.types.Panel):
return particle_panel_poll(self, context) return particle_panel_poll(self, context)
class PARTICLE_PT_context_particles(ParticleButtonsPanel): class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -136,12 +136,12 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel):
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): class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "particle_system.settings" _context_path = "particle_system.settings"
class PARTICLE_PT_emission(ParticleButtonsPanel): class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Emission" bl_label = "Emission"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -203,7 +203,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
row.prop(part, "grid_resolution") row.prop(part, "grid_resolution")
class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel): class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Hair dynamics" bl_label = "Hair dynamics"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -260,7 +260,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
col.prop(cloth, "quality", text="Steps", slider=True) col.prop(cloth, "quality", text="Steps", slider=True)
class PARTICLE_PT_cache(ParticleButtonsPanel): class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Cache" bl_label = "Cache"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -283,7 +283,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if psys.hair_dynamics else 'PSYS') point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if psys.hair_dynamics else 'PSYS')
class PARTICLE_PT_velocity(ParticleButtonsPanel): class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Velocity" bl_label = "Velocity"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -330,7 +330,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel):
# sub.prop(part, "reaction_shape", slider=True) # sub.prop(part, "reaction_shape", slider=True)
class PARTICLE_PT_rotation(ParticleButtonsPanel): class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Rotation" bl_label = "Rotation"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -376,7 +376,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel):
sub.prop(part, "angular_velocity_factor", text="") sub.prop(part, "angular_velocity_factor", text="")
class PARTICLE_PT_physics(ParticleButtonsPanel): class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Physics" bl_label = "Physics"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -573,7 +573,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
sub.prop(key, "system", text="System") sub.prop(key, "system", text="System")
class PARTICLE_PT_boidbrain(ParticleButtonsPanel): class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Boid Brain" bl_label = "Boid Brain"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -673,7 +673,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
row.prop(rule, "flee_distance") row.prop(rule, "flee_distance")
class PARTICLE_PT_render(ParticleButtonsPanel): class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Render" bl_label = "Render"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -843,7 +843,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
col.label(text="") col.label(text="")
class PARTICLE_PT_draw(ParticleButtonsPanel): class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Display" bl_label = "Display"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -902,7 +902,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel):
#sub.label(text="Override material color") #sub.label(text="Override material color")
class PARTICLE_PT_children(ParticleButtonsPanel): class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Children" bl_label = "Children"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -987,7 +987,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
col.prop(part, "kink_shape", slider=True) col.prop(part, "kink_shape", slider=True)
class PARTICLE_PT_field_weights(ParticleButtonsPanel): class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Field Weights" bl_label = "Field Weights"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1000,7 +1000,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel):
self.layout.prop(part.effector_weights, "do_growing_hair") self.layout.prop(part.effector_weights, "do_growing_hair")
class PARTICLE_PT_force_fields(ParticleButtonsPanel): class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Force Field Settings" bl_label = "Force Field Settings"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1028,7 +1028,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel):
basic_force_field_falloff_ui(self, context, part.force_field_2) basic_force_field_falloff_ui(self, context, part.force_field_2)
class PARTICLE_PT_vertexgroups(ParticleButtonsPanel): class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
bl_label = "Vertexgroups" bl_label = "Vertexgroups"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1096,35 +1096,12 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
row.prop(psys, "vertex_group_field_negate", text="") row.prop(psys, "vertex_group_field_negate", text="")
classes = [
PARTICLE_PT_context_particles,
PARTICLE_PT_hair_dynamics,
PARTICLE_PT_cache,
PARTICLE_PT_emission,
PARTICLE_PT_velocity,
PARTICLE_PT_rotation,
PARTICLE_PT_physics,
PARTICLE_PT_boidbrain,
PARTICLE_PT_render,
PARTICLE_PT_draw,
PARTICLE_PT_children,
PARTICLE_PT_field_weights,
PARTICLE_PT_force_fields,
PARTICLE_PT_vertexgroups,
PARTICLE_PT_custom_props]
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

@@ -40,7 +40,7 @@ class CLOTH_MT_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset draw = bpy.types.Menu.draw_preset
class PhysicButtonsPanel(bpy.types.Panel): class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "physics" bl_context = "physics"
@@ -51,7 +51,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (ob and ob.type == 'MESH') and (not rd.use_game_engine) return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
class PHYSICS_PT_cloth(PhysicButtonsPanel): class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth" bl_label = "Cloth"
def draw(self, context): def draw(self, context):
@@ -133,7 +133,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
col.prop_object(cloth, "rest_shape_key", key, "keys", text="") col.prop_object(cloth, "rest_shape_key", key, "keys", text="")
class PHYSICS_PT_cloth_cache(PhysicButtonsPanel): class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth Cache" bl_label = "Cloth Cache"
bl_default_closed = True bl_default_closed = True
@@ -145,7 +145,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH') point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH')
class PHYSICS_PT_cloth_collision(PhysicButtonsPanel): class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth Collision" bl_label = "Cloth Collision"
bl_default_closed = True bl_default_closed = True
@@ -185,7 +185,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
layout.prop(cloth, "group") layout.prop(cloth, "group")
class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel): class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth Stiffness Scaling" bl_label = "Cloth Stiffness Scaling"
bl_default_closed = True bl_default_closed = True
@@ -222,7 +222,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
col.prop(cloth, "bending_stiffness_max", text="Max") col.prop(cloth, "bending_stiffness_max", text="Max")
class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel): class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Cloth Field Weights" bl_label = "Cloth Field Weights"
bl_default_closed = True bl_default_closed = True
@@ -234,26 +234,12 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel):
effector_weights_ui(self, context, cloth.effector_weights) effector_weights_ui(self, context, cloth.effector_weights)
classes = [
CLOTH_MT_presets,
PHYSICS_PT_cloth,
PHYSICS_PT_cloth_cache,
PHYSICS_PT_cloth_collision,
PHYSICS_PT_cloth_stiffness,
PHYSICS_PT_cloth_field_weights]
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

@@ -26,7 +26,7 @@ from properties_physics_common import basic_force_field_settings_ui
from properties_physics_common import basic_force_field_falloff_ui from properties_physics_common import basic_force_field_falloff_ui
class PhysicButtonsPanel(bpy.types.Panel): class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "physics" bl_context = "physics"
@@ -36,7 +36,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (context.object) and (not rd.use_game_engine) return (context.object) and (not rd.use_game_engine)
class PHYSICS_PT_field(PhysicButtonsPanel): class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Force Fields" bl_label = "Force Fields"
def draw(self, context): def draw(self, context):
@@ -169,7 +169,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
sub.prop(field, "radial_maximum", text="Distance") sub.prop(field, "radial_maximum", text="Distance")
class PHYSICS_PT_collision(PhysicButtonsPanel): class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Collision" bl_label = "Collision"
#bl_default_closed = True #bl_default_closed = True
@@ -243,21 +243,12 @@ class PHYSICS_PT_collision(PhysicButtonsPanel):
col.prop(settings, "absorption", text="Absorption") col.prop(settings, "absorption", text="Absorption")
classes = [
PHYSICS_PT_field,
PHYSICS_PT_collision]
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

@@ -22,7 +22,7 @@ import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class PhysicButtonsPanel(bpy.types.Panel): class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "physics" bl_context = "physics"
@@ -33,7 +33,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (ob and ob.type == 'MESH') and (not rd.use_game_engine) return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
class PHYSICS_PT_fluid(PhysicButtonsPanel): class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Fluid" bl_label = "Fluid"
def draw(self, context): def draw(self, context):
@@ -216,7 +216,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
sub.prop(fluid, "velocity_radius", text="Radius") sub.prop(fluid, "velocity_radius", text="Radius")
class PHYSICS_PT_domain_gravity(PhysicButtonsPanel): class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Domain World" bl_label = "Domain World"
bl_default_closed = True bl_default_closed = True
@@ -267,7 +267,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
col.prop(fluid, "compressibility", slider=True) col.prop(fluid, "compressibility", slider=True)
class PHYSICS_PT_domain_boundary(PhysicButtonsPanel): class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Domain Boundary" bl_label = "Domain Boundary"
bl_default_closed = True bl_default_closed = True
@@ -296,7 +296,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
col.prop(fluid, "surface_subdivisions", text="Subdivisions") col.prop(fluid, "surface_subdivisions", text="Subdivisions")
class PHYSICS_PT_domain_particles(PhysicButtonsPanel): class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Domain Particles" bl_label = "Domain Particles"
bl_default_closed = True bl_default_closed = True
@@ -314,23 +314,12 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
col.prop(fluid, "generate_particles") col.prop(fluid, "generate_particles")
classes = [
PHYSICS_PT_fluid,
PHYSICS_PT_domain_gravity,
PHYSICS_PT_domain_boundary,
PHYSICS_PT_domain_particles]
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

@@ -26,7 +26,7 @@ from properties_physics_common import point_cache_ui
from properties_physics_common import effector_weights_ui from properties_physics_common import effector_weights_ui
class PhysicButtonsPanel(bpy.types.Panel): class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "physics" bl_context = "physics"
@@ -37,7 +37,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (ob and ob.type == 'MESH') and (not rd.use_game_engine) return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
class PHYSICS_PT_smoke(PhysicButtonsPanel): class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke" bl_label = "Smoke"
def draw(self, context): def draw(self, context):
@@ -126,7 +126,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
# layout.separator() # layout.separator()
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel): class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke Groups" bl_label = "Smoke Groups"
bl_default_closed = True bl_default_closed = True
@@ -155,7 +155,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
col.prop(group, "coll_group", text="") col.prop(group, "coll_group", text="")
class PHYSICS_PT_smoke_cache(PhysicButtonsPanel): class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke Cache" bl_label = "Smoke Cache"
bl_default_closed = True bl_default_closed = True
@@ -175,7 +175,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE') point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE')
class PHYSICS_PT_smoke_highres(PhysicButtonsPanel): class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke High Resolution" bl_label = "Smoke High Resolution"
bl_default_closed = True bl_default_closed = True
@@ -211,7 +211,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
col.prop(md, "strength") col.prop(md, "strength")
class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel): class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke High Resolution Cache" bl_label = "Smoke High Resolution Cache"
bl_default_closed = True bl_default_closed = True
@@ -231,7 +231,7 @@ class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE') point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE')
class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel): class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Smoke Field Weights" bl_label = "Smoke Field Weights"
bl_default_closed = True bl_default_closed = True
@@ -244,25 +244,12 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel):
effector_weights_ui(self, context, domain.effector_weights) effector_weights_ui(self, context, domain.effector_weights)
classes = [
PHYSICS_PT_smoke,
PHYSICS_PT_smoke_field_weights,
PHYSICS_PT_smoke_cache,
PHYSICS_PT_smoke_highres,
PHYSICS_PT_smoke_groups,
PHYSICS_PT_smoke_cache_highres]
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

@@ -30,7 +30,7 @@ def softbody_panel_enabled(md):
return (md.point_cache.baked is False) return (md.point_cache.baked is False)
class PhysicButtonsPanel(bpy.types.Panel): class PhysicButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "physics" bl_context = "physics"
@@ -43,7 +43,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine)
class PHYSICS_PT_softbody(PhysicButtonsPanel): class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body" bl_label = "Soft Body"
def draw(self, context): def draw(self, context):
@@ -88,7 +88,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
col.prop(softbody, "speed") col.prop(softbody, "speed")
class PHYSICS_PT_softbody_cache(PhysicButtonsPanel): class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Cache" bl_label = "Soft Body Cache"
bl_default_closed = True bl_default_closed = True
@@ -100,7 +100,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY') point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY')
class PHYSICS_PT_softbody_goal(PhysicButtonsPanel): class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Goal" bl_label = "Soft Body Goal"
bl_default_closed = True bl_default_closed = True
@@ -144,7 +144,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
layout.prop_object(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group") layout.prop_object(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group")
class PHYSICS_PT_softbody_edge(PhysicButtonsPanel): class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Edges" bl_label = "Soft Body Edges"
bl_default_closed = True bl_default_closed = True
@@ -199,7 +199,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
col.prop(softbody, "face_collision", text="Face") col.prop(softbody, "face_collision", text="Face")
class PHYSICS_PT_softbody_collision(PhysicButtonsPanel): class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Self Collision" bl_label = "Soft Body Self Collision"
bl_default_closed = True bl_default_closed = True
@@ -234,7 +234,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
col.prop(softbody, "ball_damp", text="Dampening") col.prop(softbody, "ball_damp", text="Dampening")
class PHYSICS_PT_softbody_solver(PhysicButtonsPanel): class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Solver" bl_label = "Soft Body Solver"
bl_default_closed = True bl_default_closed = True
@@ -271,7 +271,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
layout.prop(softbody, "estimate_matrix") layout.prop(softbody, "estimate_matrix")
class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel): class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, bpy.types.Panel):
bl_label = "Soft Body Field Weights" bl_label = "Soft Body Field Weights"
bl_default_closed = True bl_default_closed = True
@@ -285,26 +285,12 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
effector_weights_ui(self, context, softbody.effector_weights) effector_weights_ui(self, context, softbody.effector_weights)
classes = [
PHYSICS_PT_softbody,
PHYSICS_PT_softbody_cache,
PHYSICS_PT_softbody_goal,
PHYSICS_PT_softbody_edge,
PHYSICS_PT_softbody_collision,
PHYSICS_PT_softbody_solver,
PHYSICS_PT_softbody_field_weights]
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

@@ -36,7 +36,7 @@ class RENDER_MT_ffmpeg_presets(bpy.types.Menu):
draw = bpy.types.Menu.draw_preset draw = bpy.types.Menu.draw_preset
class RenderButtonsPanel(bpy.types.Panel): class RenderButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "render" bl_context = "render"
@@ -47,7 +47,7 @@ class RenderButtonsPanel(bpy.types.Panel):
return (context.scene and rd.use_game_engine is False) and (rd.engine in self.COMPAT_ENGINES) return (context.scene and rd.use_game_engine is False) and (rd.engine in self.COMPAT_ENGINES)
class RENDER_PT_render(RenderButtonsPanel): class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Render" bl_label = "Render"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -69,7 +69,7 @@ class RENDER_PT_render(RenderButtonsPanel):
layout.prop(rd, "display_mode", text="Display") layout.prop(rd, "display_mode", text="Display")
class RENDER_PT_layers(RenderButtonsPanel): class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Layers" bl_label = "Layers"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -174,7 +174,7 @@ class RENDER_PT_layers(RenderButtonsPanel):
row.prop(rl, "pass_refraction_exclude", text="") row.prop(rl, "pass_refraction_exclude", text="")
class RENDER_PT_shading(RenderButtonsPanel): class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Shading" bl_label = "Shading"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -199,7 +199,7 @@ class RENDER_PT_shading(RenderButtonsPanel):
col.prop(rd, "alpha_mode", text="Alpha") col.prop(rd, "alpha_mode", text="Alpha")
class RENDER_PT_performance(RenderButtonsPanel): class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Performance" bl_label = "Performance"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -243,7 +243,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
sub.prop(rd, "use_local_coords", text="Local Coordinates") sub.prop(rd, "use_local_coords", text="Local Coordinates")
class RENDER_PT_post_processing(RenderButtonsPanel): class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Post Processing" bl_label = "Post Processing"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -287,7 +287,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
sub.prop(rd, "edge_color", text="") sub.prop(rd, "edge_color", text="")
class RENDER_PT_output(RenderButtonsPanel): class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Output" bl_label = "Output"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -407,7 +407,7 @@ class RENDER_PT_output(RenderButtonsPanel):
col.prop(rd, "quicktime_audio_resampling_hq") col.prop(rd, "quicktime_audio_resampling_hq")
class RENDER_PT_encoding(RenderButtonsPanel): class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Encoding" bl_label = "Encoding"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -479,7 +479,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
col.prop(rd, "ffmpeg_audio_volume", slider=True) col.prop(rd, "ffmpeg_audio_volume", slider=True)
class RENDER_PT_antialiasing(RenderButtonsPanel): class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Anti-Aliasing" bl_label = "Anti-Aliasing"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -509,7 +509,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
col.prop(rd, "filter_size", text="Size") col.prop(rd, "filter_size", text="Size")
class RENDER_PT_motion_blur(RenderButtonsPanel): class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Full Sample Motion Blur" bl_label = "Full Sample Motion Blur"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -529,8 +529,7 @@ class RENDER_PT_motion_blur(RenderButtonsPanel):
row.prop(rd, "motion_blur_samples") row.prop(rd, "motion_blur_samples")
row.prop(rd, "motion_blur_shutter") row.prop(rd, "motion_blur_shutter")
class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
class RENDER_PT_dimensions(RenderButtonsPanel):
bl_label = "Dimensions" bl_label = "Dimensions"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -577,7 +576,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
sub.prop(rd, "fps_base", text="/") sub.prop(rd, "fps_base", text="/")
class RENDER_PT_stamp(RenderButtonsPanel): class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Stamp" bl_label = "Stamp"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -623,7 +622,7 @@ class RENDER_PT_stamp(RenderButtonsPanel):
sub.prop(rd, "stamp_note_text", text="") sub.prop(rd, "stamp_note_text", text="")
class RENDER_PT_bake(RenderButtonsPanel): class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
bl_label = "Bake" bl_label = "Bake"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -670,33 +669,12 @@ class RENDER_PT_bake(RenderButtonsPanel):
sub.prop(rd, "bake_bias") sub.prop(rd, "bake_bias")
classes = [
RENDER_MT_presets,
RENDER_MT_ffmpeg_presets,
RENDER_PT_render,
RENDER_PT_layers,
RENDER_PT_dimensions,
RENDER_PT_antialiasing,
RENDER_PT_motion_blur,
RENDER_PT_shading,
RENDER_PT_output,
RENDER_PT_encoding,
RENDER_PT_performance,
RENDER_PT_post_processing,
RENDER_PT_stamp,
RENDER_PT_bake]
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

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class SceneButtonsPanel(bpy.types.Panel): class SceneButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "scene" bl_context = "scene"
@@ -32,7 +32,7 @@ class SceneButtonsPanel(bpy.types.Panel):
return context.scene return context.scene
class SCENE_PT_scene(SceneButtonsPanel): class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Scene" bl_label = "Scene"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -49,11 +49,11 @@ class SCENE_PT_scene(SceneButtonsPanel):
layout.prop(scene, "set", text="") layout.prop(scene, "set", text="")
class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel): class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "scene" _context_path = "scene"
class SCENE_PT_unit(SceneButtonsPanel): class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Units" bl_label = "Units"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -78,7 +78,7 @@ class SCENE_PT_unit(SceneButtonsPanel):
layout.column().prop(unit, "rotation_units") layout.column().prop(unit, "rotation_units")
class SCENE_PT_keying_sets(SceneButtonsPanel): class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Keying Sets" bl_label = "Keying Sets"
def draw(self, context): def draw(self, context):
@@ -115,7 +115,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel):
col.prop(ks, "insertkey_xyz_to_rgb", text="XYZ to RGB") col.prop(ks, "insertkey_xyz_to_rgb", text="XYZ to RGB")
class SCENE_PT_keying_set_paths(SceneButtonsPanel): class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Active Keying Set" bl_label = "Active Keying Set"
def poll(self, context): def poll(self, context):
@@ -169,7 +169,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel):
col.prop(ksp, "insertkey_xyz_to_rgb", text="XYZ to RGB") col.prop(ksp, "insertkey_xyz_to_rgb", text="XYZ to RGB")
class SCENE_PT_physics(SceneButtonsPanel): class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Gravity" bl_label = "Gravity"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -190,7 +190,7 @@ class SCENE_PT_physics(SceneButtonsPanel):
layout.column().prop(scene, "gravity", text="") layout.column().prop(scene, "gravity", text="")
class SCENE_PT_simplify(SceneButtonsPanel): class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
bl_label = "Simplify" bl_label = "Simplify"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -334,29 +334,12 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
return {'RUNNING_MODAL'} return {'RUNNING_MODAL'}
classes = [
SCENE_PT_scene,
SCENE_PT_unit,
SCENE_PT_keying_sets,
SCENE_PT_keying_set_paths,
SCENE_PT_physics,
SCENE_PT_simplify,
SCENE_PT_custom_props,
ANIM_OT_keying_set_export]
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

@@ -65,7 +65,7 @@ def context_tex_datablock(context):
return idblock return idblock
class TextureButtonsPanel(bpy.types.Panel): class TextureButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "texture" bl_context = "texture"
@@ -78,7 +78,7 @@ class TextureButtonsPanel(bpy.types.Panel):
return (tex.type != 'NONE' or tex.use_nodes) and (engine in self.COMPAT_ENGINES) return (tex.type != 'NONE' or tex.use_nodes) and (engine in self.COMPAT_ENGINES)
class TEXTURE_PT_preview(TextureButtonsPanel): class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Preview" bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -95,7 +95,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel):
layout.template_preview(tex, slot=slot) layout.template_preview(tex, slot=slot)
class TEXTURE_PT_context_texture(TextureButtonsPanel): class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -166,7 +166,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
layout.prop(tex, "type", text="") layout.prop(tex, "type", text="")
class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel): class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Panel):
_context_path = "texture" _context_path = "texture"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -175,7 +175,7 @@ class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel):
return context.texture and (engine in self.COMPAT_ENGINES) return context.texture and (engine in self.COMPAT_ENGINES)
class TEXTURE_PT_colors(TextureButtonsPanel): class TEXTURE_PT_colors(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Colors" bl_label = "Colors"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -220,7 +220,7 @@ class TextureSlotPanel(TextureButtonsPanel):
return TextureButtonsPanel.poll(self, context) and (engine in self.COMPAT_ENGINES) return TextureButtonsPanel.poll(self, context) and (engine in self.COMPAT_ENGINES)
class TEXTURE_PT_mapping(TextureSlotPanel): class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel):
bl_label = "Mapping" bl_label = "Mapping"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -317,7 +317,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel):
col.prop(tex, "size") col.prop(tex, "size")
class TEXTURE_PT_influence(TextureSlotPanel): class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel):
bl_label = "Influence" bl_label = "Influence"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -451,7 +451,7 @@ class TextureTypePanel(TextureButtonsPanel):
return ((tex and tex.type == self.tex_type and not tex.use_nodes) and (engine in self.COMPAT_ENGINES)) return ((tex and tex.type == self.tex_type and not tex.use_nodes) and (engine in self.COMPAT_ENGINES))
class TEXTURE_PT_clouds(TextureTypePanel): class TEXTURE_PT_clouds(TextureTypePanel, bpy.types.Panel):
bl_label = "Clouds" bl_label = "Clouds"
tex_type = 'CLOUDS' tex_type = 'CLOUDS'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -481,7 +481,7 @@ class TEXTURE_PT_clouds(TextureTypePanel):
col.prop(tex, "nabla", text="Nabla") col.prop(tex, "nabla", text="Nabla")
class TEXTURE_PT_wood(TextureTypePanel): class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
bl_label = "Wood" bl_label = "Wood"
tex_type = 'WOOD' tex_type = 'WOOD'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -518,7 +518,7 @@ class TEXTURE_PT_wood(TextureTypePanel):
col.prop(tex, "nabla") col.prop(tex, "nabla")
class TEXTURE_PT_marble(TextureTypePanel): class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
bl_label = "Marble" bl_label = "Marble"
tex_type = 'MARBLE' tex_type = 'MARBLE'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -550,7 +550,7 @@ class TEXTURE_PT_marble(TextureTypePanel):
col.prop(tex, "nabla") col.prop(tex, "nabla")
class TEXTURE_PT_magic(TextureTypePanel): class TEXTURE_PT_magic(TextureTypePanel, bpy.types.Panel):
bl_label = "Magic" bl_label = "Magic"
tex_type = 'MAGIC' tex_type = 'MAGIC'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -571,7 +571,7 @@ class TEXTURE_PT_magic(TextureTypePanel):
col.prop(tex, "turbulence") col.prop(tex, "turbulence")
class TEXTURE_PT_blend(TextureTypePanel): class TEXTURE_PT_blend(TextureTypePanel, bpy.types.Panel):
bl_label = "Blend" bl_label = "Blend"
tex_type = 'BLEND' tex_type = 'BLEND'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -593,7 +593,7 @@ class TEXTURE_PT_blend(TextureTypePanel):
sub.prop(tex, "flip_axis", expand=True) sub.prop(tex, "flip_axis", expand=True)
class TEXTURE_PT_stucci(TextureTypePanel): class TEXTURE_PT_stucci(TextureTypePanel, bpy.types.Panel):
bl_label = "Stucci" bl_label = "Stucci"
tex_type = 'STUCCI' tex_type = 'STUCCI'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -622,7 +622,7 @@ class TEXTURE_PT_stucci(TextureTypePanel):
col.prop(tex, "turbulence") col.prop(tex, "turbulence")
class TEXTURE_PT_image(TextureTypePanel): class TEXTURE_PT_image(TextureTypePanel, bpy.types.Panel):
bl_label = "Image" bl_label = "Image"
tex_type = 'IMAGE' tex_type = 'IMAGE'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -648,7 +648,7 @@ def texture_filter_common(tex, layout):
layout.prop(tex, "filter_size_minimum") layout.prop(tex, "filter_size_minimum")
class TEXTURE_PT_image_sampling(TextureTypePanel): class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
bl_label = "Image Sampling" bl_label = "Image Sampling"
bl_default_closed = True bl_default_closed = True
tex_type = 'IMAGE' tex_type = 'IMAGE'
@@ -689,7 +689,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel):
texture_filter_common(tex, col) texture_filter_common(tex, col)
class TEXTURE_PT_image_mapping(TextureTypePanel): class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
bl_label = "Image Mapping" bl_label = "Image Mapping"
bl_default_closed = True bl_default_closed = True
tex_type = 'IMAGE' tex_type = 'IMAGE'
@@ -748,7 +748,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel):
col.prop(tex, "crop_max_y", text="Y") col.prop(tex, "crop_max_y", text="Y")
class TEXTURE_PT_plugin(TextureTypePanel): class TEXTURE_PT_plugin(TextureTypePanel, bpy.types.Panel):
bl_label = "Plugin" bl_label = "Plugin"
tex_type = 'PLUGIN' tex_type = 'PLUGIN'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -761,7 +761,7 @@ class TEXTURE_PT_plugin(TextureTypePanel):
layout.label(text="Nothing yet") layout.label(text="Nothing yet")
class TEXTURE_PT_envmap(TextureTypePanel): class TEXTURE_PT_envmap(TextureTypePanel, bpy.types.Panel):
bl_label = "Environment Map" bl_label = "Environment Map"
tex_type = 'ENVIRONMENT_MAP' tex_type = 'ENVIRONMENT_MAP'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -802,7 +802,7 @@ class TEXTURE_PT_envmap(TextureTypePanel):
col.prop(env, "clip_end", text="End") col.prop(env, "clip_end", text="End")
class TEXTURE_PT_envmap_sampling(TextureTypePanel): class TEXTURE_PT_envmap_sampling(TextureTypePanel, bpy.types.Panel):
bl_label = "Environment Map Sampling" bl_label = "Environment Map Sampling"
bl_default_closed = True bl_default_closed = True
tex_type = 'ENVIRONMENT_MAP' tex_type = 'ENVIRONMENT_MAP'
@@ -816,7 +816,7 @@ class TEXTURE_PT_envmap_sampling(TextureTypePanel):
texture_filter_common(tex, layout) texture_filter_common(tex, layout)
class TEXTURE_PT_musgrave(TextureTypePanel): class TEXTURE_PT_musgrave(TextureTypePanel, bpy.types.Panel):
bl_label = "Musgrave" bl_label = "Musgrave"
tex_type = 'MUSGRAVE' tex_type = 'MUSGRAVE'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -864,7 +864,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel):
col.prop(tex, "nabla") col.prop(tex, "nabla")
class TEXTURE_PT_voronoi(TextureTypePanel): class TEXTURE_PT_voronoi(TextureTypePanel, bpy.types.Panel):
bl_label = "Voronoi" bl_label = "Voronoi"
tex_type = 'VORONOI' tex_type = 'VORONOI'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -908,7 +908,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel):
col.prop(tex, "nabla") col.prop(tex, "nabla")
class TEXTURE_PT_distortednoise(TextureTypePanel): class TEXTURE_PT_distortednoise(TextureTypePanel, bpy.types.Panel):
bl_label = "Distorted Noise" bl_label = "Distorted Noise"
tex_type = 'DISTORTED_NOISE' tex_type = 'DISTORTED_NOISE'
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -937,7 +937,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel):
col.prop(tex, "nabla") col.prop(tex, "nabla")
class TEXTURE_PT_voxeldata(TextureButtonsPanel): class TEXTURE_PT_voxeldata(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Voxel Data" bl_label = "Voxel Data"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -975,7 +975,7 @@ class TEXTURE_PT_voxeldata(TextureButtonsPanel):
layout.prop(vd, "intensity") layout.prop(vd, "intensity")
class TEXTURE_PT_pointdensity(TextureButtonsPanel): class TEXTURE_PT_pointdensity(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Point Density" bl_label = "Point Density"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -1035,7 +1035,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel):
col.prop(pd, "falloff_softness") col.prop(pd, "falloff_softness")
class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel): class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
bl_label = "Turbulence" bl_label = "Turbulence"
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -1076,49 +1076,12 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel):
col.prop(pd, "turbulence_strength") col.prop(pd, "turbulence_strength")
classes = [
TEXTURE_MT_specials,
TEXTURE_MT_envmap_specials,
TEXTURE_PT_context_texture,
TEXTURE_PT_preview,
TEXTURE_PT_clouds, # Texture Type Panels
TEXTURE_PT_wood,
TEXTURE_PT_marble,
TEXTURE_PT_magic,
TEXTURE_PT_blend,
TEXTURE_PT_stucci,
TEXTURE_PT_image,
TEXTURE_PT_image_sampling,
TEXTURE_PT_image_mapping,
TEXTURE_PT_plugin,
TEXTURE_PT_envmap,
TEXTURE_PT_envmap_sampling,
TEXTURE_PT_musgrave,
TEXTURE_PT_voronoi,
TEXTURE_PT_distortednoise,
TEXTURE_PT_voxeldata,
TEXTURE_PT_pointdensity,
TEXTURE_PT_pointdensity_turbulence,
TEXTURE_PT_colors,
TEXTURE_PT_mapping,
TEXTURE_PT_influence,
TEXTURE_PT_custom_props]
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

@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class WorldButtonsPanel(bpy.types.Panel): class WorldButtonsPanel():
bl_space_type = 'PROPERTIES' bl_space_type = 'PROPERTIES'
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_context = "world" bl_context = "world"
@@ -34,7 +34,7 @@ class WorldButtonsPanel(bpy.types.Panel):
return (context.world) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES) return (context.world) and (not rd.use_game_engine) and (rd.engine in self.COMPAT_ENGINES)
class WORLD_PT_preview(WorldButtonsPanel): class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Preview" bl_label = "Preview"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -42,7 +42,7 @@ class WORLD_PT_preview(WorldButtonsPanel):
self.layout.template_preview(context.world) self.layout.template_preview(context.world)
class WORLD_PT_context_world(WorldButtonsPanel): class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = "" bl_label = ""
bl_show_header = False bl_show_header = False
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -70,12 +70,12 @@ class WORLD_PT_context_world(WorldButtonsPanel):
layout.template_ID(scene, "world", new="world.new") layout.template_ID(scene, "world", new="world.new")
class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel): class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
_context_path = "world" _context_path = "world"
class WORLD_PT_world(WorldButtonsPanel): class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
bl_label = "World" bl_label = "World"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -103,7 +103,7 @@ class WORLD_PT_world(WorldButtonsPanel):
row.column().prop(world, "ambient_color") row.column().prop(world, "ambient_color")
class WORLD_PT_mist(WorldButtonsPanel): class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Mist" bl_label = "Mist"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -134,7 +134,7 @@ class WORLD_PT_mist(WorldButtonsPanel):
layout.prop(world.mist, "falloff") layout.prop(world.mist, "falloff")
class WORLD_PT_stars(WorldButtonsPanel): class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Stars" bl_label = "Stars"
bl_default_closed = True bl_default_closed = True
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -163,7 +163,7 @@ class WORLD_PT_stars(WorldButtonsPanel):
col.prop(world.stars, "average_separation", text="Separation") col.prop(world.stars, "average_separation", text="Separation")
class WORLD_PT_ambient_occlusion(WorldButtonsPanel): class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Ambient Occlusion" bl_label = "Ambient Occlusion"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -182,7 +182,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
split.prop(light, "ao_blend_mode", text="") split.prop(light, "ao_blend_mode", text="")
class WORLD_PT_environment_lighting(WorldButtonsPanel): class WORLD_PT_environment_lighting(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Environment Lighting" bl_label = "Environment Lighting"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -201,7 +201,7 @@ class WORLD_PT_environment_lighting(WorldButtonsPanel):
split.prop(light, "environment_color", text="") split.prop(light, "environment_color", text="")
class WORLD_PT_indirect_lighting(WorldButtonsPanel): class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Indirect Lighting" bl_label = "Indirect Lighting"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -224,7 +224,7 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel):
split.prop(light, "indirect_bounces", text="Bounces") split.prop(light, "indirect_bounces", text="Bounces")
class WORLD_PT_gather(WorldButtonsPanel): class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
bl_label = "Gather" bl_label = "Gather"
COMPAT_ENGINES = {'BLENDER_RENDER'} COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -272,30 +272,12 @@ class WORLD_PT_gather(WorldButtonsPanel):
col.prop(light, "correction") col.prop(light, "correction")
classes = [
WORLD_PT_context_world,
WORLD_PT_preview,
WORLD_PT_world,
WORLD_PT_ambient_occlusion,
WORLD_PT_environment_lighting,
WORLD_PT_indirect_lighting,
WORLD_PT_gather,
WORLD_PT_mist,
WORLD_PT_stars,
WORLD_PT_custom_props]
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

@@ -196,31 +196,12 @@ class ConsoleLanguage(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
classes = [
CONSOLE_HT_header,
CONSOLE_MT_console,
CONSOLE_MT_report,
CONSOLE_MT_language,
# Stubs that call the language operators
ConsoleExec,
ConsoleAutocomplete,
ConsoleBanner,
# Set the language and call the banner
ConsoleLanguage]
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

@@ -196,25 +196,12 @@ class DOPESHEET_MT_key_transform(bpy.types.Menu):
layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE' layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE'
classes = [
DOPESHEET_HT_header, # header/menu classes
DOPESHEET_MT_view,
DOPESHEET_MT_select,
DOPESHEET_MT_channel,
DOPESHEET_MT_key,
DOPESHEET_MT_key_transform]
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

@@ -65,20 +65,12 @@ class FILEBROWSER_HT_header(bpy.types.Header):
row.prop(params, "filter_text", text="") row.prop(params, "filter_text", text="")
classes = [
FILEBROWSER_HT_header]
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

@@ -204,25 +204,12 @@ class GRAPH_MT_key_transform(bpy.types.Menu):
layout.operator("transform.resize", text="Scale") layout.operator("transform.resize", text="Scale")
classes = [
GRAPH_HT_header, # header/menu classes
GRAPH_MT_view,
GRAPH_MT_select,
GRAPH_MT_channel,
GRAPH_MT_key,
GRAPH_MT_key_transform]
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

@@ -674,41 +674,12 @@ class IMAGE_PT_paint_curve(bpy.types.Panel):
row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE' row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX' row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
classes = [
IMAGE_MT_view,
IMAGE_MT_select,
IMAGE_MT_image,
IMAGE_MT_uvs_showhide,
IMAGE_MT_uvs_transform,
IMAGE_MT_uvs_snap,
IMAGE_MT_uvs_mirror,
IMAGE_MT_uvs_weldalign,
IMAGE_MT_uvs,
IMAGE_HT_header,
IMAGE_PT_image_properties,
IMAGE_PT_paint,
IMAGE_PT_tools_brush_texture,
IMAGE_PT_paint_stroke,
IMAGE_PT_paint_curve,
IMAGE_PT_game_properties,
IMAGE_PT_view_properties,
IMAGE_PT_view_histogram,
IMAGE_PT_view_waveform,
IMAGE_PT_view_vectorscope,
IMAGE_PT_sample_line,
IMAGE_PT_scope_sample]
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

@@ -354,34 +354,13 @@ class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
classes = [
INFO_HT_header,
INFO_MT_file,
INFO_MT_file_import,
INFO_MT_file_export,
INFO_MT_file_external_data,
INFO_MT_add,
INFO_MT_mesh_add,
INFO_MT_curve_add,
INFO_MT_surface_add,
INFO_MT_armature_add,
INFO_MT_game,
INFO_MT_render,
INFO_MT_help,
HELP_OT_operator_cheat_sheet]
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

@@ -88,24 +88,12 @@ class LOGIC_MT_view(bpy.types.Menu):
layout.operator("logic.properties", icon='MENU_PANEL') layout.operator("logic.properties", icon='MENU_PANEL')
classes = [
LOGIC_HT_header,
LOGIC_MT_view,
LOGIC_PT_properties,
LOGIC_MT_logicbricks_add]
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

@@ -159,25 +159,12 @@ class NLA_MT_edit_transform(bpy.types.Menu):
layout.operator("transform.resize", text="Scale") layout.operator("transform.resize", text="Scale")
classes = [
NLA_HT_header, # header/menu classes
NLA_MT_view,
NLA_MT_select,
NLA_MT_edit,
NLA_MT_add,
NLA_MT_edit_transform]
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

@@ -160,23 +160,12 @@ class NODE_MT_node(bpy.types.Menu):
layout.operator("node.show_cyclic_dependencies") layout.operator("node.show_cyclic_dependencies")
classes = [
NODE_HT_header,
NODE_MT_view,
NODE_MT_select,
NODE_MT_node]
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

@@ -117,23 +117,12 @@ class OUTLINER_MT_edit_datablocks(bpy.types.Menu):
col.operator("outliner.drivers_delete_selected") col.operator("outliner.drivers_delete_selected")
classes = [
OUTLINER_HT_header,
OUTLINER_MT_view,
OUTLINER_MT_search,
OUTLINER_MT_edit_datablocks]
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

@@ -312,7 +312,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
layout.operator("sequencer.swap_data") layout.operator("sequencer.swap_data")
class SequencerButtonsPanel(bpy.types.Panel): class SequencerButtonsPanel():
bl_space_type = 'SEQUENCE_EDITOR' bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI' bl_region_type = 'UI'
@@ -323,7 +323,7 @@ class SequencerButtonsPanel(bpy.types.Panel):
return self.has_sequencer(context) and (act_strip(context) is not None) return self.has_sequencer(context) and (act_strip(context) is not None)
class SequencerButtonsPanel_Output(bpy.types.Panel): class SequencerButtonsPanel_Output():
bl_space_type = 'SEQUENCE_EDITOR' bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI' bl_region_type = 'UI'
@@ -334,7 +334,7 @@ class SequencerButtonsPanel_Output(bpy.types.Panel):
return self.has_preview(context) return self.has_preview(context)
class SEQUENCER_PT_edit(SequencerButtonsPanel): class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Edit Strip" bl_label = "Edit Strip"
def draw(self, context): def draw(self, context):
@@ -381,7 +381,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel):
col.label(text="Frame Still %d:%d" % (strip.frame_still_start, strip.frame_still_end)) col.label(text="Frame Still %d:%d" % (strip.frame_still_start, strip.frame_still_end))
class SEQUENCER_PT_effect(SequencerButtonsPanel): class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Effect Strip" bl_label = "Effect Strip"
def poll(self, context): def poll(self, context):
@@ -510,7 +510,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel):
col.prop(strip, "rotation_start", text="Rotation") col.prop(strip, "rotation_start", text="Rotation")
class SEQUENCER_PT_input(SequencerButtonsPanel): class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Strip Input" bl_label = "Strip Input"
def poll(self, context): def poll(self, context):
@@ -528,15 +528,41 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
'MULTICAM', 'SPEED') 'MULTICAM', 'SPEED')
def draw_filename(self, context):
pass
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
strip = act_strip(context) strip = act_strip(context)
self.draw_filename(context) seq_type = strip.type
# draw a filename if we have one
if seq_type == 'IMAGE':
split = layout.split(percentage=0.2)
col = split.column()
col.label(text="Path:")
col = split.column()
col.prop(strip, "directory", text="")
# Current element for the filename
elem = strip.getStripElem(context.scene.frame_current)
if elem:
split = layout.split(percentage=0.2)
col = split.column()
col.label(text="File:")
col = split.column()
col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback
elif seq_type == 'MOVIE':
split = layout.split(percentage=0.2)
col = split.column()
col.label(text="Path:")
col = split.column()
col.prop(strip, "filepath", text="")
col.prop(strip, "mpeg_preseek", text="MPEG Preseek")
# TODO, sound???
# end drawing filename
layout.prop(strip, "use_translation", text="Image Offset:") layout.prop(strip, "use_translation", text="Image Offset:")
if strip.use_translation: if strip.use_translation:
@@ -558,85 +584,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel):
col.prop(strip, "animation_end_offset", text="End") col.prop(strip, "animation_end_offset", text="End")
class SEQUENCER_PT_input_movie(SEQUENCER_PT_input): class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Strip Input"
def poll(self, context):
if not self.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return strip.type == 'MOVIE'
def draw_filename(self, context):
layout = self.layout
strip = act_strip(context)
split = layout.split(percentage=0.2)
col = split.column()
col.label(text="Path:")
col = split.column()
col.prop(strip, "filepath", text="")
col.prop(strip, "mpeg_preseek", text="MPEG Preseek")
class SEQUENCER_PT_input_image(SEQUENCER_PT_input):
bl_label = "Strip Input"
def poll(self, context):
if not self.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return strip.type == 'IMAGE'
def draw_filename(self, context):
layout = self.layout
strip = act_strip(context)
split = layout.split(percentage=0.2)
col = split.column()
col.label(text="Path:")
col = split.column()
col.prop(strip, "directory", text="")
# Current element for the filename
elem = strip.getStripElem(context.scene.frame_current)
if elem:
split = layout.split(percentage=0.2)
col = split.column()
col.label(text="File:")
col = split.column()
col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback
class SEQUENCER_PT_input_secondary(SEQUENCER_PT_input):
bl_label = "Strip Input"
def poll(self, context):
if not self.has_sequencer(context):
return False
strip = act_strip(context)
if not strip:
return False
return strip.type in ('SCENE', 'META')
def draw_filename(self, context):
pass
class SEQUENCER_PT_sound(SequencerButtonsPanel):
bl_label = "Sound" bl_label = "Sound"
def poll(self, context): def poll(self, context):
@@ -676,7 +624,7 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel):
col.prop(strip, "animation_end_offset", text="End") col.prop(strip, "animation_end_offset", text="End")
class SEQUENCER_PT_scene(SequencerButtonsPanel): class SEQUENCER_PT_scene(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Scene" bl_label = "Scene"
def poll(self, context): def poll(self, context):
@@ -700,7 +648,7 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel):
layout.template_ID(strip, "scene_camera") layout.template_ID(strip, "scene_camera")
class SEQUENCER_PT_filter(SequencerButtonsPanel): class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Filter" bl_label = "Filter"
def poll(self, context): def poll(self, context):
@@ -761,7 +709,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel):
col.prop(strip.color_balance, "inverse_gain", text="Inverse") col.prop(strip.color_balance, "inverse_gain", text="Inverse")
class SEQUENCER_PT_proxy(SequencerButtonsPanel): class SEQUENCER_PT_proxy(SequencerButtonsPanel, bpy.types.Panel):
bl_label = "Proxy" bl_label = "Proxy"
def poll(self, context): def poll(self, context):
@@ -794,7 +742,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel):
flow.prop(strip.proxy, "filepath") flow.prop(strip.proxy, "filepath")
class SEQUENCER_PT_preview(SequencerButtonsPanel_Output): class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, bpy.types.Panel):
bl_label = "Scene Preview/Render" bl_label = "Scene Preview/Render"
bl_space_type = 'SEQUENCE_EDITOR' bl_space_type = 'SEQUENCE_EDITOR'
bl_region_type = 'UI' bl_region_type = 'UI'
@@ -818,7 +766,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output):
''' '''
class SEQUENCER_PT_view(SequencerButtonsPanel_Output): class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy.types.Panel):
bl_label = "View Settings" bl_label = "View Settings"
def draw(self, context): def draw(self, context):
@@ -834,40 +782,12 @@ class SEQUENCER_PT_view(SequencerButtonsPanel_Output):
col.prop(st, "separate_color_preview") col.prop(st, "separate_color_preview")
col.prop(st, "proxy_render_size") col.prop(st, "proxy_render_size")
classes = [
SEQUENCER_HT_header, # header/menu classes
SEQUENCER_MT_view,
SEQUENCER_MT_view_toggle,
SEQUENCER_MT_select,
SEQUENCER_MT_marker,
SEQUENCER_MT_add,
SEQUENCER_MT_add_effect,
SEQUENCER_MT_strip,
SEQUENCER_PT_edit, # sequencer panels
SEQUENCER_PT_effect,
SEQUENCER_PT_input_movie,
SEQUENCER_PT_input_image,
SEQUENCER_PT_input_secondary,
SEQUENCER_PT_sound,
SEQUENCER_PT_scene,
SEQUENCER_PT_filter,
SEQUENCER_PT_proxy,
SEQUENCER_PT_preview,
SEQUENCER_PT_view] # view panels
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

@@ -140,6 +140,11 @@ class TEXT_MT_view(bpy.types.Menu):
layout.operator("screen.area_dupli") layout.operator("screen.area_dupli")
layout.operator("screen.screen_full_area") layout.operator("screen.screen_full_area")
layout.separator()
layout.operator("text.move", text="Top of File").type = 'FILE_TOP'
layout.operator("text.move", text="Bottom of File").type = 'FILE_BOTTOM'
class TEXT_MT_text(bpy.types.Menu): class TEXT_MT_text(bpy.types.Menu):
@@ -188,16 +193,6 @@ class TEXT_MT_templates(bpy.types.Menu):
self.path_menu(bpy.utils.script_paths("templates"), "text.open", {"internal": True}) self.path_menu(bpy.utils.script_paths("templates"), "text.open", {"internal": True})
class TEXT_MT_edit_view(bpy.types.Menu):
bl_label = "View"
def draw(self, context):
layout = self.layout
layout.operator("text.move", text="Top of File").type = 'FILE_TOP'
layout.operator("text.move", text="Bottom of File").type = 'FILE_BOTTOM'
class TEXT_MT_edit_select(bpy.types.Menu): class TEXT_MT_edit_select(bpy.types.Menu):
bl_label = "Select" bl_label = "Select"
@@ -268,7 +263,6 @@ class TEXT_MT_edit(bpy.types.Menu):
layout.separator() layout.separator()
layout.menu("TEXT_MT_edit_view")
layout.menu("TEXT_MT_edit_select") layout.menu("TEXT_MT_edit_select")
layout.menu("TEXT_MT_edit_markers") layout.menu("TEXT_MT_edit_markers")
@@ -297,33 +291,12 @@ class TEXT_MT_toolbox(bpy.types.Menu):
layout.operator("text.run_script") layout.operator("text.run_script")
classes = [
TEXT_HT_header,
TEXT_PT_properties,
TEXT_PT_find,
TEXT_MT_view,
TEXT_MT_text,
TEXT_MT_templates,
TEXT_MT_format,
TEXT_MT_edit,
TEXT_MT_edit_view,
TEXT_MT_edit_select,
TEXT_MT_edit_markers,
TEXT_MT_edit_to3d,
TEXT_MT_toolbox]
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

@@ -192,25 +192,12 @@ class TIME_MT_autokey(bpy.types.Menu):
layout.prop_enum(tools, "autokey_mode", 'ADD_REPLACE_KEYS') layout.prop_enum(tools, "autokey_mode", 'ADD_REPLACE_KEYS')
layout.prop_enum(tools, "autokey_mode", 'REPLACE_KEYS') layout.prop_enum(tools, "autokey_mode", 'REPLACE_KEYS')
classes = [
TIME_HT_header,
TIME_MT_view,
TIME_MT_cache,
TIME_MT_frame,
TIME_MT_autokey,
TIME_MT_playback]
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

@@ -814,33 +814,138 @@ class USERPREF_PT_addons(bpy.types.Panel):
bl_label = "Addons" bl_label = "Addons"
bl_region_type = 'WINDOW' bl_region_type = 'WINDOW'
bl_show_header = False bl_show_header = False
_addons_fake_modules = {}
def poll(self, context): def poll(self, context):
userpref = context.user_preferences userpref = context.user_preferences
return (userpref.active_section == 'ADDONS') return (userpref.active_section == 'ADDONS')
@staticmethod
def module_get(mod_name):
return USERPREF_PT_addons._addons_fake_modules[mod_name]
@staticmethod @staticmethod
def _addon_list(): def _addon_list():
import os
import sys import sys
import time import time
modules = [] modules = []
loaded_modules = set() loaded_modules = set()
paths = bpy.utils.script_paths("addons") paths = bpy.utils.script_paths("addons")
# if folder addons_contrib/ exists, scripts in there will be loaded
paths += bpy.utils.script_paths("addons_contrib")
if bpy.app.debug: if bpy.app.debug:
t_main = time.time() t_main = time.time()
# sys.path.insert(0, None) if 1:
for path in paths: # fake module importing
# sys.path[0] = path def fake_module(mod_name, mod_path, speedy=True):
modules.extend(bpy.utils.modules_from_path(path, loaded_modules)) if bpy.app.debug:
print("fake_module", mod_name, mod_path)
import ast
ModuleType = type(ast)
if speedy:
lines = []
line_iter = iter(open(mod_path, "r"))
l = ""
while not l.startswith("bl_addon_info"):
l = line_iter.readline()
if len(l) == 0:
break
while l.rstrip():
lines.append(l)
l = line_iter.readline()
del line_iter
data = "".join(lines)
if bpy.app.debug: else:
print("Addon Script Load Time %.4f" % (time.time() - t_main)) data = open(mod_path, "r").read()
# del sys.path[0] ast_data = ast.parse(data, filename=mod_path)
return modules body_info = None
for body in ast_data.body:
if body.__class__ == ast.Assign:
if len(body.targets) == 1:
if getattr(body.targets[0], "id", "") == "bl_addon_info":
body_info = body
break
if body_info:
mod = ModuleType(mod_name)
mod.bl_addon_info = ast.literal_eval(body.value)
mod.__file__ = mod_path
mod.__time__ = os.path.getmtime(mod_path)
return mod
else:
return None
modules_stale = set(USERPREF_PT_addons._addons_fake_modules.keys())
for path in paths:
for f in sorted(os.listdir(path)):
if f.endswith(".py"):
mod_name = f[0:-3]
mod_path = os.path.join(path, f)
elif ("." not in f) and (os.path.isfile(os.path.join(path, f, "__init__.py"))):
mod_name = f
mod_path = os.path.join(path, f, "__init__.py")
else:
mod_name = ""
mod_path = ""
if mod_name:
if mod_name in modules_stale:
modules_stale.remove(mod_name)
mod = USERPREF_PT_addons._addons_fake_modules.get(mod_name)
if mod:
if mod.__time__ != os.path.getmtime(mod_path):
print("Reloading", mod_name)
del USERPREF_PT_addons._addons_fake_modules[mod_name]
mod = None
if mod is None:
mod = fake_module(mod_name, mod_path)
if mod:
USERPREF_PT_addons._addons_fake_modules[mod_name] = mod
# just incase we get stale modules, not likely
for mod_stale in modules_stale:
del USERPREF_PT_addons._addons_fake_modules[mod_stale]
del modules_stale
return list(USERPREF_PT_addons._addons_fake_modules.values())
else:
# never run this!, before it used ast
pass
'''
# note, this still gets added to _bpy_types.TypeMap
import bpy_types as _bpy_types
_bpy_types._register_override = True
# sys.path.insert(0, None)
for path in paths:
# sys.path[0] = path
modules.extend(bpy.utils.modules_from_path(path, loaded_modules))
if bpy.app.debug:
print("Addon Script Load Time %.4f" % (time.time() - t_main))
_bpy_types._register_override = False
# del sys.path[0]
return modules
'''
def draw(self, context): def draw(self, context):
layout = self.layout layout = self.layout
@@ -994,8 +1099,13 @@ class WM_OT_addon_enable(bpy.types.Operator):
def execute(self, context): def execute(self, context):
module_name = self.properties.module module_name = self.properties.module
# note, this still gets added to _bpy_types.TypeMap
import bpy_types as _bpy_types
_bpy_types._register_immediate = False
try: try:
mod = __import__(module_name) mod = __import__(module_name)
_bpy_types._register_module(module_name)
mod.register() mod.register()
except: except:
import traceback import traceback
@@ -1010,7 +1120,9 @@ class WM_OT_addon_enable(bpy.types.Operator):
if info.get("blender", (0, 0, 0)) > bpy.app.version: if info.get("blender", (0, 0, 0)) > bpy.app.version:
self.report("WARNING','This script was written for a newer version of Blender and might not function (correctly).\nThe script is enabled though.") self.report("WARNING','This script was written for a newer version of Blender and might not function (correctly).\nThe script is enabled though.")
_bpy_types._register_immediate = True
return {'FINISHED'} return {'FINISHED'}
@@ -1022,13 +1134,15 @@ class WM_OT_addon_disable(bpy.types.Operator):
module = StringProperty(name="Module", description="Module name of the addon to disable") module = StringProperty(name="Module", description="Module name of the addon to disable")
def execute(self, context): def execute(self, context):
import traceback import bpy_types as _bpy_types
module_name = self.properties.module module_name = self.properties.module
try: try:
mod = __import__(module_name) mod = __import__(module_name)
_bpy_types._unregister_module(module_name, free=False) # dont free because we may want to enable again.
mod.unregister() mod.unregister()
except: except:
import traceback
traceback.print_exc() traceback.print_exc()
addons = context.user_preferences.addons addons = context.user_preferences.addons
@@ -1116,7 +1230,8 @@ class WM_OT_addon_expand(bpy.types.Operator):
# unlikely to fail, module should have already been imported # unlikely to fail, module should have already been imported
try: try:
mod = __import__(module_name) # mod = __import__(module_name)
mod = USERPREF_PT_addons.module_get(module_name)
except: except:
import traceback import traceback
traceback.print_exc() traceback.print_exc()
@@ -1127,36 +1242,11 @@ class WM_OT_addon_expand(bpy.types.Operator):
return {'FINISHED'} return {'FINISHED'}
classes = [
USERPREF_HT_header,
USERPREF_PT_tabs,
USERPREF_PT_interface,
USERPREF_PT_theme,
USERPREF_PT_edit,
USERPREF_PT_system,
USERPREF_PT_file,
USERPREF_PT_input,
USERPREF_PT_addons,
USERPREF_MT_interaction_presets,
USERPREF_MT_splash,
WM_OT_addon_enable,
WM_OT_addon_disable,
WM_OT_addon_install,
WM_OT_addon_expand]
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

@@ -784,29 +784,11 @@ class WM_OT_keyconfig_remove(bpy.types.Operator):
wm.remove_keyconfig(keyconfig) wm.remove_keyconfig(keyconfig)
return {'FINISHED'} return {'FINISHED'}
classes = [
WM_OT_keyconfig_export,
WM_OT_keyconfig_import,
WM_OT_keyconfig_test,
WM_OT_keyconfig_remove,
WM_OT_keymap_edit,
WM_OT_keymap_restore,
WM_OT_keyitem_add,
WM_OT_keyitem_remove,
WM_OT_keyitem_restore]
def register(): 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

@@ -75,11 +75,16 @@ class VIEW3D_HT_header(bpy.types.Header):
row.prop(view, "occlude_geometry", text="") row.prop(view, "occlude_geometry", text="")
# Proportional editing # Proportional editing
if obj.mode in ('OBJECT', '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_editing", text="", icon_only=True)
if toolsettings.proportional_editing != 'DISABLED': if toolsettings.proportional_editing != 'DISABLED':
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True) row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
elif obj.mode == 'OBJECT':
row = layout.row(align=True)
row.prop(toolsettings, "proportional_editing_objects", text="", icon_only=True)
if toolsettings.proportional_editing_objects:
row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
# Snap # Snap
row = layout.row(align=True) row = layout.row(align=True)
@@ -114,7 +119,7 @@ class VIEW3D_HT_header(bpy.types.Header):
# ********** Utilities ********** # ********** Utilities **********
class VIEW3D_MT_showhide(bpy.types.Menu): class ShowHideMenu():
bl_label = "Show/Hide" bl_label = "Show/Hide"
_operator_name = "" _operator_name = ""
@@ -1025,7 +1030,7 @@ class VIEW3D_MT_sculpt(bpy.types.Menu):
layout.prop(brush, "use_anchor") layout.prop(brush, "use_anchor")
if sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'): if sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
layout.prop(brush, "direction") layout.prop_menu_enum(brush, "direction")
if sculpt_tool == 'LAYER': if sculpt_tool == 'LAYER':
layout.prop(brush, "use_persistent") layout.prop(brush, "use_persistent")
@@ -1086,7 +1091,7 @@ class VIEW3D_MT_particle_specials(bpy.types.Menu):
layout.operator("particle.remove_doubles") layout.operator("particle.remove_doubles")
class VIEW3D_MT_particle_showhide(VIEW3D_MT_showhide): class VIEW3D_MT_particle_showhide(ShowHideMenu, bpy.types.Menu):
_operator_name = "particle" _operator_name = "particle"
# ********** Pose Menu ********** # ********** Pose Menu **********
@@ -1236,7 +1241,7 @@ class VIEW3D_MT_pose_constraints(bpy.types.Menu):
layout.operator("pose.constraints_clear") layout.operator("pose.constraints_clear")
class VIEW3D_MT_pose_showhide(VIEW3D_MT_showhide): class VIEW3D_MT_pose_showhide(ShowHideMenu, bpy.types.Menu):
_operator_name = "pose" _operator_name = "pose"
@@ -1602,7 +1607,7 @@ class VIEW3D_MT_edit_mesh_normals(bpy.types.Menu):
layout.operator("mesh.flip_normals") layout.operator("mesh.flip_normals")
class VIEW3D_MT_edit_mesh_showhide(VIEW3D_MT_showhide): class VIEW3D_MT_edit_mesh_showhide(ShowHideMenu, bpy.types.Menu):
_operator_name = "mesh" _operator_name = "mesh"
# Edit Curve # Edit Curve
@@ -1694,7 +1699,7 @@ class VIEW3D_MT_edit_curve_specials(bpy.types.Menu):
layout.operator("curve.smooth_radius") layout.operator("curve.smooth_radius")
class VIEW3D_MT_edit_curve_showhide(VIEW3D_MT_showhide): class VIEW3D_MT_edit_curve_showhide(ShowHideMenu, bpy.types.Menu):
_operator_name = "curve" _operator_name = "curve"
@@ -2269,123 +2274,13 @@ class VIEW3D_PT_context_properties(bpy.types.Panel):
# Draw with no edit button # Draw with no edit button
rna_prop_ui.draw(self.layout, context, member, False) rna_prop_ui.draw(self.layout, context, member, False)
classes = [
VIEW3D_OT_edit_mesh_extrude_move, # detects constraints setup and extrude region
VIEW3D_OT_edit_mesh_extrude_individual_move,
VIEW3D_HT_header, # Header
VIEW3D_MT_view, #View Menus
VIEW3D_MT_view_navigation,
VIEW3D_MT_view_align,
VIEW3D_MT_view_align_selected,
VIEW3D_MT_view_cameras,
VIEW3D_MT_select_object, # Select Menus
VIEW3D_MT_select_pose,
VIEW3D_MT_select_particle,
VIEW3D_MT_select_edit_mesh,
VIEW3D_MT_select_edit_curve,
VIEW3D_MT_select_edit_surface,
VIEW3D_MT_select_edit_metaball,
VIEW3D_MT_select_edit_lattice,
VIEW3D_MT_select_edit_armature,
VIEW3D_MT_select_face, # XXX todo
VIEW3D_MT_transform, # Object/Edit Menus
VIEW3D_MT_mirror, # Object/Edit Menus
VIEW3D_MT_snap, # Object/Edit Menus
VIEW3D_MT_uv_map, # Edit Menus
VIEW3D_MT_object, # Object Menu
VIEW3D_MT_object_specials,
VIEW3D_MT_object_apply,
VIEW3D_MT_object_clear,
VIEW3D_MT_object_parent,
VIEW3D_MT_object_track,
VIEW3D_MT_object_group,
VIEW3D_MT_object_constraints,
VIEW3D_MT_object_showhide,
VIEW3D_MT_make_single_user,
VIEW3D_MT_make_links,
VIEW3D_MT_object_game_properties,
VIEW3D_MT_object_game_logicbricks,
VIEW3D_MT_hook,
VIEW3D_MT_vertex_group,
VIEW3D_MT_sculpt, # Sculpt Menu
VIEW3D_MT_paint_vertex,
VIEW3D_MT_paint_weight,
VIEW3D_MT_particle, # Particle Menu
VIEW3D_MT_particle_specials,
VIEW3D_MT_particle_showhide,
VIEW3D_MT_pose, # POSE Menu
VIEW3D_MT_pose_transform,
VIEW3D_MT_pose_pose,
VIEW3D_MT_pose_motion,
VIEW3D_MT_pose_group,
VIEW3D_MT_pose_ik,
VIEW3D_MT_pose_constraints,
VIEW3D_MT_pose_showhide,
VIEW3D_MT_pose_apply,
VIEW3D_MT_edit_mesh,
VIEW3D_MT_edit_mesh_specials, # Only as a menu for keybindings
VIEW3D_MT_edit_mesh_selection_mode, # Only as a menu for keybindings
VIEW3D_MT_edit_mesh_vertices,
VIEW3D_MT_edit_mesh_edges,
VIEW3D_MT_edit_mesh_faces,
VIEW3D_MT_edit_mesh_normals,
VIEW3D_MT_edit_mesh_showhide,
VIEW3D_MT_edit_mesh_extrude, # use with VIEW3D_OT_edit_mesh_extrude_menu
VIEW3D_MT_edit_curve,
VIEW3D_MT_edit_curve_ctrlpoints,
VIEW3D_MT_edit_curve_segments,
VIEW3D_MT_edit_curve_specials,
VIEW3D_MT_edit_curve_showhide,
VIEW3D_MT_edit_surface,
VIEW3D_MT_edit_text,
VIEW3D_MT_edit_text_chars,
VIEW3D_MT_edit_meta,
VIEW3D_MT_edit_meta_showhide,
VIEW3D_MT_edit_lattice,
VIEW3D_MT_edit_armature,
VIEW3D_MT_edit_armature_parent,
VIEW3D_MT_edit_armature_roll,
VIEW3D_MT_armature_specials, # Only as a menu for keybindings
# Panels
VIEW3D_PT_view3d_properties,
VIEW3D_PT_view3d_display,
VIEW3D_PT_view3d_name,
VIEW3D_PT_view3d_meshdisplay,
VIEW3D_PT_view3d_curvedisplay,
VIEW3D_PT_background_image,
VIEW3D_PT_transform_orientations,
VIEW3D_PT_etch_a_ton,
VIEW3D_PT_context_properties]
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

@@ -21,7 +21,7 @@ import bpy
narrowui = bpy.context.user_preferences.view.properties_width_check narrowui = bpy.context.user_preferences.view.properties_width_check
class View3DPanel(bpy.types.Panel): class View3DPanel():
bl_space_type = 'VIEW_3D' bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS' bl_region_type = 'TOOLS'
@@ -29,7 +29,7 @@ class View3DPanel(bpy.types.Panel):
# ********** default tools for objectmode **************** # ********** default tools for objectmode ****************
class VIEW3D_PT_tools_objectmode(View3DPanel): class VIEW3D_PT_tools_objectmode(View3DPanel, bpy.types.Panel):
bl_context = "objectmode" bl_context = "objectmode"
bl_label = "Object Tools" bl_label = "Object Tools"
@@ -79,7 +79,7 @@ class VIEW3D_PT_tools_objectmode(View3DPanel):
# ********** default tools for editmode_mesh **************** # ********** default tools for editmode_mesh ****************
class VIEW3D_PT_tools_meshedit(View3DPanel): class VIEW3D_PT_tools_meshedit(View3DPanel, bpy.types.Panel):
bl_context = "mesh_edit" bl_context = "mesh_edit"
bl_label = "Mesh Tools" bl_label = "Mesh Tools"
@@ -147,7 +147,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel):
row.operator("gpencil.draw", text="Erase").mode = 'ERASER' row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
class VIEW3D_PT_tools_meshedit_options(View3DPanel): class VIEW3D_PT_tools_meshedit_options(View3DPanel, bpy.types.Panel):
bl_context = "mesh_edit" bl_context = "mesh_edit"
bl_label = "Mesh Options" bl_label = "Mesh Options"
@@ -166,7 +166,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel):
# ********** default tools for editmode_curve **************** # ********** default tools for editmode_curve ****************
class VIEW3D_PT_tools_curveedit(View3DPanel): class VIEW3D_PT_tools_curveedit(View3DPanel, bpy.types.Panel):
bl_context = "curve_edit" bl_context = "curve_edit"
bl_label = "Curve Tools" bl_label = "Curve Tools"
@@ -220,7 +220,7 @@ class VIEW3D_PT_tools_curveedit(View3DPanel):
# ********** default tools for editmode_surface **************** # ********** default tools for editmode_surface ****************
class VIEW3D_PT_tools_surfaceedit(View3DPanel): class VIEW3D_PT_tools_surfaceedit(View3DPanel, bpy.types.Panel):
bl_context = "surface_edit" bl_context = "surface_edit"
bl_label = "Surface Tools" bl_label = "Surface Tools"
@@ -260,7 +260,7 @@ class VIEW3D_PT_tools_surfaceedit(View3DPanel):
# ********** default tools for editmode_text **************** # ********** default tools for editmode_text ****************
class VIEW3D_PT_tools_textedit(View3DPanel): class VIEW3D_PT_tools_textedit(View3DPanel, bpy.types.Panel):
bl_context = "text_edit" bl_context = "text_edit"
bl_label = "Text Tools" bl_label = "Text Tools"
@@ -293,7 +293,7 @@ class VIEW3D_PT_tools_textedit(View3DPanel):
# ********** default tools for editmode_armature **************** # ********** default tools for editmode_armature ****************
class VIEW3D_PT_tools_armatureedit(View3DPanel): class VIEW3D_PT_tools_armatureedit(View3DPanel, bpy.types.Panel):
bl_context = "armature_edit" bl_context = "armature_edit"
bl_label = "Armature Tools" bl_label = "Armature Tools"
@@ -330,7 +330,7 @@ class VIEW3D_PT_tools_armatureedit(View3DPanel):
row.operator("gpencil.draw", text="Erase").mode = 'ERASER' row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
class VIEW3D_PT_tools_armatureedit_options(View3DPanel): class VIEW3D_PT_tools_armatureedit_options(View3DPanel, bpy.types.Panel):
bl_context = "armature_edit" bl_context = "armature_edit"
bl_label = "Armature Options" bl_label = "Armature Options"
@@ -345,7 +345,7 @@ class VIEW3D_PT_tools_armatureedit_options(View3DPanel):
# ********** default tools for editmode_mball **************** # ********** default tools for editmode_mball ****************
class VIEW3D_PT_tools_mballedit(View3DPanel): class VIEW3D_PT_tools_mballedit(View3DPanel, bpy.types.Panel):
bl_context = "mball_edit" bl_context = "mball_edit"
bl_label = "Meta Tools" bl_label = "Meta Tools"
@@ -373,7 +373,7 @@ class VIEW3D_PT_tools_mballedit(View3DPanel):
# ********** default tools for editmode_lattice **************** # ********** default tools for editmode_lattice ****************
class VIEW3D_PT_tools_latticeedit(View3DPanel): class VIEW3D_PT_tools_latticeedit(View3DPanel, bpy.types.Panel):
bl_context = "lattice_edit" bl_context = "lattice_edit"
bl_label = "Lattice Tools" bl_label = "Lattice Tools"
@@ -405,7 +405,7 @@ class VIEW3D_PT_tools_latticeedit(View3DPanel):
# ********** default tools for posemode **************** # ********** default tools for posemode ****************
class VIEW3D_PT_tools_posemode(View3DPanel): class VIEW3D_PT_tools_posemode(View3DPanel, bpy.types.Panel):
bl_context = "posemode" bl_context = "posemode"
bl_label = "Pose Tools" bl_label = "Pose Tools"
@@ -453,7 +453,7 @@ class VIEW3D_PT_tools_posemode(View3DPanel):
row.operator("gpencil.draw", text="Erase").mode = 'ERASER' row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
class VIEW3D_PT_tools_posemode_options(View3DPanel): class VIEW3D_PT_tools_posemode_options(View3DPanel, bpy.types.Panel):
bl_context = "posemode" bl_context = "posemode"
bl_label = "Pose Options" bl_label = "Pose Options"
@@ -469,7 +469,7 @@ class VIEW3D_PT_tools_posemode_options(View3DPanel):
# ********** default tools for paint modes **************** # ********** default tools for paint modes ****************
class PaintPanel(bpy.types.Panel): class PaintPanel():
bl_space_type = 'VIEW_3D' bl_space_type = 'VIEW_3D'
bl_region_type = 'TOOLS' bl_region_type = 'TOOLS'
@@ -490,7 +490,7 @@ class PaintPanel(bpy.types.Panel):
return False return False
class VIEW3D_PT_tools_brush(PaintPanel): class VIEW3D_PT_tools_brush(PaintPanel, bpy.types.Panel):
bl_label = "Brush" bl_label = "Brush"
def poll(self, context): def poll(self, context):
@@ -504,26 +504,7 @@ class VIEW3D_PT_tools_brush(PaintPanel):
if not context.particle_edit_object: if not context.particle_edit_object:
col = layout.split().column() col = layout.split().column()
col.template_ID_preview(settings, "brush", new="brush.add", rows=3, cols=8)
if context.sculpt_object and context.tool_settings.sculpt:
col.template_ID_preview(settings, "brush", new="brush.add", filter="is_sculpt_brush", rows=3, cols=8)
elif context.texture_paint_object and context.tool_settings.image_paint:
col.template_ID_preview(settings, "brush", new="brush.add", filter="is_imapaint_brush", rows=3, cols=8)
elif context.vertex_paint_object and context.tool_settings.vertex_paint:
col.template_ID_preview(settings, "brush", new="brush.add", filter="is_vpaint_brush", rows=3, cols=8)
elif context.weight_paint_object and context.tool_settings.weight_paint:
col.template_ID_preview(settings, "brush", new="brush.add", filter="is_wpaint_brush", rows=3, cols=8)
else:
row = col.row()
if context.sculpt_object and brush:
defaultbrushes = 8
elif context.texture_paint_object and brush:
defaultbrushes = 4
else:
defaultbrushes = 7
row.template_list(settings, "brushes", settings, "active_brush_index", rows=2, maxrows=defaultbrushes)
# Particle Mode # # Particle Mode #
@@ -735,7 +716,7 @@ class VIEW3D_PT_tools_brush(PaintPanel):
#row.prop(brush, "use_jitter_pressure", toggle=True, text="") #row.prop(brush, "use_jitter_pressure", toggle=True, text="")
class VIEW3D_PT_tools_brush_texture(PaintPanel): class VIEW3D_PT_tools_brush_texture(PaintPanel, bpy.types.Panel):
bl_label = "Texture" bl_label = "Texture"
bl_default_closed = True bl_default_closed = True
@@ -837,7 +818,7 @@ class VIEW3D_PT_tools_brush_texture(PaintPanel):
col.active = tex_slot.map_mode in ('FIXED', 'TILED') and brush.use_texture_overlay col.active = tex_slot.map_mode in ('FIXED', 'TILED') and brush.use_texture_overlay
class VIEW3D_PT_tools_brush_tool(PaintPanel): class VIEW3D_PT_tools_brush_tool(PaintPanel, bpy.types.Panel):
bl_label = "Tool" bl_label = "Tool"
bl_default_closed = True bl_default_closed = True
@@ -865,8 +846,14 @@ class VIEW3D_PT_tools_brush_tool(PaintPanel):
elif context.vertex_paint_object or context.weight_paint_object: elif context.vertex_paint_object or context.weight_paint_object:
col.prop(brush, "vertexpaint_tool", expand=False, text="") col.prop(brush, "vertexpaint_tool", expand=False, text="")
row = layout.row(align=True)
row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
row.prop(brush, "use_paint_vertex", text="", icon='VPAINT_HLT')
row.prop(brush, "use_paint_weight", text="", icon='WPAINT_HLT')
row.prop(brush, "use_paint_texture", text="", icon='TPAINT_HLT')
class VIEW3D_PT_tools_brush_stroke(PaintPanel):
class VIEW3D_PT_tools_brush_stroke(PaintPanel, bpy.types.Panel):
bl_label = "Stroke" bl_label = "Stroke"
bl_default_closed = True bl_default_closed = True
@@ -963,7 +950,7 @@ class VIEW3D_PT_tools_brush_stroke(PaintPanel):
# row.prop(brush, "use_spacing_pressure", toggle=True, text="") # row.prop(brush, "use_spacing_pressure", toggle=True, text="")
class VIEW3D_PT_tools_brush_curve(PaintPanel): class VIEW3D_PT_tools_brush_curve(PaintPanel, bpy.types.Panel):
bl_label = "Curve" bl_label = "Curve"
bl_default_closed = True bl_default_closed = True
@@ -987,7 +974,7 @@ class VIEW3D_PT_tools_brush_curve(PaintPanel):
row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE' row.operator("brush.curve_preset", icon="LINCURVE", text="").shape = 'LINE'
row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX' row.operator("brush.curve_preset", icon="NOCURVE", text="").shape = 'MAX'
class VIEW3D_PT_sculpt_options(PaintPanel): class VIEW3D_PT_sculpt_options(PaintPanel, bpy.types.Panel):
bl_label = "Options" bl_label = "Options"
bl_default_closed = True bl_default_closed = True
@@ -1029,7 +1016,7 @@ class VIEW3D_PT_sculpt_options(PaintPanel):
class VIEW3D_PT_sculpt_symmetry(PaintPanel): class VIEW3D_PT_sculpt_symmetry(PaintPanel, bpy.types.Panel):
bl_label = "Symmetry" bl_label = "Symmetry"
bl_default_closed = True bl_default_closed = True
@@ -1067,7 +1054,7 @@ class VIEW3D_PT_sculpt_symmetry(PaintPanel):
col.prop(sculpt, "use_symmetry_feather", text="Feather") col.prop(sculpt, "use_symmetry_feather", text="Feather")
class VIEW3D_PT_tools_brush_appearance(PaintPanel): class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
bl_label = "Appearance" bl_label = "Appearance"
bl_default_closed = True bl_default_closed = True
@@ -1105,7 +1092,7 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel):
# ********** default tools for weightpaint **************** # ********** default tools for weightpaint ****************
class VIEW3D_PT_tools_weightpaint(View3DPanel): class VIEW3D_PT_tools_weightpaint(View3DPanel, bpy.types.Panel):
bl_context = "weightpaint" bl_context = "weightpaint"
bl_label = "Weight Tools" bl_label = "Weight Tools"
@@ -1120,7 +1107,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel):
col.operator("object.vertex_group_levels", text="Levels") col.operator("object.vertex_group_levels", text="Levels")
class VIEW3D_PT_tools_weightpaint_options(View3DPanel): class VIEW3D_PT_tools_weightpaint_options(View3DPanel, bpy.types.Panel):
bl_context = "weightpaint" bl_context = "weightpaint"
bl_label = "Options" bl_label = "Options"
@@ -1157,7 +1144,7 @@ class VIEW3D_PT_tools_weightpaint_options(View3DPanel):
# ********** default tools for vertexpaint **************** # ********** default tools for vertexpaint ****************
class VIEW3D_PT_tools_vertexpaint(View3DPanel): class VIEW3D_PT_tools_vertexpaint(View3DPanel, bpy.types.Panel):
bl_context = "vertexpaint" bl_context = "vertexpaint"
bl_label = "Options" bl_label = "Options"
@@ -1186,12 +1173,13 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel):
# ********** default tools for texturepaint **************** # ********** default tools for texturepaint ****************
class VIEW3D_PT_tools_projectpaint(View3DPanel): class VIEW3D_PT_tools_projectpaint(View3DPanel, bpy.types.Panel):
bl_context = "texturepaint" bl_context = "texturepaint"
bl_label = "Project Paint" bl_label = "Project Paint"
def poll(self, context): def poll(self, context):
return context.tool_settings.image_paint.brush.imagepaint_tool != 'SMEAR' brush = context.tool_settings.image_paint.brush
return (brush and brush.imagepaint_tool != 'SMEAR')
def draw_header(self, context): def draw_header(self, context):
ipaint = context.tool_settings.image_paint ipaint = context.tool_settings.image_paint
@@ -1294,7 +1282,7 @@ class VIEW3D_MT_tools_projectpaint_stencil(bpy.types.Menu):
prop.value = i prop.value = i
class VIEW3D_PT_tools_particlemode(View3DPanel): class VIEW3D_PT_tools_particlemode(View3DPanel, bpy.types.Panel):
'''default tools for particle mode''' '''default tools for particle mode'''
bl_context = "particlemode" bl_context = "particlemode"
bl_label = "Options" bl_label = "Options"
@@ -1361,49 +1349,12 @@ class VIEW3D_PT_tools_particlemode(View3DPanel):
sub.prop(pe, "fade_frames", slider=True) sub.prop(pe, "fade_frames", slider=True)
classes = [
VIEW3D_PT_tools_weightpaint,
VIEW3D_PT_tools_objectmode,
VIEW3D_PT_tools_meshedit,
VIEW3D_PT_tools_meshedit_options,
VIEW3D_PT_tools_curveedit,
VIEW3D_PT_tools_surfaceedit,
VIEW3D_PT_tools_textedit,
VIEW3D_PT_tools_armatureedit,
VIEW3D_PT_tools_armatureedit_options,
VIEW3D_PT_tools_mballedit,
VIEW3D_PT_tools_latticeedit,
VIEW3D_PT_tools_posemode,
VIEW3D_PT_tools_posemode_options,
VIEW3D_PT_tools_brush,
VIEW3D_PT_tools_brush_texture,
VIEW3D_PT_tools_brush_stroke,
VIEW3D_PT_tools_brush_curve,
VIEW3D_PT_tools_brush_appearance,
VIEW3D_PT_tools_brush_tool,
VIEW3D_PT_sculpt_symmetry,
VIEW3D_PT_sculpt_options,
VIEW3D_PT_tools_vertexpaint,
VIEW3D_PT_tools_weightpaint_options,
VIEW3D_PT_imagepaint_options,
VIEW3D_PT_tools_projectpaint,
VIEW3D_MT_tools_projectpaint_clone,
VIEW3D_MT_tools_projectpaint_stencil,
VIEW3D_PT_tools_particlemode]
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

@@ -1,6 +1,6 @@
This version of Blender has been originally released at www.blender.org. This version of Blender has been originally released at www.blender.org.
It is subject to the GPL license, which is part of this download. It is subject to the GNU GPL license, which is part of this download.
For more information please review the Blender source code distribution, For more information please review the Blender source code distribution,
which should be available at the same location as where you obtained which should be available at the same location as where you obtained
this version. this version.
@@ -14,14 +14,12 @@
License Agreement accompanies (the "Software"). License Agreement accompanies (the "Software").
By installing, copying or otherwise using the Software, You agree to be By installing, copying or otherwise using the Software, You agree to be
bound by the terms of this License Agreement. If You do not agree to the bound by the terms of this License Agreement.
terms of this License Agreement do not install or use the Software.
1. Grant of License 1. Grant of License
Subject to the provisions of this License Agreement, BF grants You a Subject to the provisions of the GNU GPL license, BF grants You a
limited, non-exclusive, personal, non-sublicenseable, non-transferable non-exclusive right to use the Software at any computer You own or use.
license to use the Software at any computer You own or use.
Artwork you create with the Software - whether it is images, movies, Artwork you create with the Software - whether it is images, movies,
scripts, exported 3d files or the .blend files themselves - is your sole scripts, exported 3d files or the .blend files themselves - is your sole
property, and can be licensed or sold under any conditions you prefer. property, and can be licensed or sold under any conditions you prefer.
@@ -76,25 +74,8 @@
out of or in connection with (i) the use of the Software by You and (ii) out of or in connection with (i) the use of the Software by You and (ii)
the use of any Works created with the Software by You or any third the use of any Works created with the Software by You or any third
parties. parties.
6. Term and Termination 6. Enforceability
This License Agreement and the license granted hereunder is effective
until terminated. This License Agreement shall terminate automatically
and forthwith if You fail to comply with the terms of this License
Agreement. Upon termination, You shall cease the use of the Software,
remove the Software from (the memory of) your computer and destroy all
copies of the Software.
7. Entire Agreement
This License Agreement is the entire agreement between BF and You in
respect of the subject matter of the License Agreement. This License
Agreement supersedes all prior written or oral agreements, proposals or
understandings, and any other communications between BF and You
relating to the subject matter of this License Agreement.
8. Enforceability
If any provision of this License Agreement is held to be unenforceable If any provision of this License Agreement is held to be unenforceable
by a court of competent jurisdiction for any reason, such provision by a court of competent jurisdiction for any reason, such provision
@@ -102,7 +83,7 @@
enforceable, and the remainder of the License Agreement shall remain in enforceable, and the remainder of the License Agreement shall remain in
effect. effect.
9. Governing law and disputes 7. Governing law and disputes
This License Agreement and all disputes arising from it will be governed This License Agreement and all disputes arising from it will be governed
by the laws of The Netherlands. All disputes arising in connection with by the laws of The Netherlands. All disputes arising in connection with

View File

@@ -204,7 +204,9 @@ ifeq ($(WITH_OPENJPEG), true)
endif endif
endif endif
COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a ifeq ($(WITH_CINEON), true)
COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
endif
ifeq ($(WITH_DDS), true) ifeq ($(WITH_DDS), true)
COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a
@@ -418,7 +420,7 @@ ifeq ($(WITH_JACK),true)
endif endif
ifeq ($(WITH_SNDFILE),true) ifeq ($(WITH_SNDFILE),true)
ifeq ($(OS),$(findstring $(OS), "linux")) ifeq ($(OS),$(findstring $(OS), "linux darwin"))
NAN_SND_LIBS += $(NAN_SNDFILELIBS) NAN_SND_LIBS += $(NAN_SNDFILELIBS)
endif endif
endif endif

View File

@@ -34,7 +34,6 @@ ADD_SUBDIRECTORY(blenlib)
ADD_SUBDIRECTORY(blenloader) ADD_SUBDIRECTORY(blenloader)
ADD_SUBDIRECTORY(blenpluginapi) ADD_SUBDIRECTORY(blenpluginapi)
ADD_SUBDIRECTORY(imbuf) ADD_SUBDIRECTORY(imbuf)
ADD_SUBDIRECTORY(imbuf/intern/cineon)
ADD_SUBDIRECTORY(gpu) ADD_SUBDIRECTORY(gpu)
ADD_SUBDIRECTORY(makesdna) ADD_SUBDIRECTORY(makesdna)
ADD_SUBDIRECTORY(makesrna) ADD_SUBDIRECTORY(makesrna)
@@ -43,13 +42,17 @@ ADD_SUBDIRECTORY(render)
ADD_SUBDIRECTORY(blenfont) ADD_SUBDIRECTORY(blenfont)
ADD_SUBDIRECTORY(ikplugin) ADD_SUBDIRECTORY(ikplugin)
IF(WITH_OPENEXR) IF(WITH_IMAGE_OPENEXR)
ADD_SUBDIRECTORY(imbuf/intern/openexr) ADD_SUBDIRECTORY(imbuf/intern/openexr)
ENDIF(WITH_OPENEXR) ENDIF(WITH_IMAGE_OPENEXR)
IF(WITH_DDS) IF(WITH_IMAGE_DDS)
ADD_SUBDIRECTORY(imbuf/intern/dds) ADD_SUBDIRECTORY(imbuf/intern/dds)
ENDIF(WITH_DDS) ENDIF(WITH_IMAGE_DDS)
IF(WITH_IMAGE_CINEON)
ADD_SUBDIRECTORY(imbuf/intern/cineon)
ENDIF(WITH_IMAGE_CINEON)
IF(WITH_QUICKTIME) IF(WITH_QUICKTIME)
ADD_SUBDIRECTORY(quicktime) ADD_SUBDIRECTORY(quicktime)

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