svn merge -r 30954:31059 https://svn.blender.org/svnroot/bf-blender/trunk/blender
authorJoerg Mueller <nexyon@gmail.com>
Thu, 5 Aug 2010 08:23:26 +0000 (08:23 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Thu, 5 Aug 2010 08:23:26 +0000 (08:23 +0000)
353 files changed:
CMakeLists.txt
SConstruct
build_files/cmake/macros.cmake
build_files/make/nan_compile.mk
build_files/make/nan_definitions.mk
build_files/make/nan_link.mk
build_files/scons/config/win64-vc-config.py
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
extern/CMakeLists.txt
intern/CMakeLists.txt
release/scripts/io/engine_render_pov.py [deleted file]
release/scripts/io/export_3ds.py
release/scripts/io/export_fbx.py
release/scripts/io/export_mdd.py
release/scripts/io/export_obj.py
release/scripts/io/export_ply.py
release/scripts/io/export_x3d.py
release/scripts/io/import_anim_bvh.py
release/scripts/io/import_scene_3ds.py
release/scripts/io/import_scene_obj.py
release/scripts/io/import_shape_mdd.py
release/scripts/io/netrender/client.py
release/scripts/io/netrender/operators.py
release/scripts/io/netrender/ui.py
release/scripts/io/netrender/utils.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/bpy_types.py
release/scripts/modules/rna_prop_ui.py
release/scripts/op/add_armature_human.py
release/scripts/op/add_mesh_torus.py
release/scripts/op/console_python.py
release/scripts/op/fcurve_euler_filter.py
release/scripts/op/image.py
release/scripts/op/mesh.py
release/scripts/op/nla.py
release/scripts/op/object.py
release/scripts/op/object_align.py
release/scripts/op/object_randomize_transform.py
release/scripts/op/presets.py
release/scripts/op/screen_play_rendered_anim.py
release/scripts/op/sequencer.py
release/scripts/op/uv.py
release/scripts/op/uvcalc_follow_active.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/op/vertexpaint_dirt.py
release/scripts/op/wm.py
release/scripts/templates/operator.py
release/scripts/templates/operator_modal.py
release/scripts/templates/operator_modal_draw.py
release/scripts/templates/operator_modal_view3d.py
release/scripts/templates/operator_simple.py
release/scripts/templates/operator_uv.py
release/scripts/templates/panel_simple.py
release/scripts/ui/properties_animviz.py
release/scripts/ui/properties_data_armature.py
release/scripts/ui/properties_data_armature_rigify.py
release/scripts/ui/properties_data_bone.py
release/scripts/ui/properties_data_camera.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_data_empty.py
release/scripts/ui/properties_data_lamp.py
release/scripts/ui/properties_data_lattice.py
release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_data_metaball.py
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_particle.py
release/scripts/ui/properties_physics_cloth.py
release/scripts/ui/properties_physics_field.py
release/scripts/ui/properties_physics_fluid.py
release/scripts/ui/properties_physics_smoke.py
release/scripts/ui/properties_physics_softbody.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_scene.py
release/scripts/ui/properties_texture.py
release/scripts/ui/properties_world.py
release/scripts/ui/space_console.py
release/scripts/ui/space_dopesheet.py
release/scripts/ui/space_filebrowser.py
release/scripts/ui/space_graph.py
release/scripts/ui/space_image.py
release/scripts/ui/space_info.py
release/scripts/ui/space_logic.py
release/scripts/ui/space_nla.py
release/scripts/ui/space_node.py
release/scripts/ui/space_outliner.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_text.py
release/scripts/ui/space_time.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_userpref_keymap.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py
release/text/copyright.txt
source/Makefile
source/blender/CMakeLists.txt
source/blender/SConscript
source/blender/avi/CMakeLists.txt
source/blender/blenkernel/BKE_anim.h
source/blender/blenkernel/BKE_brush.h
source/blender/blenkernel/BKE_curve.h
source/blender/blenkernel/BKE_displist.h
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/BKE_main.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_paint.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/BME_conversions.c
source/blender/blenkernel/intern/Makefile
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/node.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/sequencer.c
source/blender/blenkernel/intern/sound.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/blenlib/BLI_math_rotation.h
source/blender/blenlib/BLI_path_util.h
source/blender/blenlib/CMakeLists.txt
source/blender/blenlib/intern/bpath.c
source/blender/blenlib/intern/math_rotation.c
source/blender/blenlib/intern/path_util.c
source/blender/blenloader/intern/readblenentry.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/blenpluginapi/CMakeLists.txt
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/poseobject.c
source/blender/editors/curve/editcurve.c
source/blender/editors/datafiles/startup.blend.c
source/blender/editors/gpencil/gpencil_buttons.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_shapekey.c
source/blender/editors/object/object_transform.c
source/blender/editors/physics/CMakeLists.txt
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/render/render_preview.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_ops.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_intern.h
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_file/CMakeLists.txt
source/blender/editors/space_file/Makefile
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/writeimage.c
source/blender/editors/space_image/CMakeLists.txt
source/blender/editors/space_image/Makefile
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_text/text_draw.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/drawanimviz.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/transform/transform_snap.c
source/blender/gpu/intern/gpu_shader_material.glsl
source/blender/gpu/intern/gpu_shader_material.glsl.c
source/blender/imbuf/CMakeLists.txt
source/blender/imbuf/IMB_imbuf_types.h
source/blender/imbuf/SConscript
source/blender/imbuf/intern/Makefile
source/blender/imbuf/intern/allocimbuf.c
source/blender/imbuf/intern/cineon/CMakeLists.txt
source/blender/imbuf/intern/dds/CMakeLists.txt
source/blender/imbuf/intern/filetype.c
source/blender/imbuf/intern/openexr/CMakeLists.txt
source/blender/imbuf/intern/radiance_hdr.c
source/blender/imbuf/intern/util.c
source/blender/makesdna/DNA_ID.h
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_actuator_types.h
source/blender/makesdna/DNA_brush_types.h
source/blender/makesdna/DNA_constraint_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_sequence_types.h
source/blender/makesdna/DNA_sound_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_wave_types.h [deleted file]
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_define.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/Makefile
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_animviz.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_boid.c
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_cloth.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_context.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_internal_types.h
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_sensor.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_ui.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_world.c
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/intern/MOD_armature.c
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_boolean.c
source/blender/modifiers/intern/MOD_cast.c
source/blender/modifiers/intern/MOD_curve.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_fluidsim.c
source/blender/modifiers/intern/MOD_hook.c
source/blender/modifiers/intern/MOD_lattice.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_shrinkwrap.c
source/blender/modifiers/intern/MOD_simpledeform.c
source/blender/modifiers/intern/MOD_smoke.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/nodes/intern/CMP_nodes/CMP_colorSpill.c
source/blender/nodes/intern/CMP_nodes/CMP_value.c
source/blender/nodes/intern/SHD_nodes/SHD_value.c
source/blender/python/SConscript
source/blender/python/generic/bpy_internal_import.c
source/blender/python/generic/bpy_internal_import.h
source/blender/python/generic/mathutils.c
source/blender/python/generic/mathutils.h
source/blender/python/generic/mathutils_quat.c
source/blender/python/generic/mathutils_vector.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_rna.c
source/blender/quicktime/CMakeLists.txt
source/blender/quicktime/apple/Makefile
source/blender/readblenfile/CMakeLists.txt
source/blender/render/CMakeLists.txt
source/blender/render/intern/raytrace/Makefile
source/blender/render/intern/source/pipeline.c
source/blender/windowmanager/intern/wm_operators.c
source/blenderplayer/CMakeLists.txt
source/creator/CMakeLists.txt
source/creator/Makefile
source/creator/SConscript
source/creator/creator.c
source/gameengine/BlenderRoutines/CMakeLists.txt
source/gameengine/Converter/CMakeLists.txt
source/gameengine/Converter/KX_ConvertControllers.cpp
source/gameengine/Expressions/CMakeLists.txt
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GameLogic/SCA_PythonController.cpp
source/gameengine/GamePlayer/common/CMakeLists.txt
source/gameengine/GamePlayer/ghost/CMakeLists.txt
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/CMakeLists.txt
source/gameengine/Ketsji/KX_KetsjiEngine.h
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/KX_Scene.cpp
source/gameengine/Ketsji/Makefile
source/gameengine/Network/CMakeLists.txt
source/gameengine/Network/LoopBackNetwork/CMakeLists.txt
source/gameengine/Physics/Bullet/CMakeLists.txt
source/gameengine/Physics/Dummy/CMakeLists.txt
source/gameengine/Physics/common/CMakeLists.txt
source/gameengine/PyDoc/SConscript [deleted file]
source/gameengine/Rasterizer/CMakeLists.txt
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/CMakeLists.txt
source/gameengine/SceneGraph/CMakeLists.txt
source/gameengine/VideoTexture/CMakeLists.txt
source/kernel/CMakeLists.txt

index 0016f3de16183dc57e06731eca88e0f9bc5e2fc4..87265e959e53e73c7b6400e85f976b556ab48b85 100644 (file)
@@ -69,7 +69,7 @@ OPTION(WITH_INTERNATIONAL "Enable I18N   (International fonts and text)" ON)
 OPTION(WITH_LCMS          "Enable color correction with lcms" OFF)
 OPTION(WITH_PYTHON        "Enable Embedded Python API" ON)
 OPTION(WITH_BUILDINFO     "Include extra build details" ON)
-OPTION(WITH_ELBEEM        "Enable Elbeem (Fluid Simulation)" ON)
+OPTION(WITH_FLUID        "Enable Elbeem (Fluid Simulation)" ON)
 OPTION(WITH_FFTW3         "Enable FFTW3 support (Used for smoke and audio effects)" OFF)
 OPTION(WITH_BULLET        "Enable Bullet (Physics Engine)" ON)
 OPTION(WITH_GAMEENGINE    "Enable Game Engine" ON)
@@ -82,10 +82,12 @@ ELSE()
 ENDIF()
 
 # Image format support
-OPTION(WITH_OPENEXR       "Enable OpenEXR Support (http://www.openexr.com)" ON)
-OPTION(WITH_OPENJPEG      "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
-OPTION(WITH_TIFF          "Enable LibTIFF Support" ON)
-OPTION(WITH_DDS           "Enable DDS Support" ON)
+OPTION(WITH_IMAGE_OPENEXR       "Enable OpenEXR Support (http://www.openexr.com)" ON)
+OPTION(WITH_IMAGE_OPENJPEG      "Enable OpenJpeg Support (http://www.openjpeg.org/)" OFF)
+OPTION(WITH_IMAGE_TIFF          "Enable LibTIFF Support" ON)
+OPTION(WITH_IMAGE_DDS           "Enable DDS Image Support" ON)
+OPTION(WITH_IMAGE_CINEON        "Enable CINEON and DPX Image Support" ON)
+OPTION(WITH_IMAGE_HDR           "Enable HDR Image Support" ON)
 
 # Audio format support
 OPTION(WITH_FFMPEG        "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)" OFF)
@@ -220,7 +222,7 @@ IF(UNIX AND NOT APPLE)
                ENDIF(NOT SDL_FOUND)
        ENDIF(WITH_SDL)
 
-       IF(WITH_OPENEXR)
+       IF(WITH_IMAGE_OPENEXR)
                SET(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
                FIND_PATH(OPENEXR_INC
                        ImfXdr.h
@@ -235,16 +237,16 @@ IF(UNIX AND NOT APPLE)
                SET(OPENEXR_LIB Half IlmImf Iex Imath)
                
                IF(NOT OPENEXR_INC)
-                       SET(WITH_OPENEXR OFF)
+                       SET(WITH_IMAGE_OPENEXR OFF)
                ENDIF(NOT OPENEXR_INC)
-       ENDIF(WITH_OPENEXR)
+       ENDIF(WITH_IMAGE_OPENEXR)
 
-       IF(WITH_TIFF)
+       IF(WITH_IMAGE_TIFF)
                FIND_PACKAGE(TIFF)
                IF(NOT TIFF_FOUND)
-                       SET(WITH_TIFF OFF)
+                       SET(WITH_IMAGE_TIFF OFF)
                ENDIF(NOT TIFF_FOUND)
-       ENDIF(WITH_TIFF)
+       ENDIF(WITH_IMAGE_TIFF)
 
        FIND_PACKAGE(JPEG REQUIRED)
 
@@ -497,7 +499,7 @@ IF(WIN32)
                        SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
                ENDIF(WITH_FFMPEG)
 
-               IF(WITH_OPENEXR)
+               IF(WITH_IMAGE_OPENEXR)
                        SET(OPENEXR ${LIBDIR}/openexr)
                        SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/IlmImf ${OPENEXR}/include/Iex ${OPENEXR}/include/Imath)
                        SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
@@ -509,14 +511,14 @@ IF(WIN32)
                        IF (MSVC90)
                                SET(OPENEXR_LIBPATH ${OPENEXR}/lib_vs2008)
                        ENDIF(MSVC90)
-               ENDIF(WITH_OPENEXR)
+               ENDIF(WITH_IMAGE_OPENEXR)
 
-               IF(WITH_TIFF)
+               IF(WITH_IMAGE_TIFF)
                        SET(TIFF ${LIBDIR}/tiff)
                        SET(TIFF_LIBRARY libtiff)
                        SET(TIFF_INCLUDE_DIR ${TIFF}/include)
                        SET(TIFF_LIBPATH ${TIFF}/lib)
-               ENDIF(WITH_TIFF)
+               ENDIF(WITH_IMAGE_TIFF)
 
                IF(WITH_JACK)
                        SET(JACK ${LIBDIR}/jack)
@@ -607,19 +609,19 @@ IF(WIN32)
                        SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
                ENDIF(WITH_FFMPEG)
 
-               IF(WITH_OPENEXR)
+               IF(WITH_IMAGE_OPENEXR)
                        SET(OPENEXR ${LIBDIR}/gcc/openexr)
                        SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
                        SET(OPENEXR_LIB Half IlmImf Imath IlmThread)
                        SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
-               ENDIF(WITH_OPENEXR)
+               ENDIF(WITH_IMAGE_OPENEXR)
 
-               IF(WITH_TIFF)
+               IF(WITH_IMAGE_TIFF)
                        SET(TIFF ${LIBDIR}/gcc/tiff)
                        SET(TIFF_LIBRARY tiff)
                        SET(TIFF_INCLUDE_DIR ${TIFF}/include)
                        SET(TIFF_LIBPATH ${TIFF}/lib)
-               ENDIF(WITH_TIFF)
+               ENDIF(WITH_IMAGE_TIFF)
 
                IF(WITH_JACK)
                        SET(JACK ${LIBDIR}/jack)
@@ -727,12 +729,12 @@ IF(APPLE)
        SET(FREETYPE_LIBPATH ${FREETYPE}/lib)
        SET(FREETYPE_LIBRARY freetype)
 
-       IF(WITH_OPENEXR)
+       IF(WITH_IMAGE_OPENEXR)
                SET(OPENEXR ${LIBDIR}/openexr)
                SET(OPENEXR_INC ${OPENEXR}/include/OpenEXR ${OPENEXR}/include)
                SET(OPENEXR_LIB Iex Half IlmImf Imath IlmThread)
                SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
-       ENDIF(WITH_OPENEXR)
+       ENDIF(WITH_IMAGE_OPENEXR)
 
        IF(WITH_LCMS)
                SET(LCMS ${LIBDIR}/lcms)
@@ -810,12 +812,12 @@ IF(APPLE)
        SET(JPEG_INC "${JPEG}/include")
        SET(JPEG_LIBPATH ${JPEG}/lib)
 
-       IF(WITH_TIFF)
+       IF(WITH_IMAGE_TIFF)
                SET(TIFF ${LIBDIR}/tiff)
                SET(TIFF_INCLUDE_DIR ${TIFF}/include)
                SET(TIFF_LIBRARY tiff)
                SET(TIFF_LIBPATH ${TIFF}/lib)
-       ENDIF(WITH_TIFF)
+       ENDIF(WITH_IMAGE_TIFF)
 
        IF(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
                SET(PLATFORM_CFLAGS " -msse -msse2 ${PLATFORM_CFLAGS}")
@@ -869,11 +871,11 @@ ENDIF(WITH_BUILDINFO)
        
 #-----------------------------------------------------------------------------
 # Common.
-IF(WITH_OPENJPEG)
+IF(WITH_IMAGE_OPENJPEG)
        set(OPENJPEG ${CMAKE_SOURCE_DIR}/extern/libopenjpeg)
        set(OPENJPEG_INC ${OPENJPEG})
        set(OPENJPEG_LIb extern_libopenjpeg)
-ENDIF(WITH_OPENJPEG)
+ENDIF(WITH_IMAGE_OPENJPEG)
 
 #-----------------------------------------------------------------------------
 # Blender WebPlugin
index acdf6182504406a1ef6f19b4abfd7244d92a791b..1f67f79f10b25e9edd685b58d03c4280902213cc 100644 (file)
@@ -210,14 +210,36 @@ SetOption('num_jobs', int(env['BF_NUMJOBS']))
 print B.bc.OKGREEN + "Build with parallel jobs%s: %s" % (B.bc.ENDC, GetOption('num_jobs'))
 print B.bc.OKGREEN + "Build with debug symbols%s: %s" % (B.bc.ENDC, env['BF_DEBUG'])
 
-# BLENDERPATH is a unix only option to enable typical style paths this is
-# spesifically a data-dir, which is used a lot but cant replace BF_INSTALLDIR
-# because the blender binary is installed in $BF_INSTALLDIR/bin/blender
+if 'blenderlite' in B.targets:
+       target_env_defs = {}
+       target_env_defs['WITH_BF_GAMEENGINE'] = False
+       target_env_defs['WITH_BF_OPENAL'] = False
+       target_env_defs['WITH_BF_OPENEXR'] = False
+       target_env_defs['WITH_BF_OPENMP'] = False
+       target_env_defs['WITH_BF_ICONV'] = False
+       target_env_defs['WITH_BF_INTERNATIONAL'] = False
+       target_env_defs['WITH_BF_OPENJPEG'] = False
+       target_env_defs['WITH_BF_FFMPEG'] = False
+       target_env_defs['WITH_BF_QUICKTIME'] = False
+       target_env_defs['WITH_BF_REDCODE'] = False
+       target_env_defs['WITH_BF_DDS'] = False
+       target_env_defs['WITH_BF_CINEON'] = False
+       target_env_defs['WITH_BF_HDR'] = False
+       target_env_defs['WITH_BF_ZLIB'] = False
+       target_env_defs['WITH_BF_SDL'] = False
+       target_env_defs['WITH_BF_JPEG'] = False
+       target_env_defs['WITH_BF_PNG'] = False
+       target_env_defs['WITH_BF_BULLET'] = False
+       target_env_defs['WITH_BF_BINRELOC'] = False
+       target_env_defs['BF_BUILDINFO'] = False
+       target_env_defs['BF_NO_ELBEEM'] = True
+       target_env_defs['WITH_BF_PYTHON'] = False
+       
+       # Merge blenderlite, let command line to override
+       for k,v in target_env_defs.iteritems():
+               if k not in B.arguments:
+                       env[k] = v
 
-if env['WITH_BF_FHS']:
-       BLENDERPATH = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION'])
-else:
-       BLENDERPATH = env['BF_INSTALLDIR']
 
 if env['WITH_BF_OPENMP'] == 1:
                if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
@@ -271,34 +293,6 @@ if 'blenderplayer' in B.targets:
 if 'blendernogame' in B.targets:
        env['WITH_BF_GAMEENGINE'] = False
 
-if 'blenderlite' in B.targets:
-       target_env_defs = {}
-       target_env_defs['WITH_BF_GAMEENGINE'] = False
-       target_env_defs['WITH_BF_OPENAL'] = False
-       target_env_defs['WITH_BF_OPENEXR'] = False
-       target_env_defs['WITH_BF_OPENMP'] = False
-       target_env_defs['WITH_BF_ICONV'] = False
-       target_env_defs['WITH_BF_INTERNATIONAL'] = False
-       target_env_defs['WITH_BF_OPENJPEG'] = False
-       target_env_defs['WITH_BF_FFMPEG'] = False
-       target_env_defs['WITH_BF_QUICKTIME'] = False
-       target_env_defs['WITH_BF_REDCODE'] = False
-       target_env_defs['WITH_BF_DDS'] = False
-       target_env_defs['WITH_BF_ZLIB'] = False
-       target_env_defs['WITH_BF_SDL'] = False
-       target_env_defs['WITH_BF_JPEG'] = False
-       target_env_defs['WITH_BF_PNG'] = False
-       target_env_defs['WITH_BF_BULLET'] = False
-       target_env_defs['WITH_BF_BINRELOC'] = False
-       target_env_defs['BF_BUILDINFO'] = False
-       target_env_defs['BF_NO_ELBEEM'] = True
-       target_env_defs['WITH_BF_PYTHON'] = False
-       
-       # Merge blenderlite, let command line to override
-       for k,v in target_env_defs.iteritems():
-               if k not in B.arguments:
-                       env[k] = v
-
 # disable elbeem (fluidsim) compilation?
 if env['BF_NO_ELBEEM'] == 1:
        env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
@@ -311,7 +305,7 @@ if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-min
 
 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
 B.root_build_dir = env['BF_BUILDDIR']
-B.doc_build_dir = os.path.join(BLENDERPATH, 'doc')
+B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
 if not B.root_build_dir[-1]==os.sep:
        B.root_build_dir += os.sep
 if not B.doc_build_dir[-1]==os.sep:
@@ -366,8 +360,9 @@ if not os.path.isdir ( B.root_build_dir):
        os.makedirs ( B.root_build_dir + 'extern' )
        os.makedirs ( B.root_build_dir + 'lib' )
        os.makedirs ( B.root_build_dir + 'bin' )
-if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
-       os.makedirs ( B.doc_build_dir )
+# # Docs not working with epy anymore
+# if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
+#      os.makedirs ( B.doc_build_dir )
 
 Help(opts.GenerateHelpText(env))
 
@@ -436,10 +431,7 @@ if  env['OURPLATFORM']=='darwin':
                        source=[dp+os.sep+f for f in df]
                        blenderinstall.append(env.Install(dir=dir,source=source))
 else:
-       if env['WITH_BF_FHS']:  dir= os.path.join(env['BF_INSTALLDIR'], 'bin')
-       else:                                   dir= env['BF_INSTALLDIR']
-       
-       blenderinstall = env.Install(dir=dir, source=B.program_list)
+       blenderinstall = env.Install(dir=env['BF_INSTALLDIR'], source=B.program_list)
 
 #-- local path = config files in install dir: installdir\VERSION
 #- dont do config and scripts for darwin, it is already in the bundle
@@ -466,15 +458,12 @@ if  env['OURPLATFORM']!='darwin':
                                
                                if 'locale' in dp:
                                        datafileslist.append(os.path.join(dp,f))
-                                       if env['WITH_BF_FHS']:  dir= os.path.join(*([BLENDERPATH] + ['datafiles'] + dp.split(os.sep)[2:]))      # skip bin/.blender
-                                       else:                                   dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:]))  # skip bin
+                                       dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:])) # skip bin
                                        datafilestargetlist.append(dir + os.sep + f)
 
                                else:
                                        dotblendlist.append(os.path.join(dp, f))
-                                       if env['WITH_BF_FHS']:  dir= os.path.join(*([BLENDERPATH] + ['config'] + dp.split(os.sep)[2:])) # skip bin/.blender
-                                       else:                                   dir= os.path.join(*([BLENDERPATH] + [VERSION] + ['config'] + dp.split(os.sep)[1:]))     # skip bin
-                                       
+                                       dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['config'] + dp.split(os.sep)[1:]))    # skip bin
                                        dottargetlist.append(dir + os.sep + f)
                                        
                dotblenderinstall = []
@@ -493,8 +482,7 @@ if  env['OURPLATFORM']!='darwin':
                                        if '.svn' in dn:
                                                dn.remove('.svn')
                                        
-                                       if env['WITH_BF_FHS']:          dir = BLENDERPATH
-                                       else:                                           dir = os.path.join(env['BF_INSTALLDIR'], VERSION)                               
+                                       dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
                                        dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
                                        
                                        source=[os.path.join(dp, f) for f in df if f[-3:]!='pyc']
@@ -510,7 +498,7 @@ if env['OURPLATFORM']=='linux2':
                        tn.remove('.svn')
                for f in tf:
                        iconlist.append(os.path.join(tp, f))
-                       icontargetlist.append( os.path.join(*([BLENDERPATH] + tp.split(os.sep)[2:] + [f])) )
+                       icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) )
 
        iconinstall = []
        for targetdir,srcfile in zip(icontargetlist, iconlist):
@@ -537,24 +525,24 @@ for tp, tn, tf in os.walk('release/plugins'):
        df = tp[8:] # remove 'release/'
        for f in tf:
                pluglist.append(os.path.join(tp, f))
-               plugtargetlist.append( os.path.join(BLENDERPATH, df, f) )
+               plugtargetlist.append( os.path.join(env['BF_INSTALLDIR'], df, f) )
 
 
 # header files for plugins
 pluglist.append('source/blender/blenpluginapi/documentation.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'documentation.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'documentation.h'))
 pluglist.append('source/blender/blenpluginapi/externdef.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'externdef.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'externdef.h'))
 pluglist.append('source/blender/blenpluginapi/floatpatch.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'floatpatch.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'floatpatch.h'))
 pluglist.append('source/blender/blenpluginapi/iff.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'iff.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'iff.h'))
 pluglist.append('source/blender/blenpluginapi/plugin.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'plugin.h'))
 pluglist.append('source/blender/blenpluginapi/util.h')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'util.h'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'util.h'))
 pluglist.append('source/blender/blenpluginapi/plugin.DEF')
-plugtargetlist.append(os.path.join(BLENDERPATH, 'plugins', 'include', 'plugin.def'))
+plugtargetlist.append(os.path.join(env['BF_INSTALLDIR'], 'plugins', 'include', 'plugin.def'))
 
 plugininstall = []
 for targetdir,srcfile in zip(plugtargetlist, pluglist):
@@ -569,7 +557,7 @@ for tp, tn, tf in os.walk('release/text'):
        for f in tf:
                textlist.append(tp+os.sep+f)
 
-textinstall = env.Install(dir=BLENDERPATH, source=textlist)
+textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
 
 if  env['OURPLATFORM']=='darwin':
                allinstall = [blenderinstall, plugininstall, textinstall]
@@ -662,17 +650,3 @@ Default(B.program_list)
 
 if not env['WITHOUT_BF_INSTALL']:
                Default(installtarget)
-
-#------------ EPYDOC
-if env['WITH_BF_DOCS']:
-    try:
-        import epydoc
-    except ImportError:
-        epydoc = None
-
-    if epydoc:
-        SConscript('source/gameengine/PyDoc/SConscript')
-    else:
-        print "No epydoc install detected, Python API and Gameengine API Docs will not be generated "
-
-
index 84e6b788dc0906dfe2ceb1e24320ab06852874e6..22c090342ef7b4b8a8d74025ddc1500697c48668 100644 (file)
@@ -58,12 +58,12 @@ MACRO(SETUP_LIBDIRS)
        IF(WITH_FFMPEG)
                LINK_DIRECTORIES(${FFMPEG_LIBPATH})
        ENDIF(WITH_FFMPEG)
-       IF(WITH_OPENEXR)
+       IF(WITH_IMAGE_OPENEXR)
                LINK_DIRECTORIES(${OPENEXR_LIBPATH})
-       ENDIF(WITH_OPENEXR)
-       IF(WITH_TIFF)
+       ENDIF(WITH_IMAGE_OPENEXR)
+       IF(WITH_IMAGE_TIFF)
                LINK_DIRECTORIES(${TIFF_LIBPATH})
-       ENDIF(WITH_TIFF)
+       ENDIF(WITH_IMAGE_TIFF)
        IF(WITH_LCMS)
                LINK_DIRECTORIES(${LCMS_LIBPATH})
        ENDIF(WITH_LCMS)
@@ -140,10 +140,10 @@ MACRO(SETUP_LIBLINKS
        IF(WITH_QUICKTIME)
                TARGET_LINK_LIBRARIES(${target} ${QUICKTIME_LIB})
        ENDIF(WITH_QUICKTIME)
-       IF(WITH_TIFF)
+       IF(WITH_IMAGE_TIFF)
                TARGET_LINK_LIBRARIES(${target} ${TIFF_LIBRARY})
-       ENDIF(WITH_TIFF)
-       IF(WITH_OPENEXR)
+       ENDIF(WITH_IMAGE_TIFF)
+       IF(WITH_IMAGE_OPENEXR)
                IF(WIN32)
                        FOREACH(loop_var ${OPENEXR_LIB})
                                TARGET_LINK_LIBRARIES(${target} debug ${loop_var}_d)
@@ -152,7 +152,7 @@ MACRO(SETUP_LIBLINKS
                ELSE(WIN32)
                        TARGET_LINK_LIBRARIES(${target} ${OPENEXR_LIB})
                ENDIF(WIN32)
-       ENDIF(WITH_OPENEXR)
+       ENDIF(WITH_IMAGE_OPENEXR)
        IF(WITH_LCMS)
                TARGET_LINK_LIBRARIES(${target} ${LCMS_LIBRARY})
        ENDIF(WITH_LCMS)
@@ -198,6 +198,7 @@ MACRO(TEST_SSE_SUPPORT)
        SUPPORT_SSE_BUILD)
 ENDMACRO(TEST_SSE_SUPPORT)
 
+
 MACRO(GET_BLENDER_VERSION)
        FILE(READ ${CMAKE_SOURCE_DIR}/source/blender/blenkernel/BKE_blender.h CONTENT)
        STRING(REGEX REPLACE "\n" ";" CONTENT "${CONTENT}")
index 36c315a8e1124e1b1c15afd00c48afd568a2595a..be38eac4f92a50696b61c1e8c06aea30b01e7de8 100644 (file)
@@ -89,7 +89,6 @@ ifeq ($(OS),darwin)
         CCFLAGS += -pipe -fPIC -funsigned-char
     endif
 
-
     CFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS)
     CCFLAGS += -arch $(MACOSX_ARCHITECTURE) #-isysroot $(MACOSX_SDK) -mmacosx-version-min=$(MACOSX_MIN_VERS)
 
index d14bdb0a13cb79f91447b5ac8f3058398fd56e48..d3948511ce3f711440cefb28603f6fbea35afcab 100644 (file)
@@ -159,6 +159,13 @@ ifndef CONFIG_GUESS
   endif
 
   export WITH_TIFF ?= true
+
+  #enable raytracing optimization (currently only for i386 and x86_64)
+  export WITH_BF_RAYOPTIMIZATION ?= true
+
+  export WITH_LCMS ?= false
+  export WITH_CINEON ?= true
+  export WITH_HDR ?= true
   
   # Compare recreated .mo files with committed ones
   export BF_VERIFY_MO_FILES ?= true
@@ -622,6 +629,11 @@ ifndef CONFIG_GUESS
   # default tiff libs
   export NAN_TIFF_LIBS ?= $(NAN_TIFF)/lib/libtiff.a
 
+  # default path to lcms, may be overidden in platform sections above or in user-def.mk
+  export BF_LCMS ?= $(LCGDIR)/lcms
+  export BF_LCMS_INC ?= $(BF_LCMS)/include
+  export BF_LCMS_LIBS ?= $(BF_LCMS)/lib/liblcms.a
+
 endif # CONFIG_GUESS
 
 # Don't want to build the gameengine?
index bbf4053b14c083e36a5d82b2c72824c1bb33431f..43fba13f45b693becda0a6d9909c8a1c098a68d4 100644 (file)
@@ -195,4 +195,8 @@ ifeq ($(WITH_TIFF),true)
    LLIBS += $(NAN_TIFF_LIBS)
 endif
 
+ifeq ($(WITH_LCMS),true)
+   LLIBS += $(BF_LCMS_LIBS)
+endif
+
 LLIBS += $(NAN_PYTHON_LIB)
index 46b9034823cca58d22bc74ada117d080d75bd7be..0a4b05a28bf2b5c7d4e945d9a880061db813d6a0 100644 (file)
@@ -194,8 +194,6 @@ CXX_WARN = []
 
 LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
 
-WITH_BF_DOCS=False
-
 BF_DEBUG=False
 BF_BSC=False
 
index 1c2fccec322ff1d9d301e26ecc48d416c04089b1..89c4ef9cac9008ea0c375a6d609009bc74476297 100644 (file)
@@ -501,10 +501,7 @@ def AppIt(target=None, source=None, env=None):
        installdir = env['BF_INSTALLDIR']
        print("compiled architecture: %s"%(osxarch))
        print("Installing to %s"%(installdir))
-       if  libdir == '../lib/darwin-9.x.universal':
-               python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip
-       else:
-               python_zip = 'python.zip' # compatibility for darwin8 python.zip
+       python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip
        print("unzipping to app-bundle: %s"%(python_zip))
        bldroot = env.Dir('.').abspath
        binary = env['BINARYKIND']
@@ -570,10 +567,9 @@ def UnixPyBundle(target=None, source=None, env=None):
        def run(cmd):
                print 'Install command:', cmd
                commands.getoutput(cmd)
-       
-       if env['WITH_BF_FHS']:  dir = os.path.join(env['BF_INSTALLDIR'], 'share', 'blender', env['BF_VERSION']) # BLENDERPATH
-       else:                                   dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
-       
+
+       dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
+
        py_src =        env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] )
        py_target =     env.subst( dir + '/python/lib/python'+env['BF_PYTHON_VERSION'] )
        
index 5647ef0ebaaf03117d9431f1206d7eab5133548a..c930c150cb6f8af29a9916615b18ea20e8c01c26 100644 (file)
@@ -36,7 +36,7 @@ def validate_arguments(args, bc):
             'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH',
             'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
             'WITH_BF_OPENEXR', 'BF_OPENEXR', 'BF_OPENEXR_INC', 'BF_OPENEXR_LIB', 'BF_OPENEXR_LIBPATH', 'WITH_BF_STATICOPENEXR', 'BF_OPENEXR_LIB_STATIC',
-            'WITH_BF_DDS',
+            'WITH_BF_DDS', 'WITH_BF_CINEON', 'WITH_BF_HDR',
             'WITH_BF_FFMPEG', 'BF_FFMPEG_LIB','BF_FFMPEG_EXTRA', 'BF_FFMPEG',  'BF_FFMPEG_INC',
             'WITH_BF_OGG', 'BF_OGG', 'BF_OGG_LIB',
             'WITH_BF_JPEG', 'BF_JPEG', 'BF_JPEG_INC', 'BF_JPEG_LIB', 'BF_JPEG_LIBPATH',
@@ -78,7 +78,6 @@ def validate_arguments(args, bc):
             'WITH_BF_DOCS',
             'BF_NUMJOBS',
             'BF_MSVS',
-            'WITH_BF_FHS',
             'BF_VERSION',
             'BF_GHOST_DEBUG',
             'WITH_BF_RAYOPTIMIZATION',
@@ -224,7 +223,11 @@ def read_opts(env, cfg, args):
         ('BF_OPENEXR_LIBPATH', 'OPENEXR library path', ''),
         ('BF_OPENEXR_LIB_STATIC', 'OPENEXR static library', ''),
 
-        (BoolVariable('WITH_BF_DDS', 'Use DDS if true', True)),
+        (BoolVariable('WITH_BF_DDS', 'Support DDS image format if true', True)),
+
+        (BoolVariable('WITH_BF_CINEON', 'Support CINEON and DPX image formats if true', True)),
+
+        (BoolVariable('WITH_BF_HDR', 'Support HDR image formats if true', True)),
 
         (BoolVariable('WITH_BF_FFMPEG', 'Use FFMPEG if true', False)),
         ('BF_FFMPEG', 'FFMPEG base path', ''),
@@ -428,13 +431,12 @@ def read_opts(env, cfg, args):
         
         ('BF_X264_CONFIG', 'configuration flags for x264', ''),
         ('BF_XVIDCORE_CONFIG', 'configuration flags for xvidcore', ''),
-        (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
+#        (BoolVariable('WITH_BF_DOCS', 'Generate API documentation', False)),
         
         ('BF_CONFIG', 'SCons python config file used to set default options', 'user_config.py'),
         ('BF_NUMJOBS', 'Number of build processes to spawn', '1'),
         ('BF_MSVS', 'Generate MSVS project files and solution', False),
-        
-        (BoolVariable('WITH_BF_FHS', 'Use the Unix "Filesystem Hierarchy Standard" rather then a redistributable directory layout', False)),
+
         ('BF_VERSION', 'The root path for Unix (non-apple)', '2.5'),
 
         (BoolVariable('BF_UNIT_TEST', 'Build with unit test support.', False)),
index 35271d24a2d4945bdc1f20fd73e4fbf155c75ed7..b15c8a31c730a15eb706770a1de3e8176ec83dcf 100644 (file)
@@ -34,9 +34,9 @@ ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
 ADD_SUBDIRECTORY(glew)
 
-IF(WITH_OPENJPEG)
+IF(WITH_IMAGE_OPENJPEG)
        ADD_SUBDIRECTORY(libopenjpeg)
-ENDIF(WITH_OPENJPEG)
+ENDIF(WITH_IMAGE_OPENJPEG)
 
 IF(WITH_LZO)
        ADD_SUBDIRECTORY(lzo)
index a370118f061a5dc766bfadf535b881e0cbdb2154..d64029a66718313e8d6bb8f8ef180cab485e0363 100644 (file)
@@ -38,8 +38,8 @@ ADD_SUBDIRECTORY(boolop)
 ADD_SUBDIRECTORY(opennl)
 ADD_SUBDIRECTORY(smoke)
 
-IF(WITH_ELBEEM)
+IF(WITH_FLUID)
        ADD_SUBDIRECTORY(elbeem)
-ENDIF(WITH_ELBEEM)
+ENDIF(WITH_FLUID)
 
 ADD_SUBDIRECTORY(bsp)
diff --git a/release/scripts/io/engine_render_pov.py b/release/scripts/io/engine_render_pov.py
deleted file mode 100644 (file)
index 9cda437..0000000
+++ /dev/null
@@ -1,1001 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-#
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-#
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-# <pep8 compliant>
-
-import bpy
-
-from math import atan, pi, degrees
-import subprocess
-import os
-import sys
-import time
-
-import platform as pltfrm
-
-if pltfrm.architecture()[0] == '64bit':
-    bitness = 64
-else:
-    bitness = 32
-
-
-def write_pov(filename, scene=None, info_callback=None):
-    file = open(filename, 'w')
-
-    # Only for testing
-    if not scene:
-        scene = bpy.data.scenes[0]
-
-    render = scene.render
-    world = scene.world
-
-    def uniqueName(name, nameSeq):
-
-        if name not in nameSeq:
-            return name
-
-        name_orig = name
-        i = 1
-        while name in nameSeq:
-            name = '%s_%.3d' % (name_orig, i)
-            i += 1
-
-        return name
-
-    def writeMatrix(matrix):
-        file.write('\tmatrix <%.6f, %.6f, %.6f,  %.6f, %.6f, %.6f,  %.6f, %.6f, %.6f,  %.6f, %.6f, %.6f>\n' %\
-        (matrix[0][0], matrix[0][1], matrix[0][2], matrix[1][0], matrix[1][1], matrix[1][2], matrix[2][0], matrix[2][1], matrix[2][2], matrix[3][0], matrix[3][1], matrix[3][2]))
-
-    def writeObjectMaterial(material):
-        if material and material.transparency_method == 'RAYTRACE':
-            file.write('\tinterior { ior %.6f }\n' % material.raytrace_transparency.ior)
-
-            # Other interior args
-            # fade_distance 2
-            # fade_power [Value]
-            # fade_color
-
-            # dispersion
-            # dispersion_samples
-
-    materialNames = {}
-    DEF_MAT_NAME = 'Default'
-
-    def writeMaterial(material):
-        # Assumes only called once on each material
-
-        if material:
-            name_orig = material.name
-        else:
-            name_orig = DEF_MAT_NAME
-
-        name = materialNames[name_orig] = uniqueName(bpy.utils.clean_name(name_orig), materialNames)
-
-        file.write('#declare %s = finish {\n' % name)
-
-        if material:
-            file.write('\tdiffuse %.3g\n' % material.diffuse_intensity)
-            file.write('\tspecular %.3g\n' % material.specular_intensity)
-
-            file.write('\tambient %.3g\n' % material.ambient)
-            #file.write('\tambient rgb <%.3g, %.3g, %.3g>\n' % tuple([c*material.ambient for c in world.ambient_color])) # povray blends the global value
-
-            # map hardness between 0.0 and 1.0
-            roughness = ((1.0 - ((material.specular_hardness - 1.0) / 510.0)))
-            # scale from 0.0 to 0.1
-            roughness *= 0.1
-            # add a small value because 0.0 is invalid
-            roughness += (1 / 511.0)
-
-            file.write('\troughness %.3g\n' % roughness)
-
-            # 'phong 70.0 '
-
-            if material.raytrace_mirror.enabled:
-                raytrace_mirror = material.raytrace_mirror
-                if raytrace_mirror.reflect_factor:
-                    file.write('\treflection {\n')
-                    file.write('\t\trgb <%.3g, %.3g, %.3g>' % tuple(material.mirror_color))
-                    file.write('\t\tfresnel 1 falloff %.3g exponent %.3g metallic %.3g} ' % (raytrace_mirror.fresnel, raytrace_mirror.fresnel_factor, raytrace_mirror.reflect_factor))
-
-        else:
-            file.write('\tdiffuse 0.8\n')
-            file.write('\tspecular 0.2\n')
-
-
-        # This is written into the object
-        '''
-        if material and material.transparency_method=='RAYTRACE':
-            'interior { ior %.3g} ' % material.raytrace_transparency.ior
-        '''
-
-        #file.write('\t\t\tcrand 1.0\n') # Sand granyness
-        #file.write('\t\t\tmetallic %.6f\n' % material.spec)
-        #file.write('\t\t\tphong %.6f\n' % material.spec)
-        #file.write('\t\t\tphong_size %.6f\n' % material.spec)
-        #file.write('\t\t\tbrilliance %.6f ' % (material.specular_hardness/256.0) # Like hardness
-
-        file.write('}\n')
-
-    def exportCamera():
-        camera = scene.camera
-        matrix = camera.matrix_world
-
-        # compute resolution
-        Qsize = float(render.resolution_x) / float(render.resolution_y)
-
-        file.write('camera {\n')
-        file.write('\tlocation  <0, 0, 0>\n')
-        file.write('\tlook_at  <0, 0, -1>\n')
-        file.write('\tright <%s, 0, 0>\n' % - Qsize)
-        file.write('\tup <0, 1, 0>\n')
-        file.write('\tangle  %f \n' % (360.0 * atan(16.0 / camera.data.lens) / pi))
-
-        file.write('\trotate  <%.6f, %.6f, %.6f>\n' % tuple([degrees(e) for e in matrix.rotation_part().to_euler()]))
-        file.write('\ttranslate <%.6f, %.6f, %.6f>\n' % (matrix[3][0], matrix[3][1], matrix[3][2]))
-        file.write('}\n')
-
-    def exportLamps(lamps):
-        # Get all lamps
-        for ob in lamps:
-            lamp = ob.data
-
-            matrix = ob.matrix_world
-
-            color = tuple([c * lamp.energy for c in lamp.color]) # Colour is modified by energy
-
-            file.write('light_source {\n')
-            file.write('\t< 0,0,0 >\n')
-            file.write('\tcolor rgb<%.3g, %.3g, %.3g>\n' % color)
-
-            if lamp.type == 'POINT': # Point Lamp
-                pass
-            elif lamp.type == 'SPOT': # Spot
-                file.write('\tspotlight\n')
-
-                # Falloff is the main radius from the centre line
-                file.write('\tfalloff %.2f\n' % (degrees(lamp.spot_size) / 2.0)) # 1 TO 179 FOR BOTH
-                file.write('\tradius %.6f\n' % ((degrees(lamp.spot_size) / 2.0) * (1.0 - lamp.spot_blend)))
-
-                # Blender does not have a tightness equivilent, 0 is most like blender default.
-                file.write('\ttightness 0\n') # 0:10f
-
-                file.write('\tpoint_at  <0, 0, -1>\n')
-            elif lamp.type == 'SUN':
-                file.write('\tparallel\n')
-                file.write('\tpoint_at  <0, 0, -1>\n') # *must* be after 'parallel'
-
-            elif lamp.type == 'AREA':
-
-                size_x = lamp.size
-                samples_x = lamp.shadow_ray_samples_x
-                if lamp.shape == 'SQUARE':
-                    size_y = size_x
-                    samples_y = samples_x
-                else:
-                    size_y = lamp.size_y
-                    samples_y = lamp.shadow_ray_samples_y
-
-                file.write('\tarea_light <%d,0,0>,<0,0,%d> %d, %d\n' % (size_x, size_y, samples_x, samples_y))
-                if lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
-                    if lamp.jitter:
-                        file.write('\tjitter\n')
-                else:
-                    file.write('\tadaptive 1\n')
-                    file.write('\tjitter\n')
-
-            if lamp.shadow_method == 'NOSHADOW':
-                file.write('\tshadowless\n')
-
-            file.write('\tfade_distance %.6f\n' % lamp.distance)
-            file.write('\tfade_power %d\n' % 1) # Could use blenders lamp quad?
-            writeMatrix(matrix)
-
-            file.write('}\n')
-
-    def exportMeta(metas):
-
-        # TODO - blenders 'motherball' naming is not supported.
-
-        for ob in metas:
-            meta = ob.data
-
-            file.write('blob {\n')
-            file.write('\t\tthreshold %.4g\n' % meta.threshold)
-
-            try:
-                material = meta.materials[0] # lame! - blender cant do enything else.
-            except:
-                material = None
-
-            for elem in meta.elements:
-
-                if elem.type not in ('BALL', 'ELLIPSOID'):
-                    continue # Not supported
-
-                loc = elem.location
-
-                stiffness = elem.stiffness
-                if elem.negative:
-                    stiffness = - stiffness
-
-                if elem.type == 'BALL':
-
-                    file.write('\tsphere { <%.6g, %.6g, %.6g>, %.4g, %.4g ' % (loc.x, loc.y, loc.z, elem.radius, stiffness))
-
-                    # After this wecould do something simple like...
-                    #  "pigment {Blue} }"
-                    # except we'll write the color
-
-                elif elem.type == 'ELLIPSOID':
-                    # location is modified by scale
-                    file.write('\tsphere { <%.6g, %.6g, %.6g>, %.4g, %.4g ' % (loc.x / elem.size_x, loc.y / elem.size_y, loc.z / elem.size_z, elem.radius, stiffness))
-                    file.write('scale <%.6g, %.6g, %.6g> ' % (elem.size_x, elem.size_y, elem.size_z))
-
-                if material:
-                    diffuse_color = material.diffuse_color
-
-                    if material.transparency and material.transparency_method == 'RAYTRACE':
-                        trans = 1.0 - material.raytrace_transparency.filter
-                    else:
-                        trans = 0.0
-
-                    file.write('pigment {rgbft<%.3g, %.3g, %.3g, %.3g, %.3g>} finish {%s} }\n' % \
-                        (diffuse_color[0], diffuse_color[1], diffuse_color[2], 1.0 - material.alpha, trans, materialNames[material.name]))
-
-                else:
-                    file.write('pigment {rgb<1 1 1>} finish {%s} }\n' % DEF_MAT_NAME)          # Write the finish last.
-
-            writeObjectMaterial(material)
-
-            writeMatrix(ob.matrix_world)
-
-            file.write('}\n')
-
-    def exportMeshs(scene, sel):
-
-        ob_num = 0
-
-        for ob in sel:
-            ob_num += 1
-
-            if ob.type in ('LAMP', 'CAMERA', 'EMPTY', 'META', 'ARMATURE'):
-                continue
-
-            me = ob.data
-            me_materials = me.materials
-
-            me = ob.create_mesh(scene, True, 'RENDER')
-
-            if not me:
-                continue
-
-            if info_callback:
-                info_callback('Object %2.d of %2.d (%s)' % (ob_num, len(sel), ob.name))
-
-            #if ob.type!='MESH':
-            #  continue
-            # me = ob.data
-
-            matrix = ob.matrix_world
-            try:
-                uv_layer = me.active_uv_texture.data
-            except:
-                uv_layer = None
-
-            try:
-                vcol_layer = me.active_vertex_color.data
-            except:
-                vcol_layer = None
-
-            faces_verts = [f.verts for f in me.faces]
-            faces_normals = [tuple(f.normal) for f in me.faces]
-            verts_normals = [tuple(v.normal) for v in me.verts]
-
-            # quads incur an extra face
-            quadCount = len([f for f in faces_verts if len(f) == 4])
-
-            file.write('mesh2 {\n')
-            file.write('\tvertex_vectors {\n')
-            file.write('\t\t%s' % (len(me.verts))) # vert count
-            for v in me.verts:
-                file.write(',\n\t\t<%.6f, %.6f, %.6f>' % tuple(v.co)) # vert count
-            file.write('\n  }\n')
-
-
-            # Build unique Normal list
-            uniqueNormals = {}
-            for fi, f in enumerate(me.faces):
-                fv = faces_verts[fi]
-                # [-1] is a dummy index, use a list so we can modify in place
-                if f.smooth: # Use vertex normals
-                    for v in fv:
-                        key = verts_normals[v]
-                        uniqueNormals[key] = [-1]
-                else: # Use face normal
-                    key = faces_normals[fi]
-                    uniqueNormals[key] = [-1]
-
-            file.write('\tnormal_vectors {\n')
-            file.write('\t\t%d' % len(uniqueNormals)) # vert count
-            idx = 0
-            for no, index in uniqueNormals.items():
-                file.write(',\n\t\t<%.6f, %.6f, %.6f>' % no) # vert count
-                index[0] = idx
-                idx += 1
-            file.write('\n  }\n')
-
-
-            # Vertex colours
-            vertCols = {} # Use for material colours also.
-
-            if uv_layer:
-                # Generate unique UV's
-                uniqueUVs = {}
-
-                for fi, uv in enumerate(uv_layer):
-
-                    if len(faces_verts[fi]) == 4:
-                        uvs = uv.uv1, uv.uv2, uv.uv3, uv.uv4
-                    else:
-                        uvs = uv.uv1, uv.uv2, uv.uv3
-
-                    for uv in uvs:
-                        uniqueUVs[tuple(uv)] = [-1]
-
-                file.write('\tuv_vectors {\n')
-                #print unique_uvs
-                file.write('\t\t%s' % (len(uniqueUVs))) # vert count
-                idx = 0
-                for uv, index in uniqueUVs.items():
-                    file.write(',\n\t\t<%.6f, %.6f>' % uv)
-                    index[0] = idx
-                    idx += 1
-                '''
-                else:
-                    # Just add 1 dummy vector, no real UV's
-                    file.write('\t\t1') # vert count
-                    file.write(',\n\t\t<0.0, 0.0>')
-                '''
-                file.write('\n  }\n')
-
-
-            if me.vertex_colors:
-
-                for fi, f in enumerate(me.faces):
-                    material_index = f.material_index
-                    material = me_materials[material_index]
-
-                    if material and material.vertex_color_paint:
-
-                        col = vcol_layer[fi]
-
-                        if len(faces_verts[fi]) == 4:
-                            cols = col.color1, col.color2, col.color3, col.color4
-                        else:
-                            cols = col.color1, col.color2, col.color3
-
-                        for col in cols:
-                            key = col[0], col[1], col[2], material_index # Material index!
-                            vertCols[key] = [-1]
-
-                    else:
-                        if material:
-                            diffuse_color = tuple(material.diffuse_color)
-                            key = diffuse_color[0], diffuse_color[1], diffuse_color[2], material_index
-                            vertCols[key] = [-1]
-
-
-            else:
-                # No vertex colours, so write material colours as vertex colours
-                for i, material in enumerate(me_materials):
-
-                    if material:
-                        diffuse_color = tuple(material.diffuse_color)
-                        key = diffuse_color[0], diffuse_color[1], diffuse_color[2], i # i == f.mat
-                        vertCols[key] = [-1]
-
-
-            # Vert Colours
-            file.write('\ttexture_list {\n')
-            file.write('\t\t%s' % (len(vertCols))) # vert count
-            idx = 0
-            for col, index in vertCols.items():
-
-                if me_materials:
-                    material = me_materials[col[3]]
-                    material_finish = materialNames[material.name]
-
-                    if material.transparency and material.transparency_method == 'RAYTRACE':
-                        trans = 1.0 - material.raytrace_transparency.filter
-                    else:
-                        trans = 0.0
-
-                else:
-                    material_finish = DEF_MAT_NAME # not working properly,
-                    trans = 0.0
-
-                #print material.apl
-                file.write(',\n\t\ttexture { pigment {rgbft<%.3g, %.3g, %.3g, %.3g, %.3g>} finish {%s}}' %
-                            (col[0], col[1], col[2], 1.0 - material.alpha, trans, material_finish))
-
-                index[0] = idx
-                idx += 1
-
-            file.write('\n  }\n')
-
-            # Face indicies
-            file.write('\tface_indices {\n')
-            file.write('\t\t%d' % (len(me.faces) + quadCount)) # faces count
-            for fi, f in enumerate(me.faces):
-                fv = faces_verts[fi]
-                material_index = f.material_index
-                if len(fv) == 4:
-                    indicies = (0, 1, 2), (0, 2, 3)
-                else:
-                    indicies = ((0, 1, 2),)
-
-                if vcol_layer:
-                    col = vcol_layer[fi]
-
-                    if len(fv) == 4:
-                        cols = col.color1, col.color2, col.color3, col.color4
-                    else:
-                        cols = col.color1, col.color2, col.color3
-
-
-                if not me_materials or me_materials[material_index] == None: # No materials
-                    for i1, i2, i3 in indicies:
-                        file.write(',\n\t\t<%d,%d,%d>' % (fv[i1], fv[i2], fv[i3])) # vert count
-                else:
-                    material = me_materials[material_index]
-                    for i1, i2, i3 in indicies:
-                        if me.vertex_colors and material.vertex_color_paint:
-                            # Colour per vertex - vertex colour
-
-                            col1 = cols[i1]
-                            col2 = cols[i2]
-                            col3 = cols[i3]
-
-                            ci1 = vertCols[col1[0], col1[1], col1[2], material_index][0]
-                            ci2 = vertCols[col2[0], col2[1], col2[2], material_index][0]
-                            ci3 = vertCols[col3[0], col3[1], col3[2], material_index][0]
-                        else:
-                            # Colour per material - flat material colour
-                            diffuse_color = material.diffuse_color
-                            ci1 = ci2 = ci3 = vertCols[diffuse_color[0], diffuse_color[1], diffuse_color[2], f.material_index][0]
-
-                        file.write(',\n\t\t<%d,%d,%d>, %d,%d,%d' % (fv[i1], fv[i2], fv[i3], ci1, ci2, ci3)) # vert count
-
-
-            file.write('\n  }\n')
-
-            # normal_indices indicies
-            file.write('\tnormal_indices {\n')
-            file.write('\t\t%d' % (len(me.faces) + quadCount)) # faces count
-            for fi, fv in enumerate(faces_verts):
-
-                if len(fv) == 4:
-                    indicies = (0, 1, 2), (0, 2, 3)
-                else:
-                    indicies = ((0, 1, 2),)
-
-                for i1, i2, i3 in indicies:
-                    if f.smooth:
-                        file.write(',\n\t\t<%d,%d,%d>' %\
-                        (uniqueNormals[verts_normals[fv[i1]]][0],\
-                         uniqueNormals[verts_normals[fv[i2]]][0],\
-                         uniqueNormals[verts_normals[fv[i3]]][0])) # vert count
-                    else:
-                        idx = uniqueNormals[faces_normals[fi]][0]
-                        file.write(',\n\t\t<%d,%d,%d>' % (idx, idx, idx)) # vert count
-
-            file.write('\n  }\n')
-
-            if uv_layer:
-                file.write('\tuv_indices {\n')
-                file.write('\t\t%d' % (len(me.faces) + quadCount)) # faces count
-                for fi, fv in enumerate(faces_verts):
-
-                    if len(fv) == 4:
-                        indicies = (0, 1, 2), (0, 2, 3)
-                    else:
-                        indicies = ((0, 1, 2),)
-
-                    uv = uv_layer[fi]
-                    if len(faces_verts[fi]) == 4:
-                        uvs = tuple(uv.uv1), tuple(uv.uv2), tuple(uv.uv3), tuple(uv.uv4)
-                    else:
-                        uvs = tuple(uv.uv1), tuple(uv.uv2), tuple(uv.uv3)
-
-                    for i1, i2, i3 in indicies:
-                        file.write(',\n\t\t<%d,%d,%d>' %\
-                        (uniqueUVs[uvs[i1]][0],\
-                         uniqueUVs[uvs[i2]][0],\
-                         uniqueUVs[uvs[i2]][0])) # vert count
-                file.write('\n  }\n')
-
-            if me.materials:
-                material = me.materials[0] # dodgy
-                writeObjectMaterial(material)
-
-            writeMatrix(matrix)
-            file.write('}\n')
-
-            bpy.data.meshes.remove(me)
-
-    def exportWorld(world):
-        if not world:
-            return
-
-        mist = world.mist
-
-        if mist.use_mist:
-            file.write('fog {\n')
-            file.write('\tdistance %.6f\n' % mist.depth)
-            file.write('\tcolor rgbt<%.3g, %.3g, %.3g, %.3g>\n' % (tuple(world.horizon_color) + (1 - mist.intensity,)))
-            #file.write('\tfog_offset %.6f\n' % mist.start)
-            #file.write('\tfog_alt 5\n')
-            #file.write('\tturbulence 0.2\n')
-            #file.write('\tturb_depth 0.3\n')
-            file.write('\tfog_type 1\n')
-            file.write('}\n')
-
-    def exportGlobalSettings(scene):
-
-        file.write('global_settings {\n')
-
-        if scene.pov_radio_enable:
-            file.write('\tradiosity {\n')
-            file.write("\t\tadc_bailout %.4g\n" % scene.pov_radio_adc_bailout)
-            file.write("\t\talways_sample %d\n" % scene.pov_radio_always_sample)
-            file.write("\t\tbrightness %.4g\n" % scene.pov_radio_brightness)
-            file.write("\t\tcount %d\n" % scene.pov_radio_count)
-            file.write("\t\terror_bound %.4g\n" % scene.pov_radio_error_bound)
-            file.write("\t\tgray_threshold %.4g\n" % scene.pov_radio_gray_threshold)
-            file.write("\t\tlow_error_factor %.4g\n" % scene.pov_radio_low_error_factor)
-            file.write("\t\tmedia %d\n" % scene.pov_radio_media)
-            file.write("\t\tminimum_reuse %.4g\n" % scene.pov_radio_minimum_reuse)
-            file.write("\t\tnearest_count %d\n" % scene.pov_radio_nearest_count)
-            file.write("\t\tnormal %d\n" % scene.pov_radio_normal)
-            file.write("\t\trecursion_limit %d\n" % scene.pov_radio_recursion_limit)
-            file.write('\t}\n')
-
-        if world:
-            file.write("\tambient_light rgb<%.3g, %.3g, %.3g>\n" % tuple(world.ambient_color))
-
-        file.write('}\n')
-
-
-    # Convert all materials to strings we can access directly per vertex.
-    writeMaterial(None) # default material
-
-    for material in bpy.data.materials:
-        writeMaterial(material)
-
-    exportCamera()
-    #exportMaterials()
-    sel = scene.objects
-    exportLamps([l for l in sel if l.type == 'LAMP'])
-    exportMeta([l for l in sel if l.type == 'META'])
-    exportMeshs(scene, sel)
-    exportWorld(scene.world)
-    exportGlobalSettings(scene)
-
-    file.close()
-
-
-def write_pov_ini(filename_ini, filename_pov, filename_image):
-    scene = bpy.data.scenes[0]
-    render = scene.render
-
-    x = int(render.resolution_x * render.resolution_percentage * 0.01)
-    y = int(render.resolution_y * render.resolution_percentage * 0.01)
-
-    file = open(filename_ini, 'w')
-
-    file.write('Input_File_Name="%s"\n' % filename_pov)
-    file.write('Output_File_Name="%s"\n' % filename_image)
-
-    file.write('Width=%d\n' % x)
-    file.write('Height=%d\n' % y)
-
-    # Needed for border render.
-    '''
-    file.write('Start_Column=%d\n' % part.x)
-    file.write('End_Column=%d\n' % (part.x+part.w))
-
-    file.write('Start_Row=%d\n' % (part.y))
-    file.write('End_Row=%d\n' % (part.y+part.h))
-    '''
-
-    file.write('Display=0\n')
-    file.write('Pause_When_Done=0\n')
-    file.write('Output_File_Type=T\n') # TGA, best progressive loading
-    file.write('Output_Alpha=1\n')
-
-    if render.render_antialiasing:
-        aa_mapping = {'5': 2, '8': 3, '11': 4, '16': 5} # method 1 assumed
-        file.write('Antialias=1\n')
-        file.write('Antialias_Depth=%d\n' % aa_mapping[render.antialiasing_samples])
-    else:
-        file.write('Antialias=0\n')
-
-    file.close()
-
-# Radiosity panel, use in the scene for now.
-FloatProperty = bpy.types.Scene.FloatProperty
-IntProperty = bpy.types.Scene.IntProperty
-BoolProperty = bpy.types.Scene.BoolProperty
-
-# Not a real pov option, just to know if we should write
-BoolProperty(attr="pov_radio_enable",
-                name="Enable Radiosity",
-                description="Enable povrays radiosity calculation",
-                default=False)
-BoolProperty(attr="pov_radio_display_advanced",
-                name="Advanced Options",
-                description="Show advanced options",
-                default=False)
-
-# Real pov options
-FloatProperty(attr="pov_radio_adc_bailout",
-                name="ADC Bailout",
-                description="The adc_bailout for radiosity rays. Use adc_bailout = 0.01 / brightest_ambient_object for good results",
-                min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default=0.01)
-
-BoolProperty(attr="pov_radio_always_sample",
-                name="Always Sample",
-                description="Only use the data from the pretrace step and not gather any new samples during the final radiosity pass",
-                default=True)
-
-FloatProperty(attr="pov_radio_brightness",
-                name="Brightness",
-                description="Amount objects are brightened before being returned upwards to the rest of the system",
-                min=0.0, max=1000.0, soft_min=0.0, soft_max=10.0, default=1.0)
-
-IntProperty(attr="pov_radio_count",
-                name="Ray Count",
-                description="Number of rays that are sent out whenever a new radiosity value has to be calculated",
-                min=1, max=1600, default=35)
-
-FloatProperty(attr="pov_radio_error_bound",
-                name="Error Bound",
-                description="One of the two main speed/quality tuning values, lower values are more accurate",
-                min=0.0, max=1000.0, soft_min=0.1, soft_max=10.0, default=1.8)
-
-FloatProperty(attr="pov_radio_gray_threshold",
-                name="Gray Threshold",
-                description="One of the two main speed/quality tuning values, lower values are more accurate",
-                min=0.0, max=1.0, soft_min=0, soft_max=1, default=0.0)
-
-FloatProperty(attr="pov_radio_low_error_factor",
-                name="Low Error Factor",
-                description="If you calculate just enough samples, but no more, you will get an image which has slightly blotchy lighting",
-                min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, default=0.5)
-
-# max_sample - not available yet
-BoolProperty(attr="pov_radio_media",
-                name="Media",
-                description="Radiosity estimation can be affected by media",
-                default=False)
-
-FloatProperty(attr="pov_radio_minimum_reuse",
-                name="Minimum Reuse",
-                description="Fraction of the screen width which sets the minimum radius of reuse for each sample point (At values higher than 2% expect errors)",
-                min=0.0, max=1.0, soft_min=0.1, soft_max=0.1, default=0.015)
-
-IntProperty(attr="pov_radio_nearest_count",
-                name="Nearest Count",
-                description="Number of old ambient values blended together to create a new interpolated value",
-                min=1, max=20, default=5)
-
-BoolProperty(attr="pov_radio_normal",
-                name="Normals",
-                description="Radiosity estimation can be affected by normals",
-                default=False)
-
-IntProperty(attr="pov_radio_recursion_limit",
-                name="Recursion Limit",
-                description="how many recursion levels are used to calculate the diffuse inter-reflection",
-                min=1, max=20, default=3)
-
-
-class PovrayRender(bpy.types.RenderEngine):
-    bl_idname = 'POVRAY_RENDER'
-    bl_label = "Povray"
-    DELAY = 0.02
-
-    def _export(self, scene):
-        import tempfile
-
-        self._temp_file_in = tempfile.mktemp(suffix='.pov')
-        self._temp_file_out = tempfile.mktemp(suffix='.tga')
-        self._temp_file_ini = tempfile.mktemp(suffix='.ini')
-        '''
-        self._temp_file_in = '/test.pov'
-        self._temp_file_out = '/test.tga'
-        self._temp_file_ini = '/test.ini'
-        '''
-
-        def info_callback(txt):
-            self.update_stats("", "POVRAY: " + txt)
-
-        write_pov(self._temp_file_in, scene, info_callback)
-
-    def _render(self):
-
-        try:
-            os.remove(self._temp_file_out) # so as not to load the old file
-        except:
-            pass
-
-        write_pov_ini(self._temp_file_ini, self._temp_file_in, self._temp_file_out)
-
-        print ("***-STARTING-***")
-
-        pov_binary = "povray"
-
-        if sys.platform == 'win32':
-            import winreg
-            regKey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, 'Software\\POV-Ray\\v3.6\\Windows')
-
-            if bitness == 64:
-                pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine64'
-            else:
-                pov_binary = winreg.QueryValueEx(regKey, 'Home')[0] + '\\bin\\pvengine'
-
-        if 1:
-            # TODO, when povray isnt found this gives a cryptic error, would be nice to be able to detect if it exists
-            try:
-                self._process = subprocess.Popen([pov_binary, self._temp_file_ini]) # stdout=subprocess.PIPE, stderr=subprocess.PIPE
-            except OSError:
-                # TODO, report api
-                print("POVRAY: could not execute '%s', possibly povray isn't installed" % pov_binary)
-                import traceback
-                traceback.print_exc()
-                print ("***-DONE-***")
-                return False
-
-        else:
-            # This works too but means we have to wait until its done
-            os.system('%s %s' % (pov_binary, self._temp_file_ini))
-
-        print ("***-DONE-***")
-        return True
-
-    def _cleanup(self):
-        for f in (self._temp_file_in, self._temp_file_ini, self._temp_file_out):
-            try:
-                os.remove(f)
-            except:
-                pass
-
-        self.update_stats("", "")
-
-    def render(self, scene):
-
-        self.update_stats("", "POVRAY: Exporting data from Blender")
-        self._export(scene)
-        self.update_stats("", "POVRAY: Parsing File")
-
-        if not self._render():
-            self.update_stats("", "POVRAY: Not found")
-            return
-
-        r = scene.render
-
-        # compute resolution
-        x = int(r.resolution_x * r.resolution_percentage * 0.01)
-        y = int(r.resolution_y * r.resolution_percentage * 0.01)
-
-        # Wait for the file to be created
-        while not os.path.exists(self._temp_file_out):
-            if self.test_break():
-                try:
-                    self._process.terminate()
-                except:
-                    pass
-                break
-
-            if self._process.poll() != None:
-                self.update_stats("", "POVRAY: Failed")
-                break
-
-            time.sleep(self.DELAY)
-
-        if os.path.exists(self._temp_file_out):
-
-            self.update_stats("", "POVRAY: Rendering")
-
-            prev_size = -1
-
-            def update_image():
-                result = self.begin_result(0, 0, x, y)
-                lay = result.layers[0]
-                # possible the image wont load early on.
-                try:
-                    lay.load_from_file(self._temp_file_out)
-                except:
-                    pass
-                self.end_result(result)
-
-            # Update while povray renders
-            while True:
-
-                # test if povray exists
-                if self._process.poll() is not None:
-                    update_image()
-                    break
-
-                # user exit
-                if self.test_break():
-                    try:
-                        self._process.terminate()
-                    except:
-                        pass
-
-                    break
-
-                # Would be nice to redirect the output
-                # stdout_value, stderr_value = self._process.communicate() # locks
-
-
-                # check if the file updated
-                new_size = os.path.getsize(self._temp_file_out)
-
-                if new_size != prev_size:
-                    update_image()
-                    prev_size = new_size
-
-                time.sleep(self.DELAY)
-
-        self._cleanup()
-
-
-# Use some of the existing buttons.
-import properties_render
-properties_render.RENDER_PT_render.COMPAT_ENGINES.add('POVRAY_RENDER')
-properties_render.RENDER_PT_dimensions.COMPAT_ENGINES.add('POVRAY_RENDER')
-properties_render.RENDER_PT_antialiasing.COMPAT_ENGINES.add('POVRAY_RENDER')
-properties_render.RENDER_PT_output.COMPAT_ENGINES.add('POVRAY_RENDER')
-del properties_render
-
-# Use only a subset of the world panels
-import properties_world
-properties_world.WORLD_PT_preview.COMPAT_ENGINES.add('POVRAY_RENDER')
-properties_world.WORLD_PT_context_world.COMPAT_ENGINES.add('POVRAY_RENDER')
-properties_world.WORLD_PT_world.COMPAT_ENGINES.add('POVRAY_RENDER')
-properties_world.WORLD_PT_mist.COMPAT_ENGINES.add('POVRAY_RENDER')
-del properties_world
-
-# Example of wrapping every class 'as is'
-import properties_material
-for member in dir(properties_material):
-    subclass = getattr(properties_material, member)
-    try:
-        subclass.COMPAT_ENGINES.add('POVRAY_RENDER')
-    except:
-        pass
-del properties_material
-import properties_data_mesh
-for member in dir(properties_data_mesh):
-    subclass = getattr(properties_data_mesh, member)
-    try:
-        subclass.COMPAT_ENGINES.add('POVRAY_RENDER')
-    except:
-        pass
-del properties_data_mesh
-import properties_texture
-for member in dir(properties_texture):
-    subclass = getattr(properties_texture, member)
-    try:
-        subclass.COMPAT_ENGINES.add('POVRAY_RENDER')
-    except:
-        pass
-del properties_texture
-import properties_data_camera
-for member in dir(properties_data_camera):
-    subclass = getattr(properties_data_camera, member)
-    try:
-        subclass.COMPAT_ENGINES.add('POVRAY_RENDER')
-    except:
-        pass
-del properties_data_camera
-
-
-class RenderButtonsPanel(bpy.types.Panel):
-    bl_space_type = 'PROPERTIES'
-    bl_region_type = 'WINDOW'
-    bl_context = "render"
-    # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
-
-    def poll(self, context):
-        rd = context.scene.render
-        return (rd.use_game_engine == False) and (rd.engine in self.COMPAT_ENGINES)
-
-
-class RENDER_PT_povray_radiosity(RenderButtonsPanel):
-    bl_label = "Radiosity"
-    COMPAT_ENGINES = {'POVRAY_RENDER'}
-
-    def draw_header(self, context):
-        scene = context.scene
-
-        self.layout.prop(scene, "pov_radio_enable", text="")
-
-    def draw(self, context):
-        layout = self.layout
-
-        scene = context.scene
-        rd = scene.render
-
-        layout.active = scene.pov_radio_enable
-
-        split = layout.split()
-
-        col = split.column()
-        col.prop(scene, "pov_radio_count", text="Rays")
-        col.prop(scene, "pov_radio_recursion_limit", text="Recursions")
-        col = split.column()
-        col.prop(scene, "pov_radio_error_bound", text="Error")
-
-        layout.prop(scene, "pov_radio_display_advanced")
-
-        if scene.pov_radio_display_advanced:
-            split = layout.split()
-
-            col = split.column()
-            col.prop(scene, "pov_radio_adc_bailout", slider=True)
-            col.prop(scene, "pov_radio_gray_threshold", slider=True)
-            col.prop(scene, "pov_radio_low_error_factor", slider=True)
-
-            col = split.column()
-            col.prop(scene, "pov_radio_brightness")
-            col.prop(scene, "pov_radio_minimum_reuse", text="Min Reuse")
-            col.prop(scene, "pov_radio_nearest_count")
-
-            split = layout.split()
-
-            col = split.column()
-            col.label(text="Estimation Influence:")
-            col.prop(scene, "pov_radio_media")
-            col.prop(scene, "pov_radio_normal")
-
-            col = split.column()
-            col.prop(scene, "pov_radio_always_sample")
-
-
-classes = [
-    PovrayRender,
-    RENDER_PT_povray_radiosity]
-
-
-def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
-
-
-def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
-
-if __name__ == "__main__":
-    register()
index 910d462a9f9d9d7d2af1247f19c1a0c5ae250226..22b842b29051299a7655e2e486e3abecb523bc63 100644 (file)
@@ -1138,7 +1138,6 @@ class Export3DS(bpy.types.Operator):
     def poll(self, context): # Poll isnt working yet
         return context.active_object != None
 
-
 # Add to a menu
 def menu_func(self, context):
     default_path = os.path.splitext(bpy.data.filepath)[0] + ".3ds"
@@ -1146,11 +1145,9 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(Export3DS)
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 def unregister():
-    bpy.types.unregister(Export3DS)
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 if __name__ == "__main__":
index 72b03a110bdea449dbed09d2f5321c4b65458e7e..8d28500dba524ee2721333c784f359440e10bc26 100644 (file)
@@ -3439,12 +3439,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(ExportFBX)
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(ExportFBX)
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 if __name__ == "__main__":
index d2e53070910b64271198f859fd3967f6bf18275a..5cbda8a76b796268e0c2cb721c4edc7cc8cbfdc9 100644 (file)
@@ -189,12 +189,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(ExportMDD)
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(ExportMDD)
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 if __name__ == "__main__":
index a4d98aac12eb8cbc86963ec0bc30f66647039871..439d094b74b9d2e6dd18efe4a3265ca73ad40eef 100644 (file)
 
 # <pep8 compliant>
 
-"""
-Name: 'Wavefront (.obj)...'
-Blender: 248
-Group: 'Export'
-Tooltip: 'Save a Wavefront OBJ File'
-"""
-
 __author__ = "Campbell Barton, Jiri Hnidek, Paolo Ciccone"
 __url__ = ['http://wiki.blender.org/index.php/Scripts/Manual/Export/wavefront_obj', 'www.blender.org', 'blenderartists.org']
 __version__ = "1.21"
@@ -970,11 +963,9 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(ExportOBJ)
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 def unregister():
-    bpy.types.unregister(ExportOBJ)
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 
index 07865e4f65a43de2100750229b887645a9b91258..03529c4023c212d70d36017ebeb2032a39ec3ec2 100644 (file)
@@ -317,12 +317,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(ExportPLY)
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(ExportPLY)
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 if __name__ == "__main__":
index 7f5dd57171c1ccc065e4f81941a8acd48f9980ea..b2f2647fc3aa9ef9111a172e68a94a7aac63b60d 100644 (file)
@@ -1248,11 +1248,9 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(ExportX3D)
     bpy.types.INFO_MT_file_export.append(menu_func)
 
 def unregister():
-    bpy.types.unregister(ExportX3D)
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 # NOTES
index 89097fd53f59ecbbc659ac1dbadcc3b82194aee1..ba9b8a1f91d79b159bff2c4d7471158ad47afc19 100644 (file)
@@ -612,12 +612,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(BvhImporter)
     bpy.types.INFO_MT_file_import.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(BvhImporter)
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 if __name__ == "__main__":
index 435e08a209e38f4cca62ac727f8999ee62b6678a..fe242ca1f292a9c4583f0c0e5b56e3ecbe76219e 100644 (file)
@@ -1032,11 +1032,9 @@ def menu_func(self, context):
     self.layout.operator(IMPORT_OT_autodesk_3ds.bl_idname, text="3D Studio (.3ds)")
 
 def register():
-    bpy.types.register(IMPORT_OT_autodesk_3ds)
     bpy.types.INFO_MT_file_import.append(menu_func)
 
 def unregister():
-    bpy.types.unregister(IMPORT_OT_autodesk_3ds)
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 # NOTES:
index 5b29a5ded909ab21e6e34f94a8b174bd965fbef0..e832489a56020f238bbedcc0f496691d893a553d 100644 (file)
@@ -1606,11 +1606,9 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(IMPORT_OT_obj)
     bpy.types.INFO_MT_file_import.append(menu_func)
 
 def unregister():
-    bpy.types.unregister(IMPORT_OT_obj)
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 
index ec0e7696630abd333e9ac07d21160be6e8a1dcfe..16fed1798c459aa7fd982418fa4977c577dd7298 100644 (file)
@@ -143,12 +143,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(importMDD)
     bpy.types.INFO_MT_file_import.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(importMDD)
     bpy.types.INFO_MT_file_import.remove(menu_func)
 
 if __name__ == "__main__":
index 9f6d1a7639e3fe39b3916f7b7ff5792e03acabf9..e9479f92ea8b2e7b999872eba477597a21c21f25 100644 (file)
@@ -189,7 +189,6 @@ def clientSendJob(conn, scene, anim = False):
 def requestResult(conn, job_id, frame):
     conn.request("GET", renderURL(job_id, frame))
 
-@rnaType
 class NetworkRenderEngine(bpy.types.RenderEngine):
     bl_idname = 'NET_RENDER'
     bl_label = "Network Render"
index 858ec800dbcd1729ab1eea65ded48fa32afa026e..4530491dae1603db6a8fc4ad4f373833404c4b40 100644 (file)
@@ -26,7 +26,6 @@ from netrender.utils import *
 import netrender.client as client
 import netrender.model
 
-@rnaType
 class RENDER_OT_netslave_bake(bpy.types.Operator):
     '''NEED DESCRIPTION'''
     bl_idname = "render.netslavebake"
@@ -84,7 +83,6 @@ class RENDER_OT_netslave_bake(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientanim(bpy.types.Operator):
     '''Start rendering an animation on network'''
     bl_idname = "render.netclientanim"
@@ -111,7 +109,6 @@ class RENDER_OT_netclientanim(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientrun(bpy.types.Operator):
     '''Start network rendering service'''
     bl_idname = "render.netclientstart"
@@ -128,7 +125,6 @@ class RENDER_OT_netclientrun(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientsend(bpy.types.Operator):
     '''Send Render Job to the Network'''
     bl_idname = "render.netclientsend"
@@ -158,7 +154,6 @@ class RENDER_OT_netclientsend(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientsendframe(bpy.types.Operator):
     '''Send Render Job with current frame to the Network'''
     bl_idname = "render.netclientsendframe"
@@ -188,7 +183,6 @@ class RENDER_OT_netclientsendframe(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientstatus(bpy.types.Operator):
     '''Refresh the status of the current jobs'''
     bl_idname = "render.netclientstatus"
@@ -228,7 +222,6 @@ class RENDER_OT_netclientstatus(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
     '''Operator documentation text, will be used for the operator tooltip and python docs.'''
     bl_idname = "render.netclientblacklistslave"
@@ -258,7 +251,6 @@ class RENDER_OT_netclientblacklistslave(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
     '''Operator documentation text, will be used for the operator tooltip and python docs.'''
     bl_idname = "render.netclientwhitelistslave"
@@ -289,7 +281,6 @@ class RENDER_OT_netclientwhitelistslave(bpy.types.Operator):
         return self.execute(context)
 
 
-@rnaType
 class RENDER_OT_netclientslaves(bpy.types.Operator):
     '''Refresh status about available Render slaves'''
     bl_idname = "render.netclientslaves"
@@ -334,7 +325,6 @@ class RENDER_OT_netclientslaves(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientcancel(bpy.types.Operator):
     '''Cancel the selected network rendering job.'''
     bl_idname = "render.netclientcancel"
@@ -363,7 +353,6 @@ class RENDER_OT_netclientcancel(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class RENDER_OT_netclientcancelall(bpy.types.Operator):
     '''Cancel all running network rendering jobs.'''
     bl_idname = "render.netclientcancelall"
@@ -390,7 +379,6 @@ class RENDER_OT_netclientcancelall(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class netclientdownload(bpy.types.Operator):
     '''Download render results from the network'''
     bl_idname = "render.netclientdownload"
@@ -435,7 +423,6 @@ class netclientdownload(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class netclientscan(bpy.types.Operator):
     '''Listen on network for master server broadcasting its address and port.'''
     bl_idname = "render.netclientscan"
@@ -458,7 +445,6 @@ class netclientscan(bpy.types.Operator):
     def invoke(self, context, event):
         return self.execute(context)
 
-@rnaType
 class netclientweb(bpy.types.Operator):
     '''Open new window with information about running rendering jobs'''
     bl_idname = "render.netclientweb"
index c82a031100b28c16389e942add95118a694d61b0..594ebcd12dbd1d329d1013e982a51de9b3a0706a 100644 (file)
@@ -87,7 +87,6 @@ class RenderButtonsPanel():
         return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
 
 # Setting panel, use in the scene for now.
-@rnaType
 class RENDER_PT_network_settings(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Network Settings"
     COMPAT_ENGINES = {'NET_RENDER'}
@@ -122,7 +121,6 @@ class RENDER_PT_network_settings(bpy.types.Panel, RenderButtonsPanel):
 
         layout.operator("render.netclientweb", icon='QUESTION')
 
-@rnaType
 class RENDER_PT_network_slave_settings(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Slave Settings"
     COMPAT_ENGINES = {'NET_RENDER'}
@@ -147,7 +145,7 @@ class RENDER_PT_network_slave_settings(bpy.types.Panel, RenderButtonsPanel):
         sub = layout.column()
         sub.enabled = rd.threads_mode == 'FIXED'
         sub.prop(rd, "threads")
-@rnaType
+
 class RENDER_PT_network_master_settings(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Master Settings"
     COMPAT_ENGINES = {'NET_RENDER'}
@@ -166,7 +164,6 @@ class RENDER_PT_network_master_settings(bpy.types.Panel, RenderButtonsPanel):
         layout.prop(netsettings, "master_broadcast")
         layout.prop(netsettings, "master_clear")
 
-@rnaType
 class RENDER_PT_network_job(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Job Settings"
     COMPAT_ENGINES = {'NET_RENDER'}
@@ -207,7 +204,6 @@ class RENDER_PT_network_job(bpy.types.Panel, RenderButtonsPanel):
         row.prop(netsettings, "priority")
         row.prop(netsettings, "chunks")
 
-@rnaType
 class RENDER_PT_network_slaves(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Slaves Status"
     COMPAT_ENGINES = {'NET_RENDER'}
@@ -246,7 +242,6 @@ class RENDER_PT_network_slaves(bpy.types.Panel, RenderButtonsPanel):
             layout.label(text="Seen: " + time.ctime(slave.last_seen))
             layout.label(text="Stats: " + slave.stats)
 
-@rnaType
 class RENDER_PT_network_slaves_blacklist(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Slaves Blacklist"
     COMPAT_ENGINES = {'NET_RENDER'}
@@ -284,7 +279,6 @@ class RENDER_PT_network_slaves_blacklist(bpy.types.Panel, RenderButtonsPanel):
             layout.label(text="Seen: " + time.ctime(slave.last_seen))
             layout.label(text="Stats: " + slave.stats)
 
-@rnaType
 class RENDER_PT_network_jobs(bpy.types.Panel, RenderButtonsPanel):
     bl_label = "Jobs"
     COMPAT_ENGINES = {'NET_RENDER'}
@@ -325,15 +319,12 @@ class RENDER_PT_network_jobs(bpy.types.Panel, RenderButtonsPanel):
             layout.label(text="Done: %04i" % job.results[DONE])
             layout.label(text="Error: %04i" % job.results[ERROR])
 
-@rnaType
 class NetRenderSettings(bpy.types.IDPropertyGroup):
     pass
 
-@rnaType
 class NetRenderSlave(bpy.types.IDPropertyGroup):
     pass
 
-@rnaType
 class NetRenderJob(bpy.types.IDPropertyGroup):
     pass
 
index fa2eb6fb5f56f93517c90f302fc927e7f7115ba7..31123ce26da5abedcebb141f33ec562984c66541 100644 (file)
@@ -57,10 +57,6 @@ FRAME_STATUS_TEXT = {
         ERROR: "Error"
         }
 
-def rnaType(rna_type):
-    if bpy: bpy.types.register(rna_type)
-    return rna_type
-
 def reporting(report, message, errorType = None):
     if errorType:
         t = 'ERROR'
index 06dbe8fd4cca9c6e1a0c7f26c396095aad97a0f5..3f3eab2ac2a8cfcaf61b283a650f7220012c6290 100644 (file)
@@ -30,7 +30,6 @@ import sys as _sys
 from _bpy import blend_paths
 from _bpy import script_paths as _bpy_script_paths
 
-
 def _test_import(module_name, loaded_modules):
     import traceback
     import time
@@ -84,9 +83,9 @@ def modules_from_path(path, loaded_modules):
             modules.append(mod)
 
     return modules
-
-_loaded = [] # store loaded modules for reloading.
-_bpy_types = __import__("bpy_types") # keep for comparisons, never ever reload this.
+            
+_global_loaded_modules = [] # store loaded module names for reloading.
+import bpy_types as _bpy_types # keep for comparisons, never ever reload this.
 
 
 def load_scripts(reload_scripts=False, refresh_scripts=False):
@@ -101,12 +100,39 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
     import traceback
     import time
 
+    # must be set back to True on exits
+    _bpy_types._register_immediate = False
+
     t_main = time.time()
 
     loaded_modules = set()
 
     if refresh_scripts:
         original_modules = _sys.modules.values()
+    
+    if reload_scripts:
+        _bpy_types.TypeMap.clear()
+        _bpy_types.PropertiesMap.clear()
+
+    def register_module_call(mod):
+        _bpy_types._register_module(mod.__name__)
+        register = getattr(mod, "register", None)
+        if register:
+            try:
+                register()
+            except:
+                traceback.print_exc()
+        else:
+            print("\nWarning! '%s' has no register function, this is now a requirement for registerable scripts." % mod.__file__)
+
+    def unregister_module_call(mod):
+        _bpy_types._unregister_module(mod.__name__)
+        unregister = getattr(mod, "unregister", None)
+        if unregister:
+            try:
+                unregister()
+            except:
+                traceback.print_exc()
 
     def sys_path_ensure(path):
         if path not in _sys.path: # reloading would add twice
@@ -134,48 +160,23 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
             mod = test_reload(mod)
 
         if mod:
-            register = getattr(mod, "register", None)
-            if register:
-                try:
-                    register()
-                except:
-                    traceback.print_exc()
-            else:
-                print("\nWarning! '%s' has no register function, this is now a requirement for registerable scripts." % mod.__file__)
-            _loaded.append(mod)
+            register_module_call(mod)
+            _global_loaded_modules.append(mod.__name__)
 
     if reload_scripts:
 
-        # TODO, this is broken but should work, needs looking into
-        '''
-        # reload modules that may not be directly included
-        for type_class_name in dir(_bpy.types):
-            type_class = getattr(_bpy.types, type_class_name)
-            module_name = getattr(type_class, "__module__", "")
-
-            if module_name and module_name != "bpy.types": # hard coded for C types
-                loaded_modules.add(module_name)
-
-        # sorting isnt needed but rather it be pradictable
-        for module_name in sorted(loaded_modules):
-            print("Reloading:", module_name)
-            test_reload(_sys.modules[module_name])
-        '''
+        # module names -> modules
+        _global_loaded_modules[:] = [_sys.modules[mod_name] for mod_name in _global_loaded_modules]
 
         # loop over and unload all scripts
-        _loaded.reverse()
-        for mod in _loaded:
-            unregister = getattr(mod, "unregister", None)
-            if unregister:
-                try:
-                    unregister()
-                except:
-                    traceback.print_exc()
+        _global_loaded_modules.reverse()
+        for mod in _global_loaded_modules:
+            unregister_module_call(mod)
 
-        for mod in _loaded:
-            reload(mod)
+        for mod in _global_loaded_modules:
+            test_reload(mod)
 
-        _loaded[:] = []
+        _global_loaded_modules[:] = []
 
     user_path = user_script_path()
 
@@ -197,7 +198,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
 
     # load addons
     used_ext = {ext.module for ext in _bpy.context.user_preferences.addons}
-    paths = script_paths("addons")
+    paths = script_paths("addons") + script_paths("addons_contrib")
     for path in paths:
         sys_path_ensure(path)
 
@@ -211,6 +212,8 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
 
     if _bpy.app.debug:
         print("Python Script Load Time %.4f" % (time.time() - t_main))
+    
+    _bpy_types._register_immediate = True
 
 
 def expandpath(path):
@@ -336,7 +339,7 @@ _presets = _os.path.join(_scripts[0], "presets") # FIXME - multiple paths
 
 def preset_paths(subdir):
     '''
-    Returns a list of paths for a spesific preset.
+    Returns a list of paths for a specific preset.
     '''
 
     return (_os.path.join(_presets, subdir), )
index 8cbb2bf4e80ed8b767ff2b7d7e677a8cf2102f12..c5f7ee150c937aea10d646e11fb6dc7d7cc1d404 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 
 from _bpy import types as bpy_types
+import _bpy
 from mathutils import Vector
 
 StructRNA = bpy_types.Struct.__bases__[0]
@@ -539,8 +540,83 @@ class Text(bpy_types.ID):
 
 import collections
 
+TypeMap = {}
+# Properties (IDPropertyGroup) are different from types because they need to be registered
+# before adding sub properties to them, so they are registered on definition
+# and unregistered on unload
+PropertiesMap = {}
 
-class OrderedMeta(type):
+# Using our own loading function we set this to false
+# so when running a script directly in the text editor
+# registers moduals instantly.
+_register_immediate = True
+
+def _unregister_module(module, free=True):
+    for t in TypeMap.get(module, ()):
+        try:
+            bpy_types.unregister(t)
+        except:
+            import traceback
+            print("bpy.utils._unregister_module(): Module '%s' failed to unregister class '%s.%s'" % (module, t.__module__, t.__name__))
+            traceback.print_exc()
+
+    if free == True and module in TypeMap:
+        del TypeMap[module]
+
+
+    for t in PropertiesMap.get(module, ()):
+        try:
+            bpy_types.unregister(t)
+        except:
+            import traceback
+            print("bpy.utils._unload_module(): Module '%s' failed to unregister class '%s.%s'" % (module, t.__module__, t.__name__))
+            traceback.print_exc()
+
+    if free == True and module in PropertiesMap:
+        del PropertiesMap[module]
+
+
+def _register_module(module):
+    for t in TypeMap.get(module, ()):
+        try:
+            bpy_types.register(t)
+        except:
+            import traceback
+            print("bpy.utils._register_module(): Module '%s' failed to register class '%s.%s'" % (module, t.__module__, t.__name__))
+            traceback.print_exc()
+
+
+class RNAMeta(type):
+    @classmethod
+    def _register_immediate(cls):
+        return _register_immediate
+    
+    def __new__(cls, name, bases, classdict, **args):
+        result = type.__new__(cls, name, bases, classdict)
+        if bases and bases[0] != StructRNA:
+            module = result.__module__
+
+            ClassMap = TypeMap
+
+            # Register right away if needed
+            if cls._register_immediate():
+                bpy_types.register(result)
+                ClassMap = PropertiesMap 
+
+            # first part of packages only
+            if "." in module:
+                module = module[:module.index(".")]
+            
+            ClassMap.setdefault(module, []).append(result)
+
+        return result
+
+class RNAMetaRegister(RNAMeta):
+    @classmethod
+    def _register_immediate(cls):
+        return True
+
+class OrderedMeta(RNAMeta):
 
     def __init__(cls, name, bases, attributes):
         super(OrderedMeta, cls).__init__(name, bases, attributes)
@@ -549,7 +625,6 @@ class OrderedMeta(type):
     def __prepare__(name, bases, **kwargs):
         return collections.OrderedDict()
 
-
 # Only defined so operators members can be used by accessing self.order
 class Operator(StructRNA, metaclass=OrderedMeta):
     __slots__ = ()
@@ -564,7 +639,12 @@ class Macro(StructRNA, metaclass=OrderedMeta):
     def define(self, opname):
         from _bpy import ops
         return ops.macro_define(self, opname)
+    
+class IDPropertyGroup(StructRNA, metaclass=RNAMetaRegister):
+        __slots__ = ()
 
+class RenderEngine(StructRNA, metaclass=RNAMeta):
+    __slots__ = ()
 
 class _GenericUI:
     __slots__ = ()
@@ -606,15 +686,15 @@ class _GenericUI:
             pass
 
 
-class Panel(StructRNA, _GenericUI):
+class Panel(StructRNA, _GenericUI, metaclass=RNAMeta):
     __slots__ = ()
 
 
-class Header(StructRNA, _GenericUI):
+class Header(StructRNA, _GenericUI, metaclass=RNAMeta):
     __slots__ = ()
 
 
-class Menu(StructRNA, _GenericUI):
+class Menu(StructRNA, _GenericUI, metaclass=RNAMeta):
     __slots__ = ()
 
     def path_menu(self, searchpaths, operator, props_default={}):
index 3e8662c275f78c53045928594ecf5125b0eaf0c2..eda27240fb5134893654b0810ff6168d93349ee2 100644 (file)
@@ -124,7 +124,7 @@ def draw(layout, context, context_member, use_edit=True):
             assign_props(prop, val_draw, key)
 
 
-class PropertyPanel(bpy.types.Panel):
+class PropertyPanel():
     """
     The subclass should have its own poll function
     and the variable '_context_path' MUST be set.
@@ -135,130 +135,3 @@ class PropertyPanel(bpy.types.Panel):
     def draw(self, context):
         draw(self.layout, context, self._context_path)
 
-
-from bpy.props import *
-
-
-rna_path = StringProperty(name="Property Edit",
-    description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'})
-
-rna_value = StringProperty(name="Property Value",
-    description="Property value edit", maxlen=1024, default="")
-
-rna_property = StringProperty(name="Property Name",
-    description="Property name edit", maxlen=1024, default="")
-
-rna_min = FloatProperty(name="Min", default=0.0, precision=3)
-rna_max = FloatProperty(name="Max", default=1.0, precision=3)
-
-
-class WM_OT_properties_edit(bpy.types.Operator):
-    '''Internal use (edit a property data_path)'''
-    bl_idname = "wm.properties_edit"
-    bl_label = "Edit Property"
-
-    data_path = rna_path
-    property = rna_property
-    value = rna_value
-    min = rna_min
-    max = rna_max
-    description = StringProperty(name="Tip", default="")
-
-    def execute(self, context):
-        data_path = self.properties.data_path
-        value = self.properties.value
-        prop = self.properties.property
-        prop_old = self._last_prop[0]
-
-        try:
-            value_eval = eval(value)
-        except:
-            value_eval = value
-
-        # First remove
-        item = eval("context.%s" % data_path)
-
-        rna_idprop_ui_prop_clear(item, prop_old)
-        exec_str = "del item['%s']" % prop_old
-        # print(exec_str)
-        exec(exec_str)
-
-
-        # Reassign
-        exec_str = "item['%s'] = %s" % (prop, repr(value_eval))
-        # print(exec_str)
-        exec(exec_str)
-        self._last_prop[:] = [prop]
-
-        prop_type = type(item[prop])
-
-        prop_ui = rna_idprop_ui_prop_get(item, prop)
-
-        if prop_type in (float, int):
-
-            prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.properties.min)
-            prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.properties.max)
-
-        prop_ui['description'] = self.properties.description
-
-        return {'FINISHED'}
-
-    def invoke(self, context, event):
-
-        self._last_prop = [self.properties.property]
-
-        item = eval("context.%s" % self.properties.data_path)
-
-        # setup defaults
-        prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
-        if prop_ui:
-            self.properties.min = prop_ui.get("min", -1000000000)
-            self.properties.max = prop_ui.get("max", 1000000000)
-            self.properties.description = prop_ui.get("description", "")
-
-        wm = context.manager
-        # This crashes, TODO - fix
-        #return wm.invoke_props_popup(self, event)
-
-        wm.invoke_props_popup(self, event)
-        return {'RUNNING_MODAL'}
-
-
-class WM_OT_properties_add(bpy.types.Operator):
-    '''Internal use (edit a property data_path)'''
-    bl_idname = "wm.properties_add"
-    bl_label = "Add Property"
-
-    data_path = rna_path
-
-    def execute(self, context):
-        item = eval("context.%s" % self.properties.data_path)
-
-        def unique_name(names):
-            prop = 'prop'
-            prop_new = prop
-            i = 1
-            while prop_new in names:
-                prop_new = prop + str(i)
-                i += 1
-
-            return prop_new
-
-        property = unique_name(item.keys())
-
-        item[property] = 1.0
-        return {'FINISHED'}
-
-
-class WM_OT_properties_remove(bpy.types.Operator):
-    '''Internal use (edit a property data_path)'''
-    bl_idname = "wm.properties_remove"
-    bl_label = "Remove Property"
-
-    data_path = rna_path
-    property = rna_property
-
-    def execute(self, context):
-        item = eval("context.%s" % self.properties.data_path)
-        del item[self.properties.property]
-        return {'FINISHED'}
index 164bbfb100bea7252226bc246a48c3984ea5ba9e..5d6ec1f559fa9a441433eed503534c0f0f4a715e 100644 (file)
@@ -606,12 +606,10 @@ menu_func = (lambda self, context: self.layout.operator(AddHuman.bl_idname,
 
 
 def register():
-    bpy.types.register(AddHuman)
     bpy.types.INFO_MT_armature_add.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(AddHuman)
     bpy.types.INFO_MT_armature_add.remove(menu_func)
 
 if __name__ == "__main__":
index 16bf4e1c92c6f9093dffc6cf8a69fcd9f25fe098..d64b92a8b19322e41759cae4c20b6d731720154c 100644 (file)
@@ -137,12 +137,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(AddTorus)
     bpy.types.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(AddTorus)
     bpy.types.INFO_MT_mesh_add.remove(menu_func)
 
 if __name__ == "__main__":
index 2881e87fe00826de88fd497bdd39daec0f6b2b7c..bf551a4dc31e9ef11e9da62dc3d02dcc856788c8 100644 (file)
@@ -44,16 +44,17 @@ def get_console(console_id):
     from code import InteractiveConsole
 
     consoles = getattr(get_console, "consoles", None)
+    hash_next = hash(bpy.context.manager)
 
     if consoles is None:
         consoles = get_console.consoles = {}
+        get_console.consoles_namespace_hash = hash_next
     else:
         # check if clearning the namespace is needed to avoid a memory leak.
         # the window manager is normally loaded with new blend files
         # so this is a reasonable way to deal with namespace clearing.
         # bpy.data hashing is reset by undo so cant be used.
         hash_prev = getattr(get_console, "consoles_namespace_hash", 0)
-        hash_next = hash(bpy.context.manager)
 
         if hash_prev != hash_next:
             get_console.consoles_namespace_hash = hash_next
index 39c226294ee68d82012680eaab35193cc2e102e1..11431c52eb66e981f26cb87f5f7150d27850bb4b 100644 (file)
@@ -56,10 +56,10 @@ class DiscontFilterOp(bpy.types.Operator):
         return {'FINISHED'}
 
 def register():
-    bpy.types.register(DiscontFilterOp)
+    pass
 
 def unregister():
-    bpy.types.unregister(DiscontFilterOp)
+    pass
 
 if __name__ == "__main__":
     register()
index be583012d7a4a6000afa7de1bd3934a7f3713e8d..27d9ea64c0c4b44e90b57b6445c0c285d2331dab 100644 (file)
@@ -56,13 +56,15 @@ class EditExternally(bpy.types.Operator):
         return image_editor
 
     def execute(self, context):
+        import os
         import subprocess
-        filepath = self.properties.filepath
-        image_editor = self._editor_guess(context)
+        filepath = bpy.utils.expandpath(self.properties.filepath)
+
+        if not os.path.exists(filepath):
+            self.report('ERROR', "Image path '%s' not found." % filepath)
+            return {'CANCELLED'}
 
-        cmd = []
-        cmd.extend(image_editor)
-        cmd.append(bpy.utils.expandpath(filepath))
+        cmd = self._editor_guess(context) + [filepath]
 
         subprocess.Popen(cmd)
 
@@ -186,23 +188,12 @@ class ProjectApply(bpy.types.Operator):
 
         return {'FINISHED'}
 
-classes = [
-    EditExternally,
-    SaveDirty,
-    ProjectEdit,
-    ProjectApply]
-
 
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
-
+    pass
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index b63997b8eba3dba5fb286f7292fe1df268b42200..ee3e93c58c46f3fd2205d5d4d03d53e545695774 100644 (file)
@@ -172,22 +172,12 @@ class MeshMirrorUV(bpy.types.Operator):
         return {'FINISHED'}
 
 
-# Register the operator
-classes = [
-    MeshSelectInteriorFaces,
-    MeshMirrorUV]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index ceb4621d643b3895a76225e0ac8d423b7ba72117..bec5f5b3909ab6c7c0cb660d7ce61c6e283151a7 100644 (file)
@@ -178,12 +178,12 @@ class BakeAction(bpy.types.Operator):
 
 
 def register():
-    bpy.types.register(BakeAction)
+    pass
     # bpy.types.INFO_MT_mesh_add.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(BakeAction)
+    pass
     # bpy.types.INFO_MT_mesh_add.remove(menu_func)
 
 if __name__ == "__main__":
index 403491bfa28fde860565017da4ad93d7cf52371e..8d9280e43afe0430c1f349910ac931c757267aef 100644 (file)
@@ -558,28 +558,12 @@ class ClearAllRestrictRender(bpy.types.Operator):
         return {'FINISHED'}
 
 
-classes = [
-    SelectPattern,
-    SelectCamera,
-    SelectHierarchy,
-    SubdivisionSet,
-    ShapeTransfer,
-    JoinUVs,
-    IsolateTypeRender,
-    MakeDupliFace,
-    ClearAllRestrictRender]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
\ No newline at end of file
index 6e5eef0fbc289a66fb8db1847e77062a5083663a..39b642c1b9f41b664ec96ceb341c77ac192fcf37 100644 (file)
@@ -286,12 +286,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(AlignObjects)
     bpy.types.VIEW3D_MT_transform.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(AlignObjects)
     bpy.types.VIEW3D_MT_transform.remove(menu_func)
 
 if __name__ == "__main__":
index 89884b1767f59f7b66d0dfb4443b994a878cb9b8..8c3f4eb6dfdcd45b017f20f764bc7c7af7c84d55 100644 (file)
@@ -140,12 +140,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(RandomizeLocRotSize)
     bpy.types.VIEW3D_MT_transform.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(RandomizeLocRotSize)
     bpy.types.VIEW3D_MT_transform.remove(menu_func)
 
 if __name__ == "__main__":
index f80c5e69ddd2be15eee5af3afdc9a152c71c8af5..2012ba913fbf3654a45f44328991bab15ff84da7 100644 (file)
@@ -22,7 +22,7 @@ import bpy
 import os
 
 
-class AddPresetBase(bpy.types.Operator):
+class AddPresetBase():
     '''Base preset class, only for subclassing
     subclasses must define
      - preset_values
@@ -91,7 +91,7 @@ class ExecutePreset(bpy.types.Operator):
         return {'FINISHED'}
 
 
-class AddPresetRender(AddPresetBase):
+class AddPresetRender(AddPresetBase, bpy.types.Operator):
     '''Add a Render Preset'''
     bl_idname = "render.preset_add"
     bl_label = "Add Render Preset"
@@ -113,7 +113,7 @@ class AddPresetRender(AddPresetBase):
     preset_subdir = "render"
 
 
-class AddPresetSSS(AddPresetBase):
+class AddPresetSSS(AddPresetBase, bpy.types.Operator):
     '''Add a Subsurface Scattering Preset'''
     bl_idname = "material.sss_preset_add"
     bl_label = "Add SSS Preset"
@@ -138,7 +138,7 @@ class AddPresetSSS(AddPresetBase):
     preset_subdir = "sss"
 
 
-class AddPresetCloth(AddPresetBase):
+class AddPresetCloth(AddPresetBase, bpy.types.Operator):
     '''Add a Cloth Preset'''
     bl_idname = "cloth.preset_add"
     bl_label = "Add Cloth Preset"
@@ -156,7 +156,7 @@ class AddPresetCloth(AddPresetBase):
     preset_subdir = "cloth"
 
 
-class AddPresetSunSky(AddPresetBase):
+class AddPresetSunSky(AddPresetBase, bpy.types.Operator):
     '''Add a Sky & Atmosphere Preset'''
     bl_idname = "lamp.sunsky_preset_add"
     bl_label = "Add Sunsky Preset"
@@ -181,7 +181,7 @@ class AddPresetSunSky(AddPresetBase):
     preset_subdir = "sunsky"
 
 
-class AddPresetInteraction(AddPresetBase):
+class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
     '''Add an Application Interaction Preset'''
     bl_idname = "wm.interaction_preset_add"
     bl_label = "Add Interaction Preset"
@@ -203,25 +203,12 @@ class AddPresetInteraction(AddPresetBase):
 
     preset_subdir = "interaction"
 
-classes = [
-    ExecutePreset,
-    AddPresetRender,
-    AddPresetSSS,
-    AddPresetCloth,
-    AddPresetSunSky,
-    AddPresetInteraction]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 2ecd445df1d02eb3a1603ee39a5836779bf4f507..7893ce0ff3eaedab8350069430a51c2ff7eb7c9c 100644 (file)
@@ -144,11 +144,11 @@ class PlayRenderedAnim(bpy.types.Operator):
 
 
 def register():
-    bpy.types.register(PlayRenderedAnim)
+    pass
 
 
 def unregister():
-    bpy.types.unregister(PlayRenderedAnim)
+    pass
 
 if __name__ == "__main__":
     register()
index 432486b70cf71dfe59dbf5f9f1ef7d11357d2504..e01f2dcb23a23779380542aa4316c2922762ef14 100644 (file)
@@ -132,19 +132,11 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
 
 
 def register():
-    register = bpy.types.register
-
-    register(SequencerCrossfadeSounds)
-    register(SequencerCutMulticam)
-    register(SequencerDeinterlaceSelectedMovies)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-
-    unregister(SequencerCrossfadeSounds)
-    unregister(SequencerCutMulticam)
-    unregister(SequencerDeinterlaceSelectedMovies)
+    pass
 
 
 if __name__ == "__main__":
index a7abd475b8d3295a6d9cd2087dbcaa9c79717472..23e06c968cda3d619f87effdb420c0f9dd22e47b 100644 (file)
@@ -216,12 +216,10 @@ def menu_func(self, context):
 
 
 def register():
-    bpy.types.register(ExportUVLayout)
     bpy.types.IMAGE_MT_uvs.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(ExportUVLayout)
     bpy.types.IMAGE_MT_uvs.remove(menu_func)
 
 if __name__ == "__main__":
index 6466d48a9fee539898547338ca8c15558777d2d3..6f337bd623d48680f8cdaecabfb4559adc68dba6 100644 (file)
@@ -263,12 +263,10 @@ menu_func = (lambda self, context: self.layout.operator(FollowActiveQuads.bl_idn
 
 
 def register():
-    bpy.types.register(FollowActiveQuads)
     bpy.types.VIEW3D_MT_uv_map.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(FollowActiveQuads)
     bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
 
 if __name__ == "__main__":
index 78cef26f78c9bc3976896be65665ad24d4efc435..637dccda4ba4217d8e57565f2ae17c0f90da1e07 100644 (file)
@@ -1138,12 +1138,10 @@ menu_func = (lambda self, context: self.layout.operator(SmartProject.bl_idname,
 
 
 def register():
-    bpy.types.register(SmartProject)
     bpy.types.VIEW3D_MT_uv_map.append(menu_func)
 
 
 def unregister():
-    bpy.types.unregister(SmartProject)
     bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
 
 if __name__ == "__main__":
index 63a3aa3896b63e043bebaf4562aa8f0425b7e543..21c19d528ccec34bed1a61f42f3c88523f4b31fd 100644 (file)
@@ -180,11 +180,11 @@ class VertexPaintDirt(bpy.types.Operator):
 
 
 def register():
-    bpy.types.register(VertexPaintDirt)
+    pass
 
 
 def unregister():
-    bpy.types.unregister(VertexPaintDirt)
+    pass
 
 if __name__ == "__main__":
     register()
index ed77f32ff6d7deb4f5034a19fb4c0ee2cff665a6..a3ae834dbe706f75446366b2ab2cb5bd480c95f4 100644 (file)
@@ -21,7 +21,7 @@
 import bpy
 
 from bpy.props import *
-
+from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear
 
 class MESH_OT_delete_edgeloop(bpy.types.Operator):
     '''Delete an edge loop by merging the faces on each side to a single face loop'''
@@ -325,6 +325,42 @@ class WM_OT_context_cycle_enum(bpy.types.Operator):
         exec("context.%s=advance_enum" % self.properties.data_path)
         return {'FINISHED'}
 
+
+class WM_OT_context_set_id(bpy.types.Operator):
+    '''Toggle a context value.'''
+    bl_idname = "wm.context_set_id"
+    bl_label = "Set Library ID"
+    bl_options = {'UNDO'}
+
+    data_path = rna_path_prop
+    value = StringProperty(name="Value",
+            description="Assign value", maxlen=1024, default="")
+
+    def execute(self, context):
+        value = self.properties.value
+        data_path = self.properties.data_path
+
+        # match the pointer type from the target property to bpy.data.*
+        # so we lookup the correct list.
+        data_path_base, data_path_prop = data_path.rsplit(".", 1)
+        data_prop_rna = eval("context.%s" % data_path_base).rna_type.properties[data_path_prop]
+        data_prop_rna_type = data_prop_rna.fixed_type
+
+        id_iter = None
+
+        for prop in bpy.data.rna_type.properties:
+            if prop.rna_type.identifier == "CollectionProperty":
+                if prop.fixed_type == data_prop_rna_type:
+                    id_iter = prop.identifier
+                    break
+
+        if id_iter:
+            value_id = getattr(bpy.data, id_iter).get(value)
+            exec("context.%s=value_id" % data_path)
+
+        return {'FINISHED'}
+
+
 doc_id = StringProperty(name="Doc ID",
         description="", maxlen=1024, default="", options={'HIDDEN'})
 
@@ -576,46 +612,139 @@ class WM_OT_doc_edit(bpy.types.Operator):
         return wm.invoke_props_dialog(self, width=600)
 
 
-import rna_prop_ui
+from bpy.props import *
+
+
+rna_path = StringProperty(name="Property Edit",
+    description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'})
+
+rna_value = StringProperty(name="Property Value",
+    description="Property value edit", maxlen=1024, default="")
+
+rna_property = StringProperty(name="Property Name",
+    description="Property name edit", maxlen=1024, default="")
+
+rna_min = FloatProperty(name="Min", default=0.0, precision=3)
+rna_max = FloatProperty(name="Max", default=1.0, precision=3)
+
+
+class WM_OT_properties_edit(bpy.types.Operator):
+    '''Internal use (edit a property data_path)'''
+    bl_idname = "wm.properties_edit"
+    bl_label = "Edit Property"
+
+    data_path = rna_path
+    property = rna_property
+    value = rna_value
+    min = rna_min
+    max = rna_max
+    description = StringProperty(name="Tip", default="")
+
+    def execute(self, context):
+        data_path = self.properties.data_path
+        value = self.properties.value
+        prop = self.properties.property
+        prop_old = self._last_prop[0]
+
+        try:
+            value_eval = eval(value)
+        except:
+            value_eval = value
+
+        # First remove
+        item = eval("context.%s" % data_path)
+
+        rna_idprop_ui_prop_clear(item, prop_old)
+        exec_str = "del item['%s']" % prop_old
+        # print(exec_str)
+        exec(exec_str)
+
+
+        # Reassign
+        exec_str = "item['%s'] = %s" % (prop, repr(value_eval))
+        # print(exec_str)
+        exec(exec_str)
+        self._last_prop[:] = [prop]
+
+        prop_type = type(item[prop])
+
+        prop_ui = rna_idprop_ui_prop_get(item, prop)
+
+        if prop_type in (float, int):
+
+            prop_ui['soft_min'] = prop_ui['min'] = prop_type(self.properties.min)
+            prop_ui['soft_max'] = prop_ui['max'] = prop_type(self.properties.max)
+
+        prop_ui['description'] = self.properties.description
+
+        return {'FINISHED'}
+
+    def invoke(self, context, event):
+
+        self._last_prop = [self.properties.property]
+
+        item = eval("context.%s" % self.properties.data_path)
+
+        # setup defaults
+        prop_ui = rna_idprop_ui_prop_get(item, self.properties.property, False) # dont create
+        if prop_ui:
+            self.properties.min = prop_ui.get("min", -1000000000)
+            self.properties.max = prop_ui.get("max", 1000000000)
+            self.properties.description = prop_ui.get("description", "")
+
+        wm = context.manager
+        # This crashes, TODO - fix
+        #return wm.invoke_props_popup(self, event)
+
+        wm.invoke_props_popup(self, event)
+        return {'RUNNING_MODAL'}
+
+
+class WM_OT_properties_add(bpy.types.Operator):
+    '''Internal use (edit a property data_path)'''
+    bl_idname = "wm.properties_add"
+    bl_label = "Add Property"
 
-classes = [
-    MESH_OT_delete_edgeloop,
+    data_path = rna_path
 
-    WM_OT_context_set_boolean,
-    WM_OT_context_set_int,
-    WM_OT_context_scale_int,
-    WM_OT_context_set_float,
-    WM_OT_context_set_string,
-    WM_OT_context_set_enum,
-    WM_OT_context_set_value,
-    WM_OT_context_toggle,
-    WM_OT_context_toggle_enum,
-    WM_OT_context_cycle_enum,
-    WM_OT_context_cycle_int,
-    WM_OT_context_modal_mouse,
+    def execute(self, context):
+        item = eval("context.%s" % self.properties.data_path)
+
+        def unique_name(names):
+            prop = 'prop'
+            prop_new = prop
+            i = 1
+            while prop_new in names:
+                prop_new = prop + str(i)
+                i += 1
+
+            return prop_new
+
+        property = unique_name(item.keys())
+
+        item[property] = 1.0
+        return {'FINISHED'}
 
-    WM_OT_url_open,
-    WM_OT_path_open,
 
-    WM_OT_doc_view,
-    WM_OT_doc_edit,
+class WM_OT_properties_remove(bpy.types.Operator):
+    '''Internal use (edit a property data_path)'''
+    bl_idname = "wm.properties_remove"
+    bl_label = "Remove Property"
 
-    # experemental!
-    rna_prop_ui.WM_OT_properties_edit,
-    rna_prop_ui.WM_OT_properties_add,
-    rna_prop_ui.WM_OT_properties_remove]
+    data_path = rna_path
+    property = rna_property
 
+    def execute(self, context):
+        item = eval("context.%s" % self.properties.data_path)
+        del item[self.properties.property]
+        return {'FINISHED'}
 
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index e20b92c9b6a48066fd6106ee3438f774e56f030e..9cb544886da3ad44eb3c2458c6a085b589b3e274 100644 (file)
@@ -54,9 +54,6 @@ class ExportSomeData(bpy.types.Operator):
             return self.execute(context)
 
 
-
-bpy.types.register(ExportSomeData)
-
 # Only needed if you want to add into a dynamic menu
 menu_func = lambda self, context: self.layout.operator("export.some_data", text="Example Exporter...")
 bpy.types.INFO_MT_file_export.append(menu_func)
index e029d91a7fa8540799e3eeaa9ef7d7c96a05f324..0c5db47674bae0401ff2e8c1d7f438b3f18d8d3d 100644 (file)
@@ -34,7 +34,5 @@ class ModalOperator(bpy.types.Operator):
             return {'CANCELLED'}
 
 
-bpy.types.register(ModalOperator)
-
 if __name__ == "__main__":
     bpy.ops.object.modal_operator()
index 1f24672346bb0043f35ebcd7e6d770734fb41d74..56ffb95f5552d6adbef24abc07fcf0ade4ef31ac 100644 (file)
@@ -64,15 +64,3 @@ class ModalDrawOperator(bpy.types.Operator):
         else:
             self.report({'WARNING'}, "View3D not found, cannot run operator")
             return {'CANCELLED'}
-
-
-def register():
-    bpy.types.register(ModalDrawOperator)
-
-
-def unregister():
-    bpy.types.unregister(ModalDrawOperator)
-
-
-if __name__ == "__main__":
-    register()
index da019c2b653e667d0b0613c0ad8da691634a22d0..9b49fd947adc43b05649a52c711fd61c7b793635 100644 (file)
@@ -51,6 +51,3 @@ class ViewOperator(bpy.types.Operator):
         else:
             self.report({'WARNING'}, "Active space must be a View3d")
             return {'CANCELLED'}
-
-
-bpy.types.register(ViewOperator)
index 985a628c2d01869d5c1166390a8357dd26c3053b..e241afd23b797e5162bdd23a7f313bb745da9a51 100644 (file)
@@ -16,11 +16,6 @@ class SimpleOperator(bpy.types.Operator):
         main(context)
         return {'FINISHED'}
 
-def register():
-    bpy.types.register(SimpleOperator)
-
-def unregister():
-    bpy.types.unregister(SimpleOperator)
 
 if __name__ == "__main__":
-    register()
+    bpy.ops.object.simple_operator()
index 9327de33312e2648ebfc6e4e4e81723aa0c3f236..f8c8e369ec8eeb7c66c091e379bbd535c5fd9b54 100644 (file)
@@ -24,8 +24,9 @@ def main(context):
     if is_editmode:
         bpy.ops.object.mode_set(mode='EDIT', toggle=False)
 
+
 class UvOperator(bpy.types.Operator):
-    ''''''
+    '''UV Operator description'''
     bl_idname = "uv.simple_operator"
     bl_label = "Simple UV Operator"
 
@@ -37,7 +38,6 @@ class UvOperator(bpy.types.Operator):
         main(context)
         return {'FINISHED'}
 
-bpy.types.register(UvOperator)
 
 if __name__ == "__main__":
     bpy.ops.uv.simple_operator()
index aac4b6e715eb97167e6e49eb66c6996b26512fec..7c73e58a3e51db128b496ae369c44917b12b1b13 100644 (file)
@@ -18,5 +18,3 @@ class OBJECT_PT_hello(bpy.types.Panel):
         row.label(text="Active object is: " + obj.name)
         row = layout.row()
         row.prop(obj, "name")
-
-bpy.types.register(OBJECT_PT_hello)
index 9eb046cc2c888c1a7ea0be42fbc6ce155cc9c5d3..e15b7354cee3d0a05e77485f9ebdf0ca5a4aa904 100644 (file)
@@ -25,7 +25,7 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
 # Generic Panels (Independent of DataType)
 
 
-class MotionPathButtonsPanel(bpy.types.Panel):
+class MotionPathButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_label = "Motion Paths"
@@ -67,7 +67,7 @@ class MotionPathButtonsPanel(bpy.types.Panel):
 
 
 # FIXME: this panel still needs to be ported so that it will work correctly with animviz
-class OnionSkinButtonsPanel(bpy.types.Panel):
+class OnionSkinButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_label = "Onion Skinning"
@@ -102,119 +102,19 @@ class OnionSkinButtonsPanel(bpy.types.Panel):
         col.label(text="Display:")
         col.prop(arm, "ghost_only_selected", text="Selected Only")
 
-################################################
-# Specific Panels for DataTypes
-
-
-class OBJECT_PT_motion_paths(MotionPathButtonsPanel):
-    #bl_label = "Object Motion Paths"
-    bl_context = "object"
-
-    def poll(self, context):
-        return (context.object)
-
-    def draw(self, context):
-        layout = self.layout
-
-        ob = context.object
-        wide_ui = context.region.width > narrowui
-
-        self.draw_settings(context, ob.animation_visualisation, wide_ui)
-
-        layout.separator()
-
-        split = layout.split()
-
-        col = split.column()
-        col.operator("object.paths_calculate", text="Calculate Paths")
-
-        if wide_ui:
-            col = split.column()
-        col.operator("object.paths_clear", text="Clear Paths")
-
-
-class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel):
-    #bl_label = "Object Onion Skinning"
-    bl_context = "object"
-
-    def poll(self, context):
-        return (context.object)
-
-    def draw(self, context):
-        layout = self.layout
-
-        ob = context.object
-        wide_ui = context.region.width > narrowui
-
-        self.draw_settings(context, ob.animation_visualisation, wide_ui)
 
 
-class DATA_PT_motion_paths(MotionPathButtonsPanel):
-    #bl_label = "Bones Motion Paths"
-    bl_context = "data"
-
-    def poll(self, context):
-        # XXX: include posemode check?
-        return (context.object) and (context.armature)
-
-    def draw(self, context):
-        layout = self.layout
-
-        ob = context.object
-        wide_ui = context.region.width > narrowui
-
-        self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
-
-        layout.separator()
-
-        split = layout.split()
-
-        col = split.column()
-        col.operator("pose.paths_calculate", text="Calculate Paths")
-
-        if wide_ui:
-            col = split.column()
-        col.operator("pose.paths_clear", text="Clear Paths")
-
-
-class DATA_PT_onion_skinning(OnionSkinButtonsPanel):
-    #bl_label = "Bones Onion Skinning"
-    bl_context = "data"
-
-    def poll(self, context):
-        # XXX: include posemode check?
-        return (context.object) and (context.armature)
-
-    def draw(self, context):
-        layout = self.layout
-
-        ob = context.object
-        wide_ui = context.region.width > narrowui
-
-        self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
-
 # NOTE:
-# The specialised panel types defined here (i.e. OBJECT_PT_*, etc.)
-# aren't registered here, but are rather imported to (and registered)
-# in the files defining the contexts where they reside. Otherwise,
-# these panels appear at the top of the lists by default.
-#
-# However, we keep these empty register funcs here just in case
-# something will need them again one day, and also to make
-# it easier to maintain these scripts.
-classes = []
+# The specialised panel types are derived in their respective UI modules
+
 
 
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 31ede4adfb5dc667cf7f674ea86ea61b5d2a850b..f32cbe9716525b7be83c7b3a4eea77aff88adf32 100644 (file)
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
         return context.armature
 
 
-class DATA_PT_context_arm(DataButtonsPanel):
+class DATA_PT_context_arm(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
 
@@ -56,11 +56,11 @@ class DATA_PT_context_arm(DataButtonsPanel):
             layout.template_ID(ob, "data")
 
 
-class DATA_PT_custom_props_arm(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_arm(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "object.data"
 
 
-class DATA_PT_skeleton(DataButtonsPanel):
+class DATA_PT_skeleton(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Skeleton"
 
     def draw(self, context):
@@ -95,7 +95,7 @@ class DATA_PT_skeleton(DataButtonsPanel):
         col.prop(arm, "deform_quaternion", text="Quaternion")
 
 
-class DATA_PT_display(DataButtonsPanel):
+class DATA_PT_display(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Display"
 
     def draw(self, context):
@@ -124,7 +124,7 @@ class DATA_PT_display(DataButtonsPanel):
         col.prop(arm, "delay_deform", text="Delay Refresh")
 
 
-class DATA_PT_bone_groups(DataButtonsPanel):
+class DATA_PT_bone_groups(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Bone Groups"
 
     def poll(self, context):
@@ -174,7 +174,7 @@ class DATA_PT_bone_groups(DataButtonsPanel):
 
 
 # TODO: this panel will soon be depreceated too
-class DATA_PT_ghost(DataButtonsPanel):
+class DATA_PT_ghost(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Ghost"
 
     def draw(self, context):
@@ -207,7 +207,7 @@ class DATA_PT_ghost(DataButtonsPanel):
         col.prop(arm, "ghost_only_selected", text="Selected Only")
 
 
-class DATA_PT_iksolver_itasc(DataButtonsPanel):
+class DATA_PT_iksolver_itasc(DataButtonsPanel, bpy.types.Panel):
     bl_label = "iTaSC parameters"
     bl_default_closed = True
 
@@ -261,33 +261,58 @@ class DATA_PT_iksolver_itasc(DataButtonsPanel):
                 row.prop(itasc, "dampmax", text="Damp", slider=True)
                 row.prop(itasc, "dampeps", text="Eps", slider=True)
 
-# import generic panels from other files
-from properties_animviz import DATA_PT_motion_paths, DATA_PT_onion_skinning
+from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
 
-classes = [
-    DATA_PT_context_arm,
-    DATA_PT_skeleton,
-    DATA_PT_display,
-    DATA_PT_bone_groups,
-    DATA_PT_ghost,
-    DATA_PT_iksolver_itasc,
+class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
+    #bl_label = "Bones Motion Paths"
+    bl_context = "data"
+
+    def poll(self, context):
+        # XXX: include posemode check?
+        return (context.object) and (context.armature)
+
+    def draw(self, context):
+        layout = self.layout
+
+        ob = context.object
+        wide_ui = context.region.width > narrowui
+
+        self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
+
+        layout.separator()
 
-    DATA_PT_motion_paths,
-    #DATA_PT_onion_skinning,
+        split = layout.split()
+
+        col = split.column()
+        col.operator("pose.paths_calculate", text="Calculate Paths")
 
-    DATA_PT_custom_props_arm]
+        if wide_ui:
+            col = split.column()
+        col.operator("pose.paths_clear", text="Clear Paths")
+
+
+class DATA_PT_onion_skinning(OnionSkinButtonsPanel): #, bpy.types.Panel): # inherit from panel when ready
+    #bl_label = "Bones Onion Skinning"
+    bl_context = "data"
+
+    def poll(self, context):
+        # XXX: include posemode check?
+        return (context.object) and (context.armature)
+
+    def draw(self, context):
+        layout = self.layout
+
+        ob = context.object
+        wide_ui = context.region.width > narrowui
 
+        self.draw_settings(context, ob.pose.animation_visualisation, wide_ui, bones=True)
 
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 5af676d5aa8bea47e845d1b07718d04989d3af3d..8331f2d517b837f17c6502b334536376a965b503 100644 (file)
@@ -307,33 +307,11 @@ class INFO_MT_armature_metarig_add(bpy.types.Menu):
             text = bpy.utils.display_name(submodule_type)
             layout.operator("pose.metarig_sample_add", text=text, icon='OUTLINER_OB_ARMATURE').metarig_type = submodule_type
 
-classes = [
-    DATA_PT_template,
-
-    PoseTemplateSettings,
-    PoseTemplate,
-
-    Reload,
-    Generate,
-    Validate,
-    Sample,
-    Graph,
-    AsScript,
-
-    ActiveAssign,
-    ActiveClear,
-
-    INFO_MT_armature_metarig_add]
-
 menu_func = (lambda self, context: self.layout.menu("INFO_MT_armature_metarig_add", icon='OUTLINER_OB_ARMATURE'))
 import space_info # ensure the menu is loaded first
 
 
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
-
     PoseTemplate.StringProperty(attr="name",
                     name="Name of the slave",
                     description="",
@@ -361,10 +339,6 @@ def register():
 
 def unregister():
     bpy.types.Scene.RemoveProperty("pose_templates")
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
-
     space_info.INFO_MT_armature_add.remove(menu_func)
 
 if __name__ == "__main__":
index a4be7b31042744cd0d6b81ddc43e29b6988e965e..d68253aac4d1e6cde7c0dfe1e2a4a3f5935a1995 100644 (file)
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class BoneButtonsPanel(bpy.types.Panel):
+class BoneButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "bone"
@@ -32,7 +32,7 @@ class BoneButtonsPanel(bpy.types.Panel):
         return (context.bone or context.edit_bone)
 
 
-class BONE_PT_context_bone(BoneButtonsPanel):
+class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
 
@@ -48,7 +48,7 @@ class BONE_PT_context_bone(BoneButtonsPanel):
         row.prop(bone, "name", text="")
 
 
-class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel):
+class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel, bpy.types.Panel):
 
     @property
     def _context_path(self):
@@ -59,7 +59,7 @@ class BONE_PT_custom_props(BoneButtonsPanel, PropertyPanel):
             return "active_bone"
 
 
-class BONE_PT_transform(BoneButtonsPanel):
+class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Transform"
 
     def draw(self, context):
@@ -128,7 +128,7 @@ class BONE_PT_transform(BoneButtonsPanel):
                 col.prop(pchan, "scale")
 
 
-class BONE_PT_transform_locks(BoneButtonsPanel):
+class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Transform Locks"
     bl_default_closed = True
 
@@ -159,7 +159,7 @@ class BONE_PT_transform_locks(BoneButtonsPanel):
         row.column().prop(pchan, "lock_scale")
 
 
-class BONE_PT_relations(BoneButtonsPanel):
+class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Relations"
 
     def draw(self, context):
@@ -206,7 +206,7 @@ class BONE_PT_relations(BoneButtonsPanel):
         sub.prop(bone, "local_location", text="Local Location")
 
 
-class BONE_PT_display(BoneButtonsPanel):
+class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Display"
 
     def poll(self, context):
@@ -242,7 +242,7 @@ class BONE_PT_display(BoneButtonsPanel):
                 col.prop_object(pchan, "custom_shape_transform", ob.pose, "bones", text="At")
 
 
-class BONE_PT_inverse_kinematics(BoneButtonsPanel):
+class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Inverse Kinematics"
     bl_default_closed = True
 
@@ -340,7 +340,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel):
             #row.prop(pchan, "ik_lin_weight", text="Weight", slider=True)
 
 
-class BONE_PT_deform(BoneButtonsPanel):
+class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
     bl_label = "Deform"
     bl_default_closed = True
 
@@ -390,28 +390,13 @@ class BONE_PT_deform(BoneButtonsPanel):
         col.label(text="Offset:")
         col.prop(bone, "cyclic_offset")
 
-classes = [
-    BONE_PT_context_bone,
-    BONE_PT_transform,
-    BONE_PT_transform_locks,
-    BONE_PT_relations,
-    BONE_PT_display,
-    BONE_PT_inverse_kinematics,
-    BONE_PT_deform,
-
-    BONE_PT_custom_props]
-
 
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 3abd460c4277114a6270c11e5e41b08ed51376f2..5152e004f2842ee1c113a1832bf60aa74719fc8b 100644 (file)
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -33,7 +33,7 @@ class DataButtonsPanel(bpy.types.Panel):
         return context.camera and (engine in self.COMPAT_ENGINES)
 
 
-class DATA_PT_context_camera(DataButtonsPanel):
+class DATA_PT_context_camera(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -61,12 +61,12 @@ class DATA_PT_context_camera(DataButtonsPanel):
                 layout.template_ID(space, "pin_id")
 
 
-class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "object.data"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
 
-class DATA_PT_camera(DataButtonsPanel):
+class DATA_PT_camera(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Lens"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -127,7 +127,7 @@ class DATA_PT_camera(DataButtonsPanel):
         col.prop(cam, "dof_distance", text="Distance")
 
 
-class DATA_PT_camera_display(DataButtonsPanel):
+class DATA_PT_camera_display(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Display"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -155,24 +155,12 @@ class DATA_PT_camera_display(DataButtonsPanel):
         sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
 
 
-classes = [
-    DATA_PT_context_camera,
-    DATA_PT_camera,
-    DATA_PT_camera_display,
-
-    DATA_PT_custom_props_camera]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index fd836f5e5d49239ce0398659d97ad08b99e6a757..279301ae330be0818fa97569a2038dcbb2f61efe 100644 (file)
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -47,7 +47,7 @@ class DataButtonsPanelActive(DataButtonsPanel):
         return (curve and type(curve) is not bpy.types.TextCurve and curve.splines.active)
 
 
-class DATA_PT_context_curve(DataButtonsPanel):
+class DATA_PT_context_curve(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
 
@@ -73,11 +73,11 @@ class DATA_PT_context_curve(DataButtonsPanel):
             layout.template_ID(ob, "data")
 
 
-class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_curve(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "object.data"
 
 
-class DATA_PT_shape_curve(DataButtonsPanel):
+class DATA_PT_shape_curve(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Shape"
 
     def draw(self, context):
@@ -130,7 +130,7 @@ class DATA_PT_shape_curve(DataButtonsPanel):
         col.prop(curve, "auto_texspace")
 
 
-class DATA_PT_geometry_curve(DataButtonsPanel):
+class DATA_PT_geometry_curve(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Geometry"
 
     def poll(self, context):
@@ -164,7 +164,7 @@ class DATA_PT_geometry_curve(DataButtonsPanel):
         col.prop(curve, "bevel_object", text="")
 
 
-class DATA_PT_pathanim(DataButtonsPanelCurve):
+class DATA_PT_pathanim(DataButtonsPanelCurve, bpy.types.Panel):
     bl_label = "Path Animation"
 
     def draw_header(self, context):
@@ -196,7 +196,7 @@ class DATA_PT_pathanim(DataButtonsPanelCurve):
         col.prop(curve, "use_time_offset", text="Offset Children")
 
 
-class DATA_PT_active_spline(DataButtonsPanelActive):
+class DATA_PT_active_spline(DataButtonsPanelActive, bpy.types.Panel):
     bl_label = "Active Spline"
 
     def draw(self, context):
@@ -267,7 +267,7 @@ class DATA_PT_active_spline(DataButtonsPanelActive):
             layout.prop(act_spline, "smooth")
 
 
-class DATA_PT_font(DataButtonsPanel):
+class DATA_PT_font(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Font"
 
     def poll(self, context):
@@ -329,7 +329,7 @@ class DATA_PT_font(DataButtonsPanel):
         col.prop(char, "use_small_caps")
 
 
-class DATA_PT_paragraph(DataButtonsPanel):
+class DATA_PT_paragraph(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Paragraph"
 
     def poll(self, context):
@@ -362,7 +362,7 @@ class DATA_PT_paragraph(DataButtonsPanel):
         col.prop(text, "offset_y", text="Y")
 
 
-class DATA_PT_textboxes(DataButtonsPanel):
+class DATA_PT_textboxes(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Text Boxes"
 
     def poll(self, context):
@@ -404,29 +404,12 @@ class DATA_PT_textboxes(DataButtonsPanel):
             row.operator("font.textbox_remove", text='', icon='X', emboss=False).index = i
 
 
-classes = [
-    DATA_PT_context_curve,
-    DATA_PT_shape_curve,
-    DATA_PT_geometry_curve,
-    DATA_PT_pathanim,
-    DATA_PT_active_spline,
-    DATA_PT_font,
-    DATA_PT_paragraph,
-    DATA_PT_textboxes,
-
-    DATA_PT_custom_props_curve]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 577e32ed8400f452216687e9fb9f7c56902e86a2..0a246f237a8d0e8e76e646ab9bfc603f7c8d3412 100644 (file)
@@ -22,7 +22,7 @@ import bpy
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -31,7 +31,7 @@ class DataButtonsPanel(bpy.types.Panel):
         return (context.object and context.object.type == 'EMPTY')
 
 
-class DATA_PT_empty(DataButtonsPanel):
+class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Empty"
 
     def draw(self, context):
@@ -48,20 +48,13 @@ class DATA_PT_empty(DataButtonsPanel):
         layout.prop(ob, "empty_draw_size", text="Size")
 
 
-classes = [
-    DATA_PT_empty]
-
 
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 14493301b1e99e2a56e3f810c7ec6e9034d1663c..e72739f5ec7cc5364c383a08f8e28907a20d3cd5 100644 (file)
@@ -31,7 +31,7 @@ class LAMP_MT_sunsky_presets(bpy.types.Menu):
     draw = bpy.types.Menu.draw_preset
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -40,16 +40,14 @@ class DataButtonsPanel(bpy.types.Panel):
         engine = context.scene.render.engine
         return context.lamp and (engine in self.COMPAT_ENGINES)
 
-
-class DATA_PT_preview(DataButtonsPanel):
+class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Preview"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
         self.layout.template_preview(context.lamp)
 
-
-class DATA_PT_context_lamp(DataButtonsPanel):
+class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -77,12 +75,12 @@ class DATA_PT_context_lamp(DataButtonsPanel):
                 layout.template_ID(space, "pin_id")
 
 
-class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_lamp(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "object.data"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
 
-class DATA_PT_lamp(DataButtonsPanel):
+class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Lamp"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -129,7 +127,7 @@ class DATA_PT_lamp(DataButtonsPanel):
         col.prop(lamp, "diffuse")
 
 
-class DATA_PT_sunsky(DataButtonsPanel):
+class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Sky & Atmosphere"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -202,7 +200,7 @@ class DATA_PT_sunsky(DataButtonsPanel):
         sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
 
 
-class DATA_PT_shadow(DataButtonsPanel):
+class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Shadow"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -327,7 +325,7 @@ class DATA_PT_shadow(DataButtonsPanel):
             sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End")
 
 
-class DATA_PT_area(DataButtonsPanel):
+class DATA_PT_area(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Area Shape"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -354,7 +352,7 @@ class DATA_PT_area(DataButtonsPanel):
             sub.prop(lamp, "size_y", text="Size Y")
 
 
-class DATA_PT_spot(DataButtonsPanel):
+class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Spot Shape"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -390,7 +388,7 @@ class DATA_PT_spot(DataButtonsPanel):
             sub.prop(lamp, "halo_step", text="Step")
 
 
-class DATA_PT_falloff_curve(DataButtonsPanel):
+class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Falloff Curve"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -407,31 +405,12 @@ class DATA_PT_falloff_curve(DataButtonsPanel):
         self.layout.template_curve_mapping(lamp, "falloff_curve")
 
 
-classes = [
-    LAMP_MT_sunsky_presets,
-
-    DATA_PT_context_lamp,
-    DATA_PT_preview,
-    DATA_PT_lamp,
-    DATA_PT_falloff_curve,
-    DATA_PT_area,
-    DATA_PT_spot,
-    DATA_PT_shadow,
-    DATA_PT_sunsky,
-
-    DATA_PT_custom_props_lamp]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 2aa719437a7dafe18cf01402509a655411f3d69f..4bc6d9865e0c1617b9528f0db11ee759ed43b1ee 100644 (file)
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
         return context.lattice
 
 
-class DATA_PT_context_lattice(DataButtonsPanel):
+class DATA_PT_context_lattice(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
 
@@ -59,11 +59,11 @@ class DATA_PT_context_lattice(DataButtonsPanel):
                 layout.template_ID(space, "pin_id")
 
 
-class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_lattice(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "object.data"
 
 
-class DATA_PT_lattice(DataButtonsPanel):
+class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Lattice"
 
     def draw(self, context):
@@ -98,23 +98,12 @@ class DATA_PT_lattice(DataButtonsPanel):
         row.prop_object(lat, "vertex_group", context.object, "vertex_groups", text="")
 
 
-classes = [
-    DATA_PT_context_lattice,
-    DATA_PT_lattice,
-
-    DATA_PT_custom_props_lattice]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index c3170be886010d367c3c152840d3a5b088a1f2f4..b3d5215db5809c83ac0c39e8050006792c5051d9 100644 (file)
@@ -49,7 +49,7 @@ class MESH_MT_shape_key_specials(bpy.types.Menu):
         layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -59,7 +59,7 @@ class DataButtonsPanel(bpy.types.Panel):
         return context.mesh and (engine in self.COMPAT_ENGINES)
 
 
-class DATA_PT_context_mesh(DataButtonsPanel):
+class DATA_PT_context_mesh(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -87,12 +87,12 @@ class DATA_PT_context_mesh(DataButtonsPanel):
                 layout.template_ID(space, "pin_id")
 
 
-class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_mesh(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "object.data"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
 
-class DATA_PT_normals(DataButtonsPanel):
+class DATA_PT_normals(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Normals"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -117,7 +117,7 @@ class DATA_PT_normals(DataButtonsPanel):
         col.prop(mesh, "double_sided")
 
 
-class DATA_PT_settings(DataButtonsPanel):
+class DATA_PT_settings(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Settings"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -129,7 +129,7 @@ class DATA_PT_settings(DataButtonsPanel):
         layout.prop(mesh, "texture_mesh")
 
 
-class DATA_PT_vertex_groups(DataButtonsPanel):
+class DATA_PT_vertex_groups(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Vertex Groups"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -176,7 +176,7 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
             layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
 
 
-class DATA_PT_shape_keys(DataButtonsPanel):
+class DATA_PT_shape_keys(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Shape Keys"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -274,7 +274,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
                 row.prop(key, "slurph")
 
 
-class DATA_PT_uv_texture(DataButtonsPanel):
+class DATA_PT_uv_texture(DataButtonsPanel, bpy.types.Panel):
     bl_label = "UV Texture"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -344,7 +344,7 @@ class DATA_PT_texface(DataButtonsPanel):
             col.label(text="No UV Texture")
 
 
-class DATA_PT_vertex_colors(DataButtonsPanel):
+class DATA_PT_vertex_colors(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Vertex Colors"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -367,32 +367,12 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
             layout.prop(lay, "name")
 
 
-classes = [
-    MESH_MT_vertex_group_specials,
-    MESH_MT_shape_key_specials,
-
-    DATA_PT_context_mesh,
-    DATA_PT_normals,
-    DATA_PT_settings,
-    DATA_PT_vertex_groups,
-    DATA_PT_shape_keys,
-    DATA_PT_uv_texture,
-    DATA_PT_texface,
-    DATA_PT_vertex_colors,
-
-    DATA_PT_custom_props_mesh]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index e0155059b98a14ac00f075ac917fa2301cea4de5..1cce0cea66fc0a057b8efaa59522f90909aa0381 100644 (file)
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "data"
@@ -32,7 +32,7 @@ class DataButtonsPanel(bpy.types.Panel):
         return context.meta_ball
 
 
-class DATA_PT_context_metaball(DataButtonsPanel):
+class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
 
@@ -59,11 +59,11 @@ class DATA_PT_context_metaball(DataButtonsPanel):
                 layout.template_ID(space, "pin_id")
 
 
-class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel):
+class DATA_PT_custom_props_metaball(DataButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "object.data"
 
 
-class DATA_PT_metaball(DataButtonsPanel):
+class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Metaball"
 
     def draw(self, context):
@@ -92,7 +92,7 @@ class DATA_PT_metaball(DataButtonsPanel):
             layout.prop(mball, "flag", text="")
 
 
-class DATA_PT_metaball_element(DataButtonsPanel):
+class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Active Element"
 
     def poll(self, context):
@@ -136,24 +136,12 @@ class DATA_PT_metaball_element(DataButtonsPanel):
             col.prop(metaelem, "size_y", text="Y")
 
 
-classes = [
-    DATA_PT_context_metaball,
-    DATA_PT_metaball,
-    DATA_PT_metaball_element,
-
-    DATA_PT_custom_props_metaball]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 37764e208547b8fab0f132e4391edf4aebc95e8b..ea0fb606aa49121a955ae80fc4ceb717e2f16591 100644 (file)
@@ -23,13 +23,13 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
 narrowmod = 260
 
 
-class DataButtonsPanel(bpy.types.Panel):
+class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "modifier"
 
 
-class DATA_PT_modifiers(DataButtonsPanel):
+class DATA_PT_modifiers(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Modifiers"
 
     def draw(self, context):
@@ -766,20 +766,12 @@ class DATA_PT_modifiers(DataButtonsPanel):
         col.prop(md, "narrowness", slider=True)
 
 
-classes = [
-    DATA_PT_modifiers]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 88803993c9257b5576569b8a9376150bb9e09d3e..b12f368f5f47de51018fd777a047701324335ba3 100644 (file)
@@ -22,7 +22,7 @@ import bpy
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class PhysicsButtonsPanel(bpy.types.Panel):
+class PhysicsButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
@@ -33,7 +33,7 @@ class PhysicsButtonsPanel(bpy.types.Panel):
         return ob and ob.game and (rd.engine in self.COMPAT_ENGINES)
 
 
-class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
+class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
     bl_label = "Physics"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -162,7 +162,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel):
             layout.prop(ob, "hide_render", text="Invisible")
 
 
-class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
+class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
     bl_label = "Collision Bounds"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -198,7 +198,7 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel):
         col.prop(game, "collision_compound", text="Compound")
 
 
-class RenderButtonsPanel(bpy.types.Panel):
+class RenderButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "render"
@@ -208,7 +208,7 @@ class RenderButtonsPanel(bpy.types.Panel):
         return (rd.engine in self.COMPAT_ENGINES)
 
 
-class RENDER_PT_game(RenderButtonsPanel):
+class RENDER_PT_game(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Game"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -220,7 +220,7 @@ class RENDER_PT_game(RenderButtonsPanel):
         row.label()
 
 
-class RENDER_PT_game_player(RenderButtonsPanel):
+class RENDER_PT_game_player(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Standalone Player"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -258,7 +258,7 @@ class RENDER_PT_game_player(RenderButtonsPanel):
             col.prop(gs, "framing_color", text="")
 
 
-class RENDER_PT_game_stereo(RenderButtonsPanel):
+class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Stereo"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -318,7 +318,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel):
             layout.prop(gs, "dome_text")
 
 
-class RENDER_PT_game_shading(RenderButtonsPanel):
+class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Shading"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -347,7 +347,7 @@ class RENDER_PT_game_shading(RenderButtonsPanel):
             col.prop(gs, "glsl_extra_textures", text="Extra Textures")
 
 
-class RENDER_PT_game_performance(RenderButtonsPanel):
+class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Performance"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -373,7 +373,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel):
         col.prop(gs, "use_display_lists")
 
 
-class RENDER_PT_game_sound(RenderButtonsPanel):
+class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Sound"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -391,7 +391,7 @@ class RENDER_PT_game_sound(RenderButtonsPanel):
         layout.prop(scene, "doppler_factor")
 
 
-class WorldButtonsPanel(bpy.types.Panel):
+class WorldButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "world"
@@ -401,7 +401,7 @@ class WorldButtonsPanel(bpy.types.Panel):
         return (scene.render.engine in self.COMPAT_ENGINES) and (scene.world is not None)
 
 
-class WORLD_PT_game_context_world(WorldButtonsPanel):
+class WORLD_PT_game_context_world(WorldButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
     COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -431,7 +431,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel):
                 layout.template_ID(space, "pin_id")
 
 
-class WORLD_PT_game_world(WorldButtonsPanel):
+class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
     bl_label = "World"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -451,7 +451,7 @@ class WORLD_PT_game_world(WorldButtonsPanel):
         col.prop(world, "ambient_color")
 
 
-class WORLD_PT_game_mist(WorldButtonsPanel):
+class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
     bl_label = "Mist"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -477,7 +477,7 @@ class WORLD_PT_game_mist(WorldButtonsPanel):
         col.prop(world.mist, "depth")
 
 
-class WORLD_PT_game_physics(WorldButtonsPanel):
+class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
     bl_label = "Physics"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -523,33 +523,12 @@ class WORLD_PT_game_physics(WorldButtonsPanel):
             col.prop(gs, "logic_step_max", text="Max")
 
 
-classes = [
-    PHYSICS_PT_game_physics,
-    PHYSICS_PT_game_collision_bounds,
-
-    RENDER_PT_game,
-    RENDER_PT_game_player,
-    RENDER_PT_game_stereo,
-    RENDER_PT_game_shading,
-    RENDER_PT_game_performance,
-    RENDER_PT_game_sound,
-
-    WORLD_PT_game_context_world,
-    WORLD_PT_game_world,
-    WORLD_PT_game_mist,
-    WORLD_PT_game_physics]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 8d3794919835be656250c92e5fe3f3ef4e29c659..a464249b3b02e8b1bab518489507ce44a3ed819b 100644 (file)
@@ -54,7 +54,7 @@ class MATERIAL_MT_specials(bpy.types.Menu):
         layout.operator("material.paste", icon='PASTEDOWN')
 
 
-class MaterialButtonsPanel(bpy.types.Panel):
+class MaterialButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "material"
@@ -66,7 +66,7 @@ class MaterialButtonsPanel(bpy.types.Panel):
         return mat and (engine in self.COMPAT_ENGINES)
 
 
-class MATERIAL_PT_preview(MaterialButtonsPanel):
+class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Preview"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -74,7 +74,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel):
         self.layout.template_preview(context.material)
 
 
-class MATERIAL_PT_context_material(MaterialButtonsPanel):
+class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -141,12 +141,12 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
                 layout.prop(mat, "type", text="")
 
 
-class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel):
+class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER'}
     _context_path = "material"
 
 
-class MATERIAL_PT_shading(MaterialButtonsPanel):
+class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Shading"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -184,7 +184,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel):
             layout.prop(mat, "alpha")
 
 
-class MATERIAL_PT_strand(MaterialButtonsPanel):
+class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Strand"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -233,7 +233,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel):
         sub.prop(tan, "blend_distance", text="Distance")
 
 
-class MATERIAL_PT_physics(MaterialButtonsPanel):
+class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Physics"
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -257,14 +257,14 @@ class MATERIAL_PT_physics(MaterialButtonsPanel):
         col.prop(phys, "damp", slider=True)
 
 
-class MATERIAL_PT_options(MaterialButtonsPanel):
+class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Options"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def poll(self, context):
         mat = active_node_mat(context.material)
         engine = context.scene.render.engine
-        return mat and (mat.type in ('SURFACE', 'WIRE', 'HALO')) and (engine in self.COMPAT_ENGINES)
+        return mat and (mat.type in ('SURFACE', 'WIRE')) and (engine in self.COMPAT_ENGINES)
 
     def draw(self, context):
         layout = self.layout
@@ -302,7 +302,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
         col.prop(mat, "object_color")
 
 
-class MATERIAL_PT_shadow(MaterialButtonsPanel):
+class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Shadow"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -339,8 +339,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
         sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
         col.prop(mat, "cast_approximate")
 
-
-class MATERIAL_PT_diffuse(MaterialButtonsPanel):
+class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Diffuse"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -411,7 +410,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
             row.prop(mat, "diffuse_ramp_factor", text="Factor")
 
 
-class MATERIAL_PT_specular(MaterialButtonsPanel):
+class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Specular"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -480,7 +479,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
             row.prop(mat, "specular_ramp_factor", text="Factor")
 
 
-class MATERIAL_PT_sss(MaterialButtonsPanel):
+class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Subsurface Scattering"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -532,7 +531,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
         col.prop(sss, "error_tolerance", text="Error")
 
 
-class MATERIAL_PT_mirror(MaterialButtonsPanel):
+class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Mirror"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -592,7 +591,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
         sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
 
 
-class MATERIAL_PT_transp(MaterialButtonsPanel):
+class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Transparency"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -659,7 +658,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
             sub.prop(rayt, "gloss_samples", text="Samples")
 
 
-class MATERIAL_PT_transp_game(MaterialButtonsPanel):
+class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Transparency"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_GAME'}
@@ -694,7 +693,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel):
         col.prop(mat, "alpha")
 
 
-class MATERIAL_PT_halo(MaterialButtonsPanel):
+class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Halo"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -744,7 +743,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
         sub.prop(halo, "star_tips")
 
 
-class MATERIAL_PT_flare(MaterialButtonsPanel):
+class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel):
     bl_label = "Flare"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -779,7 +778,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel):
         col.prop(halo, "flare_subsize", text="Subsize")
 
 
-class VolumeButtonsPanel(bpy.types.Panel):
+class VolumeButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "material"
@@ -790,7 +789,7 @@ class VolumeButtonsPanel(bpy.types.Panel):
         return mat and (mat.type == 'VOLUME') and (engine in self.COMPAT_ENGINES)
 
 
-class MATERIAL_PT_volume_density(VolumeButtonsPanel):
+class MATERIAL_PT_volume_density(VolumeButtonsPanel, bpy.types.Panel):
     bl_label = "Density"
     bl_default_closed = False
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -810,7 +809,7 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel):
         col.prop(vol, "density_scale")
 
 
-class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
+class MATERIAL_PT_volume_shading(VolumeButtonsPanel, bpy.types.Panel):
     bl_label = "Shading"
     bl_default_closed = False
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -838,7 +837,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
         sub.prop(vol, "reflection_color", text="")
 
 
-class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
+class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
     bl_label = "Lighting"
     bl_default_closed = False
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -876,7 +875,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
             sub.prop(vol, "ms_intensity")
 
 
-class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
+class MATERIAL_PT_volume_transp(VolumeButtonsPanel, bpy.types.Panel):
     bl_label = "Transparency"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -892,7 +891,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
             layout.prop(mat, "transparency_method", text="")
 
 
-class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
+class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
     bl_label = "Integration"
     bl_default_closed = False
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -917,7 +916,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
         col.prop(vol, "depth_cutoff")
 
 
-class MATERIAL_PT_volume_options(VolumeButtonsPanel):
+class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
     bl_label = "Options"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     bl_default_closed = True
@@ -943,46 +942,12 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel):
         row.prop(mat, "light_group_exclusive", text="Exclusive")
 
 
-classes = [
-    MATERIAL_PT_context_material,
-    MATERIAL_PT_preview,
-    MATERIAL_PT_diffuse,
-    MATERIAL_PT_specular,
-    MATERIAL_PT_shading,
-    MATERIAL_PT_transp,
-    MATERIAL_PT_mirror,
-    MATERIAL_PT_sss,
-    MATERIAL_PT_halo,
-    MATERIAL_PT_flare,
-    MATERIAL_PT_physics,
-    MATERIAL_PT_strand,
-    MATERIAL_PT_options,
-    MATERIAL_PT_shadow,
-    MATERIAL_PT_transp_game,
-
-    MATERIAL_MT_sss_presets,
-    MATERIAL_MT_specials,
-
-    MATERIAL_PT_volume_density,
-    MATERIAL_PT_volume_shading,
-    MATERIAL_PT_volume_lighting,
-    MATERIAL_PT_volume_transp,
-    MATERIAL_PT_volume_integration,
-    MATERIAL_PT_volume_options,
-
-    MATERIAL_PT_custom_props]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 4e60879d6654e1333a4e87f436bcd9816f6114cd..f09de20c8f3bfbe42d7eb226991f86b173353982 100644 (file)
@@ -23,13 +23,13 @@ from rna_prop_ui import PropertyPanel
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class ObjectButtonsPanel(bpy.types.Panel):
+class ObjectButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "object"
 
 
-class OBJECT_PT_context_object(ObjectButtonsPanel):
+class OBJECT_PT_context_object(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
 
@@ -46,11 +46,7 @@ class OBJECT_PT_context_object(ObjectButtonsPanel):
             row.prop(ob, "name", text="")
 
 
-class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel):
-    _context_path = "object"
-
-
-class OBJECT_PT_transform(ObjectButtonsPanel):
+class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Transform"
 
     def draw(self, context):
@@ -90,7 +86,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel):
             col.prop(ob, "scale")
 
 
-class OBJECT_PT_transform_locks(ObjectButtonsPanel):
+class OBJECT_PT_transform_locks(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Transform Locks"
     bl_default_closed = True
 
@@ -117,7 +113,7 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel):
         row.column().prop(ob, "lock_scale", text="Scale")
 
 
-class OBJECT_PT_relations(ObjectButtonsPanel):
+class OBJECT_PT_relations(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Relations"
 
     def draw(self, context):
@@ -146,7 +142,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel):
         sub.active = (parent is not None)
 
 
-class OBJECT_PT_groups(ObjectButtonsPanel):
+class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Groups"
 
     def draw(self, context):
@@ -187,7 +183,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
                 index += 1
 
 
-class OBJECT_PT_display(ObjectButtonsPanel):
+class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Display"
 
     def draw(self, context):
@@ -223,7 +219,7 @@ class OBJECT_PT_display(ObjectButtonsPanel):
         col.prop(ob, "draw_transparent", text="Transparency")
 
 
-class OBJECT_PT_duplication(ObjectButtonsPanel):
+class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Duplication"
 
     def draw(self, context):
@@ -272,8 +268,7 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
 
 # XXX: the following options are all quite buggy, ancient hacks that should be dropped
 
-
-class OBJECT_PT_animation(ObjectButtonsPanel):
+class OBJECT_PT_animation(ObjectButtonsPanel, bpy.types.Panel):
     bl_label = "Animation Hacks"
     bl_default_closed = True
 
@@ -306,36 +301,60 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
         col.prop(ob, "track_axis", text="Axis")
         col.prop(ob, "up_axis", text="Up Axis")
 
+from properties_animviz import MotionPathButtonsPanel, OnionSkinButtonsPanel
+
+
+class OBJECT_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
+    #bl_label = "Object Motion Paths"
+    bl_context = "object"
+
+    def poll(self, context):
+        return (context.object)
 
-# import generic panels from other files
-from properties_animviz import OBJECT_PT_motion_paths, OBJECT_PT_onion_skinning
+    def draw(self, context):
+        layout = self.layout
+
+        ob = context.object
+        wide_ui = context.region.width > narrowui
+
+        self.draw_settings(context, ob.animation_visualisation, wide_ui)
 
-classes = [
-    OBJECT_PT_context_object,
-    OBJECT_PT_transform,
-    OBJECT_PT_transform_locks,
-    OBJECT_PT_relations,
-    OBJECT_PT_groups,
-    OBJECT_PT_display,
-    OBJECT_PT_duplication,
-    OBJECT_PT_animation, # XXX: panel of old hacks pending to be removed...
+        layout.separator()
 
-    OBJECT_PT_motion_paths,
-    #OBJECT_PT_onion_skinning,
+        split = layout.split()
 
-    OBJECT_PT_custom_props]
+        col = split.column()
+        col.operator("object.paths_calculate", text="Calculate Paths")
 
+        if wide_ui:
+            col = split.column()
+        col.operator("object.paths_clear", text="Clear Paths")
+
+
+class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel): #, bpy.types.Panel): # inherit from panel when ready
+    #bl_label = "Object Onion Skinning"
+    bl_context = "object"
+
+    def poll(self, context):
+        return (context.object)
+
+    def draw(self, context):
+        layout = self.layout
+
+        ob = context.object
+        wide_ui = context.region.width > narrowui
+
+        self.draw_settings(context, ob.animation_visualisation, wide_ui)
+
+class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel, bpy.types.Panel):
+    _context_path = "object"
 
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index edeadb9326b9f374c855f068a975c48144138b67..bc8fd6ad9dadddbd65f40316e3aca2d655f29e1c 100644 (file)
@@ -23,7 +23,7 @@ narrowui = bpy.context.user_preferences.view.properties_width_check
 narrowcon = 260
 
 
-class ConstraintButtonsPanel(bpy.types.Panel):
+class ConstraintButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "constraint"
@@ -749,8 +749,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         col = layout.column()
         col.prop(con, "enabled_rotation_range", text="Pivot When")
 
-
-class OBJECT_PT_constraints(ConstraintButtonsPanel):
+class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
     bl_label = "Object Constraints"
     bl_context = "constraint"
 
@@ -768,7 +767,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
             self.draw_constraint(context, con)
 
 
-class BONE_PT_constraints(ConstraintButtonsPanel):
+class BONE_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
     bl_label = "Bone Constraints"
     bl_context = "bone_constraint"
 
@@ -784,21 +783,12 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
             self.draw_constraint(context, con)
 
 
-classes = [
-    OBJECT_PT_constraints,
-    BONE_PT_constraints]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index f858c9b8511a919f46081c4080be9344209e2bc3..ed516b49dea5f51c3c5aa0de618d84802bf77c20 100644 (file)
@@ -42,7 +42,7 @@ def particle_panel_poll(panel, context):
     return psys.settings.type in ('EMITTER', 'REACTOR', 'HAIR') and (engine in panel.COMPAT_ENGINES)
 
 
-class ParticleButtonsPanel(bpy.types.Panel):
+class ParticleButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "particle"
@@ -51,7 +51,7 @@ class ParticleButtonsPanel(bpy.types.Panel):
         return particle_panel_poll(self, context)
 
 
-class PARTICLE_PT_context_particles(ParticleButtonsPanel):
+class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = ""
     bl_show_header = False
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -136,12 +136,12 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel):
                     split.prop(psys, "reactor_target_particle_system", text="Particle System")
 
 
-class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel):
+class PARTICLE_PT_custom_props(ParticleButtonsPanel, PropertyPanel, bpy.types.Panel):
     COMPAT_ENGINES = {'BLENDER_RENDER'}
     _context_path = "particle_system.settings"
 
 
-class PARTICLE_PT_emission(ParticleButtonsPanel):
+class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Emission"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -203,7 +203,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel):
                 row.prop(part, "grid_resolution")
 
 
-class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
+class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Hair dynamics"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -260,7 +260,7 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel):
         col.prop(cloth, "quality", text="Steps", slider=True)
 
 
-class PARTICLE_PT_cache(ParticleButtonsPanel):
+class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Cache"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -283,7 +283,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel):
         point_cache_ui(self, context, psys.point_cache, True, 'HAIR' if psys.hair_dynamics else 'PSYS')
 
 
-class PARTICLE_PT_velocity(ParticleButtonsPanel):
+class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Velocity"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -330,7 +330,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel):
         #    sub.prop(part, "reaction_shape", slider=True)
 
 
-class PARTICLE_PT_rotation(ParticleButtonsPanel):
+class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Rotation"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -376,7 +376,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel):
             sub.prop(part, "angular_velocity_factor", text="")
 
 
-class PARTICLE_PT_physics(ParticleButtonsPanel):
+class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Physics"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -573,7 +573,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel):
                     sub.prop(key, "system", text="System")
 
 
-class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
+class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Boid Brain"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -673,7 +673,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel):
                 row.prop(rule, "flee_distance")
 
 
-class PARTICLE_PT_render(ParticleButtonsPanel):
+class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Render"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -843,7 +843,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel):
                 col.label(text="")
 
 
-class PARTICLE_PT_draw(ParticleButtonsPanel):
+class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Display"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -902,7 +902,7 @@ class PARTICLE_PT_draw(ParticleButtonsPanel):
             #sub.label(text="Override material color")
 
 
-class PARTICLE_PT_children(ParticleButtonsPanel):
+class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Children"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -987,7 +987,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel):
         col.prop(part, "kink_shape", slider=True)
 
 
-class PARTICLE_PT_field_weights(ParticleButtonsPanel):
+class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Field Weights"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1000,7 +1000,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel):
             self.layout.prop(part.effector_weights, "do_growing_hair")
 
 
-class PARTICLE_PT_force_fields(ParticleButtonsPanel):
+class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Force Field Settings"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1028,7 +1028,7 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel):
         basic_force_field_falloff_ui(self, context, part.force_field_2)
 
 
-class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
+class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
     bl_label = "Vertexgroups"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -1096,35 +1096,12 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel):
         row.prop(psys, "vertex_group_field_negate", text="")
 
 
-classes = [
-    PARTICLE_PT_context_particles,
-    PARTICLE_PT_hair_dynamics,
-    PARTICLE_PT_cache,
-    PARTICLE_PT_emission,
-    PARTICLE_PT_velocity,
-    PARTICLE_PT_rotation,
-    PARTICLE_PT_physics,
-    PARTICLE_PT_boidbrain,
-    PARTICLE_PT_render,
-    PARTICLE_PT_draw,
-    PARTICLE_PT_children,
-    PARTICLE_PT_field_weights,
-    PARTICLE_PT_force_fields,
-    PARTICLE_PT_vertexgroups,
-
-    PARTICLE_PT_custom_props]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 61e1fe81812a3a1556a0356507ee38e3b97e4eef..af393c0d239231087bba3f7ba9b5edbd1e3f9655 100644 (file)
@@ -40,7 +40,7 @@ class CLOTH_MT_presets(bpy.types.Menu):
     draw = bpy.types.Menu.draw_preset
 
 
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
@@ -51,7 +51,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
         return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
 
 
-class PHYSICS_PT_cloth(PhysicButtonsPanel):
+class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth"
 
     def draw(self, context):
@@ -133,7 +133,7 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
                 col.prop_object(cloth, "rest_shape_key", key, "keys", text="")
 
 
-class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
+class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth Cache"
     bl_default_closed = True
 
@@ -145,7 +145,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
         point_cache_ui(self, context, md.point_cache, cloth_panel_enabled(md), 'CLOTH')
 
 
-class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
+class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth Collision"
     bl_default_closed = True
 
@@ -185,7 +185,7 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
         layout.prop(cloth, "group")
 
 
-class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
+class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth Stiffness Scaling"
     bl_default_closed = True
 
@@ -222,7 +222,7 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
         col.prop(cloth, "bending_stiffness_max", text="Max")
 
 
-class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel):
+class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Cloth Field Weights"
     bl_default_closed = True
 
@@ -234,26 +234,12 @@ class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel):
         effector_weights_ui(self, context, cloth.effector_weights)
 
 
-classes = [
-    CLOTH_MT_presets,
-
-    PHYSICS_PT_cloth,
-    PHYSICS_PT_cloth_cache,
-    PHYSICS_PT_cloth_collision,
-    PHYSICS_PT_cloth_stiffness,
-    PHYSICS_PT_cloth_field_weights]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 57fa40e4c5dd25311b5c6c53de1ef4c1e3a4f636..963fbe082265bbaa8c254e6625b696b7329d78b0 100644 (file)
@@ -26,7 +26,7 @@ from properties_physics_common import basic_force_field_settings_ui
 from properties_physics_common import basic_force_field_falloff_ui
 
 
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
@@ -36,7 +36,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
         return (context.object) and (not rd.use_game_engine)
 
 
-class PHYSICS_PT_field(PhysicButtonsPanel):
+class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Force Fields"
 
     def draw(self, context):
@@ -169,7 +169,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
                 sub.prop(field, "radial_maximum", text="Distance")
 
 
-class PHYSICS_PT_collision(PhysicButtonsPanel):
+class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Collision"
     #bl_default_closed = True
 
@@ -243,21 +243,12 @@ class PHYSICS_PT_collision(PhysicButtonsPanel):
             col.prop(settings, "absorption", text="Absorption")
 
 
-classes = [
-    PHYSICS_PT_field,
-    PHYSICS_PT_collision]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 32acd88654d09cba5e09525edae8bff7daf0d355..c24052c59fe13e62f0ecf945254e0b99dcccc316 100644 (file)
@@ -22,7 +22,7 @@ import bpy
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
@@ -33,7 +33,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
         return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
 
 
-class PHYSICS_PT_fluid(PhysicButtonsPanel):
+class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Fluid"
 
     def draw(self, context):
@@ -216,7 +216,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
                 sub.prop(fluid, "velocity_radius", text="Radius")
 
 
-class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
+class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Domain World"
     bl_default_closed = True
 
@@ -267,7 +267,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
         col.prop(fluid, "compressibility", slider=True)
 
 
-class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
+class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Domain Boundary"
     bl_default_closed = True
 
@@ -296,7 +296,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
         col.prop(fluid, "surface_subdivisions", text="Subdivisions")
 
 
-class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
+class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Domain Particles"
     bl_default_closed = True
 
@@ -314,23 +314,12 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
         col.prop(fluid, "generate_particles")
 
 
-classes = [
-    PHYSICS_PT_fluid,
-    PHYSICS_PT_domain_gravity,
-    PHYSICS_PT_domain_boundary,
-    PHYSICS_PT_domain_particles]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 9bae4c5b63fb7a8f2be2becb1dd4dac4a2c88a51..5709a239858678537a9895c5bddbdf8ef1185967 100644 (file)
@@ -26,7 +26,7 @@ from properties_physics_common import point_cache_ui
 from properties_physics_common import effector_weights_ui
 
 
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
@@ -37,7 +37,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
         return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
 
 
-class PHYSICS_PT_smoke(PhysicButtonsPanel):
+class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke"
 
     def draw(self, context):
@@ -126,7 +126,7 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel):
             #  layout.separator()
 
 
-class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke Groups"
     bl_default_closed = True
 
@@ -155,7 +155,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel):
         col.prop(group, "coll_group", text="")
 
 
-class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke Cache"
     bl_default_closed = True
 
@@ -175,7 +175,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel):
         point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE')
 
 
-class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke High Resolution"
     bl_default_closed = True
 
@@ -211,7 +211,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel):
         col.prop(md, "strength")
 
 
-class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke High Resolution Cache"
     bl_default_closed = True
 
@@ -231,7 +231,7 @@ class PHYSICS_PT_smoke_cache_highres(PhysicButtonsPanel):
         point_cache_ui(self, context, cache, (cache.baked is False), 'SMOKE')
 
 
-class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel):
+class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Smoke Field Weights"
     bl_default_closed = True
 
@@ -244,25 +244,12 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel):
         effector_weights_ui(self, context, domain.effector_weights)
 
 
-classes = [
-    PHYSICS_PT_smoke,
-    PHYSICS_PT_smoke_field_weights,
-    PHYSICS_PT_smoke_cache,
-    PHYSICS_PT_smoke_highres,
-    PHYSICS_PT_smoke_groups,
-    PHYSICS_PT_smoke_cache_highres]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 60149cf533b4ca3caed4cbd1f980fa1b9803c0ae..5e7aae2663011e6a99fe6a27363cf4a571305b8a 100644 (file)
@@ -30,7 +30,7 @@ def softbody_panel_enabled(md):
     return (md.point_cache.baked is False)
 
 
-class PhysicButtonsPanel(bpy.types.Panel):
+class PhysicButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "physics"
@@ -43,7 +43,7 @@ class PhysicButtonsPanel(bpy.types.Panel):
         return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine)
 
 
-class PHYSICS_PT_softbody(PhysicButtonsPanel):
+class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body"
 
     def draw(self, context):
@@ -88,7 +88,7 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
             col.prop(softbody, "speed")
 
 
-class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Cache"
     bl_default_closed = True
 
@@ -100,7 +100,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel):
         point_cache_ui(self, context, md.point_cache, softbody_panel_enabled(md), 'SOFTBODY')
 
 
-class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Goal"
     bl_default_closed = True
 
@@ -144,7 +144,7 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel):
         layout.prop_object(softbody, "goal_vertex_group", ob, "vertex_groups", text="Vertex Group")
 
 
-class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Edges"
     bl_default_closed = True
 
@@ -199,7 +199,7 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
         col.prop(softbody, "face_collision", text="Face")
 
 
-class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Self Collision"
     bl_default_closed = True
 
@@ -234,7 +234,7 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel):
         col.prop(softbody, "ball_damp", text="Dampening")
 
 
-class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Solver"
     bl_default_closed = True
 
@@ -271,7 +271,7 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel):
         layout.prop(softbody, "estimate_matrix")
 
 
-class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
+class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, bpy.types.Panel):
     bl_label = "Soft Body Field Weights"
     bl_default_closed = True
 
@@ -285,26 +285,12 @@ class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel):
         effector_weights_ui(self, context, softbody.effector_weights)
 
 
-classes = [
-    PHYSICS_PT_softbody,
-    PHYSICS_PT_softbody_cache,
-    PHYSICS_PT_softbody_goal,
-    PHYSICS_PT_softbody_edge,
-    PHYSICS_PT_softbody_collision,
-    PHYSICS_PT_softbody_solver,
-    PHYSICS_PT_softbody_field_weights]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 9a15387575604ff34dfa3525c788a21f02ef6575..4e6596957d7cb4a85e818e229744cb4f7790f32c 100644 (file)
@@ -36,7 +36,7 @@ class RENDER_MT_ffmpeg_presets(bpy.types.Menu):
     draw = bpy.types.Menu.draw_preset
 
 
-class RenderButtonsPanel(bpy.types.Panel):
+class RenderButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "render"
@@ -47,7 +47,7 @@ class RenderButtonsPanel(bpy.types.Panel):
         return (context.scene and rd.use_game_engine is False) and (rd.engine in self.COMPAT_ENGINES)
 
 
-class RENDER_PT_render(RenderButtonsPanel):
+class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Render"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -69,7 +69,7 @@ class RENDER_PT_render(RenderButtonsPanel):
         layout.prop(rd, "display_mode", text="Display")
 
 
-class RENDER_PT_layers(RenderButtonsPanel):
+class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Layers"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -174,7 +174,7 @@ class RENDER_PT_layers(RenderButtonsPanel):
         row.prop(rl, "pass_refraction_exclude", text="")
 
 
-class RENDER_PT_shading(RenderButtonsPanel):
+class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Shading"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -199,7 +199,7 @@ class RENDER_PT_shading(RenderButtonsPanel):
         col.prop(rd, "alpha_mode", text="Alpha")
 
 
-class RENDER_PT_performance(RenderButtonsPanel):
+class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Performance"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -243,7 +243,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
         sub.prop(rd, "use_local_coords", text="Local Coordinates")
 
 
-class RENDER_PT_post_processing(RenderButtonsPanel):
+class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Post Processing"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -287,7 +287,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
         sub.prop(rd, "edge_color", text="")
 
 
-class RENDER_PT_output(RenderButtonsPanel):
+class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Output"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -407,7 +407,7 @@ class RENDER_PT_output(RenderButtonsPanel):
                 col.prop(rd, "quicktime_audio_resampling_hq")
 
 
-class RENDER_PT_encoding(RenderButtonsPanel):
+class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Encoding"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -479,7 +479,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
         col.prop(rd, "ffmpeg_audio_volume", slider=True)
 
 
-class RENDER_PT_antialiasing(RenderButtonsPanel):
+class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Anti-Aliasing"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -509,7 +509,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
         col.prop(rd, "filter_size", text="Size")
 
 
-class RENDER_PT_motion_blur(RenderButtonsPanel):
+class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Full Sample Motion Blur"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -529,8 +529,7 @@ class RENDER_PT_motion_blur(RenderButtonsPanel):
         row.prop(rd, "motion_blur_samples")
         row.prop(rd, "motion_blur_shutter")
 
-
-class RENDER_PT_dimensions(RenderButtonsPanel):
+class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Dimensions"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -577,7 +576,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
         sub.prop(rd, "fps_base", text="/")
 
 
-class RENDER_PT_stamp(RenderButtonsPanel):
+class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Stamp"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -623,7 +622,7 @@ class RENDER_PT_stamp(RenderButtonsPanel):
         sub.prop(rd, "stamp_note_text", text="")
 
 
-class RENDER_PT_bake(RenderButtonsPanel):
+class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
     bl_label = "Bake"
     bl_default_closed = True
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -670,33 +669,12 @@ class RENDER_PT_bake(RenderButtonsPanel):
         sub.prop(rd, "bake_bias")
 
 
-classes = [
-    RENDER_MT_presets,
-    RENDER_MT_ffmpeg_presets,
-    RENDER_PT_render,
-    RENDER_PT_layers,
-    RENDER_PT_dimensions,
-    RENDER_PT_antialiasing,
-    RENDER_PT_motion_blur,
-    RENDER_PT_shading,
-    RENDER_PT_output,
-    RENDER_PT_encoding,
-    RENDER_PT_performance,
-    RENDER_PT_post_processing,
-    RENDER_PT_stamp,
-    RENDER_PT_bake]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 06ad1eda8356d5d1399b1fca707285c35b0d196f..859fcc3ce478333e7ccafe1a4f9c7885c76066a7 100644 (file)
@@ -23,7 +23,7 @@ from rna_prop_ui import PropertyPanel
 narrowui = bpy.context.user_preferences.view.properties_width_check
 
 
-class SceneButtonsPanel(bpy.types.Panel):
+class SceneButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "scene"
@@ -32,7 +32,7 @@ class SceneButtonsPanel(bpy.types.Panel):
         return context.scene
 
 
-class SCENE_PT_scene(SceneButtonsPanel):
+class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
     bl_label = "Scene"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -49,11 +49,11 @@ class SCENE_PT_scene(SceneButtonsPanel):
             layout.prop(scene, "set", text="")
 
 
-class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel):
+class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
     _context_path = "scene"
 
 
-class SCENE_PT_unit(SceneButtonsPanel):
+class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
     bl_label = "Units"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -78,7 +78,7 @@ class SCENE_PT_unit(SceneButtonsPanel):
         layout.column().prop(unit, "rotation_units")
 
 
-class SCENE_PT_keying_sets(SceneButtonsPanel):
+class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
     bl_label = "Keying Sets"
 
     def draw(self, context):
@@ -115,7 +115,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel):
             col.prop(ks, "insertkey_xyz_to_rgb", text="XYZ to RGB")
 
 
-class SCENE_PT_keying_set_paths(SceneButtonsPanel):
+class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
     bl_label = "Active Keying Set"
 
     def poll(self, context):
@@ -169,7 +169,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel):
             col.prop(ksp, "insertkey_xyz_to_rgb", text="XYZ to RGB")
 
 
-class SCENE_PT_physics(SceneButtonsPanel):
+class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel):
     bl_label = "Gravity"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -190,7 +190,7 @@ class SCENE_PT_physics(SceneButtonsPanel):
             layout.column().prop(scene, "gravity", text="")
 
 
-class SCENE_PT_simplify(SceneButtonsPanel):
+class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
     bl_label = "Simplify"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -334,29 +334,12 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
         return {'RUNNING_MODAL'}
 
 
-classes = [
-    SCENE_PT_scene,
-    SCENE_PT_unit,
-    SCENE_PT_keying_sets,
-    SCENE_PT_keying_set_paths,
-    SCENE_PT_physics,
-    SCENE_PT_simplify,
-
-    SCENE_PT_custom_props,
-
-    ANIM_OT_keying_set_export]
-
-
 def register():
-    register = bpy.types.register
-    for cls in classes:
-        register(cls)
+    pass
 
 
 def unregister():
-    unregister = bpy.types.unregister
-    for cls in classes:
-        unregister(cls)
+    pass
 
 if __name__ == "__main__":
     register()
index 2bfbe188c9ee8cb8646ed03e2a8b1c193931c07c..d9d8e5cb24dac4ce540aadd715c579d68e12dc3b 100644 (file)
@@ -65,7 +65,7 @@ def context_tex_datablock(context):
     return idblock
 
 
-class TextureButtonsPanel(bpy.types.Panel):
+class TextureButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
     bl_context = "texture"
@@ -78,7 +78,7 @@ class TextureButtonsPanel(bpy.types.Panel):
         return (tex.type != 'NONE' or tex.use_nodes) and (engine in self.COMPAT_ENGINES)
 
 
-class TEXTURE_PT_preview(TextureButtonsPanel):
+class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
     bl_label = "Preview"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -95,7