Cycles: svn merge -r39132:39457 https://svn.blender.org/svnroot/bf-blender/trunk...
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 16 Aug 2011 18:59:45 +0000 (18:59 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 16 Aug 2011 18:59:45 +0000 (18:59 +0000)
200 files changed:
CMakeLists.txt
GNUmakefile
SConstruct
build_files/buildbot/master.cfg
build_files/buildbot/slave_compile.py
build_files/buildbot/slave_pack.py
build_files/cmake/config/blender_headless.cmake [new file with mode: 0644]
build_files/cmake/config/blender_lite.cmake [new file with mode: 0644]
build_files/cmake/config/bpy_module.cmake [new file with mode: 0644]
build_files/cmake/macros.cmake
build_files/scons/config/darwin-config.py
build_files/scons/tools/btools.py
doc/doxygen/Doxyfile
doc/python_api/rst/bge.logic.rst
intern/ghost/CMakeLists.txt
intern/ghost/intern/GHOST_NDOFManager.cpp
intern/ghost/intern/GHOST_NDOFManagerCocoa.h
intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
intern/ghost/intern/GHOST_NDOFManagerX11.cpp
intern/ghost/intern/GHOST_NDOFManagerX11.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_SystemPathsX11.cpp
intern/ghost/intern/GHOST_SystemSDL.cpp
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_WindowWin32.cpp
intern/guardedalloc/MEM_guardedalloc.h
release/datafiles/splash.png
release/scripts/modules/bpy/__init__.py
release/scripts/modules/bpy_extras/io_utils.py
release/scripts/modules/bpy_extras/mesh_utils.py
release/scripts/modules/bpyml.py
release/scripts/modules/bpyml_ui.py
release/scripts/modules/rna_info.py
release/scripts/startup/bl_operators/add_mesh_torus.py
release/scripts/startup/bl_operators/animsys_update.py
release/scripts/startup/bl_operators/image.py
release/scripts/startup/bl_operators/mesh.py
release/scripts/startup/bl_operators/nla.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/object_align.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_operators/object_randomize_transform.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_operators/screen_play_rendered_anim.py
release/scripts/startup/bl_operators/sequencer.py
release/scripts/startup/bl_operators/uvcalc_follow_active.py
release/scripts/startup/bl_operators/uvcalc_lightmap.py
release/scripts/startup/bl_operators/uvcalc_smart_project.py
release/scripts/startup/bl_operators/vertexpaint_dirt.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_bone.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_empty.py
release/scripts/startup/bl_ui/properties_data_lamp.py
release/scripts/startup/bl_ui/properties_data_lattice.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_data_metaball.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_game.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_object_constraint.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_common.py
release/scripts/startup/bl_ui/properties_physics_field.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/properties_texture.py
release/scripts/startup/bl_ui/properties_world.py
release/scripts/startup/bl_ui/space_console.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_filebrowser.py
release/scripts/startup/bl_ui/space_graph.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_logic.py
release/scripts/startup/bl_ui/space_nla.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_outliner.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_text.py
release/scripts/startup/bl_ui/space_time.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_userpref_keymap.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/templates/operator_modal.py
release/scripts/templates/operator_modal_draw.py
release/scripts/templates/operator_modal_timer.py
release/scripts/templates/operator_modal_view3d.py
release/text/readme.html
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/nla.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/unit.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_utildefines.h
source/blender/blenlib/intern/BLI_ghash.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/datafiles/splash.png.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/ED_object.h
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/interface/resources.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_relations.c
source/blender/editors/render/render_update.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_select.c
source/blender/editors/space_outliner/CMakeLists.txt
source/blender/editors/space_outliner/outliner.c [deleted file]
source/blender/editors/space_outliner/outliner_draw.c [new file with mode: 0644]
source/blender/editors/space_outliner/outliner_edit.c [new file with mode: 0644]
source/blender/editors/space_outliner/outliner_intern.h
source/blender/editors/space_outliner/outliner_ops.c
source/blender/editors/space_outliner/outliner_select.c [new file with mode: 0644]
source/blender/editors/space_outliner/outliner_tools.c [new file with mode: 0644]
source/blender/editors/space_outliner/outliner_tree.c [new file with mode: 0644]
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_intern.h
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_text/text_python.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/transform/CMakeLists.txt
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ndofinput.c [deleted file]
source/blender/editors/transform/transform_ops.c
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/filter.c
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/python/intern/bpy_operator.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna_anim.c
source/blender/python/intern/bpy_rna_array.c
source/blender/python/mathutils/mathutils_Vector.c
source/blender/render/extern/include/RE_engine.h
source/blender/render/intern/source/rayshade.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_keymap.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_subwindow.c
source/blenderplayer/bad_level_call_stubs/stubs.c
source/gameengine/Ketsji/KX_Light.cpp
source/tests/CMakeLists.txt
source/tests/bl_run_operators.py

index bbd9598780d1b366b78b77a38c6662d76ecfb07a..3cc935939f4d2077a7d75ce1fc94ed2eef0fe6b5 100644 (file)
@@ -1089,6 +1089,10 @@ elseif(APPLE)
                        if(NOT 3D_CONNEXION_CLIENT_LIBRARY)
                                set(WITH_INPUT_NDOF OFF)
                        endif()
+
+                       if(WITH_INPUT_NDOF)
+                               set(PLATFORM_LINKFLAGS "${PLATFORM_LINKFLAGS} -weak_framework 3DconnexionClient")
+                       endif()
                endif()
 
        else()
index b6741d7e5f0654a381f2bd074ef97611d92e6e5b..8446541cfae3db1af0f13f0e213dd7560ca197bc 100644 (file)
@@ -35,17 +35,33 @@ OS_NCASE:=$(shell uname -s | tr '[A-Z]' '[a-z]')
 # Source and Build DIR's
 BLENDER_DIR:=$(shell pwd -P)
 BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build/$(OS_NCASE)
+BUILD_TYPE:=Release
+BUILD_CMAKE_ARGS:=""
 
 
+# -----------------------------------------------------------------------------
+# additional targets for the build configuration
+
 # support 'make debug'
 ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
        BUILD_DIR:=$(BUILD_DIR)_debug
        BUILD_TYPE:=Debug
-else
-       BUILD_TYPE:=Release
+endif
+ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
+       BUILD_DIR:=$(BUILD_DIR)_lite
+       BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake
+endif
+ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
+       BUILD_DIR:=$(BUILD_DIR)_bpy
+       BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake
+endif
+ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
+       BUILD_DIR:=$(BUILD_DIR)_bpy
+       BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake
 endif
 
 
+# -----------------------------------------------------------------------------
 # Get the number of cores for threaded build
 NPROCS:=1
 ifeq ($(OS), Linux)
@@ -61,14 +77,14 @@ ifeq ($(OS), NetBSD)
        NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
 endif
 
-
+# -----------------------------------------------------------------------------
 # Build Blender
 all:
        @echo
        @echo Configuring Blender ...
 
        if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
-               cmake -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE) ; \
+               cmake $(BUILD_CMAKE_ARGS) -H$(BLENDER_DIR) -B$(BUILD_DIR) -DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE); \
        fi
 
        @echo
@@ -80,9 +96,40 @@ all:
        @echo
 
 debug: all
-       # pass
-
-# package types
+lite: all
+headless: all
+bpy: all
+
+# -----------------------------------------------------------------------------
+# Helo for build targets
+help:
+       @echo ""
+       @echo "Convenience targets provided for building blender, (multiple at once can be used)"
+       @echo "  * debug     - build a debug binary"
+       @echo "  * lite      - disable non essential features for a smaller binary and faster build"
+       @echo "  * headless  - build without an interface (renderfarm or server automation)"
+       @echo "  * bpy       - build as a python module which can be loaded from python directly"
+       @echo ""
+       @echo "Project Files for IDE's"
+       @echo "  * project_qtcreator - QtCreator Project Files"
+       @echo "  * project_netbeans  - NetBeans Project Files"
+       @echo "  * project_eclipse   - Eclipse CDT4 Project Files"
+       @echo ""
+       @echo "Package Targets"
+       @echo "  * package_debian  - build a debian package"
+       @echo "  * package_pacman  - build an arch linux pacmanpackage"
+       @echo "  * package_archive - build an archive package"
+       @echo ""
+       @echo "Testing Targets (not assosiated with building blender)"
+       @echo "  * test            - run ctest, currently tests import/export, operator execution and that python modules load"
+       @echo "  * test_cmake      - runs our own cmake file checker which detects errors in the cmake file list definitions"
+       @echo "  * test_pep8       - checks all python script are pep8 which are tagged to use the stricter formatting"
+       @echo "  * test_deprecated - checks for deprecation tags in our code which may need to be removed"
+       @echo ""
+
+# -----------------------------------------------------------------------------
+# Packages
+#
 package_debian:
        cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
 
@@ -93,7 +140,10 @@ package_archive:
        make -C $(BUILD_DIR) -s package_archive
        @echo archive in "$(BUILD_DIR)/release"
 
-# forward build targets
+
+# -----------------------------------------------------------------------------
+# Tests
+#
 test:
        cd $(BUILD_DIR) ; ctest . --output-on-failure
 
@@ -111,6 +161,21 @@ test_cmake:
 test_deprecated:
        python3 source/tests/check_deprecated.py
 
+
+# -----------------------------------------------------------------------------
+# Project Files
+#
+
+project_qtcreator:
+       python3 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR)
+
+project_netbeans:
+       python3 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR)
+
+project_eclipse:
+       cmake -G"Eclipse CDT4 - Unix Makefiles" -H$(BLENDER_DIR) -B$(BUILD_DIR)
+
+
 clean:
        $(MAKE) -C $(BUILD_DIR) clean
 
index 4f920190276714e11a1fb021489d1cb06da5ce58..81c12c7c318091e2ee6ce19ae4bb84dcfb1d502c 100644 (file)
@@ -253,14 +253,23 @@ if 'blenderlite' in B.targets:
         if k not in B.arguments:
             env[k] = v
 
-# detect presence of 3D_CONNEXION_CLIENT_LIBRARY for OSX
+# Extended OSX_SDK and 3D_CONNEXION_CLIENT_LIBRARY detection for OSX
 if env['OURPLATFORM']=='darwin':
-    envi = Environment()
-    conf = Configure(envi)
-    if not conf.CheckCHeader('ConnexionClientAPI.h'): # CheckCXXHeader if it is c++ !
+    print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'][:9] + " --"
+    print "Available " + env['MACOSX_SDK_CHECK']
+    if not 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
+        print  B.bc.OKGREEN + "MacOSX10.5.sdk not available:" + B.bc.ENDC + " using MacOSX10.6.sdk"
+    else:
+        print B.bc.OKGREEN + "Found recommended sdk :" + B.bc.ENDC + " using MacOSX10.5.sdk"
+
+    # for now, Mac builders must download and install the driver framework from 3Dconnexion
+    # necessary header file lives here when installed:
+    # /Library/Frameworks/3DconnexionClient.framework/Versions/Current/Headers/ConnexionClientAPI.h
+    if env['WITH_BF_3DMOUSE'] == 1 and not os.path.exists('/Library/Frameworks/3DconnexionClient.framework'):
         print "3D_CONNEXION_CLIENT_LIBRARY not found, disabling WITH_BF_3DMOUSE" # avoid build errors !
         env['WITH_BF_3DMOUSE'] = 0
-    envi = conf.Finish()
+    else:
+        env.Append(LINKFLAGS=['-weak_framework','3DconnexionClient'])
 
 
 if env['WITH_BF_OPENMP'] == 1:
index 1e70ec5e13e9afd5922d3c739a4192ab1531767d..5aa5a43abf75785768ea9330572f083f727cfe09 100644 (file)
@@ -116,7 +116,7 @@ add_builder(c, 'linux_x86_64_scons', '', generic_builder)
 add_builder(c, 'salad_linux_x86_64_scons', '', generic_builder, 'soc-2011-salad')
 add_builder(c, 'win32_scons', 'windows', generic_builder)
 add_builder(c, 'salad_win32_scons', 'windows', generic_builder, 'soc-2011-salad')
-add_builder(c, 'win64_scons', 'windows', generic_builder)
+add_builder(c, 'win64_scons', 'win64', generic_builder)
 #add_builder(c, 'freebsd_i386_cmake', '', generic_builder)
 #add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder)
 
index 9dd39ccd3088b27d8e10fe18477072d5d55cf493..b83a65f2466301ecf2bdaed2f458c5f08c7c2dc9 100644 (file)
@@ -134,7 +134,7 @@ else:
             scons_options.append('BF_FFMPEG_LIB=' + (' '.join(ffmpeg_lib)))
             scons_options.append('BF_FFMPEG_DLL=' + (' '.join(ffmpeg_dll)))
 
-            scons_options.append('BF_BITNESS='+bitness)
+            scons_options.append('BF_BITNESS=' + bitness)
 
         retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
         sys.exit(retcode)
index e779b10bd2a8272f2f76b7dacfedd31f24438ed8..5fdeb4a8ad558c237182235c004e3b0e0fa0c03f 100644 (file)
@@ -98,7 +98,7 @@ if builder.find('scons') != -1:
             scons_options.append('BF_FFMPEG_LIB=' + (' '.join(ffmpeg_lib)))
             scons_options.append('BF_FFMPEG_DLL=' + (' '.join(ffmpeg_dll)))
 
-            scons_options.append('BF_BITNESS='+bitness)
+            scons_options.append('BF_BITNESS=' + bitness)
 
         retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
         sys.exit(retcode)
diff --git a/build_files/cmake/config/blender_headless.cmake b/build_files/cmake/config/blender_headless.cmake
new file mode 100644 (file)
index 0000000..bd69eed
--- /dev/null
@@ -0,0 +1,24 @@
+# headless configuration, useful in for servers or renderfarms
+# builds without a windowing system (X11/Windows/Cocoa).
+#
+# Example usage:
+#   cmake -C../blender/build_files/cmake/config/blender_headless.cmake  ../blender
+#
+
+set(WITH_HEADLESS            ON  CACHE FORCE BOOL) 
+set(WITH_GAMEENGINE          OFF CACHE FORCE BOOL)
+
+# disable audio, its possible some devs may want this but for now disable
+# so the python module doesnt hold the audio device and loads quickly.
+set(WITH_AUDASPACE           OFF CACHE FORCE BOOL)
+set(WITH_SAMPLERATE          OFF CACHE FORCE BOOL)
+set(WITH_FFTW3               OFF CACHE FORCE BOOL)
+set(WITH_JACK                OFF CACHE FORCE BOOL)
+set(WITH_SDL                 OFF CACHE FORCE BOOL)
+set(WITH_OPENAL              OFF CACHE FORCE BOOL)
+set(WITH_CODEC_FFMPEG        OFF CACHE FORCE BOOL)
+set(WITH_CODEC_SNDFILE       OFF CACHE FORCE BOOL)
+
+# other features which are not especially useful as a python module
+set(WITH_X11_XINPUT          OFF CACHE FORCE BOOL)
+set(WITH_INPUT_NDOF          OFF CACHE FORCE BOOL)
diff --git a/build_files/cmake/config/blender_lite.cmake b/build_files/cmake/config/blender_lite.cmake
new file mode 100644 (file)
index 0000000..d2b791b
--- /dev/null
@@ -0,0 +1,43 @@
+# turn everything OFF CACHE FORCE BOOL) except for python which defaults to ON
+# and is needed for the UI
+#
+# Example usage:
+#   cmake -C../blender/build_files/cmake/config/blender_lite.cmake  ../blender
+#
+
+set(WITH_INSTALL_PORTABLE    ON  CACHE FORCE BOOL)
+
+set(WITH_BUILDINFO           OFF CACHE FORCE BOOL)
+set(WITH_BUILTIN_GLEW        OFF CACHE FORCE BOOL)
+set(WITH_BULLET              OFF CACHE FORCE BOOL)
+set(WITH_CODEC_FFMPEG        OFF CACHE FORCE BOOL)
+set(WITH_CODEC_SNDFILE       OFF CACHE FORCE BOOL)
+set(WITH_FFTW3               OFF CACHE FORCE BOOL)
+set(WITH_GAMEENGINE          OFF CACHE FORCE BOOL)
+set(WITH_IK_ITASC            OFF CACHE FORCE BOOL)
+set(WITH_IMAGE_CINEON        OFF CACHE FORCE BOOL)
+set(WITH_IMAGE_DDS           OFF CACHE FORCE BOOL)
+set(WITH_IMAGE_FRAMESERVER   OFF CACHE FORCE BOOL)
+set(WITH_IMAGE_HDR           OFF CACHE FORCE BOOL)
+set(WITH_IMAGE_OPENEXR       OFF CACHE FORCE BOOL)
+set(WITH_IMAGE_OPENJPEG      OFF CACHE FORCE BOOL)
+set(WITH_IMAGE_REDCODE       OFF CACHE FORCE BOOL)
+set(WITH_IMAGE_TIFF          OFF CACHE FORCE BOOL)
+set(WITH_INPUT_NDOF          OFF CACHE FORCE BOOL)
+set(WITH_INTERNATIONAL       OFF CACHE FORCE BOOL)
+set(WITH_JACK                OFF CACHE FORCE BOOL)
+set(WITH_LZMA                OFF CACHE FORCE BOOL)
+set(WITH_LZO                 OFF CACHE FORCE BOOL)
+set(WITH_MOD_BOOLEAN         OFF CACHE FORCE BOOL)
+set(WITH_MOD_DECIMATE        OFF CACHE FORCE BOOL)
+set(WITH_MOD_FLUID           OFF CACHE FORCE BOOL)
+set(WITH_MOD_SMOKE           OFF CACHE FORCE BOOL)
+set(WITH_AUDASPACE           OFF CACHE FORCE BOOL)
+set(WITH_OPENAL              OFF CACHE FORCE BOOL)
+set(WITH_OPENCOLLADA         OFF CACHE FORCE BOOL)
+set(WITH_OPENMP              OFF CACHE FORCE BOOL)
+set(WITH_PYTHON_INSTALL      OFF CACHE FORCE BOOL)
+set(WITH_RAYOPTIMIZATION     OFF CACHE FORCE BOOL)
+set(WITH_SAMPLERATE          OFF CACHE FORCE BOOL)
+set(WITH_SDL                 OFF CACHE FORCE BOOL)
+set(WITH_X11_XINPUT          OFF CACHE FORCE BOOL)
diff --git a/build_files/cmake/config/bpy_module.cmake b/build_files/cmake/config/bpy_module.cmake
new file mode 100644 (file)
index 0000000..5392705
--- /dev/null
@@ -0,0 +1,34 @@
+# defaults for building blender as a python module 'bpy'
+#
+# Example usage:
+#   cmake -C../blender/build_files/cmake/config/bpy_module.cmake  ../blender
+#
+
+set(WITH_PYTHON_MODULE       ON  CACHE FORCE BOOL)
+
+# install into the systems python dir
+set(WITH_INSTALL_PORTABLE    OFF CACHE FORCE BOOL)
+
+# no point int copying python into python
+set(WITH_PYTHON_INSTALL      OFF CACHE FORCE BOOL)
+
+# dont build the game engine
+set(WITH_GAMEENGINE          OFF CACHE FORCE BOOL)
+
+# disable audio, its possible some devs may want this but for now disable
+# so the python module doesnt hold the audio device and loads quickly.
+set(WITH_AUDASPACE           OFF CACHE FORCE BOOL)
+set(WITH_SAMPLERATE          OFF CACHE FORCE BOOL)
+set(WITH_FFTW3               OFF CACHE FORCE BOOL)
+set(WITH_JACK                OFF CACHE FORCE BOOL)
+set(WITH_SDL                 OFF CACHE FORCE BOOL)
+set(WITH_OPENAL              OFF CACHE FORCE BOOL)
+set(WITH_CODEC_FFMPEG        OFF CACHE FORCE BOOL)
+set(WITH_CODEC_SNDFILE       OFF CACHE FORCE BOOL)
+
+# other features which are not especially useful as a python module
+set(WITH_X11_XINPUT          OFF CACHE FORCE BOOL)
+set(WITH_INPUT_NDOF          OFF CACHE FORCE BOOL)
+set(WITH_OPENCOLLADA         OFF CACHE FORCE BOOL)
+set(WITH_INTERNATIONAL       OFF CACHE FORCE BOOL)
+set(WITH_BULLET              OFF CACHE FORCE BOOL)
index b991edcd5d48d5c8e65af6de101140c9b47873b0..ffc920da473a07c47829952e65dcea26275c3683 100644 (file)
@@ -62,6 +62,10 @@ macro(blender_include_dirs
        foreach(_INC ${ARGV})
                get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
                list(APPEND _ALL_INCS ${_ABS_INC})
+               # for checking for invalid includes, disable for regular use
+               ##if(NOT EXISTS "${_ABS_INC}/")
+               ##      message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
+               ##endif()
        endforeach()
        include_directories(${_ALL_INCS})
        unset(_INC)
@@ -75,6 +79,9 @@ macro(blender_include_dirs_sys
        foreach(_INC ${ARGV})
                get_filename_component(_ABS_INC ${_INC} ABSOLUTE)
                list(APPEND _ALL_INCS ${_ABS_INC})
+               ##if(NOT EXISTS "${_ABS_INC}/")
+               ##      message(FATAL_ERROR "Include not found: ${_ABS_INC}/")
+               ##endif()
        endforeach()
        include_directories(SYSTEM ${_ALL_INCS})
        unset(_INC)
index 97e8e90e574a07d398b47aac75a0e1276a972e8a..ec6a3b082b8a0bead7854284080d489d5960e377 100644 (file)
@@ -21,17 +21,23 @@ cmd = 'uname -p'
 MAC_PROC=commands.getoutput(cmd) 
 cmd = 'uname -r'
 cmd_res=commands.getoutput(cmd) 
-MAC_CUR_VER='10.5' # by default (test below fails on my 10.5 PowerPC)
-if cmd_res[:2]=='7':
+
+if cmd_res[:1]=='7':
        MAC_CUR_VER='10.3'
-elif cmd_res[:2]=='8':
+elif cmd_res[:1]=='8':
        MAC_CUR_VER='10.4'
-elif cmd_res[:2]=='9':
+elif cmd_res[:1]=='9':
        MAC_CUR_VER='10.5'
 elif cmd_res[:2]=='10':
        MAC_CUR_VER='10.6'
 elif cmd_res[:2]=='11':
        MAC_CUR_VER='10.7'
+cmd = 'xcodebuild -version'
+cmd_xcode=commands.getoutput(cmd)
+XCODE_CUR_VER=cmd_xcode
+cmd = 'xcodebuild -showsdks'
+cmd_sdk=commands.getoutput(cmd)
+MACOSX_SDK_CHECK=cmd_sdk
 
 if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
        USE_QTKIT=True # Carbon quicktime is not available for 64bit
@@ -60,21 +66,23 @@ elif MACOSX_ARCHITECTURE == 'i386' and MAC_CUR_VER == '10.4':
        LCGDIR = '#../lib/darwin-8.x.i386'
        CC = 'gcc-4.0'
        CXX = 'g++-4.0'
-elif MAC_CUR_VER >= '10.6':
-       # OSX 10.6 and 10.7 developer tools do not come with sdk < 10.6 anymore !
-       MAC_MIN_VERS = '10.6'
-       MACOSX_DEPLOYMENT_TARGET = '10.6'
-       MACOSX_SDK='/Developer/SDKs/MacOSX10.6.sdk'
-       LCGDIR = '#../lib/darwin-9.x.universal'
-       CC = 'llvm-gcc-4.2'
-       CXX = 'llvm-g++-4.2'
 else :
-       MAC_MIN_VERS = '10.5'
-       MACOSX_DEPLOYMENT_TARGET = '10.5'
-       MACOSX_SDK='/Developer/SDKs/MacOSX10.5.sdk'
-       LCGDIR = '#../lib/darwin-9.x.universal'
-       CC = 'gcc-4.2'
-       CXX = 'g++-4.2'
+       if 'Mac OS X 10.5' in MACOSX_SDK_CHECK:
+               # OSX 10.5/6 with Xcode 3.x
+               MAC_MIN_VERS = '10.5'
+               MACOSX_DEPLOYMENT_TARGET = '10.5'
+               MACOSX_SDK='/Developer/SDKs/MacOSX10.5.sdk'
+               LCGDIR = '#../lib/darwin-9.x.universal'
+               CC = 'gcc-4.2'
+               CXX = 'g++-4.2'
+       else:
+               # OSX 10.6/7 with Xcode 4.x
+               MAC_MIN_VERS = '10.6'
+               MACOSX_DEPLOYMENT_TARGET = '10.6'
+               MACOSX_SDK='/Developer/SDKs/MacOSX10.6.sdk'
+               LCGDIR = '#../lib/darwin-9.x.universal'
+               CC = 'gcc-4.2'
+               CXX = 'g++-4.2'
 
 LIBDIR = '${LCGDIR}'
 
@@ -199,8 +207,8 @@ BF_GETTEXT_INC = '${BF_GETTEXT}/include'
 BF_GETTEXT_LIB = 'intl'
 BF_GETTEXT_LIBPATH = '${BF_GETTEXT}/lib'
 
-WITH_BF_GAMEENGINE=True
-WITH_BF_PLAYER = False
+WITH_BF_GAMEENGINE = True
+WITH_BF_PLAYER = True
 
 WITH_BF_BULLET = True
 BF_BULLET = '#extern/bullet2/src'
@@ -251,7 +259,7 @@ BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
 BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
 
 #OpenCollada flags
-WITH_BF_COLLADA = False
+WITH_BF_COLLADA = True
 BF_COLLADA = '#source/blender/collada'
 BF_COLLADA_INC = '${BF_COLLADA}'
 BF_COLLADA_LIB = 'bf_collada'
@@ -276,8 +284,8 @@ if MACOSX_ARCHITECTURE == 'i386':
 elif MACOSX_ARCHITECTURE == 'x86_64':
     BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-msse2']
 
-# SpaceNavigator and related 3D mice
-WITH_BF_3DMOUSE = False
+# SpaceNavigator and related 3D mice, driver must be 3DxWare 10 Beta 4 (Mac OS X) or later !
+WITH_BF_3DMOUSE = True
 
 #############################################################################
 ###################  various compile settings and flags    ##################
@@ -296,31 +304,28 @@ CPPFLAGS = []+ARCH_FLAGS
 CCFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
 CXXFLAGS = ['-pipe','-funsigned-char']+ARCH_FLAGS
 
-if WITH_GHOST_COCOA==True:
+if WITH_GHOST_COCOA:
        PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
 else:
        PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
 
-if WITH_BF_QUICKTIME == True:
-       if USE_QTKIT == True:
+if WITH_BF_QUICKTIME:
+       if USE_QTKIT:
                PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QTKit']
        else:
                PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
 
-if WITH_BF_3DMOUSE:
-       PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS + ['-weak_framework','3DconnexionClient']
-
 #note to build succesfully on 10.3.9 SDK you need to patch  10.3.9 by adding the SystemStubs.a lib from 10.4
 LLIBS = ['stdc++', 'SystemStubs']
 
-# some flags shuffling for different Os versions
+# some flags shuffling for different OS versions
 if MAC_MIN_VERS == '10.3':
        CFLAGS = ['-fuse-cxa-atexit']+CFLAGS
        CXXFLAGS = ['-fuse-cxa-atexit']+CXXFLAGS
        PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit']+PLATFORM_LINKFLAGS
        LLIBS.append('crt3.o')
        
-if USE_SDK==True:
+if USE_SDK:
        SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS,'-arch',MACOSX_ARCHITECTURE]    
        PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS,'-Wl','-isysroot',MACOSX_SDK,'-arch',MACOSX_ARCHITECTURE]+PLATFORM_LINKFLAGS
        CCFLAGS=SDK_FLAGS+CCFLAGS
index 9b911b9d6f0c719cee97595647f60232cdc63064..25e0582c536f13089213fe92763045a367804df7 100644 (file)
@@ -149,7 +149,7 @@ def validate_arguments(args, bc):
             'BF_PROFILE_CFLAGS', 'BF_PROFILE_CCFLAGS', 'BF_PROFILE_CXXFLAGS', 'BF_PROFILE_LINKFLAGS',
             'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
             'C_WARN', 'CC_WARN', 'CXX_WARN',
-            'LLIBS', 'PLATFORM_LINKFLAGS','MACOSX_ARCHITECTURE',
+            'LLIBS', 'PLATFORM_LINKFLAGS','MACOSX_ARCHITECTURE', 'MACOSX_SDK_CHECK', 'XCODE_CUR_VER',
     ]
     
     
@@ -462,6 +462,8 @@ def read_opts(env, cfg, args):
         ('LLIBS', 'Platform libs', []),
         ('PLATFORM_LINKFLAGS', 'Platform linkflags', []),
         ('MACOSX_ARCHITECTURE', 'python_arch.zip select', ''),
+        ('MACOSX_SDK_CHECK', 'detect available OSX sdk`s', ''),
+        ('XCODE_CUR_VER', 'detect XCode version', ''),
 
         (BoolVariable('BF_PROFILE', 'Add profiling information if true', False)),
         ('BF_PROFILE_CFLAGS', 'C only profiling flags', []),
index 79b3f1a4160bb0707ed2a3818ebbe610abe53589..b4d3b14b9dde48f8a74fa959b561a6af76a4dadb 100644 (file)
@@ -31,7 +31,7 @@ PROJECT_NAME           = Blender
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = "V2.58"
+PROJECT_NUMBER         = "V2.59"
 
 # Using the PROJECT_BRIEF tag one can provide an optional one line description
 # for a project that appears at the top of each page and should give viewer
index 128f87f76bd864f8464f526ea08d0f04abcdf587..798491b471059c521736a955e52e3d4e9da98361 100644 (file)
@@ -217,6 +217,12 @@ General functions
 
    Loads a scene into the game engine.
 
+   .. note::
+
+      This function is not effective immediately, the scene is queued
+      and added on the next logic cycle where it will be available
+      from `getSceneList`
+
    :arg name: The name of the scene
    :type name: string
    :arg overlay: Overlay or underlay (optional)
index d7658c50a366428ee136946e4637d7ab58c32eaa..bdda0f3382ebf008eb6db1b035ed829da8e2573a 100644 (file)
@@ -149,6 +149,10 @@ if(WITH_HEADLESS OR WITH_GHOST_SDL)
                        intern/GHOST_SystemPathsX11.cpp
                        intern/GHOST_SystemPathsX11.h
                )
+
+               if(NOT WITH_INSTALL_PORTABLE)
+                       add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+               endif()
        elseif(WIN32)
 
                list(APPEND SRC
@@ -204,10 +208,6 @@ elseif(APPLE)
 
 elseif(UNIX)
 
-       if(WITH_X11_XINPUT)
-               add_definitions(-DWITH_X11_XINPUT)
-       endif()
-
        list(APPEND INC_SYS
                ${X11_X11_INCLUDE_PATH}
        )
@@ -224,10 +224,6 @@ elseif(UNIX)
                intern/GHOST_WindowX11.h
        )
 
-       if(NOT WITH_INSTALL_PORTABLE)
-               add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
-       endif()
-
        if(X11_XF86keysym_INCLUDE_PATH)
                add_definitions(-DWITH_XF86KEYSYM)
                list(APPEND INC_SYS
@@ -243,6 +239,14 @@ elseif(UNIX)
                )
        endif()
 
+       if(NOT WITH_INSTALL_PORTABLE)
+               add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+       endif()
+
+       if(WITH_X11_XINPUT)
+               add_definitions(-DWITH_X11_XINPUT)
+       endif()
+
 elseif(WIN32)
        if(MSVC)
                set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
index 855e27b99644411f61456f8a49f7e8fabf84d5c9..a24ccc3ff6c8d860eaae00ad196887d50e29c948 100644 (file)
@@ -375,7 +375,7 @@ void GHOST_NDOFManager::setDeadZone(float dz)
 
 static bool atHomePosition(GHOST_TEventNDOFMotionData* ndof)
 {
-#define HOME(foo) (ndof->foo == 0)
+#define HOME(foo) (ndof->foo == 0.f)
        return HOME(tx) && HOME(ty) && HOME(tz) && HOME(rx) && HOME(ry) && HOME(rz);
 #undef HOME
 }
@@ -386,9 +386,9 @@ static bool nearHomePosition(GHOST_TEventNDOFMotionData* ndof, float threshold)
                return atHomePosition(ndof);
        }
        else {
-#define HOME1(foo) (fabsf(ndof->foo) < threshold)
-               return HOME1(tx) && HOME1(ty) && HOME1(tz) && HOME1(rx) && HOME1(ry) && HOME1(rz);
-#undef HOME1
+#define HOME(foo) (fabsf(ndof->foo) < threshold)
+               return HOME(tx) && HOME(ty) && HOME(tz) && HOME(rx) && HOME(ry) && HOME(rz);
+#undef HOME
        }
 }
 
@@ -423,17 +423,17 @@ bool GHOST_NDOFManager::sendMotionEvent()
 
        data->dt = 0.001f * (m_motionTime - m_prevMotionTime); // in seconds
 
-       bool handMotion = !nearHomePosition(data, m_deadZone);
+       bool weHaveMotion = !nearHomePosition(data, m_deadZone);
 
        // determine what kind of motion event to send (Starting, InProgress, Finishing)
        // and where that leaves this NDOF manager (NotStarted, InProgress, Finished)
        switch (m_motionState) {
                case GHOST_kNotStarted:
                case GHOST_kFinished:
-                       if (handMotion) {
+                       if (weHaveMotion) {
                                data->progress = GHOST_kStarting;
                                m_motionState = GHOST_kInProgress;
-                               // prev motion time will be ancient, so just make up something reasonable
+                               // prev motion time will be ancient, so just make up a reasonable time delta
                                data->dt = 0.0125f;
                        }
                        else {
@@ -443,9 +443,9 @@ bool GHOST_NDOFManager::sendMotionEvent()
                        }
                        break;
                case GHOST_kInProgress:
-                       if (handMotion) {
+                       if (weHaveMotion) {
                                data->progress = GHOST_kInProgress;
-                               // keep InProgress state
+                               // remain 'InProgress'
                        }
                        else {
                                data->progress = GHOST_kFinishing;
@@ -453,7 +453,7 @@ bool GHOST_NDOFManager::sendMotionEvent()
                        }
                        break;
                default:
-                       break;
+                       ; // will always be one of the above
        }
 
 #ifdef DEBUG_NDOF_MOTION
index 27397b711b7a0e2df9840416a8429de4c33d2a54..e9897f30104c2122ae84de83f3c28dee395b0011 100644 (file)
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
 #ifndef _GHOST_NDOFMANAGERCOCOA_H_
 #define _GHOST_NDOFMANAGERCOCOA_H_
 
+#ifdef WITH_INPUT_NDOF
+
 #include "GHOST_NDOFManager.h"
 
 // Event capture is handled within the NDOF manager on Macintosh,
@@ -47,4 +49,5 @@ private:
 };
 
 
-#endif
+#endif // WITH_INPUT_NDOF
+#endif // #include guard
index 53a991a7396f78ede325f01cbf93bfbdbf59d9ec..409ed953134b517286d2666517da8849bb7349e1 100644 (file)
@@ -22,7 +22,9 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
+#ifdef WITH_INPUT_NDOF
+
 #include "GHOST_NDOFManagerCocoa.h"
 #include "GHOST_SystemCocoa.h"
 
@@ -157,16 +159,22 @@ GHOST_NDOFManagerCocoa::GHOST_NDOFManagerCocoa(GHOST_System& sys)
 
 GHOST_NDOFManagerCocoa::~GHOST_NDOFManagerCocoa()
 {
-       UnregisterConnexionClient(m_clientID);
-       CleanupConnexionHandlers();
-       ghost_system = NULL;
-       ndof_manager = NULL;
+       if (available())
+       {
+               UnregisterConnexionClient(m_clientID);
+               CleanupConnexionHandlers();
+               ghost_system = NULL;
+               ndof_manager = NULL;
+       }
 }
-
-bool GHOST_NDOFManagerCocoa::available()
-{
-       // extern OSErr InstallConnexionHandlers() __attribute__((weak_import));
-       // ^^ not needed since the entire framework is weak-linked
-       return InstallConnexionHandlers != NULL;
-       // this means that the driver is installed and dynamically linked to blender
+extern "C" {
+       bool GHOST_NDOFManagerCocoa::available()
+       {
+               extern OSErr InstallConnexionHandlers() __attribute__((weak_import));
+               // Make the linker happy for the framework check (see link below for more info)
+               // http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html
+               return InstallConnexionHandlers != NULL;
+               // this means that the driver is installed and dynamically linked to blender
+       }
 }
+#endif // WITH_INPUT_NDOF
index 099fa15d179ee0335879bbfb278de277f19014c3..4dd5331903962875e8b01fa4f7c18e590a869c16 100644 (file)
@@ -22,7 +22,9 @@
  *
  * ***** END GPL LICENSE BLOCK *****
  */
+
+#ifdef WITH_INPUT_NDOF
+
 #include "GHOST_NDOFManagerX11.h"
 #include "GHOST_SystemX11.h"
 #include <spnav.h>
@@ -34,14 +36,14 @@ GHOST_NDOFManagerX11::GHOST_NDOFManagerX11(GHOST_System& sys)
       GHOST_NDOFManager(sys),
       m_available(false)
 {
-       setDeadZone(0.1f); // how to calibrate on Linux? throw away slight motion!
+       setDeadZone(0.1f); /* how to calibrate on Linux? throw away slight motion! */
 
        if (spnav_open() != -1) {
-               // determine exactly which device (if any) is plugged in
+               /* determine exactly which device (if any) is plugged in */
 
 #define MAX_LINE_LENGTH 100
 
-               // look for USB devices with Logitech's vendor ID
+               /* look for USB devices with Logitech's vendor ID */
                FILE* command_output = popen("lsusb -d 046d:","r");
                if (command_output) {
                        char line[MAX_LINE_LENGTH] = {0};
@@ -50,15 +52,15 @@ GHOST_NDOFManagerX11::GHOST_NDOFManagerX11(GHOST_System& sys)
                                if (sscanf(line, "Bus %*d Device %*d: ID %hx:%hx", &vendor_id, &product_id) == 2)
                                        if (setDevice(vendor_id, product_id)) {
                                                m_available = true;
-                                               break; // stop looking once the first 3D mouse is found
+                                               break; /* stop looking once the first 3D mouse is found */
                                        }
                        }
                        pclose(command_output);
                }
        }
        else {
-               printf("ndof: spacenavd not found\n");
-               // This isn't a hard error, just means the user doesn't have a 3D mouse.
+               puts("ndof: spacenavd not found");
+               /* This isn't a hard error, just means the user doesn't have a 3D mouse. */
        }
 }
 
@@ -73,11 +75,6 @@ bool GHOST_NDOFManagerX11::available()
        return m_available;
 }
 
-//bool GHOST_NDOFManagerX11::identifyDevice()
-//{
-//     
-//}
-
 bool GHOST_NDOFManagerX11::processEvents()
 {
        GHOST_TUns64 now = m_system.getMilliSeconds();
@@ -88,7 +85,7 @@ bool GHOST_NDOFManagerX11::processEvents()
                switch (e.type) {
                        case SPNAV_EVENT_MOTION:
                        {
-                               // convert to blender view coords
+                               /* convert to blender view coords */
                                short t[3] = {e.motion.x, e.motion.y, -e.motion.z};
                                short r[3] = {-e.motion.rx, -e.motion.ry, e.motion.rz};
 
@@ -104,3 +101,5 @@ bool GHOST_NDOFManagerX11::processEvents()
        }
        return anyProcessed;
 }
+
+#endif /* WITH_INPUT_NDOF */
index 82bd256c70736c6e869c50bf91217493f951672c..0a5497537563996ef6d5296d97ebe83acf1f5584 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef _GHOST_NDOFMANAGERX11_H_
 #define _GHOST_NDOFMANAGERX11_H_
 
+#ifdef WITH_INPUT_NDOF
+
 #include "GHOST_NDOFManager.h"
 
 /* Event capture is handled within the NDOF manager on Linux,
@@ -40,10 +42,9 @@ public:
        bool processEvents();
 
 private:
-       //      bool identifyDevice();
-
        bool m_available;
 };
 
-#endif
+#endif /* WITH_INPUT_NDOF */
+#endif /* #include guard */
 
index 17f0f2d6ecde753edc0da85d9d9a3ce18ec1325f..303c2b24497df406d08ee3aa47f8d0325af20a80 100644 (file)
@@ -21,8 +21,8 @@
  *
  * The Original Code is: all of this file.
  *
- * Contributor(s):     Maarten Gribnau 05/2001
- *                                     Damien Plisson 09/2009
+ * Contributors: Maarten Gribnau 05/2001
+ *               Damien Plisson 09/2009
  *
  * ***** END GPL LICENSE BLOCK *****
  */
 #include "GHOST_EventButton.h"
 #include "GHOST_EventCursor.h"
 #include "GHOST_EventWheel.h"
-#include "GHOST_EventNDOF.h"
 #include "GHOST_EventTrackpad.h"
 #include "GHOST_EventDragnDrop.h"
 #include "GHOST_EventString.h"
-
 #include "GHOST_TimerManager.h"
 #include "GHOST_TimerTask.h"
 #include "GHOST_WindowManager.h"
 #include "GHOST_WindowCocoa.h"
+#ifdef WITH_INPUT_NDOF
 #include "GHOST_NDOFManagerCocoa.h"
+#endif
+
 #include "AssertMacros.h"
 
 #pragma mark KeyMap, mouse converters
index dd8935732c504974a175336b4d0043612d47bad0..135f5c42dc5d51babb8c9ff4792791bfe8e99c11 100644 (file)
 #include <stdio.h> // for fprintf only
 #include <cstdlib> // for exit
 
-using namespace std;
+#ifdef PREFIX
+static const char *static_path= PREFIX "/share" ;
+#else
+static const char *static_path= NULL;
+#endif
 
 GHOST_SystemPathsX11::GHOST_SystemPathsX11()
 {
@@ -56,21 +60,12 @@ GHOST_SystemPathsX11::~GHOST_SystemPathsX11()
 const GHOST_TUns8* GHOST_SystemPathsX11::getSystemDir() const
 {
        /* no prefix assumes a portable build which only uses bundled scripts */
-#ifdef PREFIX
-       return (GHOST_TUns8*) PREFIX "/share";
-#else
-       return NULL;
-#endif
+       return (const GHOST_TUns8 *)static_path;
 }
 
 const GHOST_TUns8* GHOST_SystemPathsX11::getUserDir() const
 {
-       const char* env = getenv("HOME");
-       if(env) {
-               return (GHOST_TUns8*) env;
-       } else {
-               return NULL;
-       }
+       return (const GHOST_TUns8 *)getenv("HOME");
 }
 
 const GHOST_TUns8* GHOST_SystemPathsX11::getBinaryDir() const
index 69a9f936cf693bea950be2b365b5c3b8cdba8567..f2cc45731fa0c5a7b2dbed0910bc9bbf71d07e8c 100644 (file)
@@ -146,7 +146,7 @@ convertSDLKey(SDL_Scancode key)
        if ((key >= SDL_SCANCODE_A) && (key <= SDL_SCANCODE_Z)) {
                type= GHOST_TKey( key - SDL_SCANCODE_A + int(GHOST_kKeyA));
        } else if ((key >= SDL_SCANCODE_1) && (key <= SDL_SCANCODE_0)) {
-               type= GHOST_TKey(key - SDL_SCANCODE_1 + int(GHOST_kKey0));
+               type= (key == SDL_SCANCODE_0) ? GHOST_kKey0 : GHOST_TKey(key - SDL_SCANCODE_1 + int(GHOST_kKey1));
        } else if ((key >= SDL_SCANCODE_F1) && (key <= SDL_SCANCODE_F12)) {
                type= GHOST_TKey(key - SDL_SCANCODE_F1 + int(GHOST_kKeyF1));
        } else if ((key >= SDL_SCANCODE_F13) && (key <= SDL_SCANCODE_F24)) {
@@ -167,6 +167,8 @@ convertSDLKey(SDL_Scancode key)
                GXMAP(type,SDL_SCANCODE_APOSTROPHE,     GHOST_kKeyQuote);
                GXMAP(type,SDL_SCANCODE_GRAVE,          GHOST_kKeyAccentGrave);
                GXMAP(type,SDL_SCANCODE_MINUS,          GHOST_kKeyMinus);
+               GXMAP(type,SDL_SCANCODE_EQUALS,         GHOST_kKeyEqual);
+
                GXMAP(type,SDL_SCANCODE_SLASH,          GHOST_kKeySlash);
                GXMAP(type,SDL_SCANCODE_BACKSLASH,      GHOST_kKeyBackslash);
                GXMAP(type,SDL_SCANCODE_KP_EQUALS,      GHOST_kKeyEqual);
@@ -198,6 +200,7 @@ convertSDLKey(SDL_Scancode key)
                GXMAP(type,SDL_SCANCODE_CAPSLOCK,       GHOST_kKeyCapsLock);
                GXMAP(type,SDL_SCANCODE_SCROLLLOCK,     GHOST_kKeyScrollLock);
                GXMAP(type,SDL_SCANCODE_NUMLOCKCLEAR,   GHOST_kKeyNumLock);
+               GXMAP(type,SDL_SCANCODE_PRINTSCREEN,    GHOST_kKeyPrintScreen);
 
                /* keypad events */
 
@@ -382,8 +385,26 @@ GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
 
                        GHOST_TKey gkey= convertSDLKey(sdl_sub_evt.keysym.scancode);
                        /* note, the sdl_sub_evt.keysym.sym is truncated, for unicode support ghost has to be modified */
+                       /* printf("%d\n", sym); */
                        if(sym > 127) {
-                               sym= 0;
+                               switch(sym) {
+                                       case SDLK_KP_DIVIDE: sym= '/'; break;
+                                   case SDLK_KP_MULTIPLY: sym= '*'; break;
+                                   case SDLK_KP_MINUS: sym= '-'; break;
+                                   case SDLK_KP_PLUS: sym= '+'; break;
+                                   case SDLK_KP_1: sym= '1'; break;
+                                   case SDLK_KP_2: sym= '2'; break;
+                                   case SDLK_KP_3: sym= '3'; break;
+                                   case SDLK_KP_4: sym= '4'; break;
+                                   case SDLK_KP_5: sym= '5'; break;
+                                   case SDLK_KP_6: sym= '6'; break;
+                                   case SDLK_KP_7: sym= '7'; break;
+                                   case SDLK_KP_8: sym= '8'; break;
+                                   case SDLK_KP_9: sym= '9'; break;
+                                   case SDLK_KP_0: sym= '0'; break;
+                                   case SDLK_KP_PERIOD: sym= '.'; break;
+                                       default: sym= 0; break;
+                               }
                        }
                        else {
                                if(sdl_sub_evt.keysym.mod & (KMOD_LSHIFT|KMOD_RSHIFT)) {
index 105f71b514f9ad8b0f20dedaaa765d4263e87f13..d5100e589f2aa08933664c21d173bee751826d07 100644 (file)
 #include "GHOST_EventKey.h"
 #include "GHOST_EventButton.h"
 #include "GHOST_EventWheel.h"
-#include "GHOST_NDOFManagerX11.h"
 #include "GHOST_DisplayManagerX11.h"
+#ifdef WITH_INPUT_NDOF
+#include "GHOST_NDOFManagerX11.h"
+#endif
 
 #include "GHOST_Debug.h"
 
@@ -815,22 +817,6 @@ GHOST_SystemX11::processEvent(XEvent *xe)
        }
 }
 
-#if 0 // obsolete SpaceNav code
-
-       void *
-GHOST_SystemX11::
-prepareNdofInfo(volatile GHOST_TEventNDOFData *currentNdofValues)
-{
-       const vector<GHOST_IWindow*>& v(m_windowManager->getWindows());
-       if (v.size() > 0)
-               sNdofInfo.window = static_cast<GHOST_WindowX11*>(v[0])->getXWindow();
-       sNdofInfo.display = m_display;
-       sNdofInfo.currValues = currentNdofValues;
-       return (void*)&sNdofInfo;
-}
-
-#endif
-
        GHOST_TSuccess 
 GHOST_SystemX11::
 getModifierKeys(
index 1ba51376ff92a54837bb111bfe28dffb705990a3..0c8c0adf0413e46d1cf2737f32e63ca42349bcb8 100644 (file)
@@ -612,7 +612,6 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
                wp.showCmd = SW_SHOWMINIMIZED;
                break;
        case GHOST_kWindowStateMaximized:
-               ShowWindow(m_hWnd, SW_HIDE);
                wp.showCmd = SW_SHOWMAXIMIZED;
                SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
                break;
@@ -629,12 +628,12 @@ GHOST_TSuccess GHOST_WindowWin32::setState(GHOST_TWindowState state)
                break;
        case GHOST_kWindowStateNormal:
        default:
-               ShowWindow(m_hWnd, SW_HIDE);
                wp.showCmd = SW_SHOWNORMAL;
                SetWindowLongPtr(m_hWnd, GWL_STYLE, WS_OVERLAPPEDWINDOW);
                break;
        }
-       return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
+       SetWindowPos(m_hWnd, 0, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); /*Clears window cache for SetWindowLongPtr */
+       return ::SetWindowPlacement(m_hWnd, &wp) == TRUE ? GHOST_kSuccess : GHOST_kFailure;
 }
 
 
index a4beea6d8d5615141f1a59f5017fa3768751ecb8..f96a49b9f4afad63e3286277c8e1f2537c37928d 100644 (file)
 #ifndef MEM_MALLOCN_H
 #define MEM_MALLOCN_H
 
-#ifndef LIBEXPORT
-#ifdef _WIN32
-#ifdef BLENDER_PLUGIN
-#define LIBEXPORT __declspec(dllimport)
-#else
-#define LIBEXPORT __declspec(dllexport)
-#endif
-#else
-#define LIBEXPORT
-#endif
-#endif
-
 #include <stdio.h> /* needed for FILE* */
 #include "MEM_sys_types.h" /* needed for uintptr_t */
 
@@ -107,7 +95,7 @@ extern "C" {
        /**
         * Duplicates a block of memory, and returns a pointer to the
         * newly allocated block.  */
-       LIBEXPORT void *MEM_dupallocN(void *vmemh) WARN_UNUSED;
+       void *MEM_dupallocN(void *vmemh) WARN_UNUSED;
 
        /**
          * Reallocates a block of memory, and returns pointer to the newly
index d6ccdb5b733c56493eb27333ae73542ecae7a39b..79339095b0774b85ebf07d7758adf2dfa10c1077 100644 (file)
Binary files a/release/datafiles/splash.png and b/release/datafiles/splash.png differ
index a43b42e49a14ffe232ff18d951bcf42fc7acb0d4..5c371fd750a7590c4f4593c567710556fc2a8ddd 100644 (file)
@@ -44,14 +44,18 @@ from . import utils, path, ops
 ops = ops.ops_fake_module
 
 
-def _main():
-    import sys as _sys
+def main():
+    import sys
 
     # Possibly temp. addons path
     from os.path import join, dirname, normpath
-    _sys.path.append(normpath(join(dirname(__file__),
+    sys.path.append(normpath(join(dirname(__file__),
                                    "..", "..", "addons", "modules")))
 
+    # fake module to allow:
+    #   from bpy.types import Panel
+    sys.modules["bpy.types"] = types
+
     # if "-d" in sys.argv: # Enable this to measure startup speed
     if 0:
         import cProfile
@@ -65,6 +69,6 @@ def _main():
         utils.load_scripts()
 
 
-_main()
+main()
 
-del _main
+del main
index 45664384efaa4372ccc3ba66a93fd67ab41153ee..6271c1f77b598ff7f85a62940392426f5d1bc7fb 100644 (file)
@@ -379,7 +379,7 @@ def path_reference(filepath,
     is_relative = filepath.startswith("//")
     filepath_abs = os.path.normpath(bpy.path.abspath(filepath, base_src))
 
-    if mode in ('ABSOLUTE', 'RELATIVE', 'STRIP'):
+    if mode in {'ABSOLUTE', 'RELATIVE', 'STRIP'}:
         pass
     elif mode == 'MATCH':
         mode = 'RELATIVE' if is_relative else 'ABSOLUTE'
@@ -439,7 +439,7 @@ def path_reference_copy(copy_set, report=print):
             shutil.copy(file_src, file_dst)
 
 
-def unique_name(key, name, name_dict, name_max=-1, clean_func=None):
+def unique_name(key, name, name_dict, name_max=-1, clean_func=None, sep="."):
     """
     Helper function for storing unique names which may have special characters
     stripped and restricted to a maximum length.
@@ -456,6 +456,9 @@ def unique_name(key, name, name_dict, name_max=-1, clean_func=None):
     :type name_dict: dict
     :arg clean_func: Function to call on *name* before creating a unique value.
     :type clean_func: function
+    :arg sep: Separator to use when between the name and a number when a
+       duplicate name is found.
+    :type sep: string
     """
     name_new = name_dict.get(key)
     if name_new is None:
@@ -466,14 +469,15 @@ def unique_name(key, name, name_dict, name_max=-1, clean_func=None):
 
         if name_max == -1:
             while name_new in name_dict_values:
-                name_new = "%s.%03d" % (name_new_orig, count)
+                name_new = "%s%s%03d" % (name_new_orig, sep, count)
                 count += 1
         else:
             name_new = name_new[:name_max]
             while name_new in name_dict_values:
                 count_str = "%03d" % count
-                name_new = "%.*s.%s" % (name_max - (len(count_str) + 1),
+                name_new = "%.*s%s%s" % (name_max - (len(count_str) + 1),
                                         name_new_orig,
+                                        sep,
                                         count_str,
                                         )
                 count += 1
index f94006741387ce0b2eeca43629fbc555b414401c..c965169ff04cdb267a43dd2abff40d21a1aaa410 100644 (file)
@@ -294,7 +294,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
         '''
         Normal single concave loop filling
         '''
-        if type(from_data) in (tuple, list):
+        if type(from_data) in {tuple, list}:
             verts = [Vector(from_data[i]) for ii, i in enumerate(indices)]
         else:
             verts = [from_data.vertices[i].co for ii, i in enumerate(indices)]
@@ -312,7 +312,7 @@ def ngon_tesselate(from_data, indices, fix_loops=True):
         used twice. This is used by lightwave LWO files a lot
         '''
 
-        if type(from_data) in (tuple, list):
+        if type(from_data) in {tuple, list}:
             verts = [vert_treplet(Vector(from_data[i]), ii)
                      for ii, i in enumerate(indices)]
         else:
index fdf5172a0b3597418369c0a31dcc80a396ed1d0e..42d2bf94fbaa99585208db55ba70ecd78215519c 100644 (file)
@@ -120,7 +120,7 @@ def fromxml(data):
         py_item = (xml_node.tagName, _fromxml_kwargs(xml_node), [])
         #_fromxml_iter(py_item, xml_node.childNodes)
         for xml_node_child in xml_node.childNodes:
-            if xml_node_child.nodeType not in (xml_node_child.TEXT_NODE, xml_node_child.COMMENT_NODE):
+            if xml_node_child.nodeType not in {xml_node_child.TEXT_NODE, xml_node_child.COMMENT_NODE}:
                 py_item[CHILDREN].append(_fromxml(xml_node_child))
         return py_item
 
index 5df04b8bf34784c410cb0ce197bc0b69a2996ffe..f4b6de23dbb2cf93ce9b68fe8137bfc7fa3e2ff4 100644 (file)
@@ -40,13 +40,13 @@ def _parse_rna(prop, value):
     elif prop.type == 'INT':
         value = int(value)
     elif prop.type == 'BOOLEAN':
-        if value in (True, False):
+        if value in {True, False}:
             pass
         else:
-            if value not in ("True", "False"):
+            if value not in {"True", "False"}:
                 raise Exception("invalid bool value: %s" % value)
             value = bool(value == "True")
-    elif prop.type in ('STRING', 'ENUM'):
+    elif prop.type in {'STRING', 'ENUM'}:
         pass
     elif prop.type == 'POINTER':
         value = eval("_bpy." + value)
index 93a344f4b09f97570feed6f58aec66a5e0344742..943f86adecbeea2a001264dd8d075b6df2953b4e 100644 (file)
@@ -148,7 +148,7 @@ class InfoStructRNA:
         import types
         functions = []
         for identifier, attr in self._get_py_visible_attrs():
-            if type(attr) in (types.FunctionType, types.MethodType):
+            if type(attr) in {types.FunctionType, types.MethodType}:
                 functions.append((identifier, attr))
         return functions
 
@@ -156,7 +156,7 @@ class InfoStructRNA:
         import types
         functions = []
         for identifier, attr in self._get_py_visible_attrs():
-            if type(attr) in (types.BuiltinMethodType, types.BuiltinFunctionType):
+            if type(attr) in {types.BuiltinMethodType, types.BuiltinFunctionType}:
                 functions.append((identifier, attr))
         return functions
 
@@ -260,7 +260,7 @@ class InfoPropertyRNA:
             if self.array_length:
                 type_str += " array of %d items" % (self.array_length)
 
-            if self.type in ("float", "int"):
+            if self.type in {"float", "int"}:
                 type_str += " in [%s, %s]" % (range_str(self.min), range_str(self.max))
             elif self.type == "enum":
                 if self.is_enum_flag:
@@ -595,7 +595,7 @@ def BuildRNAInfo():
             for prop in rna_info.properties:
                 # ERROR CHECK
                 default = prop.default
-                if type(default) in (float, int):
+                if type(default) in {float, int}:
                     if default < prop.min or default > prop.max:
                         print("\t %s.%s, %s not in [%s - %s]" % (rna_info.identifier, prop.identifier, default, prop.min, prop.max))
 
index 27a6d21d519f812b685cfd7ef9863ab97197bd0d..1c4518c4feb11c401440610e0d1a510b8595917f 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8-80 compliant>
 import bpy
+from bpy.types import Operator
 import mathutils
 
 
@@ -81,7 +82,7 @@ from bpy.props import (FloatProperty,
                        )
 
 
-class AddTorus(bpy.types.Operator):
+class AddTorus(Operator):
     '''Add a torus mesh'''
     bl_idname = "mesh.primitive_torus_add"
     bl_label = "Add Torus"
index 63d438a5066504634e3fc721d1a7f59186235d9a..3710c57ac167e74ac175984757324f87d1702ed2 100644 (file)
@@ -686,9 +686,10 @@ data_path_update = [
 
 
 import bpy
+from bpy.types import Operator
 
 
-class UpdateAnimData(bpy.types.Operator):
+class UpdateAnimData(Operator):
     """Update data paths from 2.56 and previous versions, modifying data paths of drivers and fcurves"""
     bl_idname = "anim.update_data_paths"
     bl_label = "Update Animation Data"
index 23bafe2eaae4bf39398c1afbf5f428648f4a8167..9226cbed51b737ba05d1a7860407d90cb75acb34 100644 (file)
 # <pep8-80 compliant>
 
 import bpy
+from bpy.types import Operator
 from bpy.props import StringProperty
 
 
-class EditExternally(bpy.types.Operator):
+class EditExternally(Operator):
     '''Edit image in an external application'''
     bl_idname = "image.external_edit"
     bl_label = "Image Edit Externally"
@@ -61,13 +62,19 @@ class EditExternally(bpy.types.Operator):
     def execute(self, context):
         import os
         import subprocess
-        filepath = os.path.normpath(bpy.path.abspath(self.filepath))
+
+        filepath = self.filepath
+
+        if not filepath:
+            self.report({'ERROR'}, "Image path not set")
+            return {'CANCELLED'}
+
+        filepath = os.path.normpath(bpy.path.abspath(filepath))
 
         if not os.path.exists(filepath):
             self.report({'ERROR'},
                         "Image path %r not found, image may be packed or "
                         "unsaved." % filepath)
-
             return {'CANCELLED'}
 
         cmd = self._editor_guess(context) + [filepath]
@@ -100,7 +107,7 @@ class EditExternally(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class SaveDirty(bpy.types.Operator):
+class SaveDirty(Operator):
     """Save all modified textures"""
     bl_idname = "image.save_dirty"
     bl_label = "Save Dirty"
@@ -123,7 +130,7 @@ class SaveDirty(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class ProjectEdit(bpy.types.Operator):
+class ProjectEdit(Operator):
     """Edit a snapshot of the viewport in an external image editor"""
     bl_idname = "image.project_edit"
     bl_label = "Project Edit"
@@ -190,7 +197,7 @@ class ProjectEdit(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class ProjectApply(bpy.types.Operator):
+class ProjectApply(Operator):
     """Project edited image back onto the object"""
     bl_idname = "image.project_apply"
     bl_label = "Project Apply"
index 344b238709f9feb490626699a80a1019ffc28a65..4114381f3dc3e484cbdca66dd2a133368fd95f63 100644 (file)
 # <pep8-80 compliant>
 
 import bpy
+from bpy.types import Operator
 
 from bpy.props import EnumProperty
 
 
-class MeshSelectInteriorFaces(bpy.types.Operator):
+class MeshSelectInteriorFaces(Operator):
     '''Select faces where all edges have more then 2 face users.'''
 
     bl_idname = "mesh.faces_select_interior"
@@ -67,7 +68,7 @@ class MeshSelectInteriorFaces(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class MeshMirrorUV(bpy.types.Operator):
+class MeshMirrorUV(Operator):
     '''Copy mirror UV coordinates on the X axis based on a mirrored mesh'''
     bl_idname = "mesh.faces_mirror_uv"
     bl_label = "Copy Mirrored UV coords"
index 469e9015e62ebb77a0cc1d71d9857ab8aa7837eb..44ed846e530053c0acef8cff618ca7f7f2318915 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8-80 compliant>
 
 import bpy
+from bpy.types import Operator
 
 
 def pose_frame_info(obj):
@@ -191,7 +192,7 @@ def bake(frame_start,
 from bpy.props import IntProperty, BoolProperty, EnumProperty
 
 
-class BakeAction(bpy.types.Operator):
+class BakeAction(Operator):
     '''Bake animation to an Action'''
     bl_idname = "nla.bake"
     bl_label = "Bake Action"
index 627a1530fe15657c1bcf3aad7a7f93bd446faa28..79f57990f370e02274948ccdeacff43fa7d4665b 100644 (file)
 # <pep8-80 compliant>
 
 import bpy
+from bpy.types import Operator
 from bpy.props import StringProperty, BoolProperty, EnumProperty, IntProperty
 
 
-class SelectPattern(bpy.types.Operator):
+class SelectPattern(Operator):
     '''Select object matching a naming pattern'''
     bl_idname = "object.select_pattern"
     bl_label = "Select Pattern"
@@ -99,7 +100,7 @@ class SelectPattern(bpy.types.Operator):
         row.prop(self, "extend")
 
 
-class SelectCamera(bpy.types.Operator):
+class SelectCamera(Operator):
     '''Select object matching a naming pattern'''
     bl_idname = "object.select_camera"
     bl_label = "Select Camera"
@@ -120,7 +121,7 @@ class SelectCamera(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class SelectHierarchy(bpy.types.Operator):
+class SelectHierarchy(Operator):
     '''Select object relative to the active objects position''' \
     '''in the hierarchy'''
     bl_idname = "object.select_hierarchy"
@@ -187,7 +188,7 @@ class SelectHierarchy(bpy.types.Operator):
         return {'CANCELLED'}
 
 
-class SubdivisionSet(bpy.types.Operator):
+class SubdivisionSet(Operator):
     '''Sets a Subdivision Surface Level (1-5)'''
 
     bl_idname = "object.subdivision_set"
@@ -263,7 +264,7 @@ class SubdivisionSet(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class ShapeTransfer(bpy.types.Operator):
+class ShapeTransfer(Operator):
     '''Copy another selected objects active shape to this one by ''' \
     '''applying the relative offsets'''
 
@@ -507,7 +508,7 @@ class ShapeTransfer(bpy.types.Operator):
         return self._main(ob_act, objects, self.mode, self.use_clamp)
 
 
-class JoinUVs(bpy.types.Operator):
+class JoinUVs(Operator):
     '''Copy UV Layout to objects with matching geometry'''
     bl_idname = "object.join_uvs"
     bl_label = "Join as UVs"
@@ -575,7 +576,7 @@ class JoinUVs(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class MakeDupliFace(bpy.types.Operator):
+class MakeDupliFace(Operator):
     '''Make linked objects into dupli-faces'''
     bl_idname = "object.make_dupli_face"
     bl_label = "Make Dupli-Face"
@@ -649,7 +650,7 @@ class MakeDupliFace(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class IsolateTypeRender(bpy.types.Operator):
+class IsolateTypeRender(Operator):
     '''Hide unselected render objects of same type as active ''' \
     '''by setting the hide render flag'''
     bl_idname = "object.isolate_type_render"
@@ -670,7 +671,7 @@ class IsolateTypeRender(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class ClearAllRestrictRender(bpy.types.Operator):
+class ClearAllRestrictRender(Operator):
     '''Reveal all render objects by setting the hide render flag'''
     bl_idname = "object.hide_render_clear_all"
     bl_label = "Clear All Restrict Render"
index 7fd769c40c9bbb44dc2a9da51b4944492bf76e41..d4a3d826f2f5c47d6538ee2dd8d2af8517ab9598 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8-80 compliant>
 
 import bpy
+from bpy.types import Operator
 from mathutils import Vector
 
 
@@ -339,7 +340,7 @@ def align_objects(align_x,
 from bpy.props import EnumProperty, BoolProperty
 
 
-class AlignObjects(bpy.types.Operator):
+class AlignObjects(Operator):
     '''Align Objects'''
     bl_idname = "object.align"
     bl_label = "Align Objects"
index ef10bfd737db05693035bafa2797c9e7c09a2de3..cd206da3a8ee4f5ee4b7da0b0973d2c2a23584b6 100644 (file)
@@ -20,6 +20,7 @@
 
 from mathutils import Vector
 import bpy
+from bpy.types import Operator
 from bpy.props import (BoolProperty,
                        EnumProperty,
                        IntProperty,
@@ -45,7 +46,7 @@ def object_ensure_material(obj, mat_name):
     return mat
 
 
-class QuickFur(bpy.types.Operator):
+class QuickFur(Operator):
     bl_idname = "object.quick_fur"
     bl_label = "Quick Fur"
     bl_options = {'REGISTER', 'UNDO'}
@@ -104,7 +105,7 @@ class QuickFur(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class QuickExplode(bpy.types.Operator):
+class QuickExplode(Operator):
     bl_idname = "object.quick_explode"
     bl_label = "Quick Explode"
     bl_options = {'REGISTER', 'UNDO'}
@@ -265,7 +266,7 @@ def obj_bb_minmax(obj, min_co, max_co):
         max_co[2] = max(bb_vec[2], max_co[2])
 
 
-class QuickSmoke(bpy.types.Operator):
+class QuickSmoke(Operator):
     bl_idname = "object.quick_smoke"
     bl_label = "Quick Smoke"
     bl_options = {'REGISTER', 'UNDO'}
@@ -383,7 +384,7 @@ class QuickSmoke(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class QuickFluid(bpy.types.Operator):
+class QuickFluid(Operator):
     bl_idname = "object.quick_fluid"
     bl_label = "Quick Fluid"
     bl_options = {'REGISTER', 'UNDO'}
index b94c4f06cd3260aa72a5f897043844640e068792..f65e3d27d830c37cdb680977bb86c59733fd6d45 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8-80 compliant>
 
 import bpy
+from bpy.types import Operator
 
 
 def randomize_selected(seed, delta, loc, rot, scale, scale_even):
@@ -87,7 +88,7 @@ def randomize_selected(seed, delta, loc, rot, scale, scale_even):
 from bpy.props import IntProperty, BoolProperty, FloatVectorProperty
 
 
-class RandomizeLocRotSize(bpy.types.Operator):
+class RandomizeLocRotSize(Operator):
     '''Randomize objects loc/rot/scale'''
     bl_idname = "object.randomize_transform"
     bl_label = "Randomize Transform"
index fbcc327c3bdc0cdd426be5a15a3163908447f3e9..2fd0c4a9e12195a7648a305cc7961d0d0fe47594 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8-80 compliant>
 
 import bpy
+from bpy.types import Menu, Operator
 
 
 class AddPresetBase():
@@ -140,7 +141,7 @@ class AddPresetBase():
             return self.execute(context)
 
 
-class ExecutePreset(bpy.types.Operator):
+class ExecutePreset(Operator):
     ''' Executes a preset '''
     bl_idname = "script.execute_preset"
     bl_label = "Execute a Python Preset"
@@ -168,7 +169,7 @@ class ExecutePreset(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class AddPresetRender(AddPresetBase, bpy.types.Operator):
+class AddPresetRender(AddPresetBase, Operator):
     '''Add a Render Preset'''
     bl_idname = "render.preset_add"
     bl_label = "Add Render Preset"
@@ -194,7 +195,7 @@ class AddPresetRender(AddPresetBase, bpy.types.Operator):
     preset_subdir = "render"
 
 
-class AddPresetSSS(AddPresetBase, bpy.types.Operator):
+class AddPresetSSS(AddPresetBase, Operator):
     '''Add a Subsurface Scattering Preset'''
     bl_idname = "material.sss_preset_add"
     bl_label = "Add SSS Preset"
@@ -222,7 +223,7 @@ class AddPresetSSS(AddPresetBase, bpy.types.Operator):
     preset_subdir = "sss"
 
 
-class AddPresetCloth(AddPresetBase, bpy.types.Operator):
+class AddPresetCloth(AddPresetBase, Operator):
     '''Add a Cloth Preset'''
     bl_idname = "cloth.preset_add"
     bl_label = "Add Cloth Preset"
@@ -244,7 +245,7 @@ class AddPresetCloth(AddPresetBase, bpy.types.Operator):
     preset_subdir = "cloth"
 
 
-class AddPresetSunSky(AddPresetBase, bpy.types.Operator):
+class AddPresetSunSky(AddPresetBase, Operator):
     '''Add a Sky & Atmosphere Preset'''
     bl_idname = "lamp.sunsky_preset_add"
     bl_label = "Add Sunsky Preset"
@@ -273,7 +274,7 @@ class AddPresetSunSky(AddPresetBase, bpy.types.Operator):
     preset_subdir = "sunsky"
 
 
-class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
+class AddPresetInteraction(AddPresetBase, Operator):
     '''Add an Application Interaction Preset'''
     bl_idname = "wm.interaction_preset_add"
     bl_label = "Add Interaction Preset"
@@ -299,7 +300,7 @@ class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
     preset_subdir = "interaction"
 
 
-class AddPresetKeyconfig(AddPresetBase, bpy.types.Operator):
+class AddPresetKeyconfig(AddPresetBase, Operator):
     '''Add a Keyconfig Preset'''
     bl_idname = "wm.keyconfig_preset_add"
     bl_label = "Add Keyconfig Preset"
@@ -322,7 +323,7 @@ class AddPresetKeyconfig(AddPresetBase, bpy.types.Operator):
             keyconfigs.remove(keyconfigs.active)
 
 
-class AddPresetOperator(AddPresetBase, bpy.types.Operator):
+class AddPresetOperator(AddPresetBase, Operator):
     '''Add an Application Interaction Preset'''
     bl_idname = "wm.operator_preset_add"
     bl_label = "Operator Preset"
@@ -345,7 +346,7 @@ class AddPresetOperator(AddPresetBase, bpy.types.Operator):
 
     @property
     def preset_values(self):
-        properties_blacklist = bpy.types.Operator.bl_rna.properties.keys()
+        properties_blacklist = Operator.bl_rna.properties.keys()
 
         prefix, suffix = self.operator.split("_OT_", 1)
         op = getattr(getattr(bpy.ops, prefix.lower()), suffix)
@@ -367,12 +368,12 @@ class AddPresetOperator(AddPresetBase, bpy.types.Operator):
         return os.path.join("operator", "%s.%s" % (prefix.lower(), suffix))
 
 
-class WM_MT_operator_presets(bpy.types.Menu):
+class WM_MT_operator_presets(Menu):
     bl_label = "Operator Presets"
 
     def draw(self, context):
         self.operator = context.space_data.operator.bl_idname
-        bpy.types.Menu.draw_preset(self, context)
+        Menu.draw_preset(self, context)
 
     @property
     def preset_subdir(self):
index a38d817d738f281d9a99e4fe768afc79442f428c..c2a09d6a4ae15a904f5323ba98a02ef8b7176273 100644 (file)
@@ -21,6 +21,7 @@
 # Originally written by Matt Ebb
 
 import bpy
+from bpy.types import Operator
 import os
 
 
@@ -64,7 +65,7 @@ def guess_player_path(preset):
     return player_path
 
 
-class PlayRenderedAnim(bpy.types.Operator):
+class PlayRenderedAnim(Operator):
     '''Plays back rendered frames/movies using an external player.'''
     bl_idname = "render.play_rendered_anim"
     bl_label = "Play Rendered Animation"
index 16b72406c498f8b7f617e12b66c97b6e4d42d0ed..d2f85c8d7c715d1b88f70841301922e96efde671 100644 (file)
 # <pep8 compliant>
 
 import bpy
+from bpy.types import Operator
 
 from bpy.props import IntProperty
 
 
-class SequencerCrossfadeSounds(bpy.types.Operator):
+class SequencerCrossfadeSounds(Operator):
     '''Do crossfading volume animation of two selected sound strips.'''
 
     bl_idname = "sequencer.crossfade_sounds"
@@ -74,7 +75,7 @@ class SequencerCrossfadeSounds(bpy.types.Operator):
             return {'CANCELLED'}
 
 
-class SequencerCutMulticam(bpy.types.Operator):
+class SequencerCutMulticam(Operator):
     '''Cut multicam strip and select camera.'''
 
     bl_idname = "sequencer.cut_multicam"
@@ -112,7 +113,7 @@ class SequencerCutMulticam(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
+class SequencerDeinterlaceSelectedMovies(Operator):
     '''Deinterlace all selected movie sources.'''
 
     bl_idname = "sequencer.deinterlace_selected_movies"
index 43ca9af59baccd8f945fc9ff6fb90a71e475b428..6c258d094e83c453c9d5c31b19797377bbd1177a 100644 (file)
@@ -22,6 +22,7 @@
 # http://mediawiki.blender.org/index.php/Scripts/Manual/UV_Calculate/Follow_active_quads
 
 import bpy
+from bpy.types import Operator
 
 
 def extend(obj, operator, EXTEND_MODE):
@@ -226,7 +227,7 @@ def main(context, operator):
     extend(obj, operator, operator.properties.mode)
 
 
-class FollowActiveQuads(bpy.types.Operator):
+class FollowActiveQuads(Operator):
     '''Follow UVs from active quads along continuous face loops'''
     bl_idname = "uv.follow_active_quads"
     bl_label = "Follow Active Quads"
index 9ae0cd0ddf961a048659685482f27954cafd7b87..6b1c6e1be9801d551e48459b8f1779ca1fa5ae6a 100644 (file)
 # <pep8 compliant>
 
 import bpy
+from bpy.types import Operator
 import mathutils
 
 
 class prettyface(object):
-    __slots__ = "uv", "width", "height", "children", "xoff", "yoff", "has_parent", "rot"
+    __slots__ = ("uv",
+                 "width",
+                 "height",
+                 "children",
+                 "xoff",
+                 "yoff",
+                 "has_parent",
+                 "rot",
+                 )
 
     def __init__(self, data):
         self.has_parent = False
@@ -263,10 +272,9 @@ def lightmap_uvpack(meshes,
             del trylens
 
             def trilensdiff(t1, t2):
-                return\
-                abs(t1[1][t1[2][0]] - t2[1][t2[2][0]]) + \
-                abs(t1[1][t1[2][1]] - t2[1][t2[2][1]]) + \
-                abs(t1[1][t1[2][2]] - t2[1][t2[2][2]])
+                return (abs(t1[1][t1[2][0]] - t2[1][t2[2][0]]) +
+                        abs(t1[1][t1[2][1]] - t2[1][t2[2][1]]) +
+                        abs(t1[1][t1[2][2]] - t2[1][t2[2][2]]))
 
             while tri_lengths:
                 tri1 = tri_lengths.pop()
@@ -520,7 +528,7 @@ def unwrap(operator, context, **kwargs):
         if obj and obj.type == 'MESH':
             meshes = [obj.data]
     else:
-        meshes = {me.name: me for obj in context.selected_objects if obj.type == 'MESH' for me in (obj.data,) if not me.library if len(me.faces)}.values()
+        meshes = list({me for obj in context.selected_objects if obj.type == 'MESH' for me in (obj.data,) if me.faces and me.library is None})
 
     if not meshes:
         operator.report({'ERROR'}, "No mesh object.")
@@ -536,29 +544,58 @@ def unwrap(operator, context, **kwargs):
 from bpy.props import BoolProperty, FloatProperty, IntProperty
 
 
-class LightMapPack(bpy.types.Operator):
+class LightMapPack(Operator):
     '''Follow UVs from active quads along continuous face loops'''
     bl_idname = "uv.lightmap_pack"
     bl_label = "Lightmap Pack"
     bl_options = {'REGISTER', 'UNDO'}
 
     PREF_CONTEXT = bpy.props.EnumProperty(
+            name="Selection",
+            description="",
             items=(("SEL_FACES", "Selected Faces", "Space all UVs evently"),
                    ("ALL_FACES", "All Faces", "Average space UVs edge length of each loop"),
                    ("ALL_OBJECTS", "Selected Mesh Object", "Average space UVs edge length of each loop")
                    ),
-            name="Selection",
-            description="")
+            )
 
     # Image & UVs...
-    PREF_PACK_IN_ONE = BoolProperty(name="Share Tex Space", default=True, description="Objects Share texture space, map all objects into 1 uvmap")
-    PREF_NEW_UVLAYER = BoolProperty(name="New UV Layer", default=False, description="Create a new UV layer for every mesh packed")
-    PREF_APPLY_IMAGE = BoolProperty(name="New Image", default=False, description="Assign new images for every mesh (only one if shared tex space enabled)")
-    PREF_IMG_PX_SIZE = IntProperty(name="Image Size", min=64, max=5000, default=512, description="Width and Height for the new image")
-
+    PREF_PACK_IN_ONE = BoolProperty(
+            name="Share Tex Space",
+            description=("Objects Share texture space, map all objects "
+                         "into 1 uvmap"),
+            default=True,
+            )
+    PREF_NEW_UVLAYER = BoolProperty(
+            name="New UV Layer",
+            description="Create a new UV layer for every mesh packed",
+            default=False,
+            )
+    PREF_APPLY_IMAGE = BoolProperty(
+            name="New Image",
+            description=("Assign new images for every mesh (only one if "
+                         "shared tex space enabled)"),
+            default=False,
+            )
+    PREF_IMG_PX_SIZE = IntProperty(
+            name="Image Size",
+            description="Width and Height for the new image",
+            min=64, max=5000,
+            default=512,
+            )
     # UV Packing...
-    PREF_BOX_DIV = IntProperty(name="Pack Quality", min=1, max=48, default=12, description="Pre Packing before the complex boxpack")
-    PREF_MARGIN_DIV = FloatProperty(name="Margin", min=0.001, max=1.0, default=0.1, description="Size of the margin as a division of the UV")
+    PREF_BOX_DIV = IntProperty(
+            name="Pack Quality",
+            description="Pre Packing before the complex boxpack",
+            min=1, max=48,
+            default=12,
+            )
+    PREF_MARGIN_DIV = FloatProperty(
+            name="Margin",
+            description="Size of the margin as a division of the UV",
+            min=0.001, max=1.0,
+            default=0.1,
+            )
 
     def execute(self, context):
         kwargs = self.as_keywords()
index 851f33bde115091a6d0b89c6ca9ca783d6b92e8b..8afd6c104e072c31d788f861be35cac2ec016705 100644 (file)
@@ -20,6 +20,7 @@
 
 from mathutils import Matrix, Vector, geometry
 import bpy
+from bpy.types import Operator
 
 DEG_TO_RAD = 0.017453292519943295 # pi/180.0
 SMALL_NUM = 0.000000001
@@ -812,39 +813,26 @@ def main(context,
     global RotMatStepRotation
     main_consts()
 
-    # TODO, all selected meshes
-    '''
-    # objects = context.selected_editable_objects
-    objects = []
-
-    # we can will tag them later.
-    obList =  [ob for ob in objects if ob.type == 'MESH']
-
-    # Face select object may not be selected.
-    ob = context.active_object
-
-    if ob and (not ob.select) and ob.type == 'MESH':
-        # Add to the list
-        obList =[ob]
-    del objects
-    '''
+    # Create the variables.
+    USER_PROJECTION_LIMIT = projection_limit
+    USER_ONLY_SELECTED_FACES = True
+    USER_SHARE_SPACE = 1 # Only for hole filling.
+    USER_STRETCH_ASPECT = 1 # Only for hole filling.
+    USER_ISLAND_MARGIN = island_margin # Only for hole filling.
+    USER_FILL_HOLES = 0
+    USER_FILL_HOLES_QUALITY = 50 # Only for hole filling.
+    USER_VIEW_INIT = 0 # Only for hole filling.
     
-    # quick workaround
-    obList =  [ob for ob in [context.active_object] if ob and ob.type == 'MESH']
+    is_editmode = (context.active_object.mode == 'EDIT')
+    if is_editmode:
+        obList =  [ob for ob in [context.active_object] if ob and ob.type == 'MESH']
+    else:
+        obList =  [ob for ob in context.selected_editable_objects if ob and ob.type == 'MESH']
+        USER_ONLY_SELECTED_FACES = False
 
     if not obList:
         raise('error, no selected mesh objects')
 
-    # Create the variables.
-    USER_PROJECTION_LIMIT = projection_limit
-    USER_ONLY_SELECTED_FACES = (1)
-    USER_SHARE_SPACE = (1) # Only for hole filling.
-    USER_STRETCH_ASPECT = (1) # Only for hole filling.
-    USER_ISLAND_MARGIN = island_margin # Only for hole filling.
-    USER_FILL_HOLES = (0)
-    USER_FILL_HOLES_QUALITY = (50) # Only for hole filling.
-    USER_VIEW_INIT = (0) # Only for hole filling.
-
     # Reuse variable
     if len(obList) == 1:
         ob = "Unwrap %i Selected Mesh"
@@ -905,8 +893,8 @@ def main(context,
 
         if USER_ONLY_SELECTED_FACES:
             meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces) if f.select]
-        #else:
-        #      meshFaces = map(thickface, me.faces)
+        else:
+               meshFaces = [thickface(f, uv_layer[i], me_verts) for i, f in enumerate(me.faces)]
 
         if not meshFaces:
             continue
@@ -921,7 +909,7 @@ def main(context,
         # meshFaces = []
 
         # meshFaces.sort( lambda a, b: cmp(b.area , a.area) ) # Biggest first.
-        meshFaces.sort( key = lambda a: -a.area )
+        meshFaces.sort(key=lambda a: -a.area)
 
         # remove all zero area faces
         while meshFaces and meshFaces[-1].area <= SMALL_NUM:
@@ -1116,7 +1104,7 @@ def main(context,
 from bpy.props import FloatProperty
 
 
-class SmartProject(bpy.types.Operator):
+class SmartProject(Operator):
     '''This script projection unwraps the selected faces of a mesh. it operates on all selected mesh objects, and can be used unwrap selected faces, or all faces.'''
     bl_idname = "uv.smart_project"
     bl_label = "Smart UV Project"
index 672db71e361edf866f3b3719af401c2a559e040b..facde82f812577133384065b6f0dc540a4ae0a2a 100644 (file)
@@ -142,10 +142,11 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
 
 
 import bpy
+from bpy.types import Operator
 from bpy.props import FloatProperty, IntProperty, BoolProperty
 
 
-class VertexPaintDirt(bpy.types.Operator):
+class VertexPaintDirt(Operator):
     bl_idname = "paint.vertex_color_dirt"
     bl_label = "Dirty Vertex Colors"
     bl_options = {'REGISTER', 'UNDO'}
index af33e45668c19933b84a5e1f0a50cc2172f44314..fe75c54e60e6039990c7fce268b0e10efe64e555 100644 (file)
 # <pep8 compliant>
 
 import bpy
+from bpy.types import Menu, Operator
 from bpy.props import StringProperty, BoolProperty, IntProperty, \
                       FloatProperty, EnumProperty
 
 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(Operator):
     '''Delete an edge loop by merging the faces on each side to a single face loop'''
     bl_idname = "mesh.delete_edgeloop"
     bl_label = "Delete Edge Loop"
@@ -76,7 +77,7 @@ def execute_context_assign(self, context):
     return {'FINISHED'}
 
 
-class BRUSH_OT_active_index_set(bpy.types.Operator):
+class BRUSH_OT_active_index_set(Operator):
     '''Set active sculpt/paint brush from it's number'''
     bl_idname = "brush.active_index_set"
     bl_label = "Set Brush Number"
@@ -104,7 +105,7 @@ class BRUSH_OT_active_index_set(bpy.types.Operator):
         return {'CANCELLED'}
 
 
-class WM_OT_context_set_boolean(bpy.types.Operator):
+class WM_OT_context_set_boolean(Operator):
     '''Set a context value.'''
     bl_idname = "wm.context_set_boolean"
     bl_label = "Context Set Boolean"
@@ -117,7 +118,7 @@ class WM_OT_context_set_boolean(bpy.types.Operator):
     execute = execute_context_assign
 
 
-class WM_OT_context_set_int(bpy.types.Operator):  # same as enum
+class WM_OT_context_set_int(Operator):  # same as enum
     '''Set a context value.'''
     bl_idname = "wm.context_set_int"
     bl_label = "Context Set"
@@ -130,7 +131,7 @@ class WM_OT_context_set_int(bpy.types.Operator):  # same as enum
     execute = execute_context_assign
 
 
-class WM_OT_context_scale_int(bpy.types.Operator):
+class WM_OT_context_scale_int(Operator):
     '''Scale an int context value.'''
     bl_idname = "wm.context_scale_int"
     bl_label = "Context Set"
@@ -166,7 +167,7 @@ class WM_OT_context_scale_int(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_context_set_float(bpy.types.Operator):  # same as enum
+class WM_OT_context_set_float(Operator):  # same as enum
     '''Set a context value.'''
     bl_idname = "wm.context_set_float"
     bl_label = "Context Set Float"
@@ -180,7 +181,7 @@ class WM_OT_context_set_float(bpy.types.Operator):  # same as enum
     execute = execute_context_assign
 
 
-class WM_OT_context_set_string(bpy.types.Operator):  # same as enum
+class WM_OT_context_set_string(Operator):  # same as enum
     '''Set a context value.'''
     bl_idname = "wm.context_set_string"
     bl_label = "Context Set String"
@@ -193,7 +194,7 @@ class WM_OT_context_set_string(bpy.types.Operator):  # same as enum
     execute = execute_context_assign
 
 
-class WM_OT_context_set_enum(bpy.types.Operator):
+class WM_OT_context_set_enum(Operator):
     '''Set a context value.'''
     bl_idname = "wm.context_set_enum"
     bl_label = "Context Set Enum"
@@ -207,7 +208,7 @@ class WM_OT_context_set_enum(bpy.types.Operator):
     execute = execute_context_assign
 
 
-class WM_OT_context_set_value(bpy.types.Operator):
+class WM_OT_context_set_value(Operator):
     '''Set a context value.'''
     bl_idname = "wm.context_set_value"
     bl_label = "Context Set Value"
@@ -225,7 +226,7 @@ class WM_OT_context_set_value(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_context_toggle(bpy.types.Operator):
+class WM_OT_context_toggle(Operator):
     '''Toggle a context value.'''
     bl_idname = "wm.context_toggle"
     bl_label = "Context Toggle"
@@ -244,7 +245,7 @@ class WM_OT_context_toggle(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_context_toggle_enum(bpy.types.Operator):
+class WM_OT_context_toggle_enum(Operator):
     '''Toggle a context value.'''
     bl_idname = "wm.context_toggle_enum"
     bl_label = "Context Toggle Values"
@@ -270,7 +271,7 @@ class WM_OT_context_toggle_enum(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_context_cycle_int(bpy.types.Operator):
+class WM_OT_context_cycle_int(Operator):
     '''Set a context value. Useful for cycling active material, '''
     '''vertex keys, groups' etc.'''
     bl_idname = "wm.context_cycle_int"
@@ -305,7 +306,7 @@ class WM_OT_context_cycle_int(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_context_cycle_enum(bpy.types.Operator):
+class WM_OT_context_cycle_enum(Operator):
     '''Toggle a context value.'''
     bl_idname = "wm.context_cycle_enum"
     bl_label = "Context Enum Cycle"
@@ -357,7 +358,7 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_context_cycle_array(bpy.types.Operator):
+class WM_OT_context_cycle_array(Operator):
     '''Set a context array value.
     Useful for cycling the active mesh edit mode.'''
     bl_idname = "wm.context_cycle_array"
@@ -385,7 +386,7 @@ class WM_OT_context_cycle_array(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_MT_context_menu_enum(bpy.types.Menu):
+class WM_MT_context_menu_enum(Menu):
     bl_label = ""
     data_path = ""  # BAD DESIGN, set from operator below.
 
@@ -405,7 +406,7 @@ class WM_MT_context_menu_enum(bpy.types.Menu):
             prop.value = identifier
 
 
-class WM_OT_context_menu_enum(bpy.types.Operator):
+class WM_OT_context_menu_enum(Operator):
     bl_idname = "wm.context_menu_enum"
     bl_label = "Context Enum Menu"
     bl_options = {'UNDO', 'INTERNAL'}
@@ -418,7 +419,7 @@ class WM_OT_context_menu_enum(bpy.types.Operator):
         return {'PASS_THROUGH'}
 
 
-class WM_OT_context_set_id(bpy.types.Operator):
+class WM_OT_context_set_id(Operator):
     '''Toggle a context value.'''
     bl_idname = "wm.context_set_id"
     bl_label = "Set Library ID"
@@ -466,7 +467,7 @@ data_path_item = StringProperty(
         description="The data path from each iterable to the value (int or float)")
 
 
-class WM_OT_context_collection_boolean_set(bpy.types.Operator):
+class WM_OT_context_collection_boolean_set(Operator):
     '''Set boolean values for a collection of items'''
     bl_idname = "wm.context_collection_boolean_set"
     bl_label = "Context Collection Boolean Set"
@@ -520,7 +521,7 @@ class WM_OT_context_collection_boolean_set(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_context_modal_mouse(bpy.types.Operator):
+class WM_OT_context_modal_mouse(Operator):
     '''Adjust arbitrary values with mouse input'''
     bl_idname = "wm.context_modal_mouse"
     bl_label = "Context Modal Mouse"
@@ -586,7 +587,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
             self._values_clear()
             return {'FINISHED'}
 
-        elif event_type in ('RIGHTMOUSE', 'ESC'):
+        elif event_type in {'RIGHTMOUSE', 'ESC'}:
             self._values_restore()
             return {'FINISHED'}
 
@@ -607,7 +608,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
             return {'RUNNING_MODAL'}
 
 
-class WM_OT_url_open(bpy.types.Operator):
+class WM_OT_url_open(Operator):
     "Open a website in the Webbrowser"
     bl_idname = "wm.url_open"
     bl_label = ""
@@ -621,7 +622,7 @@ class WM_OT_url_open(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_path_open(bpy.types.Operator):
+class WM_OT_path_open(Operator):
     "Open a path in a file browser"
     bl_idname = "wm.path_open"
     bl_label = ""
@@ -654,7 +655,7 @@ class WM_OT_path_open(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_doc_view(bpy.types.Operator):
+class WM_OT_doc_view(Operator):
     '''Load online reference docs'''
     bl_idname = "wm.doc_view"
     bl_label = "View Documentation"
@@ -708,7 +709,7 @@ class WM_OT_doc_view(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_doc_edit(bpy.types.Operator):
+class WM_OT_doc_edit(Operator):
     '''Load online reference docs'''
     bl_idname = "wm.doc_edit"
     bl_label = "Edit Documentation"
@@ -792,7 +793,7 @@ 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):
+class WM_OT_properties_edit(Operator):
     '''Internal use (edit a property data_path)'''
     bl_idname = "wm.properties_edit"
     bl_label = "Edit Property"
@@ -839,7 +840,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
 
         prop_ui = rna_idprop_ui_prop_get(item, prop)
 
-        if prop_type in (float, int):
+        if prop_type in {float, int}:
 
             prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.min)
             prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.max)
@@ -876,7 +877,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
         return wm.invoke_props_dialog(self)
 
 
-class WM_OT_properties_add(bpy.types.Operator):
+class WM_OT_properties_add(Operator):
     '''Internal use (edit a property data_path)'''
     bl_idname = "wm.properties_add"
     bl_label = "Add Property"
@@ -902,7 +903,7 @@ class WM_OT_properties_add(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_properties_context_change(bpy.types.Operator):
+class WM_OT_properties_context_change(Operator):
     "Change the context tab in a Properties Window"
     bl_idname = "wm.properties_context_change"
     bl_label = ""
@@ -914,7 +915,7 @@ class WM_OT_properties_context_change(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_properties_remove(bpy.types.Operator):
+class WM_OT_properties_remove(Operator):
     '''Internal use (edit a property data_path)'''
     bl_idname = "wm.properties_remove"
     bl_label = "Remove Property"
@@ -928,7 +929,7 @@ class WM_OT_properties_remove(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_keyconfig_activate(bpy.types.Operator):
+class WM_OT_keyconfig_activate(Operator):
     bl_idname = "wm.keyconfig_activate"
     bl_label = "Activate Keyconfig"
 
@@ -939,7 +940,7 @@ class WM_OT_keyconfig_activate(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_appconfig_default(bpy.types.Operator):
+class WM_OT_appconfig_default(Operator):
     bl_idname = "wm.appconfig_default"
     bl_label = "Default Application Configuration"
 
@@ -956,7 +957,7 @@ class WM_OT_appconfig_default(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_appconfig_activate(bpy.types.Operator):
+class WM_OT_appconfig_activate(Operator):
     bl_idname = "wm.appconfig_activate"
     bl_label = "Activate Application Configuration"
 
@@ -974,7 +975,7 @@ class WM_OT_appconfig_activate(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_sysinfo(bpy.types.Operator):
+class WM_OT_sysinfo(Operator):
     '''Generate System Info'''
     bl_idname = "wm.sysinfo"
     bl_label = "System Info"
@@ -985,7 +986,7 @@ class WM_OT_sysinfo(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class WM_OT_copy_prev_settings(bpy.types.Operator):
+class WM_OT_copy_prev_settings(Operator):
     '''Copy settings from previous version'''
     bl_idname = "wm.copy_prev_settings"
     bl_label = "Copy Previous Settings"
index f2a3bac237359912d1b426dc383c90fd387b858e..94c40d11141fb3d6e30006a4a3fe1b31005be461 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -31,7 +32,7 @@ class ArmatureButtonsPanel():
         return context.armature
 
 
-class DATA_PT_context_arm(ArmatureButtonsPanel, bpy.types.Panel):
+class DATA_PT_context_arm(ArmatureButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
 
@@ -48,7 +49,7 @@ class DATA_PT_context_arm(ArmatureButtonsPanel, bpy.types.Panel):
             layout.template_ID(space, "pin_id")
 
 
-class DATA_PT_skeleton(ArmatureButtonsPanel, bpy.types.Panel):
+class DATA_PT_skeleton(ArmatureButtonsPanel, Panel):
     bl_label = "Skeleton"
 
     def draw(self, context):
@@ -71,7 +72,7 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, bpy.types.Panel):
         flow.prop(arm, "use_deform_preserve_volume", text="Quaternion")
 
 
-class DATA_PT_display(ArmatureButtonsPanel, bpy.types.Panel):
+class DATA_PT_display(ArmatureButtonsPanel, Panel):
     bl_label = "Display"
 
     def draw(self, context):
@@ -96,7 +97,7 @@ class DATA_PT_display(ArmatureButtonsPanel, bpy.types.Panel):
         col.prop(arm, "use_deform_delay", text="Delay Refresh")
 
 
-class DATA_PT_bone_groups(ArmatureButtonsPanel, bpy.types.Panel):
+class DATA_PT_bone_groups(ArmatureButtonsPanel, Panel):
     bl_label = "Bone Groups"
 
     @classmethod
@@ -147,7 +148,7 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, bpy.types.Panel):
         sub.operator("pose.group_deselect", text="Deselect")
 
 
-class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel):
+class DATA_PT_pose_library(ArmatureButtonsPanel, Panel):
     bl_label = "Pose Library"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -186,7 +187,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel):
 
 
 # TODO: this panel will soon be depreceated too
-class DATA_PT_ghost(ArmatureButtonsPanel, bpy.types.Panel):
+class DATA_PT_ghost(ArmatureButtonsPanel, Panel):
     bl_label = "Ghost"
 
     def draw(self, context):
@@ -213,7 +214,7 @@ class DATA_PT_ghost(ArmatureButtonsPanel, bpy.types.Panel):
         col.prop(arm, "show_only_ghost_selected", text="Selected Only")
 
 
-class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
+class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, Panel):
     bl_label = "iTaSC parameters"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -266,7 +267,7 @@ from bl_ui.properties_animviz import (
     )
 
 
-class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
+class DATA_PT_motion_paths(MotionPathButtonsPanel, Panel):
     #bl_label = "Bones Motion Paths"
     bl_context = "data"
 
@@ -289,7 +290,7 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
         split.operator("pose.paths_clear", text="Clear Paths")
 
 
-class DATA_PT_onion_skinning(OnionSkinButtonsPanel):  # , bpy.types.Panel): # inherit from panel when ready
+class DATA_PT_onion_skinning(OnionSkinButtonsPanel):  # , Panel): # inherit from panel when ready
     #bl_label = "Bones Onion Skinning"
     bl_context = "data"
 
@@ -303,7 +304,7 @@ class DATA_PT_onion_skinning(OnionSkinButtonsPanel):  # , bpy.types.Panel): # in
         self.draw_settings(context, ob.pose.animation_visualisation, bones=True)
 
 
-class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, bpy.types.Panel):
+class DATA_PT_custom_props_arm(ArmatureButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Armature
index 9fc055e934367a393e3b429df055a3aedcf919cd..b3eaf88d5bfd066d70e900716c0628d3d2fb95b7 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -32,7 +33,7 @@ class BoneButtonsPanel():
         return (context.bone or context.edit_bone)
 
 
-class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel):
+class BONE_PT_context_bone(BoneButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
 
@@ -48,7 +49,7 @@ class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel):
         row.prop(bone, "name", text="")
 
 
-class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
+class BONE_PT_transform(BoneButtonsPanel, Panel):
     bl_label = "Transform"
 
     @classmethod
@@ -102,7 +103,7 @@ class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
             sub.prop(bone, "lock")
 
 
-class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
+class BONE_PT_transform_locks(BoneButtonsPanel, Panel):
     bl_label = "Transform Locks"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -135,7 +136,7 @@ class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
         row.column().prop(pchan, "lock_scale")
 
 
-class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
+class BONE_PT_relations(BoneButtonsPanel, Panel):
     bl_label = "Relations"
 
     def draw(self, context):
@@ -180,7 +181,7 @@ class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
         sub.prop(bone, "use_local_location", text="Local Location")
 
 
-class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
+class BONE_PT_display(BoneButtonsPanel, Panel):
     bl_label = "Display"
 
     @classmethod
@@ -217,7 +218,7 @@ class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
                     col.prop_search(pchan, "custom_shape_transform", ob.pose, "bones", text="At")
 
 
-class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
+class BONE_PT_inverse_kinematics(BoneButtonsPanel, Panel):
     bl_label = "Inverse Kinematics"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -308,7 +309,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
             #row.prop(pchan, "ik_linear_weight", text="Weight", slider=True)
 
 
-class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
+class BONE_PT_deform(BoneButtonsPanel, Panel):
     bl_label = "Deform"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -357,7 +358,7 @@ class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
         col.prop(bone, "use_cyclic_offset")
 
 
-class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):
+class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _property_type = bpy.types.Bone, bpy.types.EditBone, bpy.types.PoseBone
 
index 80cd5227fca8043d72182e0db9cbc151a5654e8c..f484d7b59e1a8ec7f44b0feb5e014fea42c4b07c 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -32,7 +33,7 @@ class CameraButtonsPanel():
         return context.camera and (engine in cls.COMPAT_ENGINES)
 
 
-class DATA_PT_context_camera(CameraButtonsPanel, bpy.types.Panel):
+class DATA_PT_context_camera(CameraButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -53,7 +54,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, bpy.types.Panel):
             split.separator()
 
 
-class DATA_PT_camera(CameraButtonsPanel, bpy.types.Panel):
+class DATA_PT_camera(CameraButtonsPanel, Panel):
     bl_label = "Lens"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -111,7 +112,7 @@ class DATA_PT_camera(CameraButtonsPanel, bpy.types.Panel):
         col.prop(cam, "dof_distance", text="Distance")
 
 
-class DATA_PT_camera_display(CameraButtonsPanel, bpy.types.Panel):
+class DATA_PT_camera_display(CameraButtonsPanel, Panel):
     bl_label = "Display"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -138,7 +139,7 @@ class DATA_PT_camera_display(CameraButtonsPanel, bpy.types.Panel):
         sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
 
 
-class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, bpy.types.Panel):
+class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Camera
index 3c88127c72403e07b265dde6e25cd003364ab0b8..6448b9a5229d908c632bbaa865c6121f5142eed9 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -48,7 +49,7 @@ class CurveButtonsPanelActive(CurveButtonsPanel):
         return (curve and type(curve) is not bpy.types.TextCurve and curve.splines.active)
 
 
-class DATA_PT_context_curve(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_context_curve(CurveButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
 
@@ -65,7 +66,7 @@ class DATA_PT_context_curve(CurveButtonsPanel, bpy.types.Panel):
             layout.template_ID(space, "pin_id")  # XXX: broken
 
 
-class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
     bl_label = "Shape"
 
     def draw(self, context):
@@ -108,13 +109,13 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
         if (is_curve or is_text):
             col.label(text="Fill:")
             sub = col.column()
-            sub.active = (curve.bevel_object is None)
+            sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D'))
             sub.prop(curve, "use_fill_front")
             sub.prop(curve, "use_fill_back")
             col.prop(curve, "use_fill_deform", text="Fill Deformed")
 
 
-class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
     bl_label = "Texture Space"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -133,7 +134,7 @@ class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel):
         row.column().prop(curve, "texspace_size", text="Size")
 
 
-class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_geometry_curve(CurveButtonsPanel, Panel):
     bl_label = "Geometry"
 
     @classmethod
@@ -166,7 +167,7 @@ class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel):
         col.prop(curve, "bevel_object", text="")
 
 
-class DATA_PT_pathanim(CurveButtonsPanelCurve, bpy.types.Panel):
+class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
     bl_label = "Path Animation"
 
     def draw_header(self, context):
@@ -197,7 +198,7 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, bpy.types.Panel):
         col.prop(curve, "use_time_offset", text="Offset Children")
 
 
-class DATA_PT_active_spline(CurveButtonsPanelActive, bpy.types.Panel):
+class DATA_PT_active_spline(CurveButtonsPanelActive, Panel):
     bl_label = "Active Spline"
 
     def draw(self, context):
@@ -268,7 +269,7 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, bpy.types.Panel):
             layout.prop(act_spline, "use_smooth")
 
 
-class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_font(CurveButtonsPanel, Panel):
     bl_label = "Font"
 
     @classmethod
@@ -332,7 +333,7 @@ class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel):
         row.prop(char, "use_small_caps")
 
 
-class DATA_PT_paragraph(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_paragraph(CurveButtonsPanel, Panel):
     bl_label = "Paragraph"
 
     @classmethod
@@ -361,7 +362,7 @@ class DATA_PT_paragraph(CurveButtonsPanel, bpy.types.Panel):
         col.prop(text, "offset_y", text="Y")
 
 
-class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel):
+class DATA_PT_text_boxes(CurveButtonsPanel, Panel):
     bl_label = "Text Boxes"
 
     @classmethod
@@ -401,7 +402,7 @@ class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel):
             row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
 
 
-class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, bpy.types.Panel):
+class DATA_PT_custom_props_curve(CurveButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Curve
index 42b0af7eaf5de679b5d69d485d98f3fe9cbea34d..c781873e16c22c70b5afa1e739165303ccc87eb6 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 
 
 class DataButtonsPanel():
@@ -30,7 +31,7 @@ class DataButtonsPanel():
         return (context.object and context.object.type == 'EMPTY')
 
 
-class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_empty(DataButtonsPanel, Panel):
     bl_label = "Empty"
 
     def draw(self, context):
index 36010c8b51100b82287e4cc2d4e8cf15f21efaf6..4ff180f74fbe76f2acfd969264daa53bcf62b6d9 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Menu, Panel
 from rna_prop_ui import PropertyPanel
 
 
-class LAMP_MT_sunsky_presets(bpy.types.Menu):
+class LAMP_MT_sunsky_presets(Menu):
     bl_label = "Sun & Sky Presets"
     preset_subdir = "sunsky"
     preset_operator = "script.execute_preset"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
-    draw = bpy.types.Menu.draw_preset
+    draw = Menu.draw_preset
 
 
 class DataButtonsPanel():
@@ -40,7 +41,7 @@ class DataButtonsPanel():
         return context.lamp and (engine in cls.COMPAT_ENGINES)
 
 
-class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_context_lamp(DataButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -65,7 +66,7 @@ class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
             split.label(text=str(texture_count), icon='TEXTURE')
 
 
-class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_preview(DataButtonsPanel, Panel):
     bl_label = "Preview"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -73,7 +74,7 @@ class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
         self.layout.template_preview(context.lamp)
 
 
-class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_lamp(DataButtonsPanel, Panel):
     bl_label = "Lamp"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -115,7 +116,7 @@ class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
         col.prop(lamp, "use_diffuse")
 
 
-class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_sunsky(DataButtonsPanel, Panel):
     bl_label = "Sky & Atmosphere"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -187,7 +188,7 @@ class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
         sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
 
 
-class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_shadow(DataButtonsPanel, Panel):
     bl_label = "Shadow"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -302,7 +303,7 @@ class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
             sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End")
 
 
-class DATA_PT_area(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_area(DataButtonsPanel, Panel):
     bl_label = "Area Shape"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -328,7 +329,7 @@ class DATA_PT_area(DataButtonsPanel, bpy.types.Panel):
             sub.prop(lamp, "size_y", text="Size Y")
 
 
-class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_spot(DataButtonsPanel, Panel):
     bl_label = "Spot Shape"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -362,7 +363,7 @@ class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
             sub.prop(lamp, "halo_step", text="Step")
 
 
-class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_falloff_curve(DataButtonsPanel, Panel):
     bl_label = "Falloff Curve"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -380,7 +381,7 @@ class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel):
         self.layout.template_curve_mapping(lamp, "falloff_curve")
 
 
-class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
+class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Lamp
index cd719b6fe8488c12ee503b559ea654b6aff50361..14d6ea66894ae488599ae9828a84529668e12f6f 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -31,7 +32,7 @@ class DataButtonsPanel():
         return context.lattice
 
 
-class DATA_PT_context_lattice(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_context_lattice(DataButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
 
@@ -51,7 +52,7 @@ class DATA_PT_context_lattice(DataButtonsPanel, bpy.types.Panel):
             split.separator()
 
 
-class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_lattice(DataButtonsPanel, Panel):
     bl_label = "Lattice"
 
     def draw(self, context):
@@ -76,7 +77,7 @@ class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
         row.prop_search(lat, "vertex_group", context.object, "vertex_groups", text="")
 
 
-class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
+class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Lattice
index 618a88f08799523312ee25d18f1fa1abab840937..896b76c59f6b25a9eec87e76b208ab54c769a2f3 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Menu, Panel
 from rna_prop_ui import PropertyPanel
 
 
-class MESH_MT_vertex_group_specials(bpy.types.Menu):
+class MESH_MT_vertex_group_specials(Menu):
     bl_label = "Vertex Group Specials"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -36,7 +37,7 @@ class MESH_MT_vertex_group_specials(bpy.types.Menu):
         layout.operator("object.vertex_group_remove", icon='X', text="Delete All").all = True
 
 
-class MESH_MT_shape_key_specials(bpy.types.Menu):
+class MESH_MT_shape_key_specials(Menu):
     bl_label = "Shape Key Specials"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -61,7 +62,7 @@ class MeshButtonsPanel():
         return context.mesh and (engine in cls.COMPAT_ENGINES)
 
 
-class DATA_PT_context_mesh(MeshButtonsPanel, bpy.types.Panel):
+class DATA_PT_context_mesh(MeshButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -72,14 +73,14 @@ class DATA_PT_context_mesh(MeshButtonsPanel, bpy.types.Panel):
         ob = context.object
         mesh = context.mesh
         space = context.space_data
-
+        layout.prop(context.scene.tool_settings, "mesh_select_mode", index=0, text="Vertex")
         if ob:
             layout.template_ID(ob, "data")
         elif mesh:
             layout.template_ID(space, "pin_id")
 
 
-class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel):
+class DATA_PT_normals(MeshButtonsPanel, Panel):
     bl_label = "Normals"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -99,7 +100,7 @@ class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel):
         split.prop(mesh, "show_double_sided")
 
 
-class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
+class DATA_PT_texture_space(MeshButtonsPanel, Panel):
     bl_label = "Texture Space"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -119,7 +120,7 @@ class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
         row.column().prop(mesh, "texspace_size", text="Size")
 
 
-class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
+class DATA_PT_vertex_groups(MeshButtonsPanel, Panel):
     bl_label = "Vertex Groups"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -168,7 +169,7 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
             layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
 
 
-class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
+class DATA_PT_shape_keys(MeshButtonsPanel, Panel):
     bl_label = "Shape Keys"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -261,7 +262,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
                 row.prop(key, "slurph")
 
 
-class DATA_PT_uv_texture(MeshButtonsPanel, bpy.types.Panel):
+class DATA_PT_uv_texture(MeshButtonsPanel, Panel):
     bl_label = "UV Texture"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -284,7 +285,7 @@ class DATA_PT_uv_texture(MeshButtonsPanel, bpy.types.Panel):
             layout.prop(lay, "name")
 
 
-class DATA_PT_texface(MeshButtonsPanel, bpy.types.Panel):
+class DATA_PT_texface(MeshButtonsPanel, Panel):
     bl_label = "Texture Face"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -331,7 +332,7 @@ class DATA_PT_texface(MeshButtonsPanel, bpy.types.Panel):
             col.label(text="No UV Texture")
 
 
-class DATA_PT_vertex_colors(MeshButtonsPanel, bpy.types.Panel):
+class DATA_PT_vertex_colors(MeshButtonsPanel, Panel):
     bl_label = "Vertex Colors"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -354,7 +355,7 @@ class DATA_PT_vertex_colors(MeshButtonsPanel, bpy.types.Panel):
             layout.prop(lay, "name")
 
 
-class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, bpy.types.Panel):
+class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.Mesh
index 6dda99bc37f710db39dd4bc64d7138dbab129bc4..cd894e60dbba9a1135ba9062cd8f3751e75deae2 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -31,7 +32,7 @@ class DataButtonsPanel():
         return context.meta_ball
 
 
-class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_context_metaball(DataButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
 
@@ -48,7 +49,7 @@ class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
             layout.template_ID(space, "pin_id")
 
 
-class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_metaball(DataButtonsPanel, Panel):
     bl_label = "Metaball"
 
     def draw(self, context):
@@ -72,7 +73,7 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
         layout.prop(mball, "update_method", expand=True)
 
 
-class DATA_PT_mball_texture_space(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_mball_texture_space(DataButtonsPanel, Panel):
     bl_label = "Texture Space"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -89,7 +90,7 @@ class DATA_PT_mball_texture_space(DataButtonsPanel, bpy.types.Panel):
         row.column().prop(mball, "texspace_size", text="Size")
 
 
-class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
+class DATA_PT_metaball_element(DataButtonsPanel, Panel):
     bl_label = "Active Element"
 
     @classmethod
@@ -129,7 +130,7 @@ class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
             col.prop(metaelem, "size_y", text="Y")
 
 
-class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
+class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object.data"
     _property_type = bpy.types.MetaBall
index a02e6bd6469abeb04c334f5488eb24a245d246a8..65827775ad1bfbd114cc3da665da4f3795f7a2a0 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 
 
 class ModifierButtonsPanel():
@@ -26,7 +27,7 @@ class ModifierButtonsPanel():
     bl_context = "modifier"
 
 
-class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
+class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
     bl_label = "Modifiers"
 
     def draw(self, context):
@@ -576,13 +577,13 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         sub = col.column()
         sub.active = bool(md.vertex_group)
         sub.prop(md, "invert_vertex_group", text="Invert")
+        sub.prop(md, "thickness_vertex_group", text="Factor")
 
         col.prop(md, "use_even_offset")
         col.prop(md, "use_quality_normals")
         col.prop(md, "use_rim")
 
         sub = col.column()
-        sub.label()
         row = sub.split(align=True, percentage=0.4)
         row.prop(md, "material_offset", text="")
         row = row.row()
index 0c07451b3b2dcdde62413053dbe48b305765863c..f8be32e6c074f5a844df39075f466ab3d82db08f 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 
 
 class PhysicsButtonsPanel():
@@ -26,7 +27,7 @@ class PhysicsButtonsPanel():
     bl_context = "physics"
 
 
-class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
     bl_label = "Physics"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -167,7 +168,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             layout.prop(ob, "hide_render", text="Invisible")
 
 
-class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, Panel):
     bl_label = "Collision Bounds"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -206,7 +207,7 @@ class RenderButtonsPanel():
         return (rd.engine in cls.COMPAT_ENGINES)
 
 
-class RENDER_PT_game(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_game(RenderButtonsPanel, Panel):
     bl_label = "Game"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -218,7 +219,7 @@ class RENDER_PT_game(RenderButtonsPanel, bpy.types.Panel):
         row.label()
 
 
-class RENDER_PT_game_player(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_game_player(RenderButtonsPanel, Panel):
     bl_label = "Standalone Player"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -251,7 +252,7 @@ class RENDER_PT_game_player(RenderButtonsPanel, bpy.types.Panel):
             col.prop(gs, "frame_color", text="")
 
 
-class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_game_stereo(RenderButtonsPanel, Panel):
     bl_label = "Stereo"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -305,7 +306,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
             layout.prop(gs, "dome_text")
 
 
-class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_game_shading(RenderButtonsPanel, Panel):
     bl_label = "Shading"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -331,7 +332,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
             col.prop(gs, "use_glsl_extra_textures", text="Extra Textures")
 
 
-class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_game_performance(RenderButtonsPanel, Panel):
     bl_label = "Performance"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -344,7 +345,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
         row.prop(gs, "use_display_lists")
 
 
-class RENDER_PT_game_display(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_game_display(RenderButtonsPanel, Panel):
     bl_label = "Display"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -360,7 +361,7 @@ class RENDER_PT_game_display(RenderButtonsPanel, bpy.types.Panel):
         flow.prop(gs, "show_mouse", text="Mouse Cursor")
 
 
-class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_game_sound(RenderButtonsPanel, Panel):
     bl_label = "Sound"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -381,7 +382,7 @@ class WorldButtonsPanel():
     bl_context = "world"
 
 
-class WORLD_PT_game_context_world(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_game_context_world(WorldButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -405,7 +406,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel, bpy.types.Panel):
             split.template_ID(space, "pin_id")
 
 
-class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_game_world(WorldButtonsPanel, Panel):
     bl_label = "World"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -424,7 +425,7 @@ class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
         row.column().prop(world, "ambient_color")
 
 
-class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_game_mist(WorldButtonsPanel, Panel):
     bl_label = "Mist"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -450,7 +451,7 @@ class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
         row.prop(world.mist_settings, "depth")
 
 
-class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_game_physics(WorldButtonsPanel, Panel):
     bl_label = "Physics"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
index 296c05d78f5fa1ec975c7dcecfe2a4c40da09f62..13ce92f084c37f62733cebac50fc73372cbd9484 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Menu, Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -50,14 +51,14 @@ def simple_material(mat):
     return False
 
 
-class MATERIAL_MT_sss_presets(bpy.types.Menu):
+class MATERIAL_MT_sss_presets(Menu):
     bl_label = "SSS Presets"
     preset_subdir = "sss"
     preset_operator = "script.execute_preset"
-    draw = bpy.types.Menu.draw_preset
+    draw = Menu.draw_preset
 
 
-class MATERIAL_MT_specials(bpy.types.Menu):
+class MATERIAL_MT_specials(Menu):
     bl_label = "Material Specials"
 
     def draw(self, context):
@@ -79,7 +80,7 @@ class MaterialButtonsPanel():
         return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES)
 
 
-class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -144,7 +145,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
                     row.label(text="No material node selected")
 
 
-class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_preview(MaterialButtonsPanel, Panel):
     bl_label = "Preview"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -152,7 +153,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
         self.layout.template_preview(context.material)
 
 
-class MATERIAL_PT_pipeline(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_pipeline(MaterialButtonsPanel, Panel):
     bl_label = "Render Pipeline Options"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -203,7 +204,7 @@ class MATERIAL_PT_pipeline(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(mat, "pass_index")
 
 
-class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel):
     bl_label = "Diffuse"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -260,7 +261,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
             col.prop(mat, "diffuse_ramp_factor", text="Factor")
 
 
-class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_specular(MaterialButtonsPanel, Panel):
     bl_label = "Specular"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -313,7 +314,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
             layout.prop(mat, "specular_ramp_factor", text="Factor")
 
 
-class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_shading(MaterialButtonsPanel, Panel):
     bl_label = "Shading"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -347,7 +348,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
             sub.prop(mat, "use_cubic")
 
 
-class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_transp(MaterialButtonsPanel, Panel):
     bl_label = "Transparency"
     # bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -413,7 +414,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
             sub.prop(rayt, "gloss_samples", text="Samples")
 
 
-class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_mirror(MaterialButtonsPanel, Panel):
     bl_label = "Mirror"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -471,7 +472,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
         sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
 
 
-class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_sss(MaterialButtonsPanel, Panel):
     bl_label = "Subsurface Scattering"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -523,7 +524,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(sss, "error_threshold", text="Error")
 
 
-class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_halo(MaterialButtonsPanel, Panel):
     bl_label = "Halo"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -576,7 +577,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
         number_but(col, "use_star", "star_tip_count", "Star tips", "")
 
 
-class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_flare(MaterialButtonsPanel, Panel):
     bl_label = "Flare"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -611,7 +612,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(halo, "flare_subflare_size", text="Subsize")
 
 
-class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_physics(MaterialButtonsPanel, Panel):
     bl_label = "Physics"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -641,7 +642,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
         row.prop(phys, "use_fh_normal")
 
 
-class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_strand(MaterialButtonsPanel, Panel):
     bl_label = "Strand"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -688,7 +689,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
         sub.prop(tan, "blend_distance", text="Distance")
 
 
-class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_options(MaterialButtonsPanel, Panel):
     bl_label = "Options"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -737,7 +738,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
             col.prop(mat, "pass_index")
 
 
-class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel):
     bl_label = "Shadow"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -781,7 +782,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
             col.prop(mat, "use_cast_approximate")
 
 
-class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_transp_game(MaterialButtonsPanel, Panel):
     bl_label = "Transparency"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -824,7 +825,7 @@ class VolumeButtonsPanel():
         return mat and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES)
 
 
-class MATERIAL_PT_volume_density(VolumeButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_volume_density(VolumeButtonsPanel, Panel):
     bl_label = "Density"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -838,7 +839,7 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel, bpy.types.Panel):
         row.prop(vol, "density_scale")
 
 
-class MATERIAL_PT_volume_shading(VolumeButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_volume_shading(VolumeButtonsPanel, Panel):
     bl_label = "Shading"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -863,7 +864,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel, bpy.types.Panel):
         sub.prop(vol, "reflection_color", text="")
 
 
-class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, Panel):
     bl_label = "Lighting"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -898,7 +899,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
             sub.prop(vol, "ms_intensity")
 
 
-class MATERIAL_PT_volume_transp(VolumeButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_volume_transp(VolumeButtonsPanel, Panel):
     bl_label = "Transparency"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -916,7 +917,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel, bpy.types.Panel):
         layout.prop(mat, "transparency_method", expand=True)
 
 
-class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_volume_integration(VolumeButtonsPanel, Panel):
     bl_label = "Integration"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -938,7 +939,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
         col.prop(vol, "depth_threshold")
 
 
-class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
+class MATERIAL_PT_volume_options(VolumeButtonsPanel, Panel):
     bl_label = "Options"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     bl_options = {'DEFAULT_CLOSED'}
@@ -970,7 +971,7 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
         row.prop(mat, "use_light_group_exclusive", text="Exclusive")
 
 
-class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Panel):
+class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "material"
     _property_type = bpy.types.Material
index cdbcf2cf53313a35af88035f7ce3997f0fbbb49d..0779debb1029821556cef84d0f92959519343a4e 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -27,7 +28,7 @@ class ObjectButtonsPanel():
     bl_context = "object"
 
 
-class OBJECT_PT_context_object(ObjectButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_context_object(ObjectButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
 
@@ -42,7 +43,7 @@ class OBJECT_PT_context_object(ObjectButtonsPanel, bpy.types.Panel):
             row.template_ID(context.scene.objects, "active")
 
 
-class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_transform(ObjectButtonsPanel, Panel):
     bl_label = "Transform"
 
     def draw(self, context):
@@ -68,7 +69,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
         layout.prop(ob, "rotation_mode")
 
 
-class OBJECT_PT_delta_transform(ObjectButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_delta_transform(ObjectButtonsPanel, Panel):
     bl_label = "Delta Transform"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -94,7 +95,7 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, bpy.types.Panel):
         row.column().prop(ob, "delta_scale")
 
 
-class OBJECT_PT_transform_locks(ObjectButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_transform_locks(ObjectButtonsPanel, Panel):
     bl_label = "Transform Locks"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -120,7 +121,7 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, bpy.types.Panel):
         row.column().prop(ob, "lock_scale", text="Scale")
 
 
-class OBJECT_PT_relations(ObjectButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_relations(ObjectButtonsPanel, Panel):
     bl_label = "Relations"
 
     def draw(self, context):
@@ -147,7 +148,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel, bpy.types.Panel):
         sub.active = (parent is not None)
 
 
-class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_groups(ObjectButtonsPanel, Panel):
     bl_label = "Groups"
 
     def draw(self, context):
@@ -186,7 +187,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
                 index += 1
 
 
-class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_display(ObjectButtonsPanel, Panel):
     bl_label = "Display"
 
     def draw(self, context):
@@ -220,7 +221,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
             col.prop(ob, "show_transparent", text="Transparency")
 
 
-class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_duplication(ObjectButtonsPanel, Panel):
     bl_label = "Duplication"
 
     def draw(self, context):
@@ -258,7 +259,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
 
 # 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, Panel):
     bl_label = "Animation Hacks"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -293,7 +294,7 @@ from bl_ui.properties_animviz import (
     )
 
 
-class OBJECT_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel):
     #bl_label = "Object Motion Paths"
     bl_context = "object"
 
@@ -315,7 +316,7 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
         row.operator("object.paths_clear", text="Clear Paths")
 
 
-class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel):  # , bpy.types.Panel): # inherit from panel when ready
+class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel):  # , Panel): # inherit from panel when ready
     #bl_label = "Object Onion Skinning"
     bl_context = "object"
 
@@ -329,7 +330,7 @@ class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel):  # , bpy.types.Panel): #
         self.draw_settings(context, ob.animation_visualisation)
 
 
-class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, bpy.types.Panel):
+class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "object"
     _property_type = bpy.types.Object
index 5f79dd3127ad15f9366776006df8533a5c90b4e6..867abe4dd5d78a5eddb09c51640b4b98b96e8678 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 
 
 class ConstraintButtonsPanel():
@@ -755,7 +756,7 @@ class ConstraintButtonsPanel():
         layout.label("Blender 2.5 has no py-constraints")
 
 
-class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
+class OBJECT_PT_constraints(ConstraintButtonsPanel, Panel):
     bl_label = "Object Constraints"
     bl_context = "constraint"
 
@@ -779,7 +780,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
             self.draw_constraint(context, con)
 
 
-class BONE_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
+class BONE_PT_constraints(ConstraintButtonsPanel, Panel):
     bl_label = "Bone Constraints"
     bl_context = "bone_constraint"
 
index f23d05f4d17a55d6d6e5c0c8262ff558b1e1ad21..6187d95d932c1545a82ab221934e02dcb8607413 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 from bl_ui.properties_physics_common import (
@@ -72,7 +73,7 @@ class ParticleButtonsPanel():
         return particle_panel_poll(cls, context)
 
 
-class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_context_particles(ParticleButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
 
@@ -175,7 +176,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
                 split.prop(psys, "reactor_target_particle_system", text="Particle System")
 
 
-class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_emission(ParticleButtonsPanel, Panel):
     bl_label = "Emission"
 
     @classmethod
@@ -243,7 +244,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
                 row.prop(part, "grid_random", text="Random", slider=True)
 
 
-class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, Panel):
     bl_label = "Hair dynamics"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -298,7 +299,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
         col.prop(cloth, "quality", text="Steps", slider=True)
 
 
-class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_cache(ParticleButtonsPanel, Panel):
     bl_label = "Cache"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -323,7 +324,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
         point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if (psys.settings.type == 'HAIR') else 'PSYS')
 
 
-class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_velocity(ParticleButtonsPanel, Panel):
     bl_label = "Velocity"
 
     @classmethod
@@ -372,7 +373,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
         #    sub.prop(part, "reaction_shape", slider=True)
 
 
-class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_rotation(ParticleButtonsPanel, Panel):
     bl_label = "Rotation"
 
     @classmethod
@@ -420,7 +421,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
             col.prop(part, "angular_velocity_factor", text="")
 
 
-class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_physics(ParticleButtonsPanel, Panel):
     bl_label = "Physics"
 
     @classmethod
@@ -455,7 +456,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
             col.prop(part, "mass")
             col.prop(part, "use_multiply_size_mass", text="Multiply mass with size")
 
-        if part.physics_type in ('NEWTON', 'FLUID'):
+        if part.physics_type in {'NEWTON', 'FLUID'}:
             split = layout.split()
 
             col = split.column()
@@ -634,7 +635,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
                     sub.prop(key, "system", text="System")
 
 
-class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_boidbrain(ParticleButtonsPanel, Panel):
     bl_label = "Boid Brain"
 
     @classmethod
@@ -734,7 +735,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
                 row.prop(rule, "flee_distance")
 
 
-class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_render(ParticleButtonsPanel, Panel):
     bl_label = "Render"
 
     @classmethod
@@ -912,13 +913,13 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
                 col = row.column()
                 col.label(text="")
 
-        if part.render_type in ('OBJECT', 'GROUP') and not part.use_advanced_hair:
+        if part.render_type in {'OBJECT', 'GROUP'} and not part.use_advanced_hair:
             row = layout.row(align=True)
             row.prop(part, "particle_size")
             row.prop(part, "size_random", slider=True)
 
 
-class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_draw(ParticleButtonsPanel, Panel):
     bl_label = "Display"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -979,7 +980,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
             col.prop(part, "draw_step")
 
 
-class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_children(ParticleButtonsPanel, Panel):
     bl_label = "Children"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -1078,7 +1079,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
         sub.prop(part, "kink_shape", slider=True)
 
 
-class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_field_weights(ParticleButtonsPanel, Panel):
     bl_label = "Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -1098,7 +1099,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
             row.prop(part, "effect_hair", slider=True)
 
 
-class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_force_fields(ParticleButtonsPanel, Panel):
     bl_label = "Force Field Settings"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -1131,7 +1132,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
         basic_force_field_falloff_ui(self, context, part.force_field_2)
 
 
-class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
+class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, Panel):
     bl_label = "Vertexgroups"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -1201,7 +1202,7 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
         # row.prop(psys, "invert_vertex_group_field", text="")
 
 
-class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel):
+class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, Panel):
     _context_path = "particle_system.settings"
     _property_type = bpy.types.ParticleSettings
 
index bce6ab993a7fd8a3fa5745a6beaffe7de7684f92..d5427d8bae871bd6a625f37210946d22f09cca79 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Menu, Panel
 
 
 from bl_ui.properties_physics_common import (
@@ -30,14 +31,14 @@ def cloth_panel_enabled(md):
     return md.point_cache.is_baked is False
 
 
-class CLOTH_MT_presets(bpy.types.Menu):
+class CLOTH_MT_presets(Menu):
     '''
     Creates the menu items by scanning scripts/templates
     '''
     bl_label = "Cloth Presets"
     preset_subdir = "cloth"
     preset_operator = "script.execute_preset"
-    draw = bpy.types.Menu.draw_preset
+    draw = Menu.draw_preset
 
 
 class PhysicButtonsPanel():
@@ -52,7 +53,7 @@ class PhysicButtonsPanel():
         return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.cloth)
 
 
-class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
     bl_label = "Cloth"
 
     def draw(self, context):
@@ -117,7 +118,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
                 col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
 
 
-class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Cache"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -130,7 +131,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
         point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH')
 
 
-class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Collision"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -171,7 +172,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
         layout.prop(cloth, "group")
 
 
-class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Stiffness Scaling"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -207,7 +208,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
         col.prop(cloth, "bending_stiffness_max", text="Max")
 
 
-class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, Panel):
     bl_label = "Cloth Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
 
index f7cf8da184033d6a7a1a17f2dd60e7ae8897bd31..204e25d9f011e84f6b64624b6912e1c867680c92 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 
 import bpy
+from bpy.types import Panel
 
 
 class PhysicButtonsPanel():
@@ -44,7 +45,7 @@ def physics_add(self, layout, md, name, type, typeicon, toggles):
         sub.operator("object.modifier_add", text=name, icon=typeicon).type = type
 
 
-class PHYSICS_PT_add(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_add(PhysicButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
 
index bd374f0a6f873808045e9347859d094426330349..aa0ff4c6c669bcbacb8b13e10d10bc7246d5d386 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 
 
 from bl_ui.properties_physics_common import (
@@ -37,7 +38,7 @@ class PhysicButtonsPanel():
         return (context.object) and (not rd.use_game_engine)
 
 
-class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_field(PhysicButtonsPanel, Panel):
     bl_label = "Force Fields"
 
     @classmethod
@@ -167,7 +168,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
                 sub.prop(field, "radial_max", text="Distance")
 
 
-class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_collision(PhysicButtonsPanel, Panel):
     bl_label = "Collision"
     #bl_options = {'DEFAULT_CLOSED'}
 
index c7e3a9e722007efcf4150e305caeb3606dcc4ed7..46893af3582fbf8ec43cd158dfb708c31f9b6bb7 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 
 
 class PhysicButtonsPanel():
@@ -32,7 +33,7 @@ class PhysicButtonsPanel():
         return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.fluid)
 
 
-class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
     bl_label = "Fluid"
 
     def draw(self, context):
@@ -186,7 +187,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
                 sub.prop(fluid, "velocity_radius", text="Radius")
 
 
-class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
     bl_label = "Domain World"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -236,7 +237,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
         col.prop(fluid, "compressibility", slider=True)
 
 
-class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel):
     bl_label = "Domain Boundary"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -265,7 +266,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
         col.prop(fluid, "surface_subdivisions", text="Subdivisions")
 
 
-class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel):
     bl_label = "Domain Particles"
     bl_options = {'DEFAULT_CLOSED'}
 
index 61d8d2e3825dcf1d2022b3cbefc64a20a5786f06..771a778380d8516b3c9d38745af5477275b4711b 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 
 
 from bl_ui.properties_physics_common import (
@@ -38,7 +39,7 @@ class PhysicButtonsPanel():
         return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.smoke)
 
 
-class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
     bl_label = "Smoke"
 
     def draw(self, context):
@@ -103,7 +104,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
                 sub.prop(flow, "temperature")
 
 
-class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
     bl_label = "Smoke Groups"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -131,7 +132,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
         col.prop(group, "collision_group", text="")
 
 
-class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel):
     bl_label = "Smoke High Resolution"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -168,7 +169,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
         layout.prop(md, "show_high_resolution")
 
 
-class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel):
     bl_label = "Smoke Cache"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -189,7 +190,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
         point_cache_ui(self, context, cache, (cache.is_baked is False), 'SMOKE')
 
 
-class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel):
     bl_label = "Smoke Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
 
index 61115a0590e3dd185284ce5f8919d99a2026d17c..0b55ccf95167b0f6b41539cd4b9c5584e89ae8a1 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 
 
 from bl_ui.properties_physics_common import (
@@ -44,7 +45,7 @@ class PhysicButtonsPanel():
         return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) and (context.soft_body)
 
 
-class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body"
 
     def draw(self, context):
@@ -71,7 +72,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
             col.prop(softbody, "speed")
 
 
-class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Cache"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -84,7 +85,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
         point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY')
 
 
-class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Goal"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -127,7 +128,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
         layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text="Vertex Group")
 
 
-class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Edges"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -180,7 +181,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
         col.prop(softbody, "use_face_collision", text="Face")
 
 
-class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Self Collision"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -212,7 +213,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
         col.prop(softbody, "ball_damp", text="Dampening")
 
 
-class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Solver"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -248,7 +249,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
         layout.prop(softbody, "use_estimate_matrix")
 
 
-class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, bpy.types.Panel):
+class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, Panel):
     bl_label = "Soft Body Field Weights"
     bl_options = {'DEFAULT_CLOSED'}
 
index 6d36db29a6c735200d6ea9e73925f4861836b95f..fb14372ebeafc213c210ffcc59b37ff96dcc84f3 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Menu, Panel
 
 
-class RENDER_MT_presets(bpy.types.Menu):
+class RENDER_MT_presets(Menu):
     bl_label = "Render Presets"
     preset_subdir = "render"
     preset_operator = "script.execute_preset"
-    draw = bpy.types.Menu.draw_preset
+    draw = Menu.draw_preset
 
 
-class RENDER_MT_ffmpeg_presets(bpy.types.Menu):
+class RENDER_MT_ffmpeg_presets(Menu):
     bl_label = "FFMPEG Presets"
     preset_subdir = "ffmpeg"
     preset_operator = "script.python_file_run"
-    draw = bpy.types.Menu.draw_preset
+    draw = Menu.draw_preset
 
 
-class RENDER_MT_framerate_presets(bpy.types.Menu):
+class RENDER_MT_framerate_presets(Menu):
     bl_label = "Frame Rate Presets"
     preset_subdir = "framerate"
     preset_operator = "script.execute_preset"
-    draw = bpy.types.Menu.draw_preset
+    draw = Menu.draw_preset
 
 
 class RenderButtonsPanel():
@@ -53,7 +54,7 @@ class RenderButtonsPanel():
         return (context.scene and rd.use_game_engine is False) and (rd.engine in cls.COMPAT_ENGINES)
 
 
-class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_render(RenderButtonsPanel, Panel):
     bl_label = "Render"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -69,7 +70,7 @@ class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
         layout.prop(rd, "display_mode", text="Display")
 
 
-class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_layers(RenderButtonsPanel, Panel):
     bl_label = "Layers"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -173,7 +174,7 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
         row.prop(rl, "exclude_refraction", text="")
 
 
-class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_dimensions(RenderButtonsPanel, Panel):
     bl_label = "Dimensions"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -240,7 +241,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
         subrow.prop(rd, "frame_map_new", text="New")
 
 
-class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_antialiasing(RenderButtonsPanel, Panel):
     bl_label = "Anti-Aliasing"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -268,7 +269,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
         col.prop(rd, "filter_size", text="Size")
 
 
-class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_motion_blur(RenderButtonsPanel, Panel):
     bl_label = "Sampled Motion Blur"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -294,7 +295,7 @@ class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
         row.prop(rd, "motion_blur_shutter")
 
 
-class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_shading(RenderButtonsPanel, Panel):
     bl_label = "Shading"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -318,7 +319,7 @@ class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
         col.prop(rd, "alpha_mode", text="Alpha")
 
 
-class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_performance(RenderButtonsPanel, Panel):
     bl_label = "Performance"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -361,7 +362,7 @@ class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
         sub.prop(rd, "use_local_coords", text="Local Coordinates")
 
 
-class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_post_processing(RenderButtonsPanel, Panel):
     bl_label = "Post Processing"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -398,7 +399,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
         sub.prop(rd, "edge_color", text="")
 
 
-class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_stamp(RenderButtonsPanel, Panel):
     bl_label = "Stamp"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -443,7 +444,7 @@ class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
         sub.prop(rd, "stamp_note_text", text="")
 
 
-class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_output(RenderButtonsPanel, Panel):
     bl_label = "Output"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -543,7 +544,7 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
                 col.prop(rd, "quicktime_audio_resampling_hq")
 
 
-class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_encoding(RenderButtonsPanel, Panel):
     bl_label = "Encoding"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -600,7 +601,7 @@ class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
         split.prop(rd, "ffmpeg_audio_volume", slider=True)
 
 
-class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
+class RENDER_PT_bake(RenderButtonsPanel, Panel):
     bl_label = "Bake"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
index 7725f6616934489646f33b259a9cef60dc3458f0..6e96e1228e7ba266f20af9058870b77b6ed209fc 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Operator, Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -31,7 +32,7 @@ class SceneButtonsPanel():
         return context.scene
 
 
-class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
+class SCENE_PT_scene(SceneButtonsPanel, Panel):
     bl_label = "Scene"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -43,7 +44,7 @@ class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
         layout.prop(scene, "background_set", text="Background")
 
 
-class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
+class SCENE_PT_unit(SceneButtonsPanel, Panel):
     bl_label = "Units"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -61,7 +62,7 @@ class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
         row.prop(unit, "use_separate")
 
 
-class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
+class SCENE_PT_keying_sets(SceneButtonsPanel, Panel):
     bl_label = "Keying Sets"
 
     def draw(self, context):
@@ -94,7 +95,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
             col.prop(ks, "bl_options")
 
 
-class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
+class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel):
     bl_label = "Active Keying Set"
 
     @classmethod
@@ -144,7 +145,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
             col.prop(ksp, "bl_options")
 
 
-class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel):
+class SCENE_PT_physics(SceneButtonsPanel, Panel):
     bl_label = "Gravity"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -161,7 +162,7 @@ class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel):
         layout.prop(scene, "gravity", text="")
 
 
-class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
+class SCENE_PT_simplify(SceneButtonsPanel, Panel):
     bl_label = "Simplify"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -190,7 +191,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
         col.prop(rd, "simplify_ao_sss", text="AO and SSS")
 
 
-class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
+class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "scene"
     _property_type = bpy.types.Scene
@@ -198,7 +199,7 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
 #  XXX, move operator to op/ dir
 
 
-class ANIM_OT_keying_set_export(bpy.types.Operator):
+class ANIM_OT_keying_set_export(Operator):
     "Export Keying Set to a python script."
     bl_idname = "anim.keying_set_export"
     bl_label = "Export Keying Set..."
index e216f0192975d3519ad525a203e1ba41caa36a7f..fe741b78daaab98e43128fa611a40b70f3191a8e 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Menu, Panel
 from rna_prop_ui import PropertyPanel
 
 
-class TEXTURE_MT_specials(bpy.types.Menu):
+class TEXTURE_MT_specials(Menu):
     bl_label = "Texture Specials"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -32,7 +33,7 @@ class TEXTURE_MT_specials(bpy.types.Menu):
         layout.operator("texture.slot_paste", icon='PASTEDOWN')
 
 
-class TEXTURE_MT_envmap_specials(bpy.types.Menu):
+class TEXTURE_MT_envmap_specials(Menu):
     bl_label = "Environment Map Specials"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -80,7 +81,7 @@ class TextureButtonsPanel():
         return tex and (tex.type != 'NONE' or tex.use_nodes) and (context.scene.render.engine in cls.COMPAT_ENGINES)
 
 
-class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
+class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -150,7 +151,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
                 split.prop(tex, "type", text="")
 
 
-class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
+class TEXTURE_PT_preview(TextureButtonsPanel, Panel):
     bl_label = "Preview"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -167,7 +168,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
             layout.template_preview(tex, slot=slot)
 
 
-class TEXTURE_PT_colors(TextureButtonsPanel, bpy.types.Panel):
+class TEXTURE_PT_colors(TextureButtonsPanel, Panel):
     bl_label = "Colors"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -223,7 +224,7 @@ class TextureTypePanel(TextureButtonsPanel):
         return tex and ((tex.type == cls.tex_type and not tex.use_nodes) and (engine in cls.COMPAT_ENGINES))
 
 
-class TEXTURE_PT_clouds(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_clouds(TextureTypePanel, Panel):
     bl_label = "Clouds"
     tex_type = 'CLOUDS'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -247,7 +248,7 @@ class TEXTURE_PT_clouds(TextureTypePanel, bpy.types.Panel):
         split.prop(tex, "nabla", text="Nabla")
 
 
-class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_wood(TextureTypePanel, Panel):
     bl_label = "Wood"
     tex_type = 'WOOD'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -276,7 +277,7 @@ class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
         split.prop(tex, "nabla")
 
 
-class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_marble(TextureTypePanel, Panel):
     bl_label = "Marble"
     tex_type = 'MARBLE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -303,7 +304,7 @@ class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
         col.prop(tex, "nabla")
 
 
-class TEXTURE_PT_magic(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_magic(TextureTypePanel, Panel):
     bl_label = "Magic"
     tex_type = 'MAGIC'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -318,7 +319,7 @@ class TEXTURE_PT_magic(TextureTypePanel, bpy.types.Panel):
         row.prop(tex, "turbulence")
 
 
-class TEXTURE_PT_blend(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_blend(TextureTypePanel, Panel):
     bl_label = "Blend"
     tex_type = 'BLEND'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -336,7 +337,7 @@ class TEXTURE_PT_blend(TextureTypePanel, bpy.types.Panel):
         sub.prop(tex, "use_flip_axis", expand=True)
 
 
-class TEXTURE_PT_stucci(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_stucci(TextureTypePanel, Panel):
     bl_label = "Stucci"
     tex_type = 'STUCCI'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -356,7 +357,7 @@ class TEXTURE_PT_stucci(TextureTypePanel, bpy.types.Panel):
         row.prop(tex, "turbulence")
 
 
-class TEXTURE_PT_image(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_image(TextureTypePanel, Panel):
     bl_label = "Image"
     tex_type = 'IMAGE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -382,7 +383,7 @@ def texture_filter_common(tex, layout):
     layout.prop(tex, "use_filter_size_min")
 
 
-class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_image_sampling(TextureTypePanel, Panel):
     bl_label = "Image Sampling"
     bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'IMAGE'
@@ -424,7 +425,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
         texture_filter_common(tex, col)
 
 
-class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_image_mapping(TextureTypePanel, Panel):
     bl_label = "Image Mapping"
     bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'IMAGE'
@@ -480,7 +481,7 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
         col.prop(tex, "crop_max_y", text="Y")
 
 
-class TEXTURE_PT_envmap(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_envmap(TextureTypePanel, Panel):
     bl_label = "Environment Map"
     tex_type = 'ENVIRONMENT_MAP'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -518,7 +519,7 @@ class TEXTURE_PT_envmap(TextureTypePanel, bpy.types.Panel):
             col.prop(env, "clip_end", text="End")
 
 
-class TEXTURE_PT_envmap_sampling(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_envmap_sampling(TextureTypePanel, Panel):
     bl_label = "Environment Map Sampling"
     bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'ENVIRONMENT_MAP'
@@ -532,7 +533,7 @@ class TEXTURE_PT_envmap_sampling(TextureTypePanel, bpy.types.Panel):
         texture_filter_common(tex, layout)
 
 
-class TEXTURE_PT_musgrave(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_musgrave(TextureTypePanel, Panel):
     bl_label = "Musgrave"
     tex_type = 'MUSGRAVE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -569,7 +570,7 @@ class TEXTURE_PT_musgrave(TextureTypePanel, bpy.types.Panel):
         row.prop(tex, "nabla")
 
 
-class TEXTURE_PT_voronoi(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_voronoi(TextureTypePanel, Panel):
     bl_label = "Voronoi"
     tex_type = 'VORONOI'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -605,7 +606,7 @@ class TEXTURE_PT_voronoi(TextureTypePanel, bpy.types.Panel):
         row.prop(tex, "nabla")
 
 
-class TEXTURE_PT_distortednoise(TextureTypePanel, bpy.types.Panel):
+class TEXTURE_PT_distortednoise(TextureTypePanel, Panel):
     bl_label = "Distorted Noise"
     tex_type = 'DISTORTED_NOISE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -627,7 +628,7 @@ class TEXTURE_PT_distortednoise(TextureTypePanel, bpy.types.Panel):
         split.prop(tex, "nabla")
 
 
-class TEXTURE_PT_voxeldata(TextureButtonsPanel, bpy.types.Panel):
+class TEXTURE_PT_voxeldata(TextureButtonsPanel, Panel):
     bl_label = "Voxel Data"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -667,7 +668,7 @@ class TEXTURE_PT_voxeldata(TextureButtonsPanel, bpy.types.Panel):
         layout.prop(vd, "intensity")
 
 
-class TEXTURE_PT_pointdensity(TextureButtonsPanel, bpy.types.Panel):
+class TEXTURE_PT_pointdensity(TextureButtonsPanel, Panel):
     bl_label = "Point Density"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -733,7 +734,7 @@ class TEXTURE_PT_pointdensity(TextureButtonsPanel, bpy.types.Panel):
             col.template_curve_mapping(pd, "falloff_curve", brush=False)
 
 
-class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
+class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, Panel):
     bl_label = "Turbulence"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -770,7 +771,7 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, bpy.types.Panel):
         col.prop(pd, "turbulence_strength")
 
 
-class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel):
+class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
     bl_label = "Mapping"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -858,7 +859,7 @@ class TEXTURE_PT_mapping(TextureSlotPanel, bpy.types.Panel):
         row.column().prop(tex, "scale")
 
 
-class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel):
+class TEXTURE_PT_influence(TextureSlotPanel, Panel):
     bl_label = "Influence"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -1034,7 +1035,7 @@ class TEXTURE_PT_influence(TextureSlotPanel, bpy.types.Panel):
             sub.prop(tex, "bump_objectspace", text="Space")
 
 
-class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, bpy.types.Panel):
+class TEXTURE_PT_custom_props(TextureButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "texture"
     _property_type = bpy.types.Texture
index c577af013744ed7d85325b1fb75a4c1124c89198..71ee03296a0c0cf15f847151421cae654a81590d 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Panel
 from rna_prop_ui import PropertyPanel
 
 
@@ -32,7 +33,7 @@ class WorldButtonsPanel():
         return (context.world and context.scene.render.engine in cls.COMPAT_ENGINES)
 
 
-class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_context_world(WorldButtonsPanel, Panel):
     bl_label = ""
     bl_options = {'HIDE_HEADER'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -61,7 +62,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
             split.label(text=str(texture_count), icon='TEXTURE')
 
 
-class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_preview(WorldButtonsPanel, Panel):
     bl_label = "Preview"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -74,7 +75,7 @@ class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
         self.layout.template_preview(context.world)
 
 
-class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_world(WorldButtonsPanel, Panel):
     bl_label = "World"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -99,7 +100,7 @@ class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
         row.prop(world, "color_range")
 
 
-class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_ambient_occlusion(WorldButtonsPanel, Panel):
     bl_label = "Ambient Occlusion"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -118,7 +119,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel):
         split.prop(light, "ao_blend_type", text="")
 
 
-class WORLD_PT_environment_lighting(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_environment_lighting(WorldButtonsPanel, Panel):
     bl_label = "Environment Lighting"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -137,7 +138,7 @@ class WORLD_PT_environment_lighting(WorldButtonsPanel, bpy.types.Panel):
         split.prop(light, "environment_color", text="")
 
 
-class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_indirect_lighting(WorldButtonsPanel, Panel):
     bl_label = "Indirect Lighting"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -159,7 +160,7 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
             layout.label(text="Only works with Approximate gather method")
 
 
-class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_gather(WorldButtonsPanel, Panel):
     bl_label = "Gather"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -207,7 +208,7 @@ class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
             col.prop(light, "correction")
 
 
-class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_mist(WorldButtonsPanel, Panel):
     bl_label = "Mist"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -236,7 +237,7 @@ class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
         layout.prop(world.mist_settings, "falloff")
 
 
-class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
+class WORLD_PT_stars(WorldButtonsPanel, Panel):
     bl_label = "Stars"
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -263,7 +264,7 @@ class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
         col.prop(world.star_settings, "average_separation", text="Separation")
 
 
-class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
+class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     _context_path = "world"
     _property_type = bpy.types.World
index da6c102100b4e8c0c4286af3d7dbcebb17c4f066..d457a66def8340fb239dedb58f7bf1bf7da81725 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header, Menu, Operator
 from bpy.props import StringProperty
 
 
-class CONSOLE_HT_header(bpy.types.Header):
+class CONSOLE_HT_header(Header):
     bl_space_type = 'CONSOLE'
 
     def draw(self, context):
-        layout = self.layout
+        layout = self.layout.row(align=True)
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         if context.area.show_menus:
-            sub = row.row(align=True)
-            sub.menu("CONSOLE_MT_console")
+            layout.menu("CONSOLE_MT_console")
 
-        row = layout.row(align=True)
-        row.operator("console.autocomplete", text="Autocomplete")
+        layout.operator("console.autocomplete", text="Autocomplete")
 
 
-class CONSOLE_MT_console(bpy.types.Menu):
+class CONSOLE_MT_console(Menu):
     bl_label = "Console"
 
     def draw(self, context):
         layout = self.layout
-        layout.column()
+        
         layout.operator("console.clear")
         layout.operator("console.copy")
         layout.operator("console.paste")
@@ -55,7 +53,7 @@ class CONSOLE_MT_console(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class CONSOLE_MT_language(bpy.types.Menu):
+class CONSOLE_MT_language(Menu):
     bl_label = "Languages..."
 
     def draw(self, context):
@@ -82,7 +80,7 @@ def add_scrollback(text, text_type):
             type=text_type)
 
 
-class ConsoleExec(bpy.types.Operator):
+class ConsoleExec(Operator):
     '''Execute the current console line as a python expression'''
     bl_idname = "console.execute"
     bl_label = "Console Execute"
@@ -100,7 +98,7 @@ class ConsoleExec(bpy.types.Operator):
             return {'FINISHED'}
 
 
-class ConsoleAutocomplete(bpy.types.Operator):
+class ConsoleAutocomplete(Operator):
     '''Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one'''
     bl_idname = "console.autocomplete"
     bl_label = "Console Autocomplete"
@@ -117,7 +115,7 @@ class ConsoleAutocomplete(bpy.types.Operator):
             return {'FINISHED'}
 
 
-class ConsoleBanner(bpy.types.Operator):
+class ConsoleBanner(Operator):
     '''Print a message whem the terminal initializes'''
     bl_idname = "console.banner"
     bl_label = "Console Banner"
@@ -139,7 +137,7 @@ class ConsoleBanner(bpy.types.Operator):
             return {'FINISHED'}
 
 
-class ConsoleLanguage(bpy.types.Operator):
+class ConsoleLanguage(Operator):
     '''Set the current language for this console'''
     bl_idname = "console.language"
     bl_label = "Console Language"
index 930a2029d3213d521b895d1fbfa4a3987a5058c0..dfbd7b3ae14a14ab8fc5737f895223aa2ce7035a 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 
 import bpy
+from bpy.types import Header, Menu
 
 
 #######################################
@@ -84,7 +85,7 @@ def dopesheet_filter(layout, context, genericFiltersOnly=False):
 #######################################
 # DopeSheet Editor - General/Standard UI
 
-class DOPESHEET_HT_header(bpy.types.Header):
+class DOPESHEET_HT_header(Header):
     bl_space_type = 'DOPESHEET_EDITOR'
 
     def draw(self, context):
@@ -96,21 +97,19 @@ class DOPESHEET_HT_header(bpy.types.Header):
         row.template_header()
 
         if context.area.show_menus:
-            sub = row.row(align=True)
-
-            sub.menu("DOPESHEET_MT_view")
-            sub.menu("DOPESHEET_MT_select")
-            sub.menu("DOPESHEET_MT_marker")
+            row.menu("DOPESHEET_MT_view")
+            row.menu("DOPESHEET_MT_select")
+            row.menu("DOPESHEET_MT_marker")
 
             if st.mode == 'DOPESHEET' or (st.mode == 'ACTION' and st.action != None):
-                sub.menu("DOPESHEET_MT_channel")
+                row.menu("DOPESHEET_MT_channel")
             elif st.mode == 'GPENCIL':
-                sub.menu("DOPESHEET_MT_gpencil_channel")
+                row.menu("DOPESHEET_MT_gpencil_channel")
 
             if st.mode != 'GPENCIL':
-                sub.menu("DOPESHEET_MT_key")
+                row.menu("DOPESHEET_MT_key")
             else:
-                sub.menu("DOPESHEET_MT_gpencil_frame")
+                row.menu("DOPESHEET_MT_gpencil_frame")
 
         layout.prop(st, "mode", text="")
         layout.prop(st.dopesheet, "show_summary", text="Summary")
@@ -134,7 +133,7 @@ class DOPESHEET_HT_header(bpy.types.Header):
         row.operator("action.paste", text="", icon='PASTEDOWN')
 
 
-class DOPESHEET_MT_view(bpy.types.Menu):
+class DOPESHEET_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
@@ -142,8 +141,6 @@ class DOPESHEET_MT_view(bpy.types.Menu):
 
         st = context.space_data
 
-        layout.column()
-
         layout.prop(st, "use_realtime_update")
         layout.prop(st, "show_frame_indicator")
         layout.prop(st, "show_sliders")
@@ -170,13 +167,12 @@ class DOPESHEET_MT_view(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class DOPESHEET_MT_select(bpy.types.Menu):
+class DOPESHEET_MT_select(Menu):
     bl_label = "Select"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
         layout.operator("action.select_all_toggle")
         layout.operator("action.select_all_toggle", text="Invert Selection").invert = True
@@ -206,7 +202,7 @@ class DOPESHEET_MT_select(bpy.types.Menu):
             layout.operator("action.select_linked")
 
 
-class DOPESHEET_MT_marker(bpy.types.Menu):
+class DOPESHEET_MT_marker(Menu):
     bl_label = "Marker"
 
     def draw(self, context):
@@ -216,7 +212,6 @@ class DOPESHEET_MT_marker(bpy.types.Menu):
 
         #layout.operator_context = 'EXEC_REGION_WIN'
 
-        layout.column()
         layout.operator("marker.add", "Add Marker")
         layout.operator("marker.duplicate", text="Duplicate Marker")
         layout.operator("marker.delete", text="Delete Marker")
@@ -237,7 +232,7 @@ class DOPESHEET_MT_marker(bpy.types.Menu):
 #######################################
 # Keyframe Editing
 
-class DOPESHEET_MT_channel(bpy.types.Menu):
+class DOPESHEET_MT_channel(Menu):
     bl_label = "Channel"
 
     def draw(self, context):
@@ -245,7 +240,6 @@ class DOPESHEET_MT_channel(bpy.types.Menu):
 
         layout.operator_context = 'INVOKE_REGION_CHANNELS'
 
-        layout.column()
         layout.operator("anim.channels_delete")
 
         layout.separator()
@@ -268,13 +262,12 @@ class DOPESHEET_MT_channel(bpy.types.Menu):
         layout.operator("anim.channels_fcurves_enable")
 
 
-class DOPESHEET_MT_key(bpy.types.Menu):
+class DOPESHEET_MT_key(Menu):
     bl_label = "Key"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         layout.menu("DOPESHEET_MT_key_transform", text="Transform")
 
         layout.operator_menu_enum("action.snap", "type", text="Snap")
@@ -301,13 +294,12 @@ class DOPESHEET_MT_key(bpy.types.Menu):
         layout.operator("action.paste")
 
 
-class DOPESHEET_MT_key_transform(bpy.types.Menu):
+class DOPESHEET_MT_key_transform(Menu):
     bl_label = "Transform"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         layout.operator("transform.transform", text="Grab/Move").mode = 'TIME_TRANSLATE'
         layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
         layout.operator("transform.transform", text="Slide").mode = 'TIME_SLIDE'
@@ -317,7 +309,7 @@ class DOPESHEET_MT_key_transform(bpy.types.Menu):
 #######################################
 # Grease Pencil Editing
 
-class DOPESHEET_MT_gpencil_channel(bpy.types.Menu):
+class DOPESHEET_MT_gpencil_channel(Menu):
     bl_label = "Channel"
 
     def draw(self, context):
@@ -325,7 +317,6 @@ class DOPESHEET_MT_gpencil_channel(bpy.types.Menu):
 
         layout.operator_context = 'INVOKE_REGION_CHANNELS'
 
-        layout.column()
         layout.operator("anim.channels_delete")
 
         layout.separator()
@@ -345,13 +336,12 @@ class DOPESHEET_MT_gpencil_channel(bpy.types.Menu):
         #layout.operator_menu_enum("anim.channels_move", "direction", text="Move...")
 
 
-class DOPESHEET_MT_gpencil_frame(bpy.types.Menu):
+class DOPESHEET_MT_gpencil_frame(Menu):
     bl_label = "Frame"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         layout.menu("DOPESHEET_MT_key_transform", text="Transform")
 
         #layout.operator_menu_enum("action.snap", "type", text="Snap")
index 73fe1a972525056ed9eaf3812c4ebe8e63fac6db..cf0d10c58448b39a0b1174e219b943307ec3fb2e 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header
 
 
-class FILEBROWSER_HT_header(bpy.types.Header):
+class FILEBROWSER_HT_header(Header):
     bl_space_type = 'FILE_BROWSER'
 
     def draw(self, context):
index bfc1a0e3a23bb8942f6da6a46b5697f2dffc0956..c379ea95ea2eba193ae37c43dd42770559202383 100644 (file)
 # <pep8 compliant>
 
 import bpy
+from bpy.types import Header, Menu
 
 
-class GRAPH_HT_header(bpy.types.Header):
+class GRAPH_HT_header(Header):
     bl_space_type = 'GRAPH_EDITOR'
 
     def draw(self, context):
@@ -35,13 +36,11 @@ class GRAPH_HT_header(bpy.types.Header):
         row.template_header()
 
         if context.area.show_menus:
-            sub = row.row(align=True)
-
-            sub.menu("GRAPH_MT_view")
-            sub.menu("GRAPH_MT_select")
-            sub.menu("GRAPH_MT_marker")
-            sub.menu("GRAPH_MT_channel")
-            sub.menu("GRAPH_MT_key")
+            row.menu("GRAPH_MT_view")
+            row.menu("GRAPH_MT_select")
+            row.menu("GRAPH_MT_marker")
+            row.menu("GRAPH_MT_channel")
+            row.menu("GRAPH_MT_key")
 
         layout.prop(st, "mode", text="")
 
@@ -61,7 +60,7 @@ class GRAPH_HT_header(bpy.types.Header):
             row.operator("graph.ghost_curves_create", text="", icon='GHOST_ENABLED')
 
 
-class GRAPH_MT_view(bpy.types.Menu):
+class GRAPH_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
@@ -69,8 +68,6 @@ class GRAPH_MT_view(bpy.types.Menu):
 
         st = context.space_data
 
-        layout.column()
-
         layout.operator("graph.properties", icon='MENU_PANEL')
         layout.separator()
 
@@ -107,13 +104,12 @@ class GRAPH_MT_view(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class GRAPH_MT_select(bpy.types.Menu):
+class GRAPH_MT_select(Menu):
     bl_label = "Select"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
         layout.operator("graph.select_all_toggle")
         layout.operator("graph.select_all_toggle", text="Invert Selection").invert = True
@@ -142,7 +138,7 @@ class GRAPH_MT_select(bpy.types.Menu):
         layout.operator("graph.select_linked")
 
 
-class GRAPH_MT_marker(bpy.types.Menu):
+class GRAPH_MT_marker(Menu):
     bl_label = "Marker"
 
     def draw(self, context):
@@ -150,7 +146,6 @@ class GRAPH_MT_marker(bpy.types.Menu):
 
         #layout.operator_context = 'EXEC_REGION_WIN'
 
-        layout.column()
         layout.operator("marker.add", "Add Marker")
         layout.operator("marker.duplicate", text="Duplicate Marker")
         layout.operator("marker.delete", text="Delete Marker")
@@ -163,7 +158,7 @@ class GRAPH_MT_marker(bpy.types.Menu):
         # TODO: pose markers for action edit mode only?
 
 
-class GRAPH_MT_channel(bpy.types.Menu):
+class GRAPH_MT_channel(Menu):
     bl_label = "Channel"
 
     def draw(self, context):
@@ -171,7 +166,6 @@ class GRAPH_MT_channel(bpy.types.Menu):
 
         layout.operator_context = 'INVOKE_REGION_CHANNELS'
 
-        layout.column()
         layout.operator("anim.channels_delete")
 
         layout.separator()
@@ -195,13 +189,12 @@ class GRAPH_MT_channel(bpy.types.Menu):
         layout.operator("anim.channels_fcurves_enable")
 
 
-class GRAPH_MT_key(bpy.types.Menu):
+class GRAPH_MT_key(Menu):
     bl_label = "Key"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         layout.menu("GRAPH_MT_key_transform", text="Transform")
 
         layout.operator_menu_enum("graph.snap", "type", text="Snap")
@@ -234,13 +227,12 @@ class GRAPH_MT_key(bpy.types.Menu):
         layout.operator("graph.euler_filter", text="Discontinuity (Euler) Filter")
 
 
-class GRAPH_MT_key_transform(bpy.types.Menu):
+class GRAPH_MT_key_transform(Menu):
     bl_label = "Transform"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         layout.operator("transform.translate", text="Grab/Move")
         layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
         layout.operator("transform.rotate", text="Rotate")
index fa5579ea2e0f5ad2ebb584c0562da3171453f7f7..5d72482ce9c4bdc60b8d02e5115f66c0c8182b54 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header, Menu, Panel
 
 
 class BrushButtonsPanel():
@@ -31,7 +32,7 @@ class BrushButtonsPanel():
         return sima.show_paint and toolsettings.brush
 
 
-class IMAGE_MT_view(bpy.types.Menu):
+class IMAGE_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
@@ -79,7 +80,7 @@ class IMAGE_MT_view(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class IMAGE_MT_select(bpy.types.Menu):
+class IMAGE_MT_select(Menu):
     bl_label = "Select"
 
     def draw(self, context):
@@ -100,7 +101,7 @@ class IMAGE_MT_select(bpy.types.Menu):
         layout.operator("uv.select_linked")
 
 
-class IMAGE_MT_image(bpy.types.Menu):
+class IMAGE_MT_image(Menu):
     bl_label = "Image"
 
     def draw(self, context):
@@ -151,7 +152,7 @@ class IMAGE_MT_image(bpy.types.Menu):
             layout.prop(sima, "use_image_paint")
 
 
-class IMAGE_MT_image_invert(bpy.types.Menu):
+class IMAGE_MT_image_invert(Menu):
     bl_label = "Invert"
 
     def draw(self, context):
@@ -177,7 +178,7 @@ class IMAGE_MT_image_invert(bpy.types.Menu):
         op.invert_a = True
 
 
-class IMAGE_MT_uvs_showhide(bpy.types.Menu):
+class IMAGE_MT_uvs_showhide(Menu):
     bl_label = "Show/Hide Faces"
 
     def draw(self, context):
@@ -188,7 +189,7 @@ class IMAGE_MT_uvs_showhide(bpy.types.Menu):
         layout.operator("uv.hide", text="Hide Unselected").unselected = True
 
 
-class IMAGE_MT_uvs_transform(bpy.types.Menu):
+class IMAGE_MT_uvs_transform(Menu):
     bl_label = "Transform"
 
     def draw(self, context):
@@ -203,7 +204,7 @@ class IMAGE_MT_uvs_transform(bpy.types.Menu):
         layout.operator("transform.shear")
 
 
-class IMAGE_MT_uvs_snap(bpy.types.Menu):
+class IMAGE_MT_uvs_snap(Menu):
     bl_label = "Snap"
 
     def draw(self, context):
@@ -220,7 +221,7 @@ class IMAGE_MT_uvs_snap(bpy.types.Menu):
         layout.operator("uv.snap_cursor", text="Cursor to Selected").target = 'SELECTED'
 
 
-class IMAGE_MT_uvs_mirror(bpy.types.Menu):
+class IMAGE_MT_uvs_mirror(Menu):
     bl_label = "Mirror"
 
     def draw(self, context):
@@ -231,7 +232,7 @@ class IMAGE_MT_uvs_mirror(bpy.types.Menu):
         layout.operator("transform.mirror", text="Y Axis").constraint_axis[1] = True
 
 
-class IMAGE_MT_uvs_weldalign(bpy.types.Menu):
+class IMAGE_MT_uvs_weldalign(Menu):
     bl_label = "Weld/Align"
 
     def draw(self, context):
@@ -241,7 +242,7 @@ class IMAGE_MT_uvs_weldalign(bpy.types.Menu):
         layout.operator_enum("uv.align", "axis")  # W, 2/3/4
 
 
-class IMAGE_MT_uvs(bpy.types.Menu):
+class IMAGE_MT_uvs(Menu):
     bl_label = "UVs"
 
     def draw(self, context):
@@ -286,7 +287,7 @@ class IMAGE_MT_uvs(bpy.types.Menu):
         layout.menu("IMAGE_MT_uvs_showhide")
 
 
-class IMAGE_MT_uvs_select_mode(bpy.types.Menu):
+class IMAGE_MT_uvs_select_mode(Menu):
     bl_label = "UV Select Mode"
 
     def draw(self, context):
@@ -328,7 +329,7 @@ class IMAGE_MT_uvs_select_mode(bpy.types.Menu):
             prop.data_path = "tool_settings.uv_select_mode"
 
 
-class IMAGE_HT_header(bpy.types.Header):
+class IMAGE_HT_header(Header):
     bl_space_type = 'IMAGE_EDITOR'
 
     def draw(self, context):
@@ -412,7 +413,7 @@ class IMAGE_HT_header(bpy.types.Header):
             layout.prop(sima, "use_realtime_update", text="", icon_only=True, icon='LOCKED')
 
 
-class IMAGE_PT_image_properties(bpy.types.Panel):
+class IMAGE_PT_image_properties(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'
     bl_label = "Image"
@@ -431,7 +432,7 @@ class IMAGE_PT_image_properties(bpy.types.Panel):
         layout.template_image(sima, "image", iuser)
 
 
-class IMAGE_PT_game_properties(bpy.types.Panel):
+class IMAGE_PT_game_properties(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'
     bl_label = "Game Properties"
@@ -451,15 +452,13 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-
+        
+        col.prop(ima, "use_animation")
         sub = col.column(align=True)
-        sub.prop(ima, "use_animation")
-
-        subsub = sub.column()
-        subsub.active = ima.use_animation
-        subsub.prop(ima, "frame_start", text="Start")
-        subsub.prop(ima, "frame_end", text="End")
-        subsub.prop(ima, "fps", text="Speed")
+        sub.active = ima.use_animation
+        sub.prop(ima, "frame_start", text="Start")
+        sub.prop(ima, "frame_end", text="End")
+        sub.prop(ima, "fps", text="Speed")
 
         col.prop(ima, "use_tiles")
         sub = col.column(align=True)
@@ -475,7 +474,7 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
         col.prop(ima, "mapping", expand=True)
 
 
-class IMAGE_PT_view_histogram(bpy.types.Panel):
+class IMAGE_PT_view_histogram(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'PREVIEW'
     bl_label = "Histogram"
@@ -494,7 +493,7 @@ class IMAGE_PT_view_histogram(bpy.types.Panel):
         layout.prop(sima.scopes.histogram, "mode", icon_only=True)
 
 
-class IMAGE_PT_view_waveform(bpy.types.Panel):
+class IMAGE_PT_view_waveform(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'PREVIEW'
     bl_label = "Waveform"
@@ -508,13 +507,14 @@ class IMAGE_PT_view_waveform(bpy.types.Panel):
         layout = self.layout
 
         sima = context.space_data
+        
         layout.template_waveform(sima, "scopes")
-        sub = layout.row().split(percentage=0.75)
-        sub.prop(sima.scopes, "waveform_alpha")
-        sub.prop(sima.scopes, "waveform_mode", text="", icon_only=True)
+        row = layout.split(percentage=0.75)
+        row.prop(sima.scopes, "waveform_alpha")
+        row.prop(sima.scopes, "waveform_mode", text="", icon_only=True)
 
 
-class IMAGE_PT_view_vectorscope(bpy.types.Panel):
+class IMAGE_PT_view_vectorscope(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'PREVIEW'
     bl_label = "Vectorscope"
@@ -532,7 +532,7 @@ class IMAGE_PT_view_vectorscope(bpy.types.Panel):
         layout.prop(sima.scopes, "vectorscope_alpha")
 
 
-class IMAGE_PT_sample_line(bpy.types.Panel):
+class IMAGE_PT_sample_line(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'PREVIEW'
     bl_label = "Sample Line"
@@ -544,13 +544,15 @@ class IMAGE_PT_sample_line(bpy.types.Panel):
 
     def draw(self, context):
         layout = self.layout
-        layout.operator("image.sample_line")
+        
         sima = context.space_data
+        
+        layout.operator("image.sample_line")
         layout.template_histogram(sima, "sample_histogram")
         layout.prop(sima.sample_histogram, "mode")
 
 
-class IMAGE_PT_scope_sample(bpy.types.Panel):
+class IMAGE_PT_scope_sample(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'PREVIEW'
     bl_label = "Scope Samples"
@@ -562,16 +564,17 @@ class IMAGE_PT_scope_sample(bpy.types.Panel):
 
     def draw(self, context):
         layout = self.layout
+        
         sima = context.space_data
-        split = layout.split()
-        row = split.row()
+        
+        row = layout.row()
         row.prop(sima.scopes, "use_full_resolution")
-        row = split.row()
-        row.active = not sima.scopes.use_full_resolution
-        row.prop(sima.scopes, "accuracy")
+        sub = row.row()
+        sub.active = not sima.scopes.use_full_resolution
+        sub.prop(sima.scopes, "accuracy")
 
 
-class IMAGE_PT_view_properties(bpy.types.Panel):
+class IMAGE_PT_view_properties(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'
     bl_label = "Display"
@@ -608,16 +611,16 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
         if show_uvedit:
 
             col = layout.column()
-            col.label("Cursor Location")
-            row = col.row()
-            row.prop(uvedit, "cursor_location", text="")
-
-            col = layout.column()
+            col.label("Cursor Location:")
+            col.row().prop(uvedit, "cursor_location", text="")
+            
+            col.separator()
+            
             col.label(text="UVs:")
-            row = col.row()
-            row.prop(uvedit, "edge_draw_type", expand=True)
+            col.row().prop(uvedit, "edge_draw_type", expand=True)
 
             split = layout.split()
+            
             col = split.column()
             col.prop(uvedit, "show_faces")
             col.prop(uvedit, "show_smooth_edges", text="Smooth")
@@ -630,7 +633,7 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
             sub.row().prop(uvedit, "draw_stretch_type", expand=True)
 
 
-class IMAGE_PT_paint(bpy.types.Panel):
+class IMAGE_PT_paint(Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'
     bl_label = "Paint"
@@ -646,9 +649,8 @@ class IMAGE_PT_paint(bpy.types.Panel):
         toolsettings = context.tool_settings.image_paint
         brush = toolsettings.brush
 
-        col = layout.split().column()
-        row = col.row()
-        col.template_ID_preview(toolsettings, "brush", new="brush.add", rows=3, cols=8)
+        col = layout.column()
+        col.template_ID_preview(toolsettings, "brush", new="brush.add", rows=2, cols=6)
 
         if brush:
             col = layout.column()
@@ -675,7 +677,7 @@ class IMAGE_PT_paint(bpy.types.Panel):
                 col.prop(brush, "clone_alpha", text="Alpha")
 
 
-class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, bpy.types.Panel):
+class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
     bl_label = "Texture"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -690,7 +692,7 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, bpy.types.Panel):
         col.prop(brush, "use_fixed_texture")
 
 
-class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, bpy.types.Panel):
+class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, Panel):
     bl_label = "Tool"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -699,9 +701,7 @@ class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, bpy.types.Panel):
         settings = context.tool_settings.image_paint
         brush = settings.brush
 
-        col = layout.column(align=True)
-
-        col.prop(brush, "image_tool", expand=False, text="")
+        layout.prop(brush, "image_tool", text="")
 
         row = layout.row(align=True)
         row.prop(brush, "use_paint_sculpt", text="", icon='SCULPTMODE_HLT')
@@ -710,7 +710,7 @@ class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, bpy.types.Panel):
         row.prop(brush, "use_paint_image", text="", icon='TPAINT_HLT')
 
 
-class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel):
+class IMAGE_PT_paint_stroke(BrushButtonsPanel, Panel):
     bl_label = "Paint Stroke"
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -721,9 +721,9 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel):
         brush = toolsettings.brush
 
         layout.prop(brush, "use_airbrush")
-        col = layout.column()
-        col.active = brush.use_airbrush
-        col.prop(brush, "rate", slider=True)
+        row = layout.row()
+        row.active = brush.use_airbrush
+        row.prop(brush, "rate", slider=True)
 
         layout.prop(brush, "use_space")
         row = layout.row(align=True)
@@ -734,7 +734,7 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel):
         layout.prop(brush, "use_wrap")
 
 
-class IMAGE_PT_paint_curve(BrushButtonsPanel, bpy.types.Panel):
+class IMAGE_PT_paint_curve(BrushButtonsPanel, Panel):
     bl_label = "Paint Curve"
     bl_options = {'DEFAULT_CLOSED'}
 
index f66cee7f431ba24516891a4c905f1d442a00f4d4..38c1e24f27ee81cfe5c7b43ffa3efd2ca97c7bec 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header, Menu, Operator
 
 
-class INFO_HT_header(bpy.types.Header):
+class INFO_HT_header(Header):
     bl_space_type = 'INFO'
 
     def draw(self, context):
@@ -86,19 +87,19 @@ class INFO_HT_header(bpy.types.Header):
         """
 
 
-class INFO_MT_report(bpy.types.Menu):
+class INFO_MT_report(Menu):
     bl_label = "Report"
 
     def draw(self, context):
         layout = self.layout
-        layout.column()
+
         layout.operator("console.select_all_toggle")
         layout.operator("console.select_border")
         layout.operator("console.report_delete")
         layout.operator("console.report_copy")
 
 
-class INFO_MT_file(bpy.types.Menu):
+class INFO_MT_file(Menu):
     bl_label = "File"
 
     def draw(self, context):
@@ -152,7 +153,7 @@ class INFO_MT_file(bpy.types.Menu):
         layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
 
 
-class INFO_MT_file_import(bpy.types.Menu):
+class INFO_MT_file_import(Menu):
     bl_idname = "INFO_MT_file_import"
     bl_label = "Import"
 
@@ -161,7 +162,7 @@ class INFO_MT_file_import(bpy.types.Menu):
             self.layout.operator("wm.collada_import", text="COLLADA (.dae)")
 
 
-class INFO_MT_file_export(bpy.types.Menu):
+class INFO_MT_file_export(Menu):
     bl_idname = "INFO_MT_file_export"
     bl_label = "Export"
 
@@ -170,7 +171,7 @@ class INFO_MT_file_export(bpy.types.Menu):
             self.layout.operator("wm.collada_export", text="COLLADA (.dae)")
 
 
-class INFO_MT_file_external_data(bpy.types.Menu):
+class INFO_MT_file_external_data(Menu):
     bl_label = "External Data"
 
     def draw(self, context):
@@ -187,12 +188,13 @@ class INFO_MT_file_external_data(bpy.types.Menu):
         layout.operator("file.find_missing_files")
 
 
-class INFO_MT_mesh_add(bpy.types.Menu):
+class INFO_MT_mesh_add(Menu):
     bl_idname = "INFO_MT_mesh_add"
     bl_label = "Mesh"
 
     def draw(self, context):
         layout = self.layout
+        
         layout.operator_context = 'INVOKE_REGION_WIN'
         layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane")
         layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube")
@@ -207,12 +209,13 @@ class INFO_MT_mesh_add(bpy.types.Menu):
         layout.operator("mesh.primitive_torus_add", text="Torus", icon='MESH_TORUS')
 
 
-class INFO_MT_curve_add(bpy.types.Menu):
+class INFO_MT_curve_add(Menu):
     bl_idname = "INFO_MT_curve_add"
     bl_label = "Curve"
 
     def draw(self, context):
         layout = self.layout
+        
         layout.operator_context = 'INVOKE_REGION_WIN'
         layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
         layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
@@ -221,7 +224,7 @@ class INFO_MT_curve_add(bpy.types.Menu):
         layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path")
 
 
-class INFO_MT_edit_curve_add(bpy.types.Menu):
+class INFO_MT_edit_curve_add(Menu):
     bl_idname = "INFO_MT_edit_curve_add"
     bl_label = "Add"
 
@@ -237,12 +240,13 @@ class INFO_MT_edit_curve_add(bpy.types.Menu):
             INFO_MT_curve_add.draw(self, context)
 
 
-class INFO_MT_surface_add(bpy.types.Menu):
+class INFO_MT_surface_add(Menu):
     bl_idname = "INFO_MT_surface_add"
     bl_label = "Surface"
 
     def draw(self, context):
         layout = self.layout
+        
         layout.operator_context = 'INVOKE_REGION_WIN'
         layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
         layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
@@ -252,17 +256,18 @@ class INFO_MT_surface_add(bpy.types.Menu):
         layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus")
 
 
-class INFO_MT_armature_add(bpy.types.Menu):
+class INFO_MT_armature_add(Menu):
     bl_idname = "INFO_MT_armature_add"
     bl_label = "Armature"
 
     def draw(self, context):
         layout = self.layout
+        
         layout.operator_context = 'INVOKE_REGION_WIN'
         layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
 
 
-class INFO_MT_add(bpy.types.Menu):
+class INFO_MT_add(Menu):
     bl_label = "Add"
 
     def draw(self, context):
@@ -302,7 +307,7 @@ class INFO_MT_add(bpy.types.Menu):
             layout.operator_menu_enum("object.group_instance_add", "group", text="Group Instance", icon='OUTLINER_OB_EMPTY')
 
 
-class INFO_MT_game(bpy.types.Menu):
+class INFO_MT_game(Menu):
     bl_label = "Game"
 
     def draw(self, context):
@@ -323,7 +328,7 @@ class INFO_MT_game(bpy.types.Menu):
         layout.prop(gs, "use_auto_start")
 
 
-class INFO_MT_render(bpy.types.Menu):
+class INFO_MT_render(Menu):
     bl_label = "Render"
 
     def draw(self, context):
@@ -343,7 +348,7 @@ class INFO_MT_render(bpy.types.Menu):
         layout.operator("render.play_rendered_anim")
 
 
-class INFO_MT_help(bpy.types.Menu):
+class INFO_MT_help(Menu):
     bl_label = "Help"
 
     def draw(self, context):
@@ -352,7 +357,7 @@ class INFO_MT_help(bpy.types.Menu):
         layout = self.layout
 
         layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
-        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-258/'
+        layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-259/'
 
         layout.separator()
 
@@ -379,7 +384,7 @@ class INFO_MT_help(bpy.types.Menu):
 # Help operators
 
 
-class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
+class HELP_OT_operator_cheat_sheet(Operator):
     bl_idname = "help.operator_cheat_sheet"
     bl_label = "Operator Cheat Sheet"
 
index 7f7aba71a467e12b9aa935ed359301eee6c47625..869a91124d3ed903be66cb6c1f412b6267ef824d 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header, Menu, Panel
 
 
-class LOGIC_PT_properties(bpy.types.Panel):
+class LOGIC_PT_properties(Panel):
     bl_space_type = 'LOGIC_EDITOR'
     bl_region_type = 'UI'
     bl_label = "Properties"
@@ -49,7 +50,7 @@ class LOGIC_PT_properties(bpy.types.Panel):
             row.operator("object.game_property_remove", text="", icon='X', emboss=False).index = i
 
 
-class LOGIC_MT_logicbricks_add(bpy.types.Menu):
+class LOGIC_MT_logicbricks_add(Menu):
     bl_label = "Add"
 
     def draw(self, context):
@@ -60,30 +61,24 @@ class LOGIC_MT_logicbricks_add(bpy.types.Menu):
         layout.operator_menu_enum("logic.actuator_add", "type", text="Actuator")
 
 
-class LOGIC_HT_header(bpy.types.Header):
+class LOGIC_HT_header(Header):
     bl_space_type = 'LOGIC_EDITOR'
 
     def draw(self, context):
-        layout = self.layout
+        layout = self.layout.row(align=True)
 
-        row = layout.row(align=True)
-        row.template_header()
+        layout.template_header()
 
         if context.area.show_menus:
-            sub = row.row(align=True)
-            sub.menu("LOGIC_MT_view")
-            #sub.menu("LOGIC_MT_select")
-            #sub.menu("LOGIC_MT_add")
+            layout.menu("LOGIC_MT_view")
 
 
-class LOGIC_MT_view(bpy.types.Menu):
+class LOGIC_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
-
         layout.operator("logic.properties", icon='MENU_PANEL')
 
 if __name__ == "__main__":  # only for live edit.
index 717adb3baa8a0c5efdbd77309972a760e2c8d8f9..c69af2c9a60982809b50556065be45d648c2f36d 100644 (file)
 # <pep8 compliant>
 
 import bpy
+from bpy.types import Header, Menu
 
 
-class NLA_HT_header(bpy.types.Header):
+class NLA_HT_header(Header):
     bl_space_type = 'NLA_EDITOR'
 
     def draw(self, context):
@@ -35,20 +36,18 @@ class NLA_HT_header(bpy.types.Header):
         row.template_header()
 
         if context.area.show_menus:
-            sub = row.row(align=True)
-
-            sub.menu("NLA_MT_view")
-            sub.menu("NLA_MT_select")
-            sub.menu("NLA_MT_marker")
-            sub.menu("NLA_MT_edit")
-            sub.menu("NLA_MT_add")
+            row.menu("NLA_MT_view")
+            row.menu("NLA_MT_select")
+            row.menu("NLA_MT_marker")
+            row.menu("NLA_MT_edit")
+            row.menu("NLA_MT_add")
 
         dopesheet_filter(layout, context)
 
         layout.prop(st, "auto_snap", text="")
 
 
-class NLA_MT_view(bpy.types.Menu):
+class NLA_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
@@ -56,8 +55,6 @@ class NLA_MT_view(bpy.types.Menu):
 
         st = context.space_data
 
-        layout.column()
-
         layout.operator("nla.properties", icon='MENU_PANEL')
 
         layout.separator()
@@ -78,13 +75,12 @@ class NLA_MT_view(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class NLA_MT_select(bpy.types.Menu):
+class NLA_MT_select(Menu):
     bl_label = "Select"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None
         layout.operator("nla.select_all_toggle")
         layout.operator("nla.select_all_toggle", text="Invert Selection").invert = True
@@ -98,7 +94,7 @@ class NLA_MT_select(bpy.types.Menu):
         layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT'
 
 
-class NLA_MT_marker(bpy.types.Menu):
+class NLA_MT_marker(Menu):
     bl_label = "Marker"
 
     def draw(self, context):
@@ -106,7 +102,6 @@ class NLA_MT_marker(bpy.types.Menu):
 
         #layout.operator_context = 'EXEC_REGION_WIN'
 
-        layout.column()
         layout.operator("marker.add", "Add Marker")
         layout.operator("marker.duplicate", text="Duplicate Marker")
         layout.operator("marker.delete", text="Delete Marker")
@@ -117,7 +112,7 @@ class NLA_MT_marker(bpy.types.Menu):
         layout.operator("marker.move", text="Grab/Move Marker")
 
 
-class NLA_MT_edit(bpy.types.Menu):
+class NLA_MT_edit(Menu):
     bl_label = "Edit"
 
     def draw(self, context):
@@ -125,7 +120,6 @@ class NLA_MT_edit(bpy.types.Menu):
 
         scene = context.scene
 
-        layout.column()
         layout.menu("NLA_MT_edit_transform", text="Transform")
 
         layout.operator_menu_enum("nla.snap", "type", text="Snap")
@@ -160,13 +154,12 @@ class NLA_MT_edit(bpy.types.Menu):
             layout.operator("nla.tweakmode_enter", text="Start Tweaking Strip Actions")
 
 
-class NLA_MT_add(bpy.types.Menu):
+class NLA_MT_add(Menu):
     bl_label = "Add"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         layout.operator("nla.actionclip_add")
         layout.operator("nla.transition_add")
 
@@ -179,13 +172,12 @@ class NLA_MT_add(bpy.types.Menu):
         layout.operator("nla.tracks_add", text="Add Tracks Above Selected").above_selected = True
 
 
-class NLA_MT_edit_transform(bpy.types.Menu):
+class NLA_MT_edit_transform(Menu):
     bl_label = "Transform"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         layout.operator("transform.translate", text="Grab/Move")
         layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND'
         layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE'
index abeee984fac34e2f4b6cd342f0340cd87af7fa06..96744cf19694d8d85b74bd6a918fc6c83a26b761 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header, Menu, Panel
 
 
-class NODE_HT_header(bpy.types.Header):
+class NODE_HT_header(Header):
     bl_space_type = 'NODE_EDITOR'
 
     def draw(self, context):
         layout = self.layout
 
         snode = context.space_data
+        snode_id = snode.id
+        id_from = snode.id_from
 
         row = layout.row(align=True)
         row.template_header()
 
         if context.area.show_menus:
-            sub = row.row(align=True)
-            sub.menu("NODE_MT_view")
-            sub.menu("NODE_MT_select")
-            sub.menu("NODE_MT_add")
-            sub.menu("NODE_MT_node")
+            row.menu("NODE_MT_view")
+            row.menu("NODE_MT_select")
+            row.menu("NODE_MT_add")
+            row.menu("NODE_MT_node")
 
-        row = layout.row()
-        row.prop(snode, "tree_type", text="", expand=True)
+        layout.prop(snode, "tree_type", text="", expand=True)
 
         if snode.tree_type == 'SHADER':
             row.prop(snode, "shader_type", text="", expand=True)
@@ -53,10 +54,8 @@ class NODE_HT_header(bpy.types.Header):
                     layout.prop(snode_id, "use_nodes")
 
         elif snode.tree_type == 'TEXTURE':
-            row.prop(snode, "texture_type", text="", expand=True)
+            layout.prop(snode, "texture_type", text="", expand=True)
 
-            snode_id = snode.id
-            id_from = snode.id_from
             if id_from:
                 if snode.texture_type == 'BRUSH':
                     layout.template_ID(id_from, "texture", new="texture.new")
@@ -66,10 +65,8 @@ class NODE_HT_header(bpy.types.Header):
                 layout.prop(snode_id, "use_nodes")
 
         elif snode.tree_type == 'COMPOSITING':
-            scene = snode.id
-
-            layout.prop(scene, "use_nodes")
-            layout.prop(scene.render, "use_free_unused_nodes", text="Free Unused")
+            layout.prop(snode_id, "use_nodes")
+            layout.prop(snode_id.render, "use_free_unused_nodes", text="Free Unused")
             layout.prop(snode, "show_backdrop")
             if snode.show_backdrop:
                 row = layout.row(align=True)
@@ -81,7 +78,7 @@ class NODE_HT_header(bpy.types.Header):
         layout.template_running_jobs()
 
 
-class NODE_MT_view(bpy.types.Menu):
+class NODE_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
@@ -110,7 +107,7 @@ class NODE_MT_view(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class NODE_MT_select(bpy.types.Menu):
+class NODE_MT_select(Menu):
     bl_label = "Select"
 
     def draw(self, context):
@@ -127,7 +124,7 @@ class NODE_MT_select(bpy.types.Menu):
         layout.operator("node.select_same_type_prev")
 
 
-class NODE_MT_node(bpy.types.Menu):
+class NODE_MT_node(Menu):
     bl_label = "Node"
 
     def draw(self, context):
@@ -168,7 +165,7 @@ class NODE_MT_node(bpy.types.Menu):
 
 
 # Node Backdrop options
-class NODE_PT_properties(bpy.types.Panel):
+class NODE_PT_properties(Panel):
     bl_space_type = 'NODE_EDITOR'
     bl_region_type = 'UI'
     bl_label = "Backdrop"
index 1f196cbd1917e648784c8c2ef515c7e3428579d5..b1e6eaf3245f6511fbcf41fad5da17407181cc59 100644 (file)
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header, Menu
 
 
-class OUTLINER_HT_header(bpy.types.Header):
+class OUTLINER_HT_header(Header):
     bl_space_type = 'OUTLINER'
 
     def draw(self, context):
@@ -63,7 +64,7 @@ class OUTLINER_HT_header(bpy.types.Header):
                 row.label(text="No Keying Set active")
 
 
-class OUTLINER_MT_view(bpy.types.Menu):
+class OUTLINER_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
@@ -71,14 +72,13 @@ class OUTLINER_MT_view(bpy.types.Menu):
 
         space = context.space_data
 
-        col = layout.column()
         if space.display_mode not in {'DATABLOCKS', 'USER_PREFERENCES', 'KEYMAPS'}:
-            col.prop(space, "show_restrict_columns")
-            col.separator()
-            col.operator("outliner.show_active")
+            layout.prop(space, "show_restrict_columns")
+            layout.separator()
+            layout.operator("outliner.show_active")
 
-        col.operator("outliner.show_one_level")
-        col.operator("outliner.show_hierarchy")
+        layout.operator("outliner.show_one_level")
+        layout.operator("outliner.show_hierarchy")
 
         layout.separator()
 
@@ -86,7 +86,7 @@ class OUTLINER_MT_view(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class OUTLINER_MT_search(bpy.types.Menu):
+class OUTLINER_MT_search(Menu):
     bl_label = "Search"
 
     def draw(self, context):
@@ -94,27 +94,23 @@ class OUTLINER_MT_search(bpy.types.Menu):
 
         space = context.space_data
 
-        col = layout.column()
+        layout.prop(space, "use_filter_case_sensitive")
+        layout.prop(space, "use_filter_complete")
 
-        col.prop(space, "use_filter_case_sensitive")
-        col.prop(space, "use_filter_complete")
 
-
-class OUTLINER_MT_edit_datablocks(bpy.types.Menu):
+class OUTLINER_MT_edit_datablocks(Menu):
     bl_label = "Edit"
 
     def draw(self, context):
         layout = self.layout
 
-        col = layout.column()
-
-        col.operator("outliner.keyingset_add_selected")
-        col.operator("outliner.keyingset_remove_selected")
+        layout.operator("outliner.keyingset_add_selected")
+        layout.operator("outliner.keyingset_remove_selected")
 
-        col.separator()
+        layout.separator()
 
-        col.operator("outliner.drivers_add_selected")
-        col.operator("outliner.drivers_delete_selected")
+        layout.operator("outliner.drivers_add_selected")
+        layout.operator("outliner.drivers_delete_selected")
 
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
index c477a2ff62baf15470c88e529d57644b8eb872dc..84cc365425ebe59d4e7aec3e819d5ac132dcc797 100644 (file)
@@ -18,6 +18,7 @@
 
 # <pep8 compliant>
 import bpy
+from bpy.types import Header, Menu, Panel
 
 
 def act_strip(context):
@@ -27,7 +28,7 @@ def act_strip(context):
         return None
 
 
-class SEQUENCER_HT_header(bpy.types.Header):
+class SEQUENCER_HT_header(Header):
     bl_space_type = 'SEQUENCE_EDITOR'
 
     def draw(self, context):
@@ -39,14 +40,13 @@ class SEQUENCER_HT_header(bpy.types.Header):
         row.template_header()
 
         if context.area.show_menus:
-            sub = row.row(align=True)
-            sub.menu("SEQUENCER_MT_view")
+            row.menu("SEQUENCER_MT_view")
 
             if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}:
-                sub.menu("SEQUENCER_MT_select")
-                sub.menu("SEQUENCER_MT_marker")
-                sub.menu("SEQUENCER_MT_add")
-                sub.menu("SEQUENCER_MT_strip")
+                row.menu("SEQUENCER_MT_select")
+                row.menu("SEQUENCER_MT_marker")
+                row.menu("SEQUENCER_MT_add")
+                row.menu("SEQUENCER_MT_strip")
 
         layout.prop(st, "view_type", expand=True, text="")
 
@@ -76,7 +76,7 @@ class SEQUENCER_HT_header(bpy.types.Header):
                     row.prop(ed, "overlay_lock", text="", icon='LOCKED')
 
 
-class SEQUENCER_MT_view_toggle(bpy.types.Menu):
+class SEQUENCER_MT_view_toggle(Menu):
     bl_label = "View Type"
 
     def draw(self, context):
@@ -87,7 +87,7 @@ class SEQUENCER_MT_view_toggle(bpy.types.Menu):
         layout.operator("sequencer.view_toggle").type = 'SEQUENCER_PREVIEW'
 
 
-class SEQUENCER_MT_view(bpy.types.Menu):
+class SEQUENCER_MT_view(Menu):
     bl_label = "View"
 
     def draw(self, context):
@@ -95,8 +95,6 @@ class SEQUENCER_MT_view(bpy.types.Menu):
 
         st = context.space_data
 
-        layout.column()
-
         layout.operator("sequencer.properties", icon='MENU_PANEL')
 
         layout.separator()
@@ -129,13 +127,12 @@ class SEQUENCER_MT_view(bpy.types.Menu):
         layout.operator("screen.screen_full_area")
 
 
-class SEQUENCER_MT_select(bpy.types.Menu):
+class SEQUENCER_MT_select(Menu):
     bl_label = "Select"
 
     def draw(self, context):
         layout = self.layout
 
-        layout.column()
         layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT'
         layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT'
         layout.separator()
@@ -148,7 +145,7 @@ class SEQUENCER_MT_select(bpy.types.Menu):
         layout.operator("sequencer.select_inverse")
 
 
-class SEQUENCER_MT_marker(bpy.types.Menu):
+class SEQUENCER_MT_marker(Menu):
     bl_label = "Marker"
 
     def draw(self, context):
@@ -156,7 +153,6 @@ class SEQUENCER_MT_marker(bpy.types.Menu):
 
         #layout.operator_context = 'EXEC_REGION_WIN'
 
-        layout.column()
         layout.operator("marker.add", "Add Marker")
         layout.operator("marker.duplicate", text="Duplicate Marker")
         layout.operator("marker.delete", text="Delete Marker")
@@ -169,14 +165,26 @@ class SEQUENCER_MT_marker(bpy.types.Menu):
         #layout.operator("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
 
 
-class SEQUENCER_MT_add(bpy.types.Menu):
+class SEQUENCER_MT_change(Menu):
+    bl_label = "Change"
+
+    def draw(self, context):
+        layout = self.layout
+
+        layout.operator_context = 'INVOKE_REGION_WIN'
+