Merge with 2.5 -r 21619:21756.
authorArystanbek Dyussenov <arystan.d@gmail.com>
Tue, 21 Jul 2009 12:13:56 +0000 (12:13 +0000)
committerArystanbek Dyussenov <arystan.d@gmail.com>
Tue, 21 Jul 2009 12:13:56 +0000 (12:13 +0000)
259 files changed:
CMakeLists.txt
blenderplayer/CMakeLists.txt
config/linux2-config.py
config/win32-mingw-config.py
config/win32-vc-config.py
config/win64-vc-config.py
extern/binreloc/CMakeLists.txt
extern/binreloc/Makefile
extern/bullet2/src/SConscript
extern/libopenjpeg/SConscript
intern/elbeem/SConscript
release/beos-4.5-i386/specific.sh [deleted file]
release/beos-5.0-i386/specific.sh [deleted file]
release/datafiles/preview.blend
release/io/export_fbx.py
release/io/export_ply.py
release/ui/bpy_ops.py [new file with mode: 0644]
release/ui/buttons_data_armature.py
release/ui/buttons_data_bone.py
release/ui/buttons_data_lamp.py
release/ui/buttons_data_lattice.py
release/ui/buttons_data_mesh.py
release/ui/buttons_data_modifier.py
release/ui/buttons_game.py [new file with mode: 0644]
release/ui/buttons_material.py
release/ui/buttons_object_constraint.py
release/ui/buttons_objects.py
release/ui/buttons_physics_cloth.py [moved from release/ui/buttons_physic_cloth.py with 64% similarity]
release/ui/buttons_physics_field.py
release/ui/buttons_physics_fluid.py
release/ui/buttons_physics_softbody.py
release/ui/buttons_scene.py
release/ui/buttons_texture.py
release/ui/buttons_world.py
release/ui/space_console.py
release/ui/space_filebrowser.py
release/ui/space_image.py
release/ui/space_info.py
release/ui/space_logic.py
release/ui/space_outliner.py
release/ui/space_sequencer.py
release/ui/space_text.py
release/ui/space_view3d.py
release/ui/space_view3d_toolbar.py
source/blender/blenkernel/BKE_action.h
source/blender/blenkernel/BKE_animsys.h
source/blender/blenkernel/BKE_boids.h [new file with mode: 0644]
source/blender/blenkernel/BKE_colortools.h
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_particle.h
source/blender/blenkernel/BKE_property.h
source/blender/blenkernel/BKE_report.h
source/blender/blenkernel/BKE_screen.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/boids.c [new file with mode: 0644]
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/fluidsim.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/object.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/property.c
source/blender/blenkernel/intern/report.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/world.c
source/blender/blenlib/BLI_arithb.h
source/blender/blenlib/BLI_dlrbTree.h [new file with mode: 0644]
source/blender/blenlib/BLI_fileops.h
source/blender/blenlib/BLI_kdtree.h
source/blender/blenlib/BLI_util.h
source/blender/blenlib/SConscript
source/blender/blenlib/intern/BLI_kdtree.c
source/blender/blenlib/intern/DLRB_tree.c [new file with mode: 0644]
source/blender/blenlib/intern/arithb.c
source/blender/blenlib/intern/fileops.c
source/blender/blenlib/intern/util.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/armature/armature_intern.h
source/blender/editors/armature/armature_ops.c
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/curve/curve_intern.h
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/datafiles/B.blend.c
source/blender/editors/datafiles/preview.blend.c
source/blender/editors/include/BIF_glutil.h
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_keyframes_draw.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/ED_physics.h
source/blender/editors/include/ED_previewrender.h
source/blender/editors/include/ED_screen.h
source/blender/editors/include/ED_transform.h
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_draw.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_intern.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/view2d.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/object/editconstraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_intern.h
source/blender/editors/object/object_ops.c
source/blender/editors/physics/physics_boids.c [new file with mode: 0644]
source/blender/editors/preview/previewrender.c
source/blender/editors/screen/area.c
source/blender/editors/screen/glutil.c
source/blender/editors/screen/screen_context.c
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_action/action_ops.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/buttons_header.c
source/blender/editors/space_buttons/buttons_intern.h
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_console/Makefile
source/blender/editors/space_console/SConscript
source/blender/editors/space_console/console_draw.c
source/blender/editors/space_console/console_intern.h
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_console/console_report.c [new file with mode: 0644]
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_image/image_draw.c
source/blender/editors/space_image/image_render.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_node/SConscript
source/blender/editors/space_node/space_node.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_ops.c
source/blender/imbuf/IMB_imbuf_types.h
source/blender/imbuf/intern/divers.c
source/blender/makesdna/DNA_anim_types.h
source/blender/makesdna/DNA_armature_types.h
source/blender/makesdna/DNA_boid_types.h [new file with mode: 0644]
source/blender/makesdna/DNA_material_types.h
source/blender/makesdna/DNA_modifier_types.h
source/blender/makesdna/DNA_object_force.h
source/blender/makesdna/DNA_particle_types.h
source/blender/makesdna/DNA_property_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_screen_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesdna/DNA_windowmanager_types.h
source/blender/makesdna/DNA_world_types.h
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/RNA_define.h
source/blender/makesrna/RNA_enum_types.h
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_boid.c [new file with mode: 0644]
source/blender/makesrna/intern/rna_brush.c
source/blender/makesrna/intern/rna_cloth.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_internal_types.h
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_property.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.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_vpaint.c
source/blender/makesrna/intern/rna_world.c
source/blender/nodes/intern/CMP_nodes/CMP_image.c
source/blender/python/SConscript
source/blender/python/generic/BGL.h [changed mode: 0755->0644]
source/blender/python/generic/bpy_internal_import.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_operator.c
source/blender/python/intern/bpy_operator_wrap.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_util.c
source/blender/python/intern/bpy_util.h
source/blender/render/intern/include/shading.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/texture.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_draw.c
source/blender/windowmanager/intern/wm_gesture.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/BlenderRoutines/SConscript
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Expressions/SConscript
source/gameengine/GameLogic/CMakeLists.txt
source/gameengine/GameLogic/SConscript
source/gameengine/GamePlayer/common/SConscript
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/SConscript
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KXNetwork/SConscript
source/gameengine/Ketsji/SConscript
source/gameengine/Physics/Bullet/SConscript
source/gameengine/Physics/common/SConscript
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/SConscript
source/gameengine/Rasterizer/SConscript
source/gameengine/SceneGraph/SConscript
source/gameengine/VideoTexture/SConscript
tools/Blender.py

index a4796c2eee90555a4c9de5d372a0e1cebab530ca..47daa1e4b9eed92acc97e4359e58e5f23a6f8a6b 100644 (file)
@@ -63,6 +63,7 @@ OPTION(WITH_OPENEXR           "Enable OpenEXR Support (http://www.openexr.com)"       ON)
 OPTION(WITH_DDS                        "Enable DDS Support"                                    ON)
 OPTION(WITH_FFMPEG             "Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"   OFF)
 OPTION(WITH_PYTHON             "Enable Embedded Python API"                            ON)
+OPTION(WITH_SDL                        "Enable SDL for sound and joystick support"                             ON)
 OPTION(WITH_OPENJPEG           "Enable OpenJpeg Support (http://www.openjpeg.org/)"    OFF)
 OPTION(WITH_OPENAL             "Enable OpenAL Support (http://www.openal.org)"         ON)
 OPTION(WITH_OPENMP             "Enable OpenMP (has to be supported by the compiler)"   OFF)
@@ -133,9 +134,11 @@ IF(UNIX AND NOT APPLE)
   SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
   SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
 
-  FIND_PACKAGE(SDL)
-  SET(SDL_INC ${SDL_INCLUDE_DIR})
-  SET(SDL_LIB ${SDL_LIBRARY})
+  IF(WITH_SDL)
+    FIND_PACKAGE(SDL)
+    SET(SDL_INC ${SDL_INCLUDE_DIR})
+    SET(SDL_LIB ${SDL_LIBRARY})
+  ENDIF(WITH_SDL)
 
   FIND_PATH(OPENEXR_INC
     ImfXdr.h
index 5b13a5f45212a770e1c6ea6e28ce8767f66f2689..2d8fc6ff4b9a3e4fca28276f4ac4c5bacf477fec 100644 (file)
@@ -32,10 +32,10 @@ IF(WITH_QUICKTIME)
   ADD_DEFINITIONS(-DWITH_QUICKTIME)
 ENDIF(WITH_QUICKTIME)
 
-IF(LINUX)
+IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
   ADD_DEFINITIONS(-DWITH_BINRELOC)
   INCLUDE_DIRECTORIES(${BINRELOC_INC})
-endif(LINUX)
+ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
 ADD_CUSTOM_COMMAND(
   OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dna.c
index 86de10c8fb39531eddf8374aa76508ddae114d0a..b6a1eeb2c441021e2daf05a5efd2625ece84d06e 100644 (file)
@@ -1,17 +1,9 @@
 LCGDIR = '../lib/linux2'
 LIBDIR = "${LCGDIR}"
 
-def py_version_string():
-       '''
-       returns py version - "2.5", "2.6" etc
-       '''
-       import platform
-       ver = platform.python_version_tuple()
-       return '%d.%d' % (int(ver[0]), int(ver[1])) # py2.5 uses strings, 2.6 ints
-
 BF_PYTHON = '/usr'
 BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
-BF_PYTHON_VERSION = py_version_string()
+BF_PYTHON_VERSION = '3.1'
 WITH_BF_STATICPYTHON = False
 BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
 BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
index 1223a4c49e97a12755b364dcdd61addcfc089405..375b8c36ce898f050b35bc38ed8b85e53a3c0346 100644 (file)
@@ -148,7 +148,7 @@ LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32
 BF_DEBUG = False
 BF_DEBUG_CCFLAGS= ['-g']
 
-BF_PROFILE_CCFLAGS = ['-pg', '-g ']
+BF_PROFILE_CCFLAGS = ['-pg', '-g']
 BF_PROFILE_LINKFLAGS = ['-pg']
 BF_PROFILE_FLAGS = BF_PROFILE_CCFLAGS
 BF_PROFILE = False
index 67ab394bef97224c562846407b3e661e87aa38a4..8b152be437e3e327fbe207acbbd1ea849b3598b1 100644 (file)
@@ -149,7 +149,7 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a'
 CC = 'cl.exe'
 CXX = 'cl.exe'
 
-CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/MT', '/wd4244', '/wd4305', '/wd4800']
+CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
 CXXFLAGS = ['/EHsc']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
@@ -165,7 +165,7 @@ CXX_WARN = []
 
 LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid']
 
-PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/ENTRY:mainCRTStartup','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/LARGEADDRESSAWARE']
+PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"msvcprtd.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"', '/LARGEADDRESSAWARE']
 
 # # Todo
 # BF_PROFILE_CCFLAGS = ['-pg', '-g ']
index c6bea9eba8902ecdfe90167755ebf812376ec41f..a8be162ea97bf42cfc54b4b09f56c9a3082104d0 100644 (file)
@@ -152,7 +152,8 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a'
 CC = 'cl.exe'
 CXX = 'cl.exe'
 
-CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/MT', '/wd4244', '/wd4305', '/wd4800']
+CFLAGS = []
+CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
 CXXFLAGS = ['/EHsc']
 
 BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr']
@@ -172,16 +173,13 @@ WITH_BF_DOCS=False
 
 BF_DEBUG=False
 BF_BSC=False
-CFLAGS = []
-CCFLAGS = ['/nologo', '/Ob1', '/J', '/W3', '/Gd', '/MT']
-CXXFLAGS = ['/EHsc']
 
 if BF_DEBUG:
        BF_NUMJOBS=1
 else:
        BF_NUMJOBS=6
 
-PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/ENTRY:mainCRTStartup','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"']
+PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"msvcprtd.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/NODEFAULTLIB:"msvcrt.lib"', '/NODEFAULTLIB:"msvcrtd.lib"', '/NODEFAULTLIB:"msvcmrt.lib"', '/NODEFAULTLIB:"msvcurt.lib"']
 
 BF_BUILDDIR = '..\\build\\blender25-win64-vc'
 BF_INSTALLDIR='..\\install\\blender25-win64-vc'
index 78dc65d81124e887aae49247d78964e7ffe954bd..7bdc93fc978c9e3a27b9697dfd5362e8c0c86512 100644 (file)
@@ -18,8 +18,8 @@
 # All rights reserved.
 #
 
-SET(INC ./include ${WINTAB_INC})
-ADD_DEFINITIONS(-DWITH_BINRELOC)
+SET(INC ./include )
+ADD_DEFINITIONS(-DENABLE_BINRELOC)
 FILE(GLOB SRC *.c)
 
 BLENDERLIB(extern_binreloc "${SRC}" "${INC}")
index d303ab3afcc59d32051221ee38c465e32519449c..21343ab4803f567f13b22db05e73029389b4f913 100644 (file)
@@ -27,7 +27,7 @@ DIR = $(OCGDIR)/extern/$(LIBNAME)
 
 include nan_definitions.mk
 
-CPPFLAGS += -I./include
+CPPFLAGS += -DENABLE_BINRELOC -I./include
 
 
 include nan_compile.mk
index bd7fb87b01f75000d0abd2fd2dc0e2d559c36a1c..319cc57ce5555509e864b156985e9717695449e6 100644 (file)
@@ -10,7 +10,7 @@ cflags = []
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
     defs += ' WIN32 NDEBUG _WINDOWS _LIB'
     #cflags += ['/MT', '/W3', '/GX', '/O2', '/Op']
-    cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3']
+    cflags += ['/MT', '/W3', '/GX', '/Og', '/Ot', '/Ob1', '/Op', '/G6', '/O3', '/EHcs']
 elif env['OURPLATFORM']=='win32-mingw':
     defs += ' NDEBUG'
     cflags += ['-O2']
index 13a34bf5598e541c0138ade6debaccf265e70f61..693fee15c91c54553105244ae1cf81f4b37f8bc8 100644 (file)
@@ -10,14 +10,14 @@ incs = '.'
 flags = []
 defs = []
 
-if env['OURPLATFORM'] == 'win32-vc':
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
        flags = []
        defs.append('OPJ_STATIC')
 else:
        flags = ['-Wall', '-O3', '-ffast-math', '-std=c99']
 
 oj_env = env.Clone()
-if not env['OURPLATFORM'] == 'win32-vc':
+if not env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
        oj_env.Replace(CCFLAGS = '')
        oj_env.Replace(BF_DEBUG_FLAGS = '')
 
index 92e80c36cea7ec364e3c29a0ace3f94171176e60..0900ab1db5c53a35468bd8ddda297fc6b77ae5ab 100644 (file)
@@ -10,7 +10,7 @@ defs = 'NOGUI ELBEEM_BLENDER=1'
 if env['WITH_BF_OPENMP']:
     defs += ' PARALLEL'
 
-if env['OURPLATFORM']=='win32-vc':
+if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
     defs += ' USE_MSVC6FIXES'
 incs = env['BF_PNG_INC'] + ' ' + env['BF_ZLIB_INC'] 
 incs += ' extern '
diff --git a/release/beos-4.5-i386/specific.sh b/release/beos-4.5-i386/specific.sh
deleted file mode 100755 (executable)
index 9ce063b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-#
-# ***** 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-# OS specific stuff for the package, only to be executed by ../Makefile
-
-# Add Python .so to package
-cp -f $NAN_PYTHON/lib/libpython$NAN_PYTHON_VERSION.so $DISTDIR/
-
-# And create a drag'n'drop symlink for it
-cd $DISTDIR && ln -s /boot/home/config/lib Drag_libpython$NAN_PYTHON_VERSION.so_here
diff --git a/release/beos-5.0-i386/specific.sh b/release/beos-5.0-i386/specific.sh
deleted file mode 100755 (executable)
index 9ce063b..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $Id$
-#
-# ***** 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
-# All rights reserved.
-#
-# The Original Code is: all of this file.
-#
-# Contributor(s): none yet.
-#
-# ***** END GPL LICENSE BLOCK *****
-#
-# OS specific stuff for the package, only to be executed by ../Makefile
-
-# Add Python .so to package
-cp -f $NAN_PYTHON/lib/libpython$NAN_PYTHON_VERSION.so $DISTDIR/
-
-# And create a drag'n'drop symlink for it
-cd $DISTDIR && ln -s /boot/home/config/lib Drag_libpython$NAN_PYTHON_VERSION.so_here
index e6b5b30dbc402fc48b843835c517df2150261076..807d1b08c4d0c9aa4aaf89ba3de25c408b8c0a73 100644 (file)
Binary files a/release/datafiles/preview.blend and b/release/datafiles/preview.blend differ
index c19a914d22eee085b65e401eb957dd5277c2cf6d..64a8870bb3dae6f2874214e15d2c821a3f9ea20d 100644 (file)
@@ -3061,7 +3061,8 @@ Takes:  {''')
        
        # copy images if enabled
        if EXP_IMAGE_COPY:
-               copy_images( basepath,  [ tex[1] for tex in textures if tex[1] != None ])       
+#              copy_images( basepath,  [ tex[1] for tex in textures if tex[1] != None ])
+               bpy.util.copy_images( basepath,  [ tex[1] for tex in textures if tex[1] != None ])      
        
        print 'export finished in %.4f sec.' % (bpy.sys.time() - start_time)
 #      print 'export finished in %.4f sec.' % (Blender.sys.time() - start_time)
@@ -3094,11 +3095,6 @@ def do_obs_sce(e,v):
        GLOBALS['EXP_OBS_SCENE'].val = 1
        GLOBALS['EXP_OBS_SELECTED'].val = 0
 
-def do_obs_sce(e,v):
-       GLOBALS['EVENT'] = e
-       GLOBALS['EXP_OBS_SCENE'].val = 1
-       GLOBALS['EXP_OBS_SELECTED'].val = 0
-
 def do_batch_type_grp(e,v):
        GLOBALS['EVENT'] = e
        GLOBALS['BATCH_GROUP'].val = 1
index ce1cdc55d09ed663ba7a94ecc58d28edbdf3eb3d..2028358ff3b9b95ee7ea1c098ea0f354b0c35fee 100644 (file)
@@ -240,6 +240,7 @@ class EXPORT_OT_ply(bpy.types.Operator):
        '''
        Operator documentatuon text, will be used for the operator tooltip and python docs.
        '''
+       __idname__ = "export.ply"
        __label__ = "Export PLY"
        
        # List of operator properties, the attributes will be assigned
diff --git a/release/ui/bpy_ops.py b/release/ui/bpy_ops.py
new file mode 100644 (file)
index 0000000..aaf9edc
--- /dev/null
@@ -0,0 +1,103 @@
+# for slightly faster access
+from bpy.__ops__ import add            as op_add
+from bpy.__ops__ import remove         as op_remove
+from bpy.__ops__ import dir            as op_dir
+from bpy.__ops__ import call           as op_call
+
+class bpy_ops(object):
+       '''
+       Fake module like class.
+       
+        bpy.ops
+       '''
+       def add(self, pyop):
+               op_add(pyop)
+       
+       def remove(self, pyop):
+               op_remove(pyop)
+       
+       def __getattr__(self, module):
+               '''
+               gets a bpy.ops submodule
+               '''
+               return bpy_ops_submodule(module)
+               
+       def __dir__(self):
+               
+               submodules = set()
+               
+               # add this classes functions
+               for id_name in dir(self.__class__):
+                       if not id_name.startswith('__'):
+                               submodules.add(id_name)
+               
+               for id_name in op_dir():
+                       id_split = id_name.split('_OT_', 1)
+                       
+                       if len(id_split) == 2:
+                               submodules.add(id_split[0].lower())
+                       else:
+                               submodules.add(id_split[0])
+               
+               return list(submodules)
+               
+       def __repr__(self):
+               return "<module like class 'bpy.ops'>"
+
+
+class bpy_ops_submodule(object):
+       '''
+       Utility class to fake submodules.
+       
+       eg. bpy.ops.object
+       '''
+       __keys__ = ('module',)
+       
+       def __init__(self, module):
+               self.module = module
+               
+       def __getattr__(self, func):
+               '''
+               gets a bpy.ops.submodule function
+               '''
+               return bpy_ops_submodule_op(self.module, func)
+               
+       def __dir__(self):
+               
+               functions = set()
+               
+               module_upper = self.module.upper()
+               
+               for id_name in op_dir():
+                       id_split = id_name.split('_OT_', 1)
+                       if len(id_split) == 2 and module_upper == id_split[0]:
+                               functions.add(id_split[1])
+               
+               return list(functions)
+       
+       def __repr__(self):
+               return "<module like class 'bpy.ops.%s'>" % self.module
+
+class bpy_ops_submodule_op(object):
+       '''
+       Utility class to fake submodule operators.
+       
+       eg. bpy.ops.object.somefunc
+       '''
+       __keys__ = ('module', 'func')
+       def __init__(self, module, func):
+               self.module = module
+               self.func = func
+       
+       def __call__(self, **kw):
+               # submod.foo -> SUBMOD_OT_foo
+               id_name = self.module.upper() + '_OT_' + self.func
+               
+               # Get the operator from 
+               return op_call(id_name, kw)
+               
+       def __repr__(self):
+               return "<function bpy.ops.%s.%s at 0x%x'>" % (self.module, self.func, id(self))
+
+import bpy
+bpy.ops = bpy_ops()
index 94fda908e569139e57069471efa954f9c96cfc6c..8eb7ba59c704d702d38f55164085c9475db5d0fa 100644 (file)
@@ -79,6 +79,38 @@ class DATA_PT_display(DataButtonsPanel):
                sub.itemR(arm, "draw_group_colors", text="Colors")
                sub.itemR(arm, "delay_deform", text="Delay Refresh")
 
+class DATA_PT_bone_groups(DataButtonsPanel):
+       __idname__ = "DATA_PT_bone_groups"
+       __label__ = "Bone Groups"
+       
+       def poll(self, context):
+               return (context.object and context.object.type=='ARMATURE' and context.object.pose)
+
+       def draw(self, context):
+               layout = self.layout
+               ob = context.object
+               pose= ob.pose
+               
+               row = layout.row()
+               
+               row.template_list(pose, "bone_groups", pose, "active_bone_group_index")
+               
+               col = row.column(align=True)
+               col.itemO("pose.group_add", icon="ICON_ZOOMIN", text="")
+               col.itemO("pose.group_remove", icon="ICON_ZOOMOUT", text="")
+               
+               group = pose.active_bone_group
+               if group:
+                       row = layout.row()
+                       row.itemR(group, "name")
+               
+               row = layout.row(align=True)
+               
+               row.itemO("pose.group_assign", text="Assign")
+               row.itemO("pose.group_remove", text="Remove") #row.itemO("pose.bone_group_remove_from", text="Remove")
+               #row.itemO("object.bone_group_select", text="Select")
+               #row.itemO("object.bone_group_deselect", text="Deselect")
+
 class DATA_PT_paths(DataButtonsPanel):
        __idname__ = "DATA_PT_paths"
        __label__ = "Paths"
@@ -136,5 +168,6 @@ class DATA_PT_ghost(DataButtonsPanel):
 bpy.types.register(DATA_PT_context_arm)
 bpy.types.register(DATA_PT_skeleton)
 bpy.types.register(DATA_PT_display)
+bpy.types.register(DATA_PT_bone_groups)
 bpy.types.register(DATA_PT_paths)
 bpy.types.register(DATA_PT_ghost)
index fae3d24839ce7c7f3930f112da7ae8670b950c98..b31cac15425b2d475f38bad785604246159505ab 100644 (file)
@@ -19,9 +19,9 @@ class BONE_PT_context_bone(BoneButtonsPanel):
                if not bone:
                        bone = context.edit_bone
                
-               split = layout.split(percentage=0.06)
-               split.itemL(text="", icon="ICON_BONE_DATA")
-               split.itemR(bone, "name", text="")
+               row = layout.row()
+               row.itemL(text="", icon="ICON_BONE_DATA")
+               row.itemR(bone, "name", text="")
 
 class BONE_PT_transform(BoneButtonsPanel):
        __idname__ = "BONE_PT_transform"
index cf0ede8ec3be46cfa09fc6360ff7bb84fcbd2b0b..4a6bc11922d551780fcefa58f7eee13456e0eab2 100644 (file)
@@ -47,39 +47,61 @@ class DATA_PT_lamp(DataButtonsPanel):
                layout = self.layout
                
                lamp = context.lamp
-
-               layout.itemR(lamp, "type")
+               
+               layout.itemR(lamp, "type", expand=True)
                
                split = layout.split()
+               col = split.column()
+               #col.itemL(text="Type:")
+               #col.itemR(lamp, "type", text="")
+               colsub = col.column(align=True)
+               colsub.itemR(lamp, "color", text="")
+               colsub.itemR(lamp, "energy")
                
-               sub = split.column()
-               sub.itemR(lamp, "color")
-               sub.itemR(lamp, "energy")
-               sub.itemR(lamp, "distance")
-               sub.itemR(lamp, "negative")
+               col.itemR(lamp, "negative")
+               #col.itemR(lamp, "distance")
        
                sub = split.column()
+               #sub.itemL(text="Influence:")
                sub.itemR(lamp, "layer", text="This Layer Only")
                sub.itemR(lamp, "specular")
                sub.itemR(lamp, "diffuse")
+               #sub.itemR(lamp, "negative")
                
                if lamp.type in ('POINT', 'SPOT'):
-                       sub.itemR(lamp, "falloff_type")
-                       sub.itemR(lamp, "sphere")
+                       split = layout.split()
+                       col = split.column()
+                       col.itemL(text="Falloff:")
+                       col = col.column(align=True)
+                       col.itemR(lamp, "falloff_type", text="")
+                       col.itemR(lamp, "distance")
+                       col.itemR(lamp, "sphere")
+                       
+                       if lamp.falloff_type != 'LINEAR_QUADRATIC_WEIGHTED':
+                               col = split.column()
                        
-                       if (lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED'):
-                               sub.itemR(lamp, "linear_attenuation")
-                               sub.itemR(lamp, "quadratic_attenuation")
+                       else:
+                               sub = split.column()
+                               sub.itemL(text="Attenuation Distance:")
+                               sub = sub.column(align=True)
+                               sub.itemR(lamp, "linear_attenuation", slider=True, text="Linear")
+                               sub.itemR(lamp, "quadratic_attenuation", slider=True, text="Quadratic")
                        
                if lamp.type == 'AREA':
-                       sub.column()
-                       sub.itemR(lamp, "gamma")
-                       sub.itemR(lamp, "shape")
+                       split = layout.split()
+                       col = split.column()
+                       col.itemL(text="Shape:")
+                       col = col.column(align=True)
+                       col.itemR(lamp, "shape", text="")
                        if (lamp.shape == 'SQUARE'):
-                               sub.itemR(lamp, "size")
+                               col.itemR(lamp, "size")
                        if (lamp.shape == 'RECTANGLE'):
-                               sub.itemR(lamp, "size", text="Size X")
-                               sub.itemR(lamp, "size_y")
+                               col.itemR(lamp, "size", text="Size X")
+                               col.itemR(lamp, "size_y", text="Size Y")
+                       
+                       sub = split.column()
+                       sub.itemL(text="Gamma:")
+                       sub.itemR(lamp, "gamma", text="Value")
                                
 class DATA_PT_sunsky(DataButtonsPanel):
        __idname__ = "DATA_PT_sunsky"
@@ -102,27 +124,51 @@ class DATA_PT_sunsky(DataButtonsPanel):
                row.itemR(lamp, "atmosphere_turbidity", text="Turbidity")
                        
                split = layout.split()
-
+               
                col = split.column()
-               sub = col.column()
-               sub.active = lamp.sky
-               sub.itemR(lamp, "sky_blend_type", text="Blend Type")
-               sub.itemR(lamp, "sky_blend")
-               sub.itemR(lamp, "sky_color_space", text="Color Space")
-               sub.itemR(lamp, "sky_exposure")
-               sub.itemR(lamp, "horizon_brightness", text="Hor Bright")
-               sub.itemR(lamp, "spread", text="Hor Spread")
-               sub.itemR(lamp, "sun_brightness", text="Sun Bright")
-               sub.itemR(lamp, "sun_size")
-               sub.itemR(lamp, "backscattered_light", text="Back Light")
-                               
-               sub = split.column()
-               sub.active = lamp.atmosphere
-               sub.itemR(lamp, "sun_intensity", text="Sun Intens")
-               sub.itemR(lamp, "atmosphere_inscattering", text="Inscattering")
-               sub.itemR(lamp, "atmosphere_extinction", text="Extinction")
-               sub.itemR(lamp, "atmosphere_distance_factor", text="Distance")
-                               
+               col.active = lamp.sky
+               col.itemL(text="Blend Mode:")
+               colsub = col.column(align=True)
+               colsub.itemR(lamp, "sky_blend_type", text="")
+               colsub.itemR(lamp, "sky_blend", text="Factor")
+               
+               col.itemL(text="Color Space:")
+               colsub = col.column(align=True)
+               colsub.itemR(lamp, "sky_color_space", text="")
+               colsub.itemR(lamp, "sky_exposure", text="Exposure")
+                       
+               col = split.column()
+               col.active = lamp.sky
+               col.itemL(text="Horizon:")
+               colsub = col.column(align=True)
+               colsub.itemR(lamp, "horizon_brightness", text="Brightness")
+               colsub.itemR(lamp, "spread", text="Spread")
+               
+               col.itemL(text="Sun:")
+               colsub = col.column(align=True)
+               colsub.itemR(lamp, "sun_brightness", text="Brightness")
+               colsub.itemR(lamp, "sun_size", text="Size")
+               colsub.itemR(lamp, "backscattered_light", slider=True,text="Back Light")
+               
+               row = layout.row()
+               row.itemS()
+               
+               split = layout.split()
+               
+               col = split.column()
+               col.active = lamp.atmosphere
+               col.itemL(text="Sun:")
+               col.itemR(lamp, "sun_intensity", text="Intensity")
+               col.itemL(text="Scale Distance:")
+               col.itemR(lamp, "atmosphere_distance_factor", text="Distance")
+                       
+               col = split.column()
+               col.active = lamp.atmosphere
+               col.itemL(text="Scattering:")
+               sub = col.column(align=True)
+               sub.itemR(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
+               sub.itemR(lamp, "atmosphere_extinction", slider=True ,text="Extinction")
+               
 class DATA_PT_shadow(DataButtonsPanel):
        __idname__ = "DATA_PT_shadow"
        __label__ = "Shadow"
@@ -137,12 +183,12 @@ class DATA_PT_shadow(DataButtonsPanel):
 
                layout.itemR(lamp, "shadow_method", expand=True)
                
-               if lamp.shadow_method in ('BUFFER_SHADOW', 'RAY_SHADOW'):
+               if lamp.shadow_method != 'NOSHADOW':
                
                        split = layout.split()
                        
-                       sub = split.column()
-                       sub.itemR(lamp, "shadow_color")
+                       col = split.column()
+                       col.itemR(lamp, "shadow_color")
                        
                        sub = split.column()
                        sub.itemR(lamp, "shadow_layer", text="This Layer Only")
@@ -155,21 +201,29 @@ class DATA_PT_shadow(DataButtonsPanel):
                        col.row().itemR(lamp, "shadow_ray_sampling_method", expand=True)
                                
                        if lamp.type in ('POINT', 'SUN', 'SPOT'):
-                               flow = layout.column_flow()
-                               flow.itemR(lamp, "shadow_soft_size", text="Soft Size")
-                               flow.itemR(lamp, "shadow_ray_samples", text="Samples")
+                               split = layout.split()
+                               col = split.column(align=True)
+                               col.itemR(lamp, "shadow_soft_size", text="Soft Size")
+                               col = split.column(align=True)
+                               col.itemR(lamp, "shadow_ray_samples", text="Samples")
                                if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
-                                       flow.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
+                                       col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
                                                
                        if lamp.type == 'AREA':
-                               flow = layout.column_flow()
-                               flow.itemR(lamp, "shadow_ray_samples_x", text="Samples")
-                               if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
-                                       flow.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
+                               split = layout.split()
+                               col = split.column()
+
                                if lamp.shadow_ray_sampling_method == 'CONSTANT_JITTERED':
-                                       flow.itemR(lamp, "umbra")
-                                       flow.itemR(lamp, "dither")
-                                       flow.itemR(lamp, "jitter")      
+                                       col.itemR(lamp, "umbra")
+                                       col.itemR(lamp, "dither")
+                                       col.itemR(lamp, "jitter")       
+                               else:
+                                       col.itemL()
+
+                               col = split.column(align=True)
+                               col.itemR(lamp, "shadow_ray_samples_x", text="Samples")
+                               if lamp.shadow_ray_sampling_method == 'ADAPTIVE_QMC':
+                                       col.itemR(lamp, "shadow_adaptive_threshold", text="Threshold")
        
                if lamp.shadow_method == 'BUFFER_SHADOW':
                        col = layout.column()
@@ -177,17 +231,23 @@ class DATA_PT_shadow(DataButtonsPanel):
                        col.row().itemR(lamp, "shadow_buffer_type", expand=True)
 
                        if lamp.shadow_buffer_type in ('REGULAR', 'HALFWAY'):
-                               flow = layout.column_flow()
-                               flow.itemL(text="Sample Buffers:")
-                               flow.itemR(lamp, "shadow_sample_buffers", text="")
-                               flow.itemL(text="Filter Type:")
-                               flow.itemR(lamp, "shadow_filter_type", text="")
                                
-                               flow = layout.column_flow()
-                               flow.itemR(lamp, "shadow_buffer_size", text="Size")
-                               flow.itemR(lamp, "shadow_buffer_samples", text="Samples")
-                               flow.itemR(lamp, "shadow_buffer_bias", text="Bias")
-                               flow.itemR(lamp, "shadow_buffer_soft", text="Soft")
+                               split = layout.split()
+                               col = split.column()
+                               col.itemL(text="Filter Type:")
+                               col.itemR(lamp, "shadow_filter_type", text="")
+                               
+                               colsub = col.column(align=True)
+                               colsub.itemR(lamp, "shadow_buffer_soft", text="Soft")
+                               colsub.itemR(lamp, "shadow_buffer_bias", text="Bias")
+                               
+                               col = split.column()
+                               col.itemL(text="Sample Buffers:")
+                               col.itemR(lamp, "shadow_sample_buffers", text="")
+                               
+                               colsub = col.column(align=True)
+                               colsub.itemR(lamp, "shadow_buffer_size", text="Size")
+                               colsub.itemR(lamp, "shadow_buffer_samples", text="Samples")
                                
                        if (lamp.shadow_buffer_type == 'IRREGULAR'):
                                row = layout.row()
@@ -215,15 +275,15 @@ class DATA_PT_spot(DataButtonsPanel):
                lamp = context.lamp
 
                split = layout.split()
-               
-               sub = split.column()
+               col = split.column()
+               sub = col.column(align=True)
                sub.itemR(lamp, "spot_size", text="Size")
                sub.itemR(lamp, "spot_blend", text="Blend")
-               sub.itemR(lamp, "square")
+               col.itemR(lamp, "square")
                
                col = split.column()
                col.itemR(lamp, "halo")
-               colsub = col.column()
+               colsub = col.column(align=True)
                colsub.active = lamp.halo
                colsub.itemR(lamp, "halo_intensity", text="Intensity")
                if lamp.shadow_method == 'BUFFER_SHADOW':
@@ -232,6 +292,7 @@ class DATA_PT_spot(DataButtonsPanel):
 class DATA_PT_falloff_curve(DataButtonsPanel):
        __idname__ = "DATA_PT_falloff_curve"
        __label__ = "Falloff Curve"
+       __default_closed__ = True
        
        def poll(self, context):
                lamp = context.lamp
@@ -251,8 +312,8 @@ class DATA_PT_falloff_curve(DataButtonsPanel):
 bpy.types.register(DATA_PT_context_lamp)
 bpy.types.register(DATA_PT_preview)
 bpy.types.register(DATA_PT_lamp)
+bpy.types.register(DATA_PT_falloff_curve)
+bpy.types.register(DATA_PT_spot)
 bpy.types.register(DATA_PT_shadow)
 bpy.types.register(DATA_PT_sunsky)
-bpy.types.register(DATA_PT_spot)
-bpy.types.register(DATA_PT_falloff_curve)
 
index dfb429af29d32b5dc8e446e5eb7ec75473bc264d..1bcaa342c67461d5389dee0ff0134a99fcf88108 100644 (file)
@@ -52,7 +52,7 @@ class DATA_PT_lattice(DataButtonsPanel):
                row.itemR(lat, "interpolation_type_w", expand=True)
                        
                row = layout.row()
-               row.itemO("LATTICE_OT_make_regular")
+               row.itemO("lattice.make_regular")
                row.itemR(lat, "outside")
 
 bpy.types.register(DATA_PT_context_lattice)
index 85ce15ef970ff02d2da194501a075c244b511a28..d4bf9698a895d3d9326286df17ae350a857af94f 100644 (file)
@@ -29,9 +29,9 @@ class DATA_PT_context_mesh(DataButtonsPanel):
                        split.template_ID(space, "pin_id")
                        split.itemS()
 
-class DATA_PT_mesh(DataButtonsPanel):
-       __idname__ = "DATA_PT_mesh"
-       __label__ = "Mesh"
+class DATA_PT_normals(DataButtonsPanel):
+       __idname__ = "DATA_PT_normals"
+       __label__ = "Normals"
 
        def draw(self, context):
                layout = self.layout
@@ -48,48 +48,6 @@ class DATA_PT_mesh(DataButtonsPanel):
                sub = split.column()
                sub.itemR(mesh, "vertex_normal_flip")
                sub.itemR(mesh, "double_sided")
-                       
-               layout.itemS()
-               layout.itemR(mesh, "texco_mesh")
-
-class DATA_PT_materials(DataButtonsPanel):
-       __idname__ = "DATA_PT_materials"
-       __label__ = "Materials"
-       
-       def poll(self, context):
-               return (context.object and context.object.type in ('MESH', 'CURVE', 'FONT', 'SURFACE'))
-
-       def draw(self, context):
-               layout = self.layout
-               ob = context.object
-
-               row = layout.row()
-
-               row.template_list(ob, "materials", ob, "active_material_index")
-
-               col = row.column(align=True)
-               col.itemO("OBJECT_OT_material_slot_add", icon="ICON_ZOOMIN", text="")
-               col.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="")
-
-               if context.edit_object:
-                       row = layout.row(align=True)
-
-                       row.itemO("OBJECT_OT_material_slot_assign", text="Assign")
-                       row.itemO("OBJECT_OT_material_slot_select", text="Select")
-                       row.itemO("OBJECT_OT_material_slot_deselect", text="Deselect")
-
-               """
-               layout.itemS()
-
-               box= layout.box()
-
-               row = box.row()
-               row.template_list(ob, "materials", ob, "active_material_index", compact=True)
-
-               subrow = row.row(align=True)
-               subrow.itemO("OBJECT_OT_material_slot_add", icon="ICON_ZOOMIN", text="")
-               subrow.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="")
-               """
 
 class DATA_PT_vertex_groups(DataButtonsPanel):
        __idname__ = "DATA_PT_vertex_groups"
@@ -107,20 +65,25 @@ class DATA_PT_vertex_groups(DataButtonsPanel):
                row.template_list(ob, "vertex_groups", ob, "active_vertex_group_index")
 
                col = row.column(align=True)
-               col.itemO("OBJECT_OT_vertex_group_add", icon="ICON_ZOOMIN", text="")
-               col.itemO("OBJECT_OT_vertex_group_remove", icon="ICON_ZOOMOUT", text="")
+               col.itemO("object.vertex_group_add", icon="ICON_ZOOMIN", text="")
+               col.itemO("object.vertex_group_remove", icon="ICON_ZOOMOUT", text="")
 
-               col.itemO("OBJECT_OT_vertex_group_copy", icon="ICON_BLANK1", text="")
+               col.itemO("object.vertex_group_copy", icon="ICON_BLANK1", text="")
                if ob.data.users > 1:
-                       col.itemO("OBJECT_OT_vertex_group_copy_to_linked", icon="ICON_BLANK1", text="")
+                       col.itemO("object.vertex_group_copy_to_linked", icon="ICON_BLANK1", text="")
+
+               group = ob.active_vertex_group
+               if group:
+                       row = layout.row()
+                       row.itemR(group, "name")
 
                if context.edit_object:
                        row = layout.row(align=True)
 
-                       row.itemO("OBJECT_OT_vertex_group_assign", text="Assign")
-                       row.itemO("OBJECT_OT_vertex_group_remove_from", text="Remove")
-                       row.itemO("OBJECT_OT_vertex_group_select", text="Select")
-                       row.itemO("OBJECT_OT_vertex_group_deselect", text="Deselect")
+                       row.itemO("object.vertex_group_assign", text="Assign")
+                       row.itemO("object.vertex_group_remove_from", text="Remove")
+                       row.itemO("object.vertex_group_select", text="Select")
+                       row.itemO("object.vertex_group_deselect", text="Deselect")
 
                        layout.itemR(context.tool_settings, "vertex_group_weight", text="Weight")
 
@@ -143,14 +106,14 @@ class DATA_PT_shape_keys(DataButtonsPanel):
                col = row.column()
 
                subcol = col.column(align=True)
-               subcol.itemO("OBJECT_OT_shape_key_add", icon="ICON_ZOOMIN", text="")
-               subcol.itemO("OBJECT_OT_shape_key_remove", icon="ICON_ZOOMOUT", text="")
+               subcol.itemO("object.shape_key_add", icon="ICON_ZOOMIN", text="")
+               subcol.itemO("object.shape_key_remove", icon="ICON_ZOOMOUT", text="")
 
                if kb:
                        col.itemS()
 
                        subcol = col.column(align=True)
-                       subcol.itemR(ob, "shape_key_lock", icon="ICON_PINNED", text="")
+                       subcol.itemR(ob, "shape_key_lock", icon="ICON_UNPINNED", text="")
                        subcol.itemR(kb, "mute", icon="ICON_MUTE_IPO_ON", text="")
 
                        if key.relative:
@@ -158,6 +121,9 @@ class DATA_PT_shape_keys(DataButtonsPanel):
                                row.itemR(key, "relative")
                                row.itemL()
 
+                               row = layout.row()
+                               row.itemR(kb, "name")
+
                                if ob.active_shape_key_index != 0:
                                        if not ob.shape_key_lock:
                                                row = layout.row(align=True)
@@ -173,6 +139,9 @@ class DATA_PT_shape_keys(DataButtonsPanel):
                                row.itemR(key, "relative")
                                row.itemR(key, "slurph")
 
+                               row = layout.row()
+                               row.itemR(kb, "name")
+
                if context.edit_object:
                        layout.enabled = False
 
@@ -186,11 +155,16 @@ class DATA_PT_uv_texture(DataButtonsPanel):
 
                row = layout.row()
 
-               row.template_list(me, "uv_textures", me, "active_uv_texture_index")
+               col = row.column()
+               col.template_list(me, "uv_textures", me, "active_uv_texture_index", rows=2)
 
                col = row.column(align=True)
-               col.itemO("MESH_OT_uv_texture_add", icon="ICON_ZOOMIN", text="")
-               col.itemO("MESH_OT_uv_texture_remove", icon="ICON_ZOOMOUT", text="")
+               col.itemO("mesh.uv_texture_add", icon="ICON_ZOOMIN", text="")
+               col.itemO("mesh.uv_texture_remove", icon="ICON_ZOOMOUT", text="")
+
+               lay = me.active_uv_texture
+               if lay:
+                       layout.itemR(lay, "name")
 
 class DATA_PT_vertex_colors(DataButtonsPanel):
        __idname__ = "DATA_PT_vertex_colors"
@@ -201,16 +175,20 @@ class DATA_PT_vertex_colors(DataButtonsPanel):
                me = context.mesh
 
                row = layout.row()
+               col = row.column()
 
-               row.template_list(me, "vertex_colors", me, "active_vertex_color_index")
+               col.template_list(me, "vertex_colors", me, "active_vertex_color_index", rows=2)
 
                col = row.column(align=True)
-               col.itemO("MESH_OT_vertex_color_add", icon="ICON_ZOOMIN", text="")
-               col.itemO("MESH_OT_vertex_color_remove", icon="ICON_ZOOMOUT", text="")
+               col.itemO("mesh.vertex_color_add", icon="ICON_ZOOMIN", text="")
+               col.itemO("mesh.vertex_color_remove", icon="ICON_ZOOMOUT", text="")
+
+               lay = me.active_vertex_color
+               if lay:
+                       layout.itemR(lay, "name")
 
 bpy.types.register(DATA_PT_context_mesh)
-bpy.types.register(DATA_PT_mesh)
-bpy.types.register(DATA_PT_materials)
+bpy.types.register(DATA_PT_normals)
 bpy.types.register(DATA_PT_vertex_groups)
 bpy.types.register(DATA_PT_shape_keys)
 bpy.types.register(DATA_PT_uv_texture)
index 10f3efa1ed42d03c21403b1b84de625713844622..f4d0f7f8ad0cb34c2dbac12804db5b25efc6e7cd 100644 (file)
@@ -15,7 +15,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
                layout = self.layout
 
                row = layout.row()
-               row.item_menu_enumO("OBJECT_OT_modifier_add", "type")
+               row.item_menu_enumO("object.modifier_add", "type")
                row.itemL();
 
                for md in ob.modifiers:
@@ -264,7 +264,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
                layout.itemR(md, "invert")
 
                layout.itemS()
-               layout.itemO("OBJECT_OT_modifier_mdef_bind", text="Bind")
+               layout.itemO("object.modifier_mdef_bind", text="Bind")
                row = layout.row()
                row.itemR(md, "precision")
                row.itemR(md, "dynamic")
@@ -289,7 +289,7 @@ class DATA_PT_modifiers(DataButtonsPanel):
                
        def multires(self, layout, ob, md):
                layout.itemR(md, "subdivision_type")
-               layout.itemO("OBJECT_OT_multires_subdivide", text="Subdivide")
+               layout.itemO("object.multires_subdivide", text="Subdivide")
                layout.itemR(md, "level")
        
        def particleinstance(self, layout, ob, md):
diff --git a/release/ui/buttons_game.py b/release/ui/buttons_game.py
new file mode 100644 (file)
index 0000000..356b791
--- /dev/null
@@ -0,0 +1,129 @@
+
+import bpy
+class GameButtonsPanel(bpy.types.Panel):
+       __space_type__ = "BUTTONS_WINDOW"
+       __region_type__ = "WINDOW"
+       __context__ = "game"
+
+class GAME_PT_context_game(GameButtonsPanel):
+       __idname__ = "GAME_PT_context_game"
+       __no_header__ = True
+
+       def draw(self, context):
+               layout = self.layout
+               ob = context.object
+               game = context.game
+
+               split = layout.split(percentage=0.06)
+               split.itemL(text="", icon="ICON_GAME")
+               split.itemR(game, "name", text="")
+
+class GAME_PT_data(GameButtonsPanel):
+       __idname__ = "GAME_PT_data"
+       __label__ = "Data"
+
+       def draw(self, context):
+               layout = self.layout
+               ob = context.object
+               game = context.game
+
+class GAME_PT_physics(GameButtonsPanel):
+       __idname__ = "GAME_PT_physics"
+       __label__ = "Physics"
+
+       def poll(self, context):
+               ob = context.active_object
+               return ob and ob.game
+
+       def draw(self, context):
+               layout = self.layout
+               ob = context.active_object
+               
+               game = ob.game
+
+               layout.itemR(game, "physics_type")
+               layout.itemS()
+               
+               split = layout.split()
+               col = split.column()
+               
+               col.itemR(game, "actor")
+               
+               col.itemR(game, "ghost")
+               col.itemR(ob, "restrict_render", text="Invisible") # out of place but useful
+               col = split.column()
+               col.itemR(game, "do_fh", text="Use Material Physics")
+               col.itemR(game, "rotation_fh", text="Rotate From Normal")
+               
+               layout.itemS()
+               split = layout.split()
+               col = split.column()
+
+               col.itemR(game, "mass")
+               col.itemR(game, "radius")
+               col.itemR(game, "no_sleeping")
+               col.itemR(game, "form_factor")
+               col.itemS()
+               col.itemL(text="Damping:")
+               col.itemR(game, "damping", text="Translation", slider=True)
+               col.itemR(game, "rotation_damping", text="Rotation", slider=True)
+               
+               col = split.column()
+               
+               col.itemL(text="Velocity:")
+               col.itemR(game, "minimum_velocity", text="Minimum")
+               col.itemR(game, "maximum_velocity", text="Maximum")
+               col.itemS()
+               col.itemR(game, "anisotropic_friction")
+               
+               colsub = col.column()
+               colsub.active = game.anisotropic_friction
+               colsub.itemR(game, "friction_coefficients", text="", slider=True)
+               
+               layout.itemS()
+               split = layout.split()
+               sub = split.column()
+               sub.itemL(text="Lock Translation:")
+               sub.itemR(game, "lock_x_axis", text="X")
+               sub.itemR(game, "lock_y_axis", text="Y")
+               sub.itemR(game, "lock_z_axis", text="Z")
+               sub = split.column()
+               sub.itemL(text="Lock Rotation:")
+               sub.itemR(game, "lock_x_rot_axis", text="X")
+               sub.itemR(game, "lock_y_rot_axis", text="Y")
+               sub.itemR(game, "lock_z_rot_axis", text="Z")
+
+
+class GAME_PT_collision_bounds(GameButtonsPanel):
+       __idname__ = "GAME_PT_collision_bounds"
+       __label__ = "Collision Bounds"
+
+       def poll(self, context):
+               ob = context.active_object
+               return ob and ob.game
+       
+       def draw_header(self, context):
+               layout = self.layout
+               ob = context.active_object
+               game = ob.game
+
+               layout.itemR(game, "use_collision_bounds", text="")
+       
+       def draw(self, context):
+               layout = self.layout
+               
+               ob = context.scene.objects[0]
+               game = ob.game
+               
+               flow = layout.column_flow()
+               flow.active = game.use_collision_bounds
+               flow.itemR(game, "collision_bounds")
+               flow.itemR(game, "collision_compound")
+               flow.itemR(game, "collision_margin")
+
+
+bpy.types.register(GAME_PT_context_game)
+bpy.types.register(GAME_PT_data)
+bpy.types.register(GAME_PT_physics)
+bpy.types.register(GAME_PT_collision_bounds)
\ No newline at end of file
index c9df957ee0262e425765ff89d17a29c6d89fb94c..ceb492b198e3aecef4248447a8a57e098f293338 100644 (file)
@@ -37,16 +37,23 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
                if ob:
                        row = layout.row()
 
-                       row.template_list(ob, "materials", ob, "active_material_index")
+                       row.template_list(ob, "materials", ob, "active_material_index", rows=2)
 
                        col = row.column(align=True)
-                       col.itemO("OBJECT_OT_material_slot_add", icon="ICON_ZOOMIN", text="")
-                       col.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="")
+                       col.itemO("object.material_slot_add", icon="ICON_ZOOMIN", text="")
+                       col.itemO("object.material_slot_remove", icon="ICON_ZOOMOUT", text="")
+
+                       if context.edit_object:
+                               row = layout.row(align=True)
+
+                               row.itemO("object.material_slot_assign", text="Assign")
+                               row.itemO("object.material_slot_select", text="Select")
+                               row.itemO("object.material_slot_deselect", text="Deselect")
 
                split = layout.split(percentage=0.65)
 
                if ob and slot:
-                       split.template_ID(slot, "material", new="MATERIAL_OT_new")
+                       split.template_ID(slot, "material", new="material.new")
                        row = split.row()
                        row.itemR(slot, "link", expand=True)
                elif mat:
@@ -55,7 +62,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
        
 class MATERIAL_PT_material(MaterialButtonsPanel):
        __idname__= "MATERIAL_PT_material"
-       __label__ = "Material"
+       __label__ = "Shading"
 
        def draw(self, context):
                layout = self.layout
@@ -68,15 +75,41 @@ class MATERIAL_PT_material(MaterialButtonsPanel):
                if mat:
                        layout.itemR(mat, "type", expand=True)
                        
-                       layout.itemR(mat, "alpha", slider=True)
 
-                       row = layout.row()
-                       row.active = mat.type in ('SURFACE', 'VOLUME')
-                       row.itemR(mat, "shadeless")     
-                       row.itemR(mat, "wireframe")
-                       rowsub = row.row()
-                       rowsub.active = mat.shadeless== False
-                       rowsub.itemR(mat, "tangent_shading")
+
+#                      row = layout.row()
+
+                       if mat.type == 'SURFACE':
+                               split = layout.split()
+       
+                               sub = split.column()
+                               sub.itemR(mat, "alpha", slider=True)
+                               sub.itemR(mat, "ambient", slider=True)
+                               sub.itemR(mat, "emit")
+                               sub.itemR(mat, "translucency", slider=True)
+                               
+                               sub = split.column()
+                               sub.itemR(mat, "shadeless")     
+                               sub.itemR(mat, "wireframe")
+                               sub.itemR(mat, "tangent_shading")
+                               sub.itemR(mat, "cubic", slider=True)
+                       elif mat.type == 'VOLUME':
+                               split = layout.split()
+       
+                               sub = split.column()
+                               sub.itemR(mat, "alpha", slider=True)
+                               sub.itemR(mat, "ambient", slider=True)
+                               sub.itemR(mat, "emit")
+                               sub.itemR(mat, "translucency", slider=True)
+                               
+                               sub = split.column()
+                               sub.itemR(mat, "shadeless")     
+                               sub.itemR(mat, "wireframe")
+                               sub.itemR(mat, "tangent_shading")
+                               sub.itemR(mat, "cubic", slider=True)
+                       elif mat.type == 'HALO':
+                               layout.itemR(mat, "alpha", slider=True)
+
                        
 class MATERIAL_PT_strand(MaterialButtonsPanel):
        __idname__= "MATERIAL_PT_strand"
@@ -126,6 +159,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
                sub.itemR(mat, "full_oversampling")
                sub.itemR(mat, "sky")
                sub.itemR(mat, "exclude_mist")
+               sub = split.column()
                sub.itemR(mat, "face_texture")
                colsub = sub.column()
                colsub.active = mat.face_texture
@@ -134,14 +168,26 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
                sub.itemR(mat, "light_group")
                sub.itemR(mat, "light_group_exclusive")
                
+               
+
+
+class MATERIAL_PT_shadows(MaterialButtonsPanel):
+       __idname__= "MATERIAL_PT_shadows"
+       __label__ = "Shadows"
+
+       def draw(self, context):
+               layout = self.layout
+               mat = context.material
+               
+               split = layout.split()
+               
                sub = split.column()
-               sub.itemL(text="Shadows:")
-               sub.itemR(mat, "shadows", text="Recieve")
-               sub.itemR(mat, "transparent_shadows", text="Recieve Transparent")
+               sub.itemR(mat, "shadows", text="Receive")
+               sub.itemR(mat, "transparent_shadows", text="Receive Transparent")
                sub.itemR(mat, "only_shadow", text="Shadows Only")
                sub.itemR(mat, "cast_shadows_only", text="Cast Only")
                sub.itemR(mat, "shadow_casting_alpha", text="Casting Alpha", slider=True)
-               
+               sub = split.column()
                sub.itemR(mat, "ray_shadow_bias", text="Auto Ray Bias")
                colsub = sub.column()
                colsub.active = not mat.ray_shadow_bias
@@ -149,6 +195,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
                sub.itemR(mat, "cast_buffer_shadows")
                sub.itemR(mat, "shadow_buffer_bias", text="Buffer Bias")
 
+
 class MATERIAL_PT_diffuse(MaterialButtonsPanel):
        __idname__= "MATERIAL_PT_diffuse"
        __label__ = "Diffuse"
@@ -165,19 +212,15 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
                
                sub = split.column()
                sub.itemR(mat, "diffuse_color", text="")
-               sub.itemR(mat, "object_color")
-               colsub = sub.column()
-               colsub.active = mat.shadeless== False
-               colsub.itemR(mat, "ambient", slider=True)
-               colsub.itemR(mat, "emit")
-               sub.itemR(mat, "translucency", slider=True)
+               sub.itemR(mat, "vertex_color_paint")
+               sub.itemR(mat, "vertex_color_light")
                
                sub = split.column()
                sub.active = mat.shadeless== False
                sub.itemR(mat, "diffuse_reflection", text="Intensity", slider=True)
-               sub.itemR(mat, "vertex_color_light")
-               sub.itemR(mat, "vertex_color_paint")
-               sub.itemR(mat, "cubic")
+               sub.itemR(mat, "object_color")
+               
+
                
                row = layout.row()
                row.active = mat.shadeless== False
@@ -235,8 +278,6 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
                        sub.itemR(mat, "specular_ior", text="IOR")
                if mat.spec_shader == 'WARDISO':
                        sub.itemR(mat, "specular_slope", text="Slope")
-                       sub = split.column()
-                       sub.itemR(mat, "specular_hardness", text="Hardness")
                if mat.spec_shader == 'TOON':
                        sub.itemR(mat, "specular_toon_size", text="Size")
                        sub = split.column()
@@ -438,3 +479,4 @@ bpy.types.register(MATERIAL_PT_sss)
 bpy.types.register(MATERIAL_PT_halo)
 bpy.types.register(MATERIAL_PT_strand)
 bpy.types.register(MATERIAL_PT_options)
+bpy.types.register(MATERIAL_PT_shadows)
index c0e2bd0250a34f416ace3a0507afbbb9b15d8df4..8d531df9e19179b562b26e1946fff6fc7dfcf9a3 100644 (file)
@@ -110,8 +110,8 @@ class ConstraintButtonsPanel(bpy.types.Panel):
                sub.itemR(con, "sizez", text="Z")
                
                row = layout.row()
-               row.itemO("CONSTRAINT_OT_childof_set_inverse")
-               row.itemO("CONSTRAINT_OT_childof_clear_inverse")
+               row.itemO("constraint.childof_set_inverse")
+               row.itemO("constraint.childof_clear_inverse")
                
        def track_to(self, layout, con):
                self.target_template(layout, con)
@@ -521,7 +521,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel):
                layout = self.layout
 
                row = layout.row()
-               row.item_menu_enumO("OBJECT_OT_constraint_add", "type")
+               row.item_menu_enumO("object.constraint_add", "type")
                row.itemL();
 
                for con in ob.constraints:
@@ -542,7 +542,7 @@ class BONE_PT_constraints(ConstraintButtonsPanel):
                layout = self.layout
 
                row = layout.row()
-               row.item_menu_enumO("POSE_OT_constraint_add", "type")
+               row.item_menu_enumO("pose.constraint_add", "type")
                row.itemL();
 
                for con in pchan.constraints:
index 69bc1708ebae45f961fcf3ce4d0587c0261f8dde..27ce093af6d6c8f870b076a7c327eec287b42195 100644 (file)
@@ -14,9 +14,9 @@ class OBJECT_PT_context_object(ObjectButtonsPanel):
                layout = self.layout
                ob = context.object
                
-               split = layout.split(percentage=0.06)
-               split.itemL(text="", icon="ICON_OBJECT_DATA")
-               split.itemR(ob, "name", text="")
+               row = layout.row()
+               row.itemL(text="", icon="ICON_OBJECT_DATA")
+               row.itemR(ob, "name", text="")
 
 class OBJECT_PT_transform(ObjectButtonsPanel):
        __idname__ = "OBJECT_PT_transform"
@@ -65,7 +65,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
                ob = context.object
 
                split = layout.split()
-               split.item_menu_enumO("OBJECT_OT_group_add", "group", text="Add to Group")
+               split.item_menu_enumO("object.group_add", "group", text="Add to Group")
                split.itemL()
 
                for group in bpy.data.groups:
@@ -76,7 +76,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
 
                                row = col.box().row()
                                row.itemR(group, "name", text="")
-                               row.itemO("OBJECT_OT_group_remove", text="", icon="VICON_X")
+                               row.itemO("object.group_remove", text="", icon="VICON_X")
 
                                split = col.box().split()
                                split.column().itemR(group, "layer", text="Dupli")
@@ -176,3 +176,4 @@ bpy.types.register(OBJECT_PT_groups)
 bpy.types.register(OBJECT_PT_display)
 bpy.types.register(OBJECT_PT_duplication)
 bpy.types.register(OBJECT_PT_animation)
+
similarity index 64%
rename from release/ui/buttons_physic_cloth.py
rename to release/ui/buttons_physics_cloth.py
index 277a6dfe760f8aa88c3d00e806c1ffe0f5008c30..08911b0195c3544dc4843d4b0fc4cb3288f1a650 100644 (file)
@@ -25,14 +25,14 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
                if md:
                        # remove modifier + settings
                        split.set_context_pointer("modifier", md)
-                       split.itemO("OBJECT_OT_modifier_remove", text="Remove")
+                       split.itemO("object.modifier_remove", text="Remove")
 
                        row = split.row(align=True)
                        row.itemR(md, "render", text="")
                        row.itemR(md, "realtime", text="")
                else:
                        # add modifier
-                       split.item_enumO("OBJECT_OT_modifier_add", "type", "CLOTH", text="Add")
+                       split.item_enumO("object.modifier_add", "type", "CLOTH", text="Add")
                        split.itemL()
 
                if md:
@@ -40,25 +40,28 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel):
 
                        split = layout.split()
                        
-                       col = split.column(align=True)
+                       col = split.column()
                        col.itemR(cloth, "quality", slider=True)
-                       col.itemR(cloth, "gravity")
+                       col.itemL(text="Gravity:")
+                       col.itemR(cloth, "gravity", text="")
 
                        col.itemR(cloth, "pin_cloth", text="Pin")
-                       col = col.column(align=True)
-                       col.active = cloth.pin_cloth
-                       col.itemR(cloth, "pin_stiffness", text="Stiffness")
-                       col.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
+                       colsub = col.column(align=True)
+                       colsub.active = cloth.pin_cloth
+                       colsub.itemR(cloth, "pin_stiffness", text="Stiffness")
+                       colsub.item_pointerR(cloth, "mass_vertex_group", ob, "vertex_groups", text="")
                        
-                       col = split.column(align=True)
+                       col = split.column()
                        col.itemL(text="Presets...")
-                       col.itemL(text="")
-                       col.itemR(cloth, "mass")
-                       col.itemR(cloth, "structural_stiffness", text="Structural")
-                       col.itemR(cloth, "bending_stiffness", text="Bending")
-                       col.itemL(text="Damping")
-                       col.itemR(cloth, "spring_damping", text="Spring")
-                       col.itemR(cloth, "air_damping", text="Air")
+                       col.itemL(text="Material:")
+                       colsub = col.column(align=True)
+                       colsub.itemR(cloth, "mass")
+                       colsub.itemR(cloth, "structural_stiffness", text="Structural")
+                       colsub.itemR(cloth, "bending_stiffness", text="Bending")
+                       col.itemL(text="Damping:")
+                       colsub = col.column(align=True)
+                       colsub.itemR(cloth, "spring_damping", text="Spring")
+                       colsub.itemR(cloth, "air_damping", text="Air")
                        
                        # Disabled for now
                        """
@@ -94,17 +97,17 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
                row = layout.row()
                
                if cache.baked == True:
-                       row.itemO("PTCACHE_OT_free_bake_cloth", text="Free Bake")
+                       row.itemO("ptcache.free_bake_cloth", text="Free Bake")
                else:
-                       row.item_booleanO("PTCACHE_OT_cache_cloth", "bake", True, text="Bake")
+                       row.item_booleanO("ptcache.cache_cloth", "bake", True, text="Bake")
                
                subrow = row.row()
                subrow.enabled = cache.frames_skipped or cache.outdated
-               subrow.itemO("PTCACHE_OT_cache_cloth", text="Calculate to Current Frame")
+               subrow.itemO("ptcache.cache_cloth", text="Calculate to Current Frame")
                        
                row = layout.row()
                #row.enabled = particle_panel_enabled(psys)
-               row.itemO("PTCACHE_OT_bake_from_cloth_cache", text="Current Cache to Bake")
+               row.itemO("ptcache.bake_from_cloth_cache", text="Current Cache to Bake")
                row.itemR(cache, "step");
        
                row = layout.row()
@@ -117,13 +120,14 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel):
                layout.itemS()
                
                row = layout.row()
-               row.itemO("PTCACHE_OT_bake_all", "bake", True, text="Bake All Dynamics")
-               row.itemO("PTCACHE_OT_free_bake_all", text="Free All Bakes")
-               layout.itemO("PTCACHE_OT_bake_all", text="Update All Dynamics to current frame")
+               row.itemO("ptcache.bake_all", "bake", True, text="Bake All Dynamics")
+               row.itemO("ptcache.free_bake_all", text="Free All Bakes")
+               layout.itemO("ptcache.bake_all", text="Update All Dynamics to current frame")
                
 class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_clothcollision"
        __label__ = "Cloth Collision"
+       __default_closed__ = True
 
        def poll(self, context):
                return (context.cloth != None)
@@ -143,19 +147,20 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel):
                
                col = split.column(align=True)
                col.itemR(cloth, "collision_quality", slider=True, text="Quality")
-               col.itemR(cloth, "min_distance", text="Distance")
+               col.itemR(cloth, "min_distance", slider=True, text="Distance")
                col.itemR(cloth, "friction")
                
-               col = split.column(align="True")
+               col = split.column(align=True)
                col.itemR(cloth, "enable_self_collision", text="Self Collision")
                col = col.column(align=True)
                col.active = cloth.enable_self_collision
                col.itemR(cloth, "self_collision_quality", slider=True, text="Quality")
-               col.itemR(cloth, "self_min_distance", text="Distance")
+               col.itemR(cloth, "self_min_distance", slider=True, text="Distance")
 
 class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_stiffness"
        __label__ = "Cloth Stiffness Scaling"
+       __default_closed__ = True
 
        def poll(self, context):
                return (context.cloth != None)
@@ -175,17 +180,20 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel):
                
                split = layout.split()
                
-               sub = split.column(align=True)
-               sub.itemL(text="Structural Stiffness:")
-               sub.itemR(cloth, "structural_stiffness_max", text="Max")
-               sub.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="")
+               col = split.column()
+               col.itemL(text="Structural Stiffness:")
+               colsub = col.column(align=True)
+               colsub.itemR(cloth, "structural_stiffness_max", text="Max")
+               colsub.item_pointerR(cloth, "structural_stiffness_vertex_group", ob, "vertex_groups", text="")
                
-               sub = split.column(align=True)
-               sub.itemL(text="Bending Stiffness:")
-               sub.itemR(cloth, "bending_stiffness_max", text="Max")
-               sub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
+               col = split.column()
+               col.itemL(text="Bending Stiffness:")
+               colsub = col.column(align=True)
+               colsub.itemR(cloth, "bending_stiffness_max", text="Max")
+               colsub.item_pointerR(cloth, "bending_vertex_group", ob, "vertex_groups", text="")
                
 bpy.types.register(PHYSICS_PT_cloth)
 bpy.types.register(PHYSICS_PT_cloth_cache)
 bpy.types.register(PHYSICS_PT_cloth_collision)
 bpy.types.register(PHYSICS_PT_cloth_stiffness)
+
index 696de5e6d56778dfb6dc8e2fe9438770c15bff3a..cdb90c95228f7701e80aa138560518cf364d31ca 100644 (file)
@@ -11,21 +11,158 @@ class PhysicButtonsPanel(bpy.types.Panel):
                
 class PHYSICS_PT_field(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_field"
-       __label__ = "Field"
+       __label__ = "Force Fields"
+       __default_closed__ = True
 
        def draw(self, context):
                layout = self.layout
                ob = context.object
                field = ob.field
 
-               layout.itemR(field, "type")
+               #layout.active = field.enabled
+               
+               split = layout.split(percentage=0.3)
+               
+               split.itemL(text="Type:")
+               split.itemR(field, "type", text=""
+               )
+
+               split = layout.split()
+               
+               sub = split.column()
+                                                       
+               if field.type == "GUIDE":
+                       sub = col.column()
+                       sub.itemR(field, "guide_path_add")
+                       
+               if field.type == "WIND":
+                       sub.itemR(field, "strength")
+                       sub = split.column()
+                       sub.itemR(field, "noise")
+                       sub.itemR(field, "seed")
+
+               
+               if field.type == "VORTEX":
+                       sub.itemR(field, "strength")
+                       sub = split.column()
+                       sub.itemL(text="")
 
-               if field.type != "NONE":
-                       layout.itemR(field, "strength")
+               if field.type in ("SPHERICAL", "CHARGE", "LENNARDJ"):
+                       sub.itemR(field, "strength")
+                       sub = split.column()
+                       sub.itemR(field, "planar")
+                       sub.itemR(field, "surface")
+                       
+               if field.type == "BOID":
+                       sub.itemR(field, "strength")
+                       sub = split.column()
+                       sub.itemR(field, "surface")
+                       
+               if field.type == "MAGNET":
+                       sub.itemR(field, "strength")
+                       sub = split.column()
+                       sub.itemR(field, "planar")
+                       
+               if field.type == "HARMONIC":
+                       sub.itemR(field, "strength")
+                       sub.itemR(field, "harmonic_damping", text="Damping")
+                       sub = split.column()
+                       sub.itemR(field, "surface")
+                       sub.itemR(field, "planar")
+                       
+               if field.type == "TEXTURE":
+                       sub.itemR(field, "strength")
+                       sub.itemR(field, "texture", text="")
+                       sub.itemR(field, "texture_mode")
+                       sub.itemR(field, "texture_nabla")
+                       sub = split.column()
+                       sub.itemR(field, "use_coordinates")
+                       sub.itemR(field, "root_coordinates")
+                       sub.itemR(field, "force_2d")
+                       
+               if field.type in ("HARMONIC", "SPHERICAL", "CHARGE", "WIND", "VORTEX", "TEXTURE", "MAGNET", "BOID"):
+               
+                       
+                       layout.itemS()                  
+                       layout.itemL(text="Falloff:")
+                       layout.itemR(field, "falloff_type", expand=True)
+                       
+                       row = layout.row()
+                       row.itemR(field, "falloff_power", text="Power")
+                       row.itemR(field, "positive_z", text="Positive Z")
+                       
+                       layout.itemS()  
+                       split = layout.split()
+                       sub = split.column()
+                       
+                       sub.itemR(field, "use_min_distance", text="Minimum")
+                       colsub1 = sub.column()
+                       colsub1.active = field.use_min_distance
+                       colsub1.itemR(field, "minimum_distance", text="Distance")
+                       
+                       sub = split.column()
+                       
+                       sub.itemR(field, "use_max_distance", text="Maximum")
+                       colsub2 = sub.column()
+                       colsub2.active = field.use_max_distance
+                       colsub2.itemR(field, "maximum_distance", text="Distance")
+                       
+                       if field.falloff_type == "CONE":
+                               layout.itemS()  
+                               layout.itemL(text="Angular:")
+                               
+                               row = layout.row()
+                               row.itemR(field, "radial_falloff", text="Power")
+                               row.itemL(text="")
+                               
+                               split = layout.split()
+                               sub = split.column()
+                               
+                               sub.itemR(field, "use_radial_min", text="Minimum")      
+                               colsub1 = sub.column()
+                               colsub1.active = field.use_radial_min
+                               colsub1.itemR(field, "radial_minimum", text="Angle")
+                               
+                               sub = split.column()
+                               
+                               sub.itemR(field, "use_radial_max", text="Maximum")
+                               colsub2 = sub.column()
+                               colsub2.active = field.use_radial_max
+                               colsub2.itemR(field, "radial_maximum", text="Angle")
+                               
+                       if field.falloff_type == "TUBE":
+                               
+                               layout.itemS()  
+                               layout.itemL(text="Radial:")    
+                               row = layout.row()
+                               row.itemR(field, "radial_falloff", text="Power")
+                               row.itemL(text="")
+                               
+                               split = layout.split()
+                               sub = split.column()
+                               
+                               sub.itemR(field, "use_radial_min", text="Minimum")      
+                               colsub1 = sub.column()
+                               colsub1.active = field.use_radial_min
+                               colsub1.itemR(field, "radial_minimum", text="Distance")
+                               
+                               sub = split.column()
+                               
+                               sub.itemR(field, "use_radial_max", text="Maximum")
+                               colsub2 = sub.column()
+                               colsub2.active = field.use_radial_max
+                               colsub2.itemR(field, "radial_maximum", text="Distance")
+                               
+               #if ob.type in "CURVE":
+                       #if field.type == "GUIDE":
+                               #colsub = col.column(align=True)
+                       
+               #if field.type != "NONE":
+                       #layout.itemR(field, "strength")
 
-               if field.type in ("HARMONIC", "SPHERICAL", "CHARGE", "LENNARDj"):
-                       if ob.type in ("MESH", "SURFACE", "FONT", "CURVE"):
-                               layout.itemR(field, "surface")
+               #if field.type in ("HARMONIC", "SPHERICAL", "CHARGE", "LENNARDj"):
+                       #if ob.type in ("MESH", "SURFACE", "FONT", "CURVE"):
+                               #layout.itemR(field, "surface")
 
 class PHYSICS_PT_collision(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_collision"
@@ -50,17 +187,30 @@ class PHYSICS_PT_collision(PhysicButtonsPanel):
                split = layout.split()
                
                col = split.column()
-               col.itemL(text="Damping:")
-               col.itemR(settings, "damping_factor", text="Factor");
-               col.itemR(settings, "random_damping", text="Random");
+               col.itemL(text="Particle:")
+               col.itemR(settings, "permeability", slider=True)
+               col.itemL(text="Particle Damping:")
+               colsub = col.column(align=True)
+               colsub.itemR(settings, "damping_factor", text="Factor", slider=True)
+               colsub.itemR(settings, "random_damping", text="Random", slider=True)
+               
+               col.itemL(text="Soft Body and Cloth:")
+               colsub = col.column(align=True)
+               colsub.itemR(settings, "outer_thickness", text="Outer", slider=True)
+               colsub.itemR(settings, "inner_thickness", text="Inner", slider=True)
+               
+               col.itemL(text="Force Fields:")
+               layout.itemR(md, "absorption", text="Absorption")
                
                col = split.column()
-               col.itemL(text="Friction:")
-               col.itemR(settings, "friction_factor", text="Factor");
-               col.itemR(settings, "random_friction", text="Random");
+               col.itemL(text="")
+               col.itemR(settings, "kill_particles")
+               col.itemL(text="Particle Friction:")
+               colsub = col.column(align=True)
+               colsub.itemR(settings, "friction_factor", text="Factor", slider=True)
+               colsub.itemR(settings, "random_friction", text="Random", slider=True)
+               col.itemL(text="Soft Body Damping:")
+               col.itemR(settings, "damping", text="Factor", slider=True)
                
-               layout.itemR(settings, "permeability");
-               layout.itemR(settings, "kill_particles");
-
 bpy.types.register(PHYSICS_PT_field)
-bpy.types.register(PHYSICS_PT_collision)
+bpy.types.register(PHYSICS_PT_collision)
\ No newline at end of file
index 2ab33b4a4160ed5cff52fff1170443d54106ce0e..0e6e9e643233bba10adc1e117caf47f6cfb258c7 100644 (file)
@@ -25,18 +25,24 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
                if md:
                        # remove modifier + settings
                        split.set_context_pointer("modifier", md)
-                       split.itemO("OBJECT_OT_modifier_remove", text="Remove")
+                       split.itemO("object.modifier_remove", text="Remove")
 
                        row = split.row(align=True)
                        row.itemR(md, "render", text="")
                        row.itemR(md, "realtime", text="")
+                       
+                       fluid = md.settings
+                       
                else:
                        # add modifier
-                       split.item_enumO("OBJECT_OT_modifier_add", "type", "FLUID_SIMULATION", text="Add")
+                       split.item_enumO("object.modifier_add", "type", "FLUID_SIMULATION", text="Add")
                        split.itemL()
-
-               if md:
-                       fluid = md.settings
+                       
+                       fluid = None
+               
+               
+               if fluid:
+                       
 
                        col = layout.column(align=True)
                        row = col.row()
@@ -50,109 +56,138 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel):
                        row.item_enumR(fluid, "type", "CONTROL")
 
                        if fluid.type == 'DOMAIN':
-                               layout.itemO("FLUID_OT_bake", text="BAKE")
-                               layout.itemL(text="Required Memory: " + fluid.memory_estimate)
-                               
-                               layout.itemL(text="Resolution:")
-                               
+                               layout.itemO("fluid.bake", text="BAKE")
                                split = layout.split()
                                
                                col = split.column()
-                               colsub = col.column(align=True)
+                               col.itemL(text="Resolution:")
+                               colsub = col.column()
                                colsub.itemR(fluid, "resolution", text="Final")
+                               colsub.itemL(text="Render Display:")
                                colsub.itemR(fluid, "render_display_mode", text="")
+                               col.itemL(text="Time:")
                                colsub = col.column(align=True)
-                               colsub.itemL(text="Time:")
                                colsub.itemR(fluid, "start_time", text="Start")
                                colsub.itemR(fluid, "end_time", text="End")
                                
                                col = split.column()
-                               colsub = col.column(align=True)
-                               colsub.itemR(fluid, "preview_resolution", text="Preview", slider=True)
+                               colsub = col.column()
+                               colsub.itemL(text="Required Memory: " + fluid.memory_estimate)
+                               colsub.itemR(fluid, "preview_resolution", text="Preview")
+                               colsub.itemL(text="Viewport Display:")
                                colsub.itemR(fluid, "viewport_display_mode", text="")
                                colsub = col.column()
+                               colsub.itemL(text="")
                                colsub.itemR(fluid, "reverse_frames")
                                colsub.itemR(fluid, "generate_speed_vectors")
-                               colsub.itemR(fluid, "path", text="")
                                
-                       if fluid.type in ('FLUID', 'OBSTACLE', 'INFLOW', 'OUTFLOW'):
-                               layout.itemR(fluid, "volume_initialization")
+                               layout.itemL(text="Path:")
+                               layout.itemR(fluid, "path", text="")
                                
                        if fluid.type == 'FLUID':
-                               row = layout.row()
-                               row.column().itemR(fluid, "initial_velocity")
-                               row.itemR(fluid, "export_animated_mesh")
+                               split = layout.split()
+                               col = split.column()
+                               col.itemL(text="Volume Initialization:")
+                               col.itemR(fluid, "volume_initialization", text="")
+                               col.itemR(fluid, "export_animated_mesh")
+                               col = split.column()
+                               col.itemL(text="Initial Velocity:")
+                               col.itemR(fluid, "initial_velocity", text="")
                                
                        if fluid.type == 'OBSTACLE':
-                               row = layout.row()
-                               row.itemL()
-                               row.itemR(fluid, "export_animated_mesh")
-                               layout.itemR(fluid, "slip_type", expand=True)
+                               split = layout.split()
+                               col = split.column()
+                               col.itemL(text="Volume Initialization:")
+                               col.itemR(fluid, "volume_initialization", text="")
+                               col.itemR(fluid, "export_animated_mesh")
+                               col = split.column()
+                               col.itemL(text="Slip Type:")
+                               colsub=col.column(align=True)
+                               colsub.itemR(fluid, "slip_type", text="")
                                if fluid.slip_type == 'PARTIALSLIP':
-                                       layout.itemR(fluid, "partial_slip_amount", text="Amount")
+                                       colsub.itemR(fluid, "partial_slip_amount", slider=True, text="Amount")
                                        
-                               layout.itemR(fluid, "impact_factor")
+                               col.itemR(fluid, "impact_factor")
                                
                        if fluid.type == 'INFLOW':
-                               row = layout.row()
-                               row.column().itemR(fluid, "inflow_velocity")
-                               row.itemR(fluid, "export_animated_mesh")
-                               layout.itemR(fluid, "local_coordinates")
+                               split = layout.split()
+                               col = split.column()
+                               col.itemL(text="Volume Initialization:")
+                               col.itemR(fluid, "volume_initialization", text="")
+                               col.itemR(fluid, "export_animated_mesh")
+                               col.itemR(fluid, "local_coordinates")
+                               
+                               col = split.column()
+                               col.itemL(text="Inflow Velocity:")
+                               col.itemR(fluid, "inflow_velocity", text="")
                                
                        if fluid.type == 'OUTFLOW':
-                               row = layout.row()
-                               row.itemL()
-                               row.itemR(fluid, "export_animated_mesh")
+                               split = layout.split()
+                               col = split.column()
+                               col.itemL(text="Volume Initialization:")
+                               col.itemR(fluid, "volume_initialization", text="")
+                               col.itemR(fluid, "export_animated_mesh")
+                               col = split.column()
                                
                        if fluid.type == 'PARTICLE':
                                split = layout.split()
                                
+                               col = split.column()
+                               col.itemL(text="Influence:")
+                               colsub = col.column(align=True)
+                               colsub.itemR(fluid, "particle_influence", text="Size")
+                               colsub.itemR(fluid, "alpha_influence", text="Alpha")
+                               col.itemL(text="Path:")
+                               
+                               layout.itemR(fluid, "path", text="")
+                               
                                col = split.column()
                                col.itemL(text="Type:")
                                col.itemR(fluid, "drops")
                                col.itemR(fluid, "floats")
                                col.itemR(fluid, "tracer")
                                
-                               col = split.column()
-                               col.itemL(text="Influence:")
-                               col.itemR(fluid, "particle_influence", text="Particle")
-                               col.itemR(fluid, "alpha_influence", text="Alpha")
-                               
-                               layout.itemR(fluid, "path")
-                               
                        if fluid.type == 'CONTROL':
                                split = layout.split()
                                
+                               col = split.column()
+                               col.itemL(text="")
+                               col.itemR(fluid, "quality", slider=True)
+                               col.itemR(fluid, "reverse_frames")
+                               
                                col = split.column()
                                col.itemL(text="Time:")
+                               col=col.column(align=True)
                                col.itemR(fluid, "start_time", text="Start")
                                col.itemR(fluid, "end_time", text="End")
                                
-                               col = split.column()
-                               col.itemR(fluid, "quality", slider=True)
-                               col.itemR(fluid, "reverse_frames")
-                               
                                split = layout.split()
                                
                                col = split.column()
-                               col.itemL(text="Attraction:")
+                               col.itemL(text="Attraction Force:")
+                               col=col.column(align=True)
                                col.itemR(fluid, "attraction_strength", text="Strength")
                                col.itemR(fluid, "attraction_radius", text="Radius")
                                
                                col = split.column()
-                               col.itemL(text="Velocity:")
+                               col.itemL(text="Velocity Force:")
+                               col=col.column(align=True)
                                col.itemR(fluid, "velocity_strength", text="Strength")
                                col.itemR(fluid, "velocity_radius", text="Radius")
 
 class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_domain_gravity"
-       __label__ = "Domain World/Gravity"
+       __label__ = "Domain World"
        __default_closed__ = True
        
        def poll(self, context):
                md = context.fluid
                if md:
-                       return (md.settings.type == 'DOMAIN')
+                       settings = md.settings
+                       if settings:
+                               return (settings.type == 'DOMAIN')
+               
+               return False
 
        def draw(self, context):
                layout = self.layout
@@ -161,19 +196,28 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel):
                split = layout.split()
                
                col = split.column()
-               col.itemR(fluid, "gravity")
+               col.itemL(text="Gravity:")
+               col.itemR(fluid, "gravity", text="")
+               
+               col.itemL(text="Real World Size:")
+               col.itemR(fluid, "real_world_size", text="Metres")
+               
+               col = split.column()
+               col.itemL(text="Viscosity Presets:")
+               colsub=col.column(align=True)
+               colsub.itemR(fluid, "viscosity_preset", text="")
                
-               col = split.column(align=True)
-               col.itemL(text="Viscosity:")
-               col.itemR(fluid, "viscosity_preset", text="")
                if fluid.viscosity_preset == 'MANUAL':
-                       col.itemR(fluid, "viscosity_base", text="Base")
-                       col.itemR(fluid, "viscosity_exponent", text="Exponent")
+                       colsub.itemR(fluid, "viscosity_base", text="Base")
+                       colsub.itemR(fluid, "viscosity_exponent", text="Exponent", slider=True)
+               else:
+                       colsub.itemL(text="")
+                       colsub.itemL(text="")
                        
-               col = layout.column_flow()
-               col.itemR(fluid, "real_world_size")
-               col.itemR(fluid, "grid_levels")
-               col.itemR(fluid, "compressibility")
+               col.itemL(text="Optimization:")
+               col=col.column(align=True)
+               col.itemR(fluid, "grid_levels", slider=True)
+               col.itemR(fluid, "compressibility", slider=True)
        
 class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_domain_boundary"
@@ -183,22 +227,28 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel):
        def poll(self, context):
                md = context.fluid
                if md:
-                       return (md.settings.type == 'DOMAIN')
+                       settings = md.settings
+                       if settings:
+                               return (settings.type == 'DOMAIN')
+               
+               return False
 
        def draw(self, context):
                layout = self.layout
                fluid = context.fluid.settings
                
-               layout.itemL(text="Slip:")
-               
-               layout.itemR(fluid, "slip_type", expand=True)
+               split = layout.split()
+               col = split.column()
+               col.itemL(text="Slip Type:")
+               col=col.column(align=True)
+               col.itemR(fluid, "slip_type", text="")
                if fluid.slip_type == 'PARTIALSLIP':
-                       layout.itemR(fluid, "partial_slip_amount", text="Amount")
-               
-               layout.itemL(text="Surface:")
-               row = layout.row()
-               row.itemR(fluid, "surface_smoothing", text="Smoothing")
-               row.itemR(fluid, "surface_subdivisions", text="Subdivisions")
+                       col.itemR(fluid, "partial_slip_amount", slider=True, text="Amount")
+               col = split.column()
+               col.itemL(text="Surface:")
+               col=col.column(align=True)
+               col.itemR(fluid, "surface_smoothing", text="Smoothing")
+               col.itemR(fluid, "surface_subdivisions", text="Subdivisions")   
                
 class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
        __idname__ = "PHYSICS_PT_domain_particles"
@@ -208,16 +258,21 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel):
        def poll(self, context):
                md = context.fluid
                if md:
-                       return (md.settings.type == 'DOMAIN')
+                       settings = md.settings
+                       if settings:
+                               return (settings.type == 'DOMAIN')
+               
+               return False
 
        def draw(self, context):
                layout = self.layout
                fluid = context.fluid.settings
                
-               layout.itemR(fluid, "tracer_particles")
-               layout.itemR(fluid, "generate_particles")
+               col=layout.column(align=True)
+               col.itemR(fluid, "tracer_particles")
+               col.itemR(fluid, "generate_particles")
 
 bpy.types.register(PHYSICS_PT_fluid)
 bpy.types.register(PHYSICS_PT_domain_gravity)
 bpy.types.register(PHYSICS_PT_domain_boundary)
-bpy.types.register(PHYSICS_PT_domain_particles)
+bpy.types.register(PHYSICS_PT_domain_particles)
\ No newline at end of file
index 774f7f67979ef042d996bf5b8ad8601ecfb46353..836c557257e35bd13294544b2288dbb8dd1a5614 100644 (file)
@@ -25,14 +25,14 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel):
                if md:
                        # remove modifier + settings
                        split.set_context_pointer("modifier", md)
-                       split.itemO("OBJECT_OT_modifier_remove", text="Remove")
+                       split.itemO("object.modifier_remove", text="Remove")
 
                        row = split.row(align=True)
                        row.itemR(md, "render", text="")
                        row.itemR(md, "realtime", text="")
                else:
                        # add modifier
-                       split.item_enumO("OBJECT_OT_modifier_add", "type", "SOFTBODY", text="Add")
+                       split.item_enumO("object.modifier_add", "type", "SOFTBODY", text="Add")
                        split.itemL("")
                        
                if md:
@@ -136,8 +136,8 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel):
                        
                        col.itemR(softbody, "new_aero", text="Aero")
                        subcol = col.column()
-                       subcol.active = softbody.new_aero
-                       subcol.itemR(softbody, "aero", text="Factor", enabled=softbody.new_aero)
+                       subcol.enabled = softbody.new_aero
+                       subcol.itemR(softbody, "aero", text="Factor")
 
                        col.itemL(text="Collision:")
                        col.itemR(softbody, "edge_collision", text="Edge")
index e5587d55dcb3c80ebd4b5ec180ba83143adcd457..5f686469292a918982c919dc5e6a7e84b341bb84 100644 (file)
@@ -14,8 +14,8 @@ class RENDER_PT_render(RenderButtonsPanel):
                rd = context.scene.render_data
 
                row = layout.row()
-               row.itemO("SCREEN_OT_render", text="Image", icon='ICON_IMAGE_COL')
-               row.item_booleanO("SCREEN_OT_render", "anim", True, text="Animation", icon='ICON_SEQUENCE')
+               row.itemO("screen.render", text="Image", icon='ICON_IMAGE_COL')
+               row.item_booleanO("screen.render", "anim", True, text="Animation", icon='ICON_SEQUENCE')
 
                layout.itemR(rd, "display_mode", text="Display")
 
@@ -32,8 +32,8 @@ class RENDER_PT_layers(RenderButtonsPanel):
                row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
 
                col = row.column(align=True)
-               col.itemO("SCENE_OT_render_layer_add", icon="ICON_ZOOMIN", text="")
-               col.itemO("SCENE_OT_render_layer_remove", icon="ICON_ZOOMOUT", text="")
+               col.itemO("scene.render_layer_add", icon="ICON_ZOOMIN", text="")
+               col.itemO("scene.render_layer_remove", icon="ICON_ZOOMOUT", text="")
 
                rl = rd.layers[rd.active_layer_index]
 
@@ -114,10 +114,11 @@ class RENDER_PT_shading(RenderButtonsPanel):
                col.itemR(rd, "render_textures", text="Textures")
                col.itemR(rd, "render_shadows", text="Shadows")
                col.itemR(rd, "render_sss", text="Subsurface Scattering")
+               col.itemR(rd, "render_envmaps", text="Environment Map")
                
                col = split.column()
-               col.itemR(rd, "render_envmaps", text="Environment Map")
                col.itemR(rd, "render_raytracing", text="Ray Tracing")
+               col.itemR(rd, "color_management")
                col.itemR(rd, "alpha_mode", text="Alpha")
 
 class RENDER_PT_performance(RenderButtonsPanel):
@@ -329,7 +330,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
                col.itemR(rd, "full_sample")
 
                col = split.column()
-               col.itemR(rd, "pixel_filter", text="Filter")
+               col.itemR(rd, "pixel_filter", text="")
                col.itemR(rd, "filter_size", text="Size", slider=True)
        
 class RENDER_PT_dimensions(RenderButtonsPanel):
@@ -411,13 +412,13 @@ class RENDER_PT_stamp(RenderButtonsPanel):
                rowsub.itemR(rd, "stamp_note_text", text="")
 
 bpy.types.register(RENDER_PT_render)
+bpy.types.register(RENDER_PT_layers)
 bpy.types.register(RENDER_PT_dimensions)
 bpy.types.register(RENDER_PT_antialiasing)
-bpy.types.register(RENDER_PT_layers)
 bpy.types.register(RENDER_PT_shading)
-bpy.types.register(RENDER_PT_post_processing)
-bpy.types.register(RENDER_PT_performance)
 bpy.types.register(RENDER_PT_output)
 bpy.types.register(RENDER_PT_encoding)
+bpy.types.register(RENDER_PT_performance)
+bpy.types.register(RENDER_PT_post_processing)
 bpy.types.register(RENDER_PT_stamp)
 
index 030e0836ca7020f563632a8e3656753edd15cd15..49f04b886b4e9d7f32195e1f876f686712cd6b1b 100644 (file)
@@ -16,15 +16,19 @@ class TEXTURE_PT_preview(TextureButtonsPanel):
        def draw(self, context):
                layout = self.layout
                tex = context.texture
+               mat = context.material
                
-               layout.template_preview(tex)
+               if mat:
+                       layout.template_preview(tex, parent=mat)
+               else:
+                       layout.template_preview(tex)
 
 class TEXTURE_PT_context_texture(TextureButtonsPanel):
        __idname__= "TEXTURE_PT_context_texture"
        __no_header__ = True
 
        def poll(self, context):
-               return (context.material or context.world or context.lamp)
+               return (context.material or context.world or context.lamp or context.texture)
 
        def draw(self, context):
                layout = self.layout
@@ -46,15 +50,15 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel):
                                row.template_list(wo, "textures", wo, "active_texture_index")
                        """if ma or la or wo: 
                                col = row.column(align=True)
-                               col.itemO("TEXTURE_OT_new", icon="ICON_ZOOMIN", text="")
-                               #col.itemO("OBJECT_OT_material_slot_remove", icon="ICON_ZOOMOUT", text="")
+                               col.itemO("texture.new", icon="ICON_ZOOMIN", text="")
+                               #col.itemO("object.material_slot_remove", icon="ICON_ZOOMOUT", text="")
                        """
 
                split = layout.split(percentage=0.65)
 
                if ma or la or wo:
                        if slot:
-                               split.template_ID(slot, "texture", new="TEXTURE_OT_new")
+                               split.template_ID(slot, "texture", new="texture.new")
                        else:
                                split.itemS()
 
index f99097db59d3bf597f399b6b3edb6bc510ac370b..5db894fc0c76a9abf212680480f2ef75942a50e6 100644 (file)
@@ -34,7 +34,7 @@ class WORLD_PT_context_world(WorldButtonsPanel):
                split = layout.split(percentage=0.65)
 
                if scene:
-                       split.template_ID(scene, "world", new="WORLD_OT_new")
+                       split.template_ID(scene, "world", new="world.new")
                elif world:
                        split.template_ID(space, "pin_id")
 
index 6548a2249b23550a00f8be172dd0fda6657c457e..880cce82a27cc1883f8e1b8900e9f416ab807d75 100644 (file)
@@ -1,6 +1,9 @@
 
 import bpy
 
+import bpy_ops # XXX - should not need to do this
+del bpy_ops
+
 class CONSOLE_HT_header(bpy.types.Header):
        __space_type__ = "CONSOLE"
        __idname__ = "CONSOLE_HT_header"
@@ -12,19 +15,29 @@ class CONSOLE_HT_header(bpy.types.Header):
 
                layout.template_header()
 
-               if context.area.show_menus:
-                       row = layout.row()
-                       row.itemM("CONSOLE_MT_console")
-               
                row = layout.row()
-               row.scale_x = 0.9
-               row.itemR(sc, "type", expand=True)
+               row.itemR(sc, "console_type", expand=True)
+
                if sc.type == 'REPORT':
-                       row.itemR(sc, "show_report_debug")
-                       row.itemR(sc, "show_report_info")
-                       row.itemR(sc, "show_report_operator")
-                       row.itemR(sc, "show_report_warn")
-                       row.itemR(sc, "show_report_error")
+                       
+                       if context.area.show_menus:
+                               row = layout.row()
+                               row.itemM("CONSOLE_MT_report")
+                       
+                       row.itemR(sc, "show_report_debug", text="Debug")
+                       row.itemR(sc, "show_report_info", text="Info")
+                       row.itemR(sc, "show_report_operator", text="Operators")
+                       row.itemR(sc, "show_report_warn", text="Warnings")
+                       row.itemR(sc, "show_report_error", text="Errors")
+                       
+                       row = layout.row()
+                       row.enabled = sc.show_report_operator
+                       row.itemO("console.report_replay")
+               
+               else:
+                       if context.area.show_menus:
+                               row = layout.row()
+                               row.itemM("CONSOLE_MT_console")
 
 
 class CONSOLE_MT_console(bpy.types.Menu):
@@ -36,11 +49,25 @@ class CONSOLE_MT_console(bpy.types.Menu):
                sc = context.space_data
 
                layout.column()
-               layout.itemO("CONSOLE_OT_clear")
+               layout.itemO("console.clear")
+
+class CONSOLE_MT_report(bpy.types.Menu):
+       __space_type__ = "CONSOLE"
+       __label__ = "Report"
+
+       def draw(self, context):
+               layout = self.layout
+               sc = context.space_data
+
+               layout.column()
+               layout.itemO("console.select_all_toggle")
+               layout.itemO("console.select_border")
+               layout.itemO("console.report_delete")
+               layout.itemO("console.report_copy")
 
 def add_scrollback(text, text_type):
        for l in text.split('\n'):
-               bpy.ops.CONSOLE_OT_scrollback_append(text=l.replace('\t', '    '), type=text_type)
+               bpy.ops.console.scrollback_append(text=l.replace('\t', '    '), type=text_type)
 
 def get_console(console_id):
        '''
@@ -50,7 +77,7 @@ def get_console(console_id):
        
        console_id can be any hashable type
        '''
-       import sys, code, io
+       import sys, code
        
        try:    consoles = get_console.consoles
        except:consoles = get_console.consoles = {}
@@ -71,12 +98,19 @@ def get_console(console_id):
                
                console = code.InteractiveConsole(namespace)
                
-               if sys.version.startswith('2'):
+               if sys.version.startswith('3'):
+                       import io
+                       stdout = io.StringIO()
+                       stderr = io.StringIO()
+               elif sys.version.startswith('2.6'):
+                       import io
                        stdout = io.BytesIO()  # Py2x support
                        stderr = io.BytesIO()
                else:
-                       stdout = io.StringIO()
-                       stderr = io.StringIO()
+                       import cStringIO
+                       stdout = cStringIO.StringIO()
+                       stderr = cStringIO.StringIO()
+
        
                consoles[console_id]= namespace, console, stdout, stderr
                
@@ -86,8 +120,9 @@ class CONSOLE_OT_exec(bpy.types.Operator):
        '''
        Operator documentatuon text, will be used for the operator tooltip and python docs.
        '''
+       __idname__ = "console.exec"
        __label__ = "Console Execute"
-       __register__ = True
+       __register__ = False
        
        # Both prompts must be the same length
        PROMPT = '>>> ' 
@@ -141,13 +176,13 @@ class CONSOLE_OT_exec(bpy.types.Operator):
                stdout.truncate(0)
                stderr.truncate(0)
                
-               bpy.ops.CONSOLE_OT_scrollback_append(text = sc.prompt+line, type='INPUT')
+               bpy.ops.console.scrollback_append(text = sc.prompt+line, type='INPUT')
                
                if is_multiline:        sc.prompt = self.PROMPT_MULTI
                else:                           sc.prompt = self.PROMPT
                
                # insert a new blank line
-               bpy.ops.CONSOLE_OT_history_append(text="", current_character=0)
+               bpy.ops.console.history_append(text="", current_character=0)
                
                # Insert the output into the editor
                # not quite correct because the order might have changed, but ok 99% of the time.
@@ -362,8 +397,9 @@ class CONSOLE_OT_autocomplete(bpy.types.Operator):
        '''
        Operator documentatuon text, will be used for the operator tooltip and python docs.
        '''
+       __idname__ = "console.autocomplete"
        __label__ = "Console Autocomplete"
-       __register__ = True
+       __register__ = False
        
        def poll(self, context):
                return context.space_data.type == 'PYTHON'
@@ -413,6 +449,7 @@ class CONSOLE_OT_autocomplete(bpy.types.Operator):
 
 bpy.types.register(CONSOLE_HT_header)
 bpy.types.register(CONSOLE_MT_console)
+bpy.types.register(CONSOLE_MT_report)
 
 bpy.ops.add(CONSOLE_OT_exec)
 bpy.ops.add(CONSOLE_OT_autocomplete)
index 0c37e8c0816efe94bf4b48faeb6e596b72078426..b0aaae8f0a58899253908a177db87314eb21c5e7 100644 (file)
@@ -19,10 +19,10 @@ class FILEBROWSER_HT_header(bpy.types.Header):
                        row.itemM("FILEBROWSER_MT_bookmarks")
 
                row = layout.row(align=True)
-               row.itemO("FILE_OT_parent", text="", icon='ICON_FILE_PARENT')
-               row.itemO("FILE_OT_refresh", text="", icon='ICON_FILE_REFRESH')
-               row.itemO("FILE_OT_previous", text="", icon='ICON_PREV_KEYFRAME')
-               row.itemO("FILE_OT_next", text="", icon='ICON_NEXT_KEYFRAME')
+               row.itemO("file.parent", text="", icon='ICON_FILE_PARENT')
+               row.itemO("file.refresh", text="", icon='ICON_FILE_REFRESH')
+               row.itemO("file.previous", text="", icon='ICON_PREV_KEYFRAME')
+               row.itemO("file.next", text="", icon='ICON_NEXT_KEYFRAME')
                
                layout.itemR(params, "display", expand=True, text="")
                layout.itemR(params, "sort", expand=True, text="")
@@ -49,8 +49,8 @@ class FILEBROWSER_MT_directory(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("FILE_OT_refresh", text="Refresh", icon='ICON_FILE_REFRESH')
-               layout.itemO("FILE_OT_parent", text="Parent", icon='ICON_FILE_PARENT')
+               layout.itemO("file.refresh", text="Refresh", icon='ICON_FILE_REFRESH')
+               layout.itemO("file.parent", text="Parent", icon='ICON_FILE_PARENT')
                
 class FILEBROWSER_MT_bookmarks(bpy.types.Menu):
        __space_type__ = "FILE_BROWSER"
@@ -59,7 +59,7 @@ class FILEBROWSER_MT_bookmarks(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("FILE_OT_add_bookmark", text="Add current directory", icon='ICON_BOOKMARKS')
+               layout.itemO("file.add_bookmark", text="Add current directory", icon='ICON_BOOKMARKS')
 
                
 bpy.types.register(FILEBROWSER_HT_header)
index ce8257203dc944b2bfde2ba5e0b6f184c71664d6..cdb22fb04422b431b4bb9a65bd317654d5723270 100644 (file)
@@ -9,11 +9,11 @@ class IMAGE_MT_view(bpy.types.Menu):
                layout = self.layout
                sima = context.space_data
                uv = sima.uv_editor
-               settings = context.scene.tool_settings
+               settings = context.tool_settings
 
                show_uvedit = sima.show_uvedit
 
-               layout.itemO("IMAGE_OT_properties", icon="ICON_MENU_PANEL")
+               layout.itemO("image.properties", icon="ICON_MENU_PANEL")
 
                layout.itemS()
 
@@ -23,8 +23,8 @@ class IMAGE_MT_view(bpy.types.Menu):
 
                layout.itemS()
 
-               layout.itemO("IMAGE_OT_view_zoom_in")
-               layout.itemO("IMAGE_OT_view_zoom_out")
+               layout.itemO("image.view_zoom_in")
+               layout.itemO("image.view_zoom_out")
 
                layout.itemS()
 
@@ -32,15 +32,15 @@ class IMAGE_MT_view(bpy.types.Menu):
 
                for a, b in ratios:
                        text = "Zoom %d:%d" % (a, b)
-                       layout.item_floatO("IMAGE_OT_view_zoom_ratio", "ratio", a/b, text=text)
+                       layout.item_floatO("image.view_zoom_ratio", "ratio", a/b, text=text)
 
                layout.itemS()
 
                if show_uvedit:
-                       layout.itemO("IMAGE_OT_view_selected")
+                       layout.itemO("image.view_selected")
 
-               layout.itemO("IMAGE_OT_view_all")
-               layout.itemO("SCREEN_OT_screen_full_area")
+               layout.itemO("image.view_all")
+               layout.itemO("screen.screen_full_area")
 
 class IMAGE_MT_select(bpy.types.Menu):
        __space_type__ = "IMAGE_EDITOR"
@@ -49,19 +49,19 @@ class IMAGE_MT_select(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("UV_OT_select_border")
-               layout.item_booleanO("UV_OT_select_border", "pinned", True)
+               layout.itemO("uv.select_border")
+               layout.item_booleanO("uv.select_border", "pinned", True)
 
                layout.itemS()
                
-               layout.itemO("UV_OT_select_all_toggle")
-               layout.itemO("UV_OT_select_inverse")
-               layout.itemO("UV_OT_unlink_selection")
+               layout.itemO("uv.select_all_toggle")
+               layout.itemO("uv.select_inverse")
+               layout.itemO("uv.unlink_selection")
                
                layout.itemS()
 
-               layout.itemO("UV_OT_select_pinned")
-               layout.itemO("UV_OT_select_linked")
+               layout.itemO("uv.select_pinned")
+               layout.itemO("uv.select_linked")
 
 class IMAGE_MT_image(bpy.types.Menu):
        __space_type__ = "IMAGE_EDITOR"
@@ -72,35 +72,35 @@ class IMAGE_MT_image(bpy.types.Menu):
                sima = context.space_data
                ima = sima.image
 
-               layout.itemO("IMAGE_OT_new")
-               layout.itemO("IMAGE_OT_open")
+               layout.itemO("image.new")
+               layout.itemO("image.open")
 
                show_render = sima.show_render
 
                if ima:
-                       if show_render:
-                               layout.itemO("IMAGE_OT_replace")
-                               layout.itemO("IMAGE_OT_reload")
+                       if not show_render:
+                               layout.itemO("image.replace")
+                               layout.itemO("image.reload")
 
-                       layout.itemO("IMAGE_OT_save")
-                       layout.itemO("IMAGE_OT_save_as")
+                       layout.itemO("image.save")
+                       layout.itemO("image.save_as")
 
                        if ima.source == "SEQUENCE":
-                               layout.itemO("IMAGE_OT_save_sequence")
+                               layout.itemO("image.save_sequence")
 
                        if not show_render:
                                layout.itemS()
 
                                if ima.packed_file:
-                                       layout.itemO("IMAGE_OT_unpack")
+                                       layout.itemO("image.unpack")
                                else:
-                                       layout.itemO("IMAGE_OT_pack")
+                                       layout.itemO("image.pack")
 
                                # only for dirty && specific image types, perhaps
                                # this could be done in operator poll too
                                if ima.dirty:
                                        if ima.source in ("FILE", "GENERATED") and ima.type != "MULTILAYER":
-                                               layout.item_booleanO("IMAGE_OT_pack", "as_png", True, text="Pack As PNG")
+                                               layout.item_booleanO("image.pack", "as_png", True, text="Pack As PNG")
 
                        layout.itemS()
 
@@ -113,9 +113,9 @@ class IMAGE_MT_uvs_showhide(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("UV_OT_reveal")
-               layout.itemO("UV_OT_hide")
-               layout.item_booleanO("UV_OT_hide", "unselected", True)
+               layout.itemO("uv.reveal")
+               layout.itemO("uv.hide")
+               layout.item_booleanO("uv.hide", "unselected", True)
 
 class IMAGE_MT_uvs_transform(bpy.types.Menu):
        __space_type__ = "IMAGE_EDITOR"
@@ -124,9 +124,9 @@ class IMAGE_MT_uvs_transform(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.item_enumO("TFM_OT_transform", "mode", "TRANSLATION")
-               layout.item_enumO("TFM_OT_transform", "mode", "ROTATION")
-               layout.item_enumO("TFM_OT_transform", "mode", "RESIZE")
+               layout.item_enumO("tfm.transform", "mode", "TRANSLATION")
+               layout.item_enumO("tfm.transform", "mode", "ROTATION")
+               layout.item_enumO("tfm.transform", "mode", "RESIZE")
 
 class IMAGE_MT_uvs_mirror(bpy.types.Menu):
        __space_type__ = "IMAGE_EDITOR"
@@ -135,8 +135,8 @@ class IMAGE_MT_uvs_mirror(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.item_enumO("UV_OT_mirror", "axis", "MIRROR_X") # "X Axis", M, 
-               layout.item_enumO("UV_OT_mirror", "axis", "MIRROR_Y") # "Y Axis", M, 
+               layout.item_enumO("uv.mirror", "axis", "MIRROR_X") # "X Axis", M, 
+               layout.item_enumO("uv.mirror", "axis", "MIRROR_Y") # "Y Axis", M, 
 
 class IMAGE_MT_uvs_weldalign(bpy.types.Menu):
        __space_type__ = "IMAGE_EDITOR"
@@ -145,8 +145,8 @@ class IMAGE_MT_uvs_weldalign(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("UV_OT_weld") # W, 1
-               layout.items_enumO("UV_OT_align", "axis") # W, 2/3/4
+               layout.itemO("uv.weld") # W, 1
+               layout.items_enumO("uv.align", "axis") # W, 2/3/4
 
 
 class IMAGE_MT_uvs(bpy.types.Menu):
@@ -157,7 +157,7 @@ class IMAGE_MT_uvs(bpy.types.Menu):
                layout = self.layout
                sima = context.space_data
                uv = sima.uv_editor
-               settings = context.scene.tool_settings
+               settings = context.tool_settings
 
                layout.itemR(uv, "snap_to_pixels")
                layout.itemR(uv, "constrain_to_image_bounds")
@@ -165,16 +165,16 @@ class IMAGE_MT_uvs(bpy.types.Menu):
                layout.itemS()
 
                layout.itemR(uv, "live_unwrap")
-               layout.itemO("UV_OT_unwrap")
-               layout.item_booleanO("UV_OT_pin", "clear", True, text="Unpin")
-               layout.itemO("UV_OT_pin")
+               layout.itemO("uv.unwrap")
+               layout.item_booleanO("uv.pin", "clear", True, text="Unpin")
+               layout.itemO("uv.pin")
 
                layout.itemS()
 
-               layout.itemO("UV_OT_pack_islands")
-               layout.itemO("UV_OT_average_islands_scale")
-               layout.itemO("UV_OT_minimize_stretch")
-               layout.itemO("UV_OT_stitch")
+               layout.itemO("uv.pack_islands")
+               layout.itemO("uv.average_islands_scale")
+               layout.itemO("uv.minimize_stretch")
+               layout.itemO("uv.stitch")
 
                layout.itemS()
 
@@ -199,7 +199,7 @@ class IMAGE_HT_header(bpy.types.Header):
                ima = sima.image
                iuser = sima.image_user
                layout = self.layout
-               settings = context.scene.tool_settings
+               settings = context.tool_settings
 
                show_render = sima.show_render
                show_paint = sima.show_paint
@@ -223,7 +223,7 @@ class IMAGE_HT_header(bpy.types.Header):
                        if show_uvedit:
                                row.itemM("IMAGE_MT_uvs")
 
-               layout.template_ID(sima, "image", new="IMAGE_OT_new", open="IMAGE_OT_open")
+               layout.template_ID(sima, "image", new="image.new")
 
                """
                /* image select */
@@ -290,9 +290,9 @@ class IMAGE_HT_header(bpy.types.Header):
 
                        row = layout.row(align=True)
                        if ima.type == "COMPOSITE":
-                               row.itemO("IMAGE_OT_record_composite", icon="ICON_REC")
+                               row.itemO("image.record_composite", icon="ICON_REC")
                        if ima.type == "COMPOSITE" and ima.source in ("MOVIE", "SEQUENCE"):
-                               row.itemO("IMAGE_OT_play_composite", icon="ICON_PLAY")
+                               row.itemO("image.play_composite", icon="ICON_PLAY")
                
                layout.itemR(sima, "update_automatically", text="")
 
index a946b30f62de3eb3501460922a239130608dae4b..55ce80e857fa5700242a1de996e1311b66a65587 100644 (file)
@@ -20,8 +20,8 @@ class INFO_HT_header(bpy.types.Header):
                        row.itemM("INFO_MT_render")
                        row.itemM("INFO_MT_help")
 
-               layout.template_ID(context.window, "screen") #, new="SCREEN_OT_new", open="SCREEN_OT_unlink")
-               layout.template_ID(context.screen, "scene") #, new="SCENE_OT_new", unlink="SCENE_OT_unlink")
+               layout.template_ID(context.window, "screen") #, new="screen.new", open="scene.unlink")
+               layout.template_ID(context.screen, "scene") #, new="screen.new", unlink="scene.unlink")
 
                layout.itemS()
 
@@ -36,16 +36,16 @@ class INFO_MT_file(bpy.types.Menu):
                layout = self.layout
 
                layout.operator_context = "EXEC_AREA"
-               layout.itemO("WM_OT_read_homefile")
+               layout.itemO("wm.read_homefile")
                layout.operator_context = "INVOKE_AREA"
-               layout.itemO("WM_OT_open_mainfile")
+               layout.itemO("wm.open_mainfile")
 
                layout.itemS()
 
                layout.operator_context = "EXEC_AREA"
-               layout.itemO("WM_OT_save_mainfile")
+               layout.itemO("wm.save_mainfile")
                layout.operator_context = "INVOKE_AREA"
-               layout.itemO("WM_OT_save_as_mainfile")
+               layout.itemO("wm.save_as_mainfile")
 
                layout.itemS()
 
@@ -58,15 +58,15 @@ class INFO_MT_file_external_data(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("FILE_OT_pack_all", text="Pack into .blend file")
-               layout.itemO("FILE_OT_unpack_all", text="Unpack into Files...")
+               layout.itemO("file.pack_all", text="Pack into .blend file")
+               layout.itemO("file.unpack_all", text="Unpack into Files...")
 
                layout.itemS()
 
-               layout.itemO("FILE_OT_make_paths_relative")
-               layout.itemO("FILE_OT_make_paths_absolute")
-               layout.itemO("FILE_OT_report_missing_files")
-               layout.itemO("FILE_OT_find_missing_files")
+               layout.itemO("file.make_paths_relative")
+               layout.itemO("file.make_paths_absolute")
+               layout.itemO("file.report_missing_files")
+               layout.itemO("file.find_missing_files")
 
 class INFO_MT_add(bpy.types.Menu):
        __space_type__ = "USER_PREFERENCES"
@@ -116,11 +116,12 @@ class INFO_PT_tabs(bpy.types.Panel):
                layout = self.layout
                userpref = context.user_preferences
 
-               layout.itemR(userpref, "active_section")
+               layout.itemR(userpref, "active_section", expand=True)
 
 class INFO_PT_view(bpy.types.Panel):
        __space_type__ = "USER_PREFERENCES"
        __label__ = "View"
+       __no_header__ = True
 
        def poll(self, context):
                userpref = context.user_preferences
@@ -131,7 +132,351 @@ class INFO_PT_view(bpy.types.Panel):
                userpref = context.user_preferences
                view = userpref.view
 
-               layout.itemR(view, "show_view_name")
+               split = layout.split()
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               colsplitcol.itemL(text="Display:")
+               colsplitcol.itemR(view, "tooltips")
+               colsplitcol.itemR(view, "display_object_info", text="Object Info")
+               colsplitcol.itemR(view, "use_large_cursors")
+               colsplitcol.itemR(view, "show_view_name", text="View Name")
+               colsplitcol.itemR(view, "show_playback_fps", text="Playback FPS")
+               colsplitcol.itemR(view, "global_scene")
+               colsplitcol.itemR(view, "pin_floating_panels")
+               colsplitcol.itemR(view, "object_center_size")
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               
+               colsplitcol.itemR(view, "show_mini_axis")
+               colsub = colsplitcol.column()
+               colsub.enabled = view.show_mini_axis
+               colsub.itemR(view, "mini_axis_size")
+               colsub.itemR(view, "mini_axis_brightness")
+               
+
+               
+               
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               colsplitcol.itemL(text="View Manipulation:")
+               colsplitcol.itemR(view, "auto_depth")
+               colsplitcol.itemR(view, "global_pivot")
+               colsplitcol.itemR(view, "zoom_to_mouse")
+               colsplitcol.itemR(view, "rotate_around_selection")
+               colsplitcol.itemL(text="Zoom Style:")
+               row = colsplitcol.row()
+               row.itemR(view, "viewport_zoom_style", expand=True)
+               colsplitcol.itemL(text="Orbit Style:")
+               row = colsplitcol.row()
+               row.itemR(view, "view_rotation", expand=True)
+               colsplitcol.itemR(view, "perspective_orthographic_switch")
+               colsplitcol.itemR(view, "smooth_view")
+               colsplitcol.itemR(view, "rotation_angle")
+               colsplitcol.itemL(text="NDOF Device:")
+               colsplitcol.itemR(view, "ndof_pan_speed", text="Pan Speed")
+               colsplitcol.itemR(view, "ndof_rotate_speed", text="Orbit Speed")
+               
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               colsplitcol.itemL(text="Mouse Buttons:")
+               colsplitcol.itemR(view, "left_mouse_button_select")
+               colsplitcol.itemR(view, "right_mouse_button_select")
+               colsplitcol.itemR(view, "emulate_3_button_mouse")
+               colsplitcol.itemR(view, "use_middle_mouse_paste")
+               colsplitcol.itemR(view, "middle_mouse_rotate")
+               colsplitcol.itemR(view, "middle_mouse_pan")
+               colsplitcol.itemR(view, "wheel_invert_zoom")
+               colsplitcol.itemR(view, "wheel_scroll_lines")
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               
+               colsplitcol.itemL(text="Menus:")
+               colsplitcol.itemR(view, "open_mouse_over")
+               colsplitcol.itemL(text="Menu Open Delay:")
+               colsplitcol.itemR(view, "open_toplevel_delay", text="Top Level")
+               colsplitcol.itemR(view, "open_sublevel_delay", text="Sub Level")
+
+               
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               #manipulator
+               colsplitcol.itemR(view, "use_manipulator")
+               colsub = colsplitcol.column()
+               colsub.enabled = view.use_manipulator
+               colsub.itemR(view, "manipulator_size", text="Size")
+               colsub.itemR(view, "manipulator_handle_size", text="Handle Size")
+               colsub.itemR(view, "manipulator_hotspot", text="Hotspot")       
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+                               
+               colsplitcol.itemL(text="Toolbox:")
+               colsplitcol.itemR(view, "use_column_layout")
+               colsplitcol.itemL(text="Open Toolbox Delay:")
+               colsplitcol.itemR(view, "open_left_mouse_delay", text="Hold LMB")
+               colsplitcol.itemR(view, "open_right_mouse_delay", text="Hold RMB")
+
+               
+class INFO_PT_edit(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "Edit"
+       __no_header__ = True
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'EDIT_METHODS')
+
+       def draw(self, context):
+               layout = self.layout
+               userpref = context.user_preferences
+               edit = userpref.edit
+               view = userpref.view
+               
+               split = layout.split()
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+
+               colsplitcol.itemL(text="Materials:")
+               colsplitcol.itemR(edit, "material_linked_object", text="Linked to Object")
+               colsplitcol.itemR(edit, "material_linked_obdata", text="Linked to ObData")
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               
+               colsplitcol.itemL(text="New Objects:")
+               colsplitcol.itemR(edit, "enter_edit_mode")
+               colsplitcol.itemR(edit, "align_to_view")
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               
+               colsplitcol.itemL(text="Transform:")
+               colsplitcol.itemR(edit, "drag_immediately")
+               
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               colsplitcol.itemL(text="Snap:")
+               colsplitcol.itemR(edit, "snap_translate", text="Translate")
+               colsplitcol.itemR(edit, "snap_rotate", text="Rotate")
+               colsplitcol.itemR(edit, "snap_scale", text="Scale")
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               
+               colsplitcol.itemL(text="Grease Pencil:")
+               colsplitcol.itemR(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
+               colsplitcol.itemR(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
+               colsplitcol.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
+               colsplitcol.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
+               colsplitcol.itemR(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
+               
+               
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+
+               colsplitcol.itemL(text="Keyframing:")
+               colsplitcol.itemR(edit, "use_visual_keying")
+               colsplitcol.itemR(edit, "new_interpolation_type")
+               colsplitcol.itemR(edit, "auto_keying_enable", text="Auto Keyframing")
+               colsub = colsplitcol.column()
+               colsub.enabled = edit.auto_keying_enable
+               row = colsub.row()
+               row.itemR(edit, "auto_keying_mode", expand=True)
+               colsub.itemR(edit, "auto_keyframe_insert_available", text="Only Insert Available")
+               colsub.itemR(edit, "auto_keyframe_insert_needed", text="Only Insert Needed")
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               
+               colsplitcol.itemL(text="Undo:")
+               colsplitcol.itemR(edit, "global_undo")
+               colsplitcol.itemR(edit, "undo_steps", text="Steps")
+               colsplitcol.itemR(edit, "undo_memory_limit", text="Memory Limit")
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               colsplitcol.itemL(text="Duplicate:")
+               colsplitcol.itemR(edit, "duplicate_mesh", text="Mesh")
+               colsplitcol.itemR(edit, "duplicate_surface", text="Surface")
+               colsplitcol.itemR(edit, "duplicate_curve", text="Curve")
+               colsplitcol.itemR(edit, "duplicate_text", text="Text")
+               colsplitcol.itemR(edit, "duplicate_metaball", text="Metaball")
+               colsplitcol.itemR(edit, "duplicate_armature", text="Armature")
+               colsplitcol.itemR(edit, "duplicate_lamp", text="Lamp")
+               colsplitcol.itemR(edit, "duplicate_material", text="Material")
+               colsplitcol.itemR(edit, "duplicate_texture", text="Texture")
+               colsplitcol.itemR(edit, "duplicate_ipo", text="F-Curve")
+               colsplitcol.itemR(edit, "duplicate_action", text="Action")
+               
+class INFO_PT_system(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "System"
+       __no_header__ = True
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'SYSTEM_OPENGL')
+
+       def draw(self, context):
+               layout = self.layout
+               userpref = context.user_preferences
+               system = userpref.system
+               lan = userpref.language
+               
+               split = layout.split()
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               colsplitcol.itemR(system, "emulate_numpad")     
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               #Weight Colors
+               colsplitcol.itemL(text="Weight Colors:")
+               colsplitcol.itemR(system, "use_weight_color_range", text="Use Custom Range")
+               colsplitcol.itemR(system, "weight_color_range")
+               colsplitcol.itemS()
+               colsplitcol.itemS()
+               
+               #sequencer
+               colsplitcol.itemL(text="Sequencer:")
+               colsplitcol.itemR(system, "prefetch_frames")
+               colsplitcol.itemR(system, "memory_cache_limit")
+               
+               col = split.column()    
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               #System
+               colsplitcol.itemL(text="System:")
+               colsplitcol.itemR(lan, "dpi")
+               colsplitcol.itemR(system, "enable_all_codecs")
+               colsplitcol.itemR(system, "auto_run_python_scripts")
+               colsplitcol.itemR(system, "frame_server_port")
+               colsplitcol.itemR(system, "game_sound")
+               colsplitcol.itemR(system, "filter_file_extensions")
+               colsplitcol.itemR(system, "hide_dot_files_datablocks")
+               colsplitcol.itemR(system, "audio_mixing_buffer")
+               
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               #OpenGL
+               colsplitcol.itemL(text="OpenGL:")
+               colsplitcol.itemR(system, "clip_alpha", slider=True)
+               colsplitcol.itemR(system, "use_mipmaps")
+               colsplitcol.itemL(text="Windom Draw Method:")
+               row = colsplitcol.row()
+               row.itemR(system, "window_draw_method", expand=True)
+               colsplitcol.itemL(text="Textures:")
+               colsplitcol.itemR(system, "gl_texture_limit", text="Limit")
+               colsplitcol.itemR(system, "texture_time_out", text="Time Out")
+               colsplitcol.itemR(system, "texture_collection_rate", text="Collection Rate")            
+               
+class INFO_PT_filepaths(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "File Paths"
+       __no_header__ = True
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'FILE_PATHS')
+
+       def draw(self, context):
+               layout = self.layout
+               userpref = context.user_preferences
+               paths = userpref.filepaths
+               
+               split = layout.split()
+               col = split.column()
+               col.itemR(paths, "use_relative_paths")
+               col.itemR(paths, "compress_file")
+               col.itemR(paths, "fonts_directory")
+               col.itemR(paths, "textures_directory")
+               col.itemR(paths, "texture_plugin_directory")
+               col.itemR(paths, "sequence_plugin_directory")
+               col.itemR(paths, "render_output_directory")
+               col.itemR(paths, "python_scripts_directory")
+               col.itemR(paths, "sounds_directory")
+               col.itemR(paths, "temporary_directory")
+
+class INFO_PT_autosave(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "Auto Save"
+       __no_header__ = True
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'AUTO_SAVE')
+
+       def draw(self, context):
+               layout = self.layout
+               userpref = context.user_preferences
+               save = userpref.autosave
+               
+               split = layout.split()
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               colsplitcol.itemR(save, "save_version")
+               colsplitcol.itemR(save, "recent_files")
+               colsplitcol.itemR(save, "save_preview_images")
+               
+               col = split.column()
+               colsplit = col.split(percentage=0.8)
+               colsplitcol = colsplit.column()
+               colsplitcol.itemR(save, "auto_save_temporary_files")
+               colsub = colsplitcol.column()
+               colsub.enabled = save.auto_save_temporary_files
+               colsub.itemR(save, "auto_save_time")
+
+class INFO_PT_language(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = "Language"
+       __no_header__ = True
+
+       def poll(self, context):
+               userpref = context.user_preferences
+               return (userpref.active_section == 'LANGUAGE_COLORS')
+
+       def draw(self, context):
+               layout = self.layout
+               userpref = context.user_preferences
+               lan = userpref.language
+               
+               split = layout.split()
+               col = split.column()
+               
+               col.itemR(lan, "language")
+               col.itemR(lan, "translate_tooltips")
+               col.itemR(lan, "translate_buttons")
+               col.itemR(lan, "translate_toolbox")
+               col.itemR(lan, "use_textured_fonts")
+               
+class INFO_PT_bottombar(bpy.types.Panel):
+       __space_type__ = "USER_PREFERENCES"
+       __label__ = " "
+       __no_header__ = True
+
+       def draw(self, context):
+               layout = self.layout
+               userpref = context.user_preferences
+       
+               split = layout.split(percentage=0.8)
+               split.itemL(text="")
+               split.itemO("wm.save_homefile", text="Save As Default")
+
 
 bpy.types.register(INFO_HT_header)
 bpy.types.register(INFO_MT_file)
@@ -143,4 +488,10 @@ bpy.types.register(INFO_MT_render)
 bpy.types.register(INFO_MT_help)
 bpy.types.register(INFO_PT_tabs)
 bpy.types.register(INFO_PT_view)
+bpy.types.register(INFO_PT_edit)
+bpy.types.register(INFO_PT_system)
+bpy.types.register(INFO_PT_filepaths)
+bpy.types.register(INFO_PT_autosave)
+bpy.types.register(INFO_PT_language)
+bpy.types.register(INFO_PT_bottombar)
 
index f862f6e26675232a3b5f6490d8d434ffedba82f7..b19351bf7792f4b128f13fe621130b2cb5dd677d 100644 (file)
@@ -1,9 +1,9 @@
 import bpy
 
-class LOGIC_PT_physics(bpy.types.Panel):
+class LOGIC_PT_properties(bpy.types.Panel):
        __space_type__ = "LOGIC_EDITOR"
        __region_type__ = "UI"
-       __label__ = "Physics"
+       __label__ = "Properties"
 
        def poll(self, context):
                ob = context.active_object
@@ -12,77 +12,151 @@ class LOGIC_PT_physics(bpy.types.Panel):
        def draw(self, context):
                layout = self.layout
                ob = context.active_object
-               
                game = ob.game
-
-               flow = layout.column_flow()
-               flow.active = True
-               flow.itemR(game, "physics_type")
-               flow.itemR(game, "actor")
-               
-               row = layout.row()
-               row.itemR(game, "ghost")
-               row.itemR(ob, "restrict_render", text="Invisible") # out of place but useful
                
-               flow = layout.column_flow()
-               flow.itemR(game, "mass")
-               flow.itemR(game, "radius")
-               flow.itemR(game, "no_sleeping")
-               flow.itemR(game, "damping")
-               flow.itemR(game, "rotation_damping")
-               flow.itemR(game, "minimum_velocity")
-               flow.itemR(game, "maximum_velocity")
-               
-               row = layout.row()
-               row.itemR(game, "do_fh")
-               row.itemR(game, "rotation_fh")
+               for prop in game.properties:
+                       flow = layout.row()
+                       flow.itemR(prop, "name", text="")
+                       flow.itemR(prop, "type", text="")
+                       flow.itemR(prop, "value", text="") # we dont care about the type. rna will display correctly
+                       flow.itemR(prop, "debug")
+
+"""
+class WORLD_PT_game(WorldButtonsPanel):
+       __space_type__ = "LOGIC_EDITOR"
+       __region_type__ = "UI"
+       __label__ = "Game Settings"
+
+       def draw(self, context):
+               layout = self.layout
+               world = context.world
                
                flow = layout.column_flow()
-               flow.itemR(game, "form_factor")
-               flow.itemR(game, "anisotropic_friction")
+               flow.itemR(world, "physics_engine")
+               flow.itemR(world, "physics_gravity")
                
-               flow = layout.column_flow()
-               flow.active = game.anisotropic_friction
-               flow.itemR(game, "friction_coefficients")
+               flow.itemR(world, "game_fps")
+               flow.itemR(world, "game_logic_step_max")
+               flow.itemR(world, "game_physics_substep")
+               flow.itemR(world, "game_physics_step_max")
                
+               flow.itemR(world, "game_use_occlusion_culling", text="Enable Occlusion Culling")
+               flow.itemR(world, "game_occlusion_culling_resolution")
+"""
+class LOGIC_PT_player(bpy.types.Panel):
+       __space_type__ = "LOGIC_EDITOR"
+       __region_type__ = "UI"
+       __label__ = "Player"
+
+       def draw(self, context):
+               layout = self.layout
+               gs = context.scene.game_data
+               row = layout.row()
+               row.itemR(gs, "fullscreen")
+
                split = layout.split()
-               sub = split.column()
-               sub.itemR(game, "lock_x_axis")
-               sub.itemR(game, "lock_y_axis")
-               sub.itemR(game, "lock_z_axis")
-               sub = split.column()
-               sub.itemR(game, "lock_x_rot_axis")
-               sub.itemR(game, "lock_y_rot_axis")
-               sub.itemR(game, "lock_z_rot_axis")
+               col = split.column()
+               col.itemL(text="Resolution:")
+               colsub = col.column(align=True)
+               colsub.itemR(gs, "resolution_x", slider=False, text="X")
+               colsub.itemR(gs, "resolution_y", slider=False, text="Y")
 
+               col = split.column()
+               col.itemL(text="Quality:")
+               colsub = col.column(align=True)
+               colsub.itemR(gs, "depth", text="Bit Depth", slider=False)
+               colsub.itemR(gs, "frequency", text="FPS", slider=False)
+               
+
+               # framing:
+               col = layout.column()
+               col.itemL(text="Framing:")
+               col.row().itemR(gs, "framing_type", expand=True)
+
+               colsub = col.column()
+               colsub.itemR(gs, "framing_color", text="")
 
-class LOGIC_PT_collision_bounds(bpy.types.Panel):
+class LOGIC_PT_stereo(bpy.types.Panel):
        __space_type__ = "LOGIC_EDITOR"
        __region_type__ = "UI"
-       __label__ = "Collision Bounds"
+       __label__ = "Stereo"
 
-       def poll(self, context):
-               ob = context.active_object
-               return ob and ob.game
-       
-       def draw_header(self, context):
+       def draw(self, context):
                layout = self.layout
-               ob = context.active_object
-               game = ob.game
+               gs = context.scene.game_data
+
+
+               # stereo options:
+               col= layout.column()
+               row = col.row()
+               row.itemR(gs, "stereo", expand=True)
+               stereo_mode = gs.stereo
+
+               # stereo:
+               if stereo_mode == 'STEREO':
 
-               layout.itemR(game, "use_collision_bounds", text="")
-       
+                       row = layout.row()
+                       row.itemR(gs, "stereo_mode")
+
+               # dome:
+               if stereo_mode == 'DOME':
+                       row = layout.row()
+                       row.itemR(gs, "dome_mode", text="Dome Type")
+
+                       split=layout.split()
+                       col=split.column()
+                       col.itemR(gs, "dome_angle", slider=True)
+                       col.itemR(gs, "dome_tesselation", text="Tesselation")
+                       col=split.column()
+                       col.itemR(gs, "dome_tilt")
+                       col.itemR(gs, "dome_buffer_resolution", text="Resolution", slider=True)
+                       col=layout.column()
+                       col.itemR(gs, "dome_text")
+
+
+class LOGIC_PT_physics(bpy.types.Panel):
+       __space_type__ = "LOGIC_EDITOR"
+       __region_type__ = "UI"
+       __label__ = "World Physics"
        def draw(self, context):
                layout = self.layout
-               
-               ob = context.scene.objects[0]
-               game = ob.game
-               
+               gs = context.scene.game_data
                flow = layout.column_flow()
-               flow.active = game.use_collision_bounds
-               flow.itemR(game, "collision_bounds")
-               flow.itemR(game, "collision_compound")
-               flow.itemR(game, "collision_margin")
+               flow.itemR(gs, "physics_engine")
+               if gs.physics_engine != "NONE":
+                       flow.itemR(gs, "physics_gravity", text="Gravity")
+                       split = layout.split()
+                       col = split.column()
+                       col.itemL(text="Physics Steps:")
+                       colsub = col.column(align=True)
+                       colsub.itemR(gs, "physics_step_max", text="Max")
+                       colsub.itemR(gs, "physics_step_sub", text="Substeps")
+                       col.itemR(gs, "fps", text="FPS")
+                       
+                       col = split.column()
+                       col.itemL(text="Logic Steps:")
+                       col.itemR(gs, "logic_step_max", text="Max")
+                       col.itemS()
+                       col.itemR(gs, "use_occlusion_culling", text="Occlusion Culling")
+                       colsub = col.column()
+                       colsub.active = gs.use_occlusion_culling
+                       colsub.itemR(gs, "occlusion_culling_resolution", text="Resolution")
+                       
+
+               else:
+                       split = layout.split()
+                       col = split.column()
+                       col.itemL(text="Physics Steps:")
+                       col.itemR(gs, "fps", text="FPS")
+                       col = split.column()
+                       col.itemL(text="Logic Steps:")
+                       col.itemR(gs, "logic_step_max", text="Max")
 
-bpy.types.register(LOGIC_PT_physics)
-bpy.types.register(LOGIC_PT_collision_bounds)
+bpy.types.register(LOGIC_PT_properties)
+bpy.types.register(LOGIC_PT_player)
+bpy.types.register(LOGIC_PT_stereo)
+bpy.types.register(LOGIC_PT_physics)
\ No newline at end of file
index 5a6ee5ea2aa43d82ced312fb876dde4c0b32084d..545a001349b0cb1678cf77c2773810313662be9d 100644 (file)
@@ -21,18 +21,18 @@ class OUTLINER_HT_header(bpy.types.Header):
                
                if so.display_mode == 'DATABLOCKS':
                        row = layout.row(align=True)
-                       row.itemO("ANIM_OT_keyingset_add_new", text="", icon=31)
+                       row.itemO("anim.keyingset_add_new", text="", icon=31)
                        # row.itemR(sce, "active_keyingset", text="KS: ")
                        # ks = sce.keyingsets[sce.active_keyingset - 1]
                        # row.itemR(ks, "name", text="")
                        ## row.itemR(sce, "keyingsets")
                        
                        row = layout.row()
-                       row.itemO("OUTLINER_OT_keyingset_add_selected", text="", icon=31)
-                       row.itemO("OUTLINER_OT_keyingset_remove_selected", text="", icon=32)
+                       row.itemO("outliner.keyingset_add_selected", text="", icon=31)
+                       row.itemO("outliner.keyingset_remove_selected", text="", icon=32)
                        
-                       row.itemO("ANIM_OT_insert_keyframe", text="", icon=514)
-                       row.itemO("ANIM_OT_delete_keyframe", text="", icon=513)
+                       row.itemO("anim.insert_keyframe", text="", icon=514)
+                       row.itemO("anim.delete_keyframe", text="", icon=513)
                
 
 class OUTLINER_MT_view(bpy.types.Menu):
@@ -45,7 +45,7 @@ class OUTLINER_MT_view(bpy.types.Menu):
 
                col = layout.column()
                col.itemR(so, "show_restriction_columns")
-               #layout.itemO("TEXT_OT_new")
+               #layout.itemO("text.new")
 
 bpy.types.register(OUTLINER_HT_header)
 bpy.types.register(OUTLINER_MT_view)
index 702c2ff20f288934fb6aba2fdb2e866d5140f569..13f90a1af6358828124da98b010ccf7a11c273b6 100644 (file)
@@ -31,7 +31,7 @@ class SEQUENCER_HT_header(bpy.types.Header):
                                row.itemM("SEQUENCER_MT_add")
                                row.itemM("SEQUENCER_MT_strip")
                                layout.itemS()
-                               row.itemO("SEQUENCER_OT_reload")
+                               row.itemO("sequencer.reload")
                        else:
                                row.itemR(st, "display_channel") # text="Chan"
 
@@ -74,8 +74,8 @@ class SEQUENCER_MT_view(bpy.types.Menu):
 
                """
                layout.itemS()
-               layout.itemO("SEQUENCER_OT_view_all")
-               layout.itemO("SEQUENCER_OT_view_selected")
+               layout.itemO("sequencer.view_all")
+               layout.itemO("sequencer.view_selected")
                layout.itemS()
                """
        
@@ -110,16 +110,16 @@ class SEQUENCER_MT_select(bpy.types.Menu):
                st = context.space_data
                
                layout.column()
-               layout.item_enumO("SEQUENCER_OT_select_active_side", "side", 'LEFT', text="Strips to the Left")
-               layout.item_enumO("SEQUENCER_OT_select_active_side", "side", 'RIGHT', text="Strips to the Right")
+               layout.item_enumO("sequencer.select_active_side", "side", 'LEFT', text="Strips to the Left")
+               layout.item_enumO("sequencer.select_active_side", "side", 'RIGHT', text="Strips to the Right")
                layout.itemS()
-               layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'BOTH', text="Surrounding Handles")
-               layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'LEFT', text="Left Handle")
-               layout.item_enumO("SEQUENCER_OT_select_handles", "side", 'RIGHT', text="Right Handle")
+               layout.item_enumO("sequencer.select_handles", "side", 'BOTH', text="Surrounding Handles")
+               layout.item_enumO("sequencer.select_handles", "side", 'LEFT', text="Left Handle")
+               layout.item_enumO("sequencer.select_handles", "side", 'RIGHT', text="Right Handle")
                layout.itemS()
-               layout.itemO("SEQUENCER_OT_select_linked")
-               layout.itemO("SEQUENCER_OT_select_all_toggle")
-               layout.itemO("SEQUENCER_OT_select_inverse")
+               layout.itemO("sequencer.select_linked")
+               layout.itemO("sequencer.select_all_toggle")
+               layout.itemO("sequencer.select_inverse")
 
 class SEQUENCER_MT_marker(bpy.types.Menu):
        __space_type__ = "SEQUENCE_EDITOR"
@@ -130,14 +130,14 @@ class SEQUENCER_MT_marker(bpy.types.Menu):
                st = context.space_data
                
                layout.column()
-               layout.itemO("SEQUENCER_OT_sound_strip_add", text="Add Marker|Ctrl Alt M")
-               layout.itemO("SEQUENCER_OT_sound_strip_add", text="Duplicate Marker|Ctrl Shift D")
-               layout.itemO("SEQUENCER_OT_sound_strip_add", text="Delete Marker|Shift X")
+               layout.itemO("sequencer.sound_strip_add", text="Add Marker|Ctrl Alt M")
+               layout.itemO("sequencer.sound_strip_add", text="Duplicate Marker|Ctrl Shift D")
+               layout.itemO("sequencer.sound_strip_add", text="Delete Marker|Shift X")
                layout.itemS()
-               layout.itemO("SEQUENCER_OT_sound_strip_add", text="(Re)Name Marker|Ctrl M")
-               layout.itemO("SEQUENCER_OT_sound_strip_add", text="Grab/Move Marker|Ctrl G")
+               layout.itemO("sequencer.sound_strip_add", text="(Re)Name Marker|Ctrl M")
+               layout.itemO("sequencer.sound_strip_add", text="Grab/Move Marker|Ctrl G")
                layout.itemS()
-               layout.itemO("SEQUENCER_OT_sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
+               layout.itemO("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS)
 
 class SEQUENCER_MT_add(bpy.types.Menu):
        __space_type__ = "SEQUENCE_EDITOR"
@@ -148,12 +148,12 @@ class SEQUENCER_MT_add(bpy.types.Menu):
                st = context.space_data
                
                layout.column()
-               layout.itemO("SEQUENCER_OT_scene_strip_add", text="Scene")
-               layout.itemO("SEQUENCER_OT_movie_strip_add", text="Movie")
-               layout.item_booleanO("SEQUENCER_OT_movie_strip_add", "sound", True, text="Movie & Sound") # FFMPEG ONLY
-               layout.itemO("SEQUENCER_OT_image_strip_add", text="Image")
-               layout.itemO("SEQUENCER_OT_sound_strip_add", text="Sound (Ram)")
-               layout.item_booleanO("SEQUENCER_OT_sound_strip_add", "hd", True, text="Sound (Streaming)") # FFMPEG ONLY
+               layout.itemO("sequencer.scene_strip_add", text="Scene")
+               layout.itemO("sequencer.movie_strip_add", text="Movie")
+               layout.item_booleanO("sequencer.movie_strip_add", "sound", True, text="Movie & Sound") # FFMPEG ONLY
+               layout.itemO("sequencer.image_strip_add", text="Image")
+               layout.itemO("sequencer.sound_strip_add", text="Sound (Ram)")
+               layout.item_booleanO("sequencer.sound_strip_add", "hd", True, text="Sound (Streaming)") # FFMPEG ONLY
                
                layout.itemM("SEQUENCER_MT_add_effect")
 
@@ -167,19 +167,19 @@ class SEQUENCER_MT_add_effect(bpy.types.Menu):
                st = context.space_data
                
                self.layout.column()
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ADD')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'SUBTRACT')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ALPHA_OVER')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'ALPHA_UNDER')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'GAMMA_CROSS')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'MULTIPLY')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'OVER_DROP')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'PLUGIN')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'WIPE')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'GLOW')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'TRANSFORM')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'COLOR')
-               self.layout.item_enumO("SEQUENCER_OT_effect_strip_add", 'type', 'SPEED')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'ADD')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'SUBTRACT')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'ALPHA_OVER')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'ALPHA_UNDER')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'GAMMA_CROSS')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'MULTIPLY')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'OVER_DROP')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'PLUGIN')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'WIPE')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'GLOW')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'TRANSFORM')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'COLOR')
+               self.layout.item_enumO("sequencer.effect_strip_add", 'type', 'SPEED')
 
 class SEQUENCER_MT_strip(bpy.types.Menu):
        __space_type__ = "SEQUENCE_EDITOR"
@@ -192,18 +192,18 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
                layout.operator_context = 'INVOKE_REGION_WIN'
                
                layout.column()
-               layout.item_enumO("TFM_OT_transform", "mode", 'TRANSLATION', text="Grab/Move")
-               layout.item_enumO("TFM_OT_transform", "mode", 'TIME_EXTEND', text="Grab/Extend from frame")
-               #  uiItemO(layout, NULL, 0, "SEQUENCER_OT_strip_snap"); // TODO - add this operator
+               layout.item_enumO("tfm.transform", "mode", 'TRANSLATION', text="Grab/Move")
+               layout.item_enumO("tfm.transform", "mode", 'TIME_EXTEND', text="Grab/Extend from frame")
+               #  uiItemO(layout, NULL, 0, "sequencer.strip_snap"); // TODO - add this operator
                layout.itemS()
                
-               layout.item_enumO("SEQUENCER_OT_cut", "type", 'HARD', text="Cut (hard) at frame")
-               layout.item_enumO("SEQUENCER_OT_cut", "type", 'SOFT', text="Cut (soft) at frame")
-               layout.itemO("SEQUENCER_OT_images_separate")
+               layout.item_enumO("sequencer.cut", "type", 'HARD', text="Cut (hard) at frame")
+               layout.item_enumO("sequencer.cut", "type", 'SOFT', text="Cut (soft) at frame")
+               layout.itemO("sequencer.images_separate")
                layout.itemS()
                
-               layout.itemO("SEQUENCER_OT_duplicate")
-               layout.itemO("SEQUENCER_OT_delete")
+               layout.itemO("sequencer.duplicate")
+               layout.itemO("sequencer.delete")
                
                strip = act_strip(context)
                
@@ -212,39 +212,39 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
                        
                        if      stype=='EFFECT':
                                layout.itemS()
-                               layout.itemO("SEQUENCER_OT_effect_change")
-                               layout.itemO("SEQUENCER_OT_effect_reassign_inputs")
+                               layout.itemO("sequencer.effect_change")
+                               layout.itemO("sequencer.effect_reassign_inputs")
                        elif stype=='IMAGE':
                                layout.itemS()
-                               layout.itemO("SEQUENCER_OT_image_change")
+                               layout.itemO("sequencer.image_change")
                        elif stype=='SCENE':
                                layout.itemS()
-                               layout.itemO("SEQUENCER_OT_scene_change", text="Change Scene")
+                               layout.itemO("sequencer.scene_change", text="Change Scene")
                        elif stype=='MOVIE':
                                layout.itemS()
-                               layout.itemO("SEQUENCER_OT_movie_change")
+                               layout.itemO("sequencer.movie_change")
                        
                layout.itemS()
                
-               layout.itemO("SEQUENCER_OT_meta_make")
-               layout.itemO("SEQUENCER_OT_meta_separate")
+               layout.itemO("sequencer.meta_make")
+               layout.itemO("sequencer.meta_separate")
                
                #if (ed && (ed->metastack.first || (ed->act_seq && ed->act_seq->type == SEQ_META))) {
                #       uiItemS(layout);
-               #       uiItemO(layout, NULL, 0, "SEQUENCER_OT_meta_toggle");
+               #       uiItemO(layout, NULL, 0, "sequencer.meta_toggle");
                #}
                
                layout.itemS()
-               layout.itemO("SEQUENCER_OT_reload")
+               layout.itemO("sequencer.reload")
                layout.itemS()
-               layout.itemO("SEQUENCER_OT_lock")
-               layout.itemO("SEQUENCER_OT_unlock")
-               layout.itemO("SEQUENCER_OT_mute")
-               layout.itemO("SEQUENCER_OT_unmute")
+               layout.itemO("sequencer.lock")
+               layout.itemO("sequencer.unlock")
+               layout.itemO("sequencer.mute")
+               layout.itemO("sequencer.unmute")
                
-               layout.item_booleanO("SEQUENCER_OT_mute", "unselected", 1, text="Mute Deselected Strips")
+               layout.item_booleanO("sequencer.mute", "unselected", 1, text="Mute Deselected Strips")
 
-               layout.itemO("SEQUENCER_OT_snap")
+               layout.itemO("sequencer.snap")
 
 # Panels
 class SequencerButtonsPanel(bpy.types.Panel):
index 07e43f32054241de61e7f44c53858bb874da02a4..51f7f6447aedfd5ed1a02456ef22eea306e63e29 100644 (file)
@@ -22,14 +22,14 @@ class TEXT_HT_header(bpy.types.Header):
                if text and text.modified:
                        row = layout.row()
                        # row.color(redalert)
-                       row.itemO("TEXT_OT_resolve_conflict", text="", icon='ICON_HELP')
+                       row.itemO("text.resolve_conflict", text="", icon='ICON_HELP')
 
                row = layout.row(align=True)
                row.itemR(st, "line_numbers", text="")
                row.itemR(st, "word_wrap", text="")
                row.itemR(st, "syntax_highlight", text="")
 
-               layout.template_ID(st, "text", new="TEXT_OT_new", unlink="TEXT_OT_unlink")
+               layout.template_ID(st, "text", new="text.new", unlink="text.unlink")
 
                if text:
                        row = layout.row()
@@ -76,18 +76,18 @@ class TEXT_PT_find(bpy.types.Panel):
                col = layout.column(align=True)
                row = col.row()
                row.itemR(st, "find_text", text="")
-               row.itemO("TEXT_OT_find_set_selected", text="", icon='ICON_TEXT')
-               col.itemO("TEXT_OT_find")
+               row.itemO("text.find_set_selected", text="", icon='ICON_TEXT')
+               col.itemO("text.find")
 
                # replace
                col = layout.column(align=True)
                row = col.row()
                row.itemR(st, "replace_text", text="")
-               row.itemO("TEXT_OT_replace_set_selected", text="", icon='ICON_TEXT')
-               col.itemO("TEXT_OT_replace")
+               row.itemO("text.replace_set_selected", text="", icon='ICON_TEXT')
+               col.itemO("text.replace")
 
                # mark
-               layout.itemO("TEXT_OT_mark_all")
+               layout.itemO("text.mark_all")
 
                # settings
                row = layout.row()
@@ -104,25 +104,25 @@ class TEXT_MT_text(bpy.types.Menu):
                text = st.text
 
                layout.column()
-               layout.itemO("TEXT_OT_new")
-               layout.itemO("TEXT_OT_open")
+               layout.itemO("text.new")
+               layout.itemO("text.open")
 
                if text:
-                       layout.itemO("TEXT_OT_reload")
+                       layout.itemO("text.reload")
 
                        layout.column()
-                       layout.itemO("TEXT_OT_save")
-                       layout.itemO("TEXT_OT_save_as")
+                       layout.itemO("text.save")
+                       layout.itemO("text.save_as")
 
                        if text.filename != "":
-                               layout.itemO("TEXT_OT_make_internal")
+                               layout.itemO("text.make_internal")
 
                        layout.column()
-                       layout.itemO("TEXT_OT_run_script")
+                       layout.itemO("text.run_script")
 
                        #ifndef DISABLE_PYTHON
                        # XXX if(BPY_is_pyconstraint(text))
-                       # XXX   uiMenuItemO(head, 0, "TEXT_OT_refresh_pyconstraints");
+                       # XXX   uiMenuItemO(head, 0, "text.refresh_pyconstraints");
                        #endif
                
                #ifndef DISABLE_PYTHON
@@ -138,8 +138,8 @@ class TEXT_MT_edit_view(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.item_enumO("TEXT_OT_move", "type", "FILE_TOP", text="Top of File")
-               layout.item_enumO("TEXT_OT_move", "type", "FILE_BOTTOM", text="Bottom of File")
+               layout.item_enumO("text.move", "type", "FILE_TOP", text="Top of File")
+               layout.item_enumO("text.move", "type", "FILE_BOTTOM", text="Bottom of File")
 
 class TEXT_MT_edit_select(bpy.types.Menu):
        __space_type__ = "TEXT_EDITOR"
@@ -148,8 +148,8 @@ class TEXT_MT_edit_select(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("TEXT_OT_select_all")
-               layout.itemO("TEXT_OT_select_line")
+               layout.itemO("text.select_all")
+               layout.itemO("text.select_line")
 
 class TEXT_MT_edit_markers(bpy.types.Menu):
        __space_type__ = "TEXT_EDITOR"
@@ -158,9 +158,9 @@ class TEXT_MT_edit_markers(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("TEXT_OT_markers_clear")
-               layout.itemO("TEXT_OT_next_marker")
-               layout.itemO("TEXT_OT_previous_marker")
+               layout.itemO("text.markers_clear")
+               layout.itemO("text.next_marker")
+               layout.itemO("text.previous_marker")
 
 class TEXT_MT_format(bpy.types.Menu):
        __space_type__ = "TEXT_EDITOR"
@@ -169,17 +169,17 @@ class TEXT_MT_format(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("TEXT_OT_indent")
-               layout.itemO("TEXT_OT_unindent")
+               layout.itemO("text.indent")
+               layout.itemO("text.unindent")
 
                layout.itemS()
 
-               layout.itemO("TEXT_OT_comment")
-               layout.itemO("TEXT_OT_uncomment")
+               layout.itemO("text.comment")
+               layout.itemO("text.uncomment")
 
                layout.itemS()
 
-               layout.item_menu_enumO("TEXT_OT_convert_whitespace", "type")
+               layout.item_menu_enumO("text.convert_whitespace", "type")
 
 class TEXT_MT_edit_to3d(bpy.types.Menu):
        __space_type__ = "TEXT_EDITOR"
@@ -188,8 +188,8 @@ class TEXT_MT_edit_to3d(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.item_booleanO("TEXT_OT_to_3d_object", "split_lines", False, text="One Object");
-               layout.item_booleanO("TEXT_OT_to_3d_object", "split_lines", True, text="One Object Per Line");
+               layout.item_booleanO("text.to_3d_object", "split_lines", False, text="One Object");
+               layout.item_booleanO("text.to_3d_object", "split_lines", True, text="One Object Per Line");
 
 class TEXT_MT_edit(bpy.types.Menu):
        __space_type__ = "TEXT_EDITOR"
@@ -202,14 +202,14 @@ class TEXT_MT_edit(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("ED_OT_undo")
-               layout.itemO("ED_OT_redo")
+               layout.itemO("ed.undo")
+               layout.itemO("ed.redo")
 
                layout.itemS()
 
-               layout.itemO("TEXT_OT_cut")
-               layout.itemO("TEXT_OT_copy")
-               layout.itemO("TEXT_OT_paste")
+               layout.itemO("text.cut")
+               layout.itemO("text.copy")
+               layout.itemO("text.paste")
 
                layout.itemS()
 
@@ -219,8 +219,8 @@ class TEXT_MT_edit(bpy.types.Menu):
 
                layout.itemS()
 
-               layout.itemO("TEXT_OT_jump")
-               layout.itemO("TEXT_OT_properties")
+               layout.itemO("text.jump")
+               layout.itemO("text.properties")
 
                layout.itemS()
 
index 77a25c0161e92c87417109dfac10d8de7c3e5a61..39d8b86613fc122c70acafe638e7a2c908c11792 100644 (file)
@@ -8,19 +8,19 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               # layout.itemO("VIEW3D_OT_view_fly_mode")
+               # layout.itemO("view3d.view_fly_mode")
                # layout.itemS()
                
-               layout.items_enumO("VIEW3D_OT_view_orbit", "type")
+               layout.items_enumO("view3d.view_orbit", "type")
                
                layout.itemS()
                
-               layout.items_enumO("VIEW3D_OT_view_pan", "type")
+               layout.items_enumO("view3d.view_pan", "type")
                
                layout.itemS()
                
-               layout.item_floatO("VIEW3D_OT_zoom", "delta", 1.0, text="Zoom In")
-               layout.item_floatO("VIEW3D_OT_zoom", "delta", -1.0, text="Zoom Out")
+               layout.item_floatO("view3d.zoom", "delta", 1.0, text="Zoom In")
+               layout.item_floatO("view3d.zoom", "delta", -1.0, text="Zoom Out")
 
 class VIEW3D_MT_view(bpy.types.Menu):
        __space_type__ = "VIEW_3D"
@@ -29,30 +29,30 @@ class VIEW3D_MT_view(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("VIEW3D_OT_properties", icon="ICON_MENU_PANEL")
-               layout.itemO("VIEW3D_OT_toolbar", icon="ICON_MENU_PANEL")
+               layout.itemO("view3d.properties", icon="ICON_MENU_PANEL")
+               layout.itemO("view3d.toolbar", icon="ICON_MENU_PANEL")
                
                layout.itemS()
                
-               layout.item_enumO("VIEW3D_OT_viewnumpad", "type", "CAMERA")
-               layout.item_enumO("VIEW3D_OT_viewnumpad", "type", "TOP")
-               layout.item_enumO("VIEW3D_OT_viewnumpad", "type", "FRONT")
-               layout.item_enumO("VIEW3D_OT_viewnumpad", "type", "RIGHT")
+               layout.item_enumO("view3d.viewnumpad", "type", "CAMERA")
+               layout.item_enumO("view3d.viewnumpad", "type", "TOP")
+               layout.item_enumO("view3d.viewnumpad", "type", "FRONT")
+               layout.item_enumO("view3d.viewnumpad", "type", "RIGHT")
                
                # layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
                
                layout.itemS()
 
-               layout.itemO("VIEW3D_OT_view_persportho")
+               layout.itemO("view3d.view_persportho")
                
                layout.itemS()
                
-               # layout.itemO("VIEW3D_OT_view_show_all_layers")
+               # layout.itemO("view3d.view_show_all_layers")
                
                # layout.itemS()
                
-               # layout.itemO("VIEW3D_OT_view_local_view")
-               # layout.itemO("VIEW3D_OT_view_global_view")
+               # layout.itemO("view3d.view_local_view")
+               # layout.itemO("view3d.view_global_view")
                
                # layout.itemS()
                
@@ -63,17 +63,17 @@ class VIEW3D_MT_view(bpy.types.Menu):
 
                layout.operator_context = "INVOKE_REGION_WIN"
 
-               layout.itemO("VIEW3D_OT_clip_border")
-               layout.itemO("VIEW3D_OT_zoom_border")
+               layout.itemO("view3d.clip_border")
+               layout.itemO("view3d.zoom_border")
                
                layout.itemS()
                
-               layout.itemO("VIEW3D_OT_view_center")
-               layout.itemO("VIEW3D_OT_view_all")
+               layout.itemO("view3d.view_center")
+               layout.itemO("view3d.view_all")
                
                layout.itemS()
                
-               layout.itemO("SCREEN_OT_screen_full_area")
+               layout.itemO("screen.screen_full_area")
 
 class VIEW3D_HT_header(bpy.types.Header):
        __space_type__ = "VIEW_3D"
@@ -170,7 +170,6 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
                col.itemR(bg, "x_offset", text="X")
                col.itemR(bg, "y_offset", text="Y")
 
-
 bpy.types.register(VIEW3D_MT_view_navigation)
 bpy.types.register(VIEW3D_MT_view)
 bpy.types.register(VIEW3D_HT_header)
index 990ba1eb6b61e6d583078d8984b2e9675d62af0c..cab22af44e3e7192edd5baa052142262db0d65e9 100644 (file)
@@ -15,12 +15,12 @@ class VIEW3D_PT_tools_objectmode(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("OBJECT_OT_duplicate")
-               layout.row().itemO("OBJECT_OT_delete")
-               layout.row().itemO("OBJECT_OT_mesh_add")
-               layout.row().itemO("OBJECT_OT_curve_add")
-               layout.row().itemO("OBJECT_OT_text_add")
-               layout.row().itemO("OBJECT_OT_surface_add")
+               layout.row().itemO("object.duplicate")
+               layout.row().itemO("object.delete")
+               layout.row().itemO("object.mesh_add")
+               layout.row().itemO("object.curve_add")
+               layout.row().itemO("object.text_add")
+               layout.row().itemO("object.surface_add")
 
 # ********** default tools for editmode_mesh ****************
 
@@ -36,14 +36,16 @@ class VIEW3D_PT_tools_editmode_mesh(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("MESH_OT_duplicate")
-               layout.row().itemO("MESH_OT_delete")
-               layout.row().itemO("MESH_OT_spin")
-               layout.row().itemO("MESH_OT_screw")
-               layout.row().itemO("MESH_OT_primitive_plane_add")
-               layout.row().itemO("MESH_OT_primitive_cube_add")
-               layout.row().itemO("MESH_OT_primitive_circle_add")
-               layout.row().itemO("MESH_OT_primitive_cylinder_add")
+               layout.row().itemO("mesh.duplicate")
+               layout.row().itemO("mesh.delete")
+               layout.row().itemO("mesh.spin")
+               layout.row().itemO("mesh.screw")
+               layout.row().itemO("mesh.primitive_plane_add")
+               layout.row().itemO("mesh.primitive_cube_add")
+               layout.row().itemO("mesh.primitive_circle_add")
+               layout.row().itemO("mesh.primitive_cylinder_add")
+               layout.row().itemO("mesh.faces_shade_smooth")
+               layout.row().itemO("mesh.faces_shade_flat")
 
 # ********** default tools for editmode_curve ****************
 
@@ -59,10 +61,10 @@ class VIEW3D_PT_tools_editmode_curve(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("CURVE_OT_duplicate")
-               layout.row().itemO("CURVE_OT_delete")
-               layout.row().itemO("OBJECT_OT_curve_add")
-               layout.row().itemO("CURVE_OT_subdivide")
+               layout.row().itemO("curve.duplicate")
+               layout.row().itemO("curve.delete")
+               layout.row().itemO("object.curve_add")
+               layout.row().itemO("curve.subdivide")
 
 # ********** default tools for editmode_surface ****************
 
@@ -78,10 +80,10 @@ class VIEW3D_PT_tools_editmode_surface(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("CURVE_OT_duplicate")
-               layout.row().itemO("CURVE_OT_delete")
-               layout.row().itemO("OBJECT_OT_surface_add")
-               layout.row().itemO("CURVE_OT_subdivide")
+               layout.row().itemO("curve.duplicate")
+               layout.row().itemO("curve.delete")
+               layout.row().itemO("object.surface_add")
+               layout.row().itemO("curve.subdivide")
 
 # ********** default tools for editmode_text ****************
 
@@ -97,10 +99,10 @@ class VIEW3D_PT_tools_editmode_text(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("FONT_OT_text_copy")
-               layout.row().itemO("FONT_OT_text_paste")
-               layout.row().itemO("FONT_OT_case_set")
-               layout.row().itemO("FONT_OT_style_toggle")
+               layout.row().itemO("font.text_copy")
+               layout.row().itemO("font.text_paste")
+               layout.row().itemO("font.case_set")
+               layout.row().itemO("font.style_toggle")
 
 # ********** default tools for editmode_armature ****************
 
@@ -116,10 +118,10 @@ class VIEW3D_PT_tools_editmode_armature(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("ARMATURE_OT_duplicate_selected")
-               layout.row().itemO("ARMATURE_OT_bone_primitive_add")
-               layout.row().itemO("ARMATURE_OT_delete")
-               layout.row().itemO("ARMATURE_OT_parent_clear")
+               layout.row().itemO("armature.duplicate_selected")
+               layout.row().itemO("armature.bone_primitive_add")
+               layout.row().itemO("armature.delete")
+               layout.row().itemO("armature.parent_clear")
 
 # ********** default tools for editmode_mball ****************
 
@@ -167,10 +169,10 @@ class VIEW3D_PT_tools_posemode(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("POSE_OT_hide")
-               layout.row().itemO("POSE_OT_reveal")
-               layout.row().itemO("POSE_OT_rot_clear")
-               layout.row().itemO("POSE_OT_loc_clear")
+               layout.row().itemO("pose.hide")
+               layout.row().itemO("pose.reveal")
+               layout.row().itemO("pose.rot_clear")
+               layout.row().itemO("pose.loc_clear")
 
 # ********** default tools for sculptmode ****************
 
@@ -179,14 +181,94 @@ class View3DPanel(bpy.types.Panel):
        __region_type__ = "TOOLS"
        __context__ = "sculptmode"
 
-class VIEW3D_PT_tools_sculptmode(View3DPanel):
-       __idname__ = "VIEW3D_PT_tools_sculptmode"
-       __label__ = "Sculpt Tools"
+#class VIEW3D_PT_tools_sculptmode(View3DPanel):
+#      __idname__ = "VIEW3D_PT_tools_sculptmode"
+#      __label__ = "Sculpt Tools"
+#
+#      def draw(self, context):
+#              layout = self.layout
+#
+#              layout.row().itemO("sculpt.radial_control")
+
+class VIEW3D_PT_tools_brush(bpy.types.Panel):
+       __space_type__ = "VIEW_3D"
+       __region_type__ = "TOOLS"
+       __label__ = "Brush"
+
+       def brush_src(self, context):
+               ts = context.tool_settings
+               if context.sculpt_object:
+                       return ts.sculpt
+               elif context.vpaint_object:
+                       return ts.vpaint
+               elif context.wpaint_object:
+                       return ts.wpaint
+               return False
+
+       def poll(self, context):
+               return self.brush_src(context)
 
        def draw(self, context):
+               src = self.brush_src(context)
+               brush = src.brush
                layout = self.layout
 
-               layout.row().itemO("SCULPT_OT_radial_control")
+               layout.split().row().template_ID(src, "brush")
+
+               if context.sculpt_object:
+                       layout.column().itemR(brush, "sculpt_tool", expand=True)
+
+               split = layout.split()
+               col = split.column()
+               col.itemR(brush, "size", slider=True)
+               if context.wpaint_object:
+                       col.itemR(context.tool_settings, "vertex_group_weight", text="Weight", slider=True)
+               col.itemR(brush, "strength", slider=True)
+
+
+
+               split = layout.split()
+               col = split.column()
+               col.itemR(brush, "airbrush")
+               col.itemR(brush, "anchored")
+               col.itemR(brush, "rake")
+               col.itemR(brush, "space", text="Spacing")
+               colsub = col.column()
+               colsub.active = brush.space
+               colsub.itemR(brush, "spacing", text="")
+
+               split = layout.split()
+               split.template_curve_mapping(brush.curve)
+               
+class VIEW3D_PT_sculptoptions(bpy.types.Panel):
+       __space_type__ = "VIEW_3D"
+       __region_type__ = "TOOLS"
+       __label__ = "Options"
+
+       def poll(self, context):
+               return context.sculpt_object
+
+       def draw(self, context):
+               sculpt = context.tool_settings.sculpt
+
+               split = self.layout.split()
+               
+               col = split.column()
+               col.itemL(text="Symmetry:")
+               row = col.row(align=True)
+               row.itemR(sculpt, "symmetry_x", text="X", toggle=True)
+               row.itemR(sculpt, "symmetry_y", text="Y", toggle=True)
+               row.itemR(sculpt, "symmetry_z", text="Z", toggle=True)
+
+               split = self.layout.split()
+               
+               col = split.column()
+               col.itemL(text="Lock Axis:")
+               row = col.row(align=True)
+               row.itemR(sculpt, "lock_x", text="X", toggle=True)
+               row.itemR(sculpt, "lock_y", text="Y", toggle=True)
+               row.itemR(sculpt, "lock_z", text="Z", toggle=True)
+
 
 # ********** default tools for weightpaint ****************
 
@@ -202,7 +284,7 @@ class VIEW3D_PT_tools_weightpaint(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("PAINT_OT_weight_paint_radial_control")
+               layout.row().itemO("paint.weight_paint_radial_control")
 
 # ********** default tools for vertexpaint ****************
 
@@ -218,7 +300,7 @@ class VIEW3D_PT_tools_vertexpaint(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("PAINT_OT_vertex_paint_radial_control")
+               layout.row().itemO("paint.vertex_paint_radial_control")
 
 # ********** default tools for texturepaint ****************
 
@@ -234,7 +316,7 @@ class VIEW3D_PT_tools_texturepaint(View3DPanel):
        def draw(self, context):
                layout = self.layout
 
-               layout.row().itemO("PAINT_OT_texture_paint_radial_control")
+               layout.row().itemO("paint.texture_paint_radial_control")
 
 
 bpy.types.register(VIEW3D_PT_tools_objectmode)
@@ -246,7 +328,8 @@ bpy.types.register(VIEW3D_PT_tools_editmode_armature)
 bpy.types.register(VIEW3D_PT_tools_editmode_mball)
 bpy.types.register(VIEW3D_PT_tools_editmode_lattice)
 bpy.types.register(VIEW3D_PT_tools_posemode)
-bpy.types.register(VIEW3D_PT_tools_sculptmode)
+bpy.types.register(VIEW3D_PT_tools_brush)
+bpy.types.register(VIEW3D_PT_sculptoptions)
 bpy.types.register(VIEW3D_PT_tools_weightpaint)
 bpy.types.register(VIEW3D_PT_tools_vertexpaint)
 bpy.types.register(VIEW3D_PT_tools_texturepaint)
index 0c9bba5e413c1c810a79599f18f16ce88b801421..d35acb5447aae7e82c35fca7a1a2513a70336216 100644 (file)
@@ -1,6 +1,6 @@
 /*  BKE_action.h   May 2001
  *  
- *  Blender kernel action functionality
+ *  Blender kernel action and pose functionality
  *
  *     Reevan McKay
  *
@@ -26,7 +26,7 @@
  * All rights reserved.
  *
  * Contributor(s): Full recode, Ton Roosendaal, Crete 2005
- *                             Full recode, Joshua Leung, 2009
+ *                              Full recode, Joshua Leung, 2009
  *
  * ***** END GPL LICENSE BLOCK *****
  */
@@ -103,8 +103,7 @@ void free_pose(struct bPose *pose);
  * Allocate a new pose on the heap, and copy the src pose and it's channels
  * into the new pose. *dst is set to the newly allocated structure, and assumed to be NULL.
  */ 
-void copy_pose(struct bPose **dst, struct bPose *src,
-                          int copyconstraints);
+void copy_pose(struct bPose **dst, struct bPose *src, int copyconstraints);
 
 
 
@@ -112,9 +111,8 @@ void copy_pose(struct bPose **dst, struct bPose *src,
  * Return a pointer to the pose channel of the given name
  * from this pose.
  */
-struct  bPoseChannel *get_pose_channel(const struct bPose *pose,
-                                                                          const char *name);
-                                                                          
+struct bPoseChannel *get_pose_channel(const struct bPose *pose, const char *name);
+
 /**
  * Return a pointer to the active pose channel from this Object.
  * (Note: Object, not bPose is used here, as we need layer info from Armature)
@@ -126,8 +124,9 @@ struct bPoseChannel *get_active_posechannel(struct Object *ob);
  * already exists in this pose - if not a new one is
  * allocated and initialized.
  */
-struct bPoseChannel *verify_pose_channel(struct bPose* pose, 
-                                                                                const char* name);
+struct bPoseChannel *verify_pose_channel(struct bPose* pose, const char* name);
+
+
 
 /* sets constraint flags */
 void update_pose_constraint_flags(struct bPose *pose);
@@ -136,18 +135,30 @@ void update_pose_constraint_flags(struct bPose *pose);
 // XXX to be depreceated for a more general solution in animsys...
 void framechange_poses_clear_unkeyed(void);
 
+/* Bone Groups API --------------------- */    
+
+/* Adds a new bone-group */
+void pose_add_group(struct Object *ob);
+
+/* Remove the active bone-group */
+void pose_remove_group(struct Object *ob);
+
+/* Assorted Evaluation ----------------- */    
+
 /* Used for the Action Constraint */
 void what_does_obaction(struct Scene *scene, struct Object *ob, struct Object *workob, struct bPose *pose, struct bAction *act, char groupname[], float cframe);
 
-/* exported for game engine */
-void game_blend_poses(struct bPose *dst, struct bPose *src, float srcweight/*, short mode*/); /* was blend_poses */
-void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
-
 /* for proxy */
 void copy_pose_result(struct bPose *to, struct bPose *from);
 /* clear all transforms */
 void rest_pose(struct bPose *pose);
 
+/* Game Engine ------------------------- */
+
+/* exported for game engine */
+void game_blend_poses(struct bPose *dst, struct bPose *src, float srcweight/*, short mode*/); /* was blend_poses */
+void extract_pose_from_pose(struct bPose *pose, const struct bPose *src);
+
 /* functions used by the game engine */
 void game_copy_pose(struct bPose **dst, struct bPose *src);
 void game_free_pose(struct bPose *pose);
index b45917e6ca1dee92fb4ae78e747271702af6fcba..2447d1823af265e96744b26e06fe95d1b41c3957 100644 (file)
@@ -1,5 +1,28 @@
-/* Testing code for new animation system in 2.5 
- * Copyright 2009, Joshua Leung
+/**
+ * $Id$
+ *
+ * ***** 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 Blender Foundation, Joshua Leung
+ * All rights reserved.
+ *
+ * Contributor(s): Joshua Leung (original author)
+ *
+ * ***** END GPL LICENSE BLOCK *****
  */
 
 #ifndef BKE_ANIM_SYS_H
diff --git a/source/blender/blenkernel/BKE_boids.h b/source/blender/blenkernel/BKE_boids.h
new file mode 100644 (file)
index 0000000..acceff8
--- /dev/null
@@ -0,0 +1,62 @@
+/* BKE_particle.h
+ *
+ *
+ * $Id$
+ *
+ * ***** 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 by Janne Karhu.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef BKE_BOIDS_H
+#define BKE_BOIDS_H
+
+#include "DNA_boid_types.h"
+
+typedef struct BoidBrainData {
+       Scene *scene;
+       struct Object *ob;
+       struct ParticleSystem *psys;
+       struct ParticleSettings *part;
+       float timestep, cfra, dfra;
+       float wanted_co[3], wanted_speed;
+
+       /* Goal stuff */
+       struct Object *goal_ob;
+       float goal_co[3];
+       float goal_nor[3];
+       float goal_priority;
+} BoidBrainData;
+
+void boids_precalc_rules(struct ParticleSettings *part, float cfra);
+void boid_brain(BoidBrainData *bbd, int p, struct ParticleData *pa);
+void boid_body(BoidBrainData *bbd, struct ParticleData *pa);
+void boid_default_settings(BoidSettings *boids);
+BoidRule *boid_new_rule(int type);
+BoidState *boid_new_state(BoidSettings *boids);
+BoidState *boid_duplicate_state(BoidSettings *boids, BoidState *state);
+void boid_free_settings(BoidSettings *boids);
+BoidSettings *boid_copy_settings(BoidSettings *boids);
+BoidState *boid_get_current_state(BoidSettings *boids);
+#endif
index 6f6c4a834dfcdde78761485ce4731d816a7bd805..c83a260690be92be70dd8c8402a4758e8dcd35be 100644 (file)
@@ -33,7 +33,16 @@ struct CurveMapping;
 struct CurveMap;
 struct ImBuf;
 struct rctf;
+
+void                           gamma_correct_rec709(float *c, float gamma);
+void                           gamma_correct(float *c, float gamma);
+float                          srgb_to_linearrgb(float c);
+float                          linearrgb_to_srgb(float c);
+void                           color_manage_linearize(float *col_to, float *col_from);
+
+void                           floatbuf_to_srgb_byte(float *rectf, unsigned char *rectc, int x1, int x2, int y1, int y2, int w);
+void                           floatbuf_to_byte(float *rectf, unsigned char *rectc, int x1, int x2, int y1, int y2, int w);
+
 struct CurveMapping    *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
 void                           curvemapping_free(struct CurveMapping *cumap);
 struct CurveMapping    *curvemapping_copy(struct CurveMapping *cumap);
@@ -60,5 +69,6 @@ void                          curvemapping_initialize(struct CurveMapping *cumap);
 void                           curvemapping_table_RGBA(struct CurveMapping *cumap, float **array, int *size);
 void                           colorcorrection_do_ibuf(struct ImBuf *ibuf, const char *profile);
 
+
 #endif
 
index 5baf5af81d16791e6ceeaf4c70e40bee3fc1c107..83cac0adf9338cad986becd94827aabeb58da652 100644 (file)
@@ -101,6 +101,10 @@ bContextStore *CTX_store_copy(bContextStore *store);
 void CTX_store_free(bContextStore *store);
 void CTX_store_free_list(ListBase *contexts);
 
+/* need to store if python is initialized or not */
+int CTX_py_init_get(bContext *C);
+void CTX_py_init_set(bContext *C, int value);
+
 /* Window Manager Context */
 
 struct wmWindowManager *CTX_wm_manager(const bContext *C);
index bb0b905b8e3fa4b29509227593210f66779107a2..9f44d3c47cb58c796f9f0802323645c792fc3252 100644 (file)
@@ -95,16 +95,6 @@ typedef struct ParticleTexture{
        float rough1, rough2, roughe;           /* used in path caching */
 } ParticleTexture;
 
-typedef struct BoidVecFunc{
-       void (*Addf)(float *v, float *v1, float *v2);
-       void (*Subf)(float *v, float *v1, float *v2);
-       void (*Mulf)(float *v, float f);
-       float (*Length)(float *v);
-       float (*Normalize)(float *v);
-       float (*Inpf)(float *v1, float *v2);
-       void (*Copyf)(float *v1, float *v2);
-} BoidVecFunc;
-
 typedef struct ParticleSeam{
        float v0[3], v1[3];
        float nor[3], dir[3], tan[3];
@@ -209,6 +199,19 @@ typedef struct ParticleBillboardData
 }
 ParticleBillboardData;
 
+/* container for moving data between deflet_particle and particle_intersect_face */
+typedef struct ParticleCollision
+{
+       struct Object *ob, *ob_t; // collided and current objects
+       struct CollisionModifierData *md; // collision modifier for ob_t;
+       float nor[3]; // normal at collision point
+       float vel[3]; // velocity of collision point
+       float co1[3], co2[3]; // ray start and end points
+       float ray_len; // original length of co2-co1, needed for collision time evaluation
+       float t;        // time of previous collision, needed for substracting face velocity
+}
+ParticleCollision;
+
 /* ----------- functions needed outside particlesystem ---------------- */
 /* particle.c */
 int count_particles(struct ParticleSystem *psys);
@@ -231,6 +234,7 @@ int psys_ob_has_hair(struct Object *ob);
 int psys_in_edit_mode(struct Scene *scene, struct ParticleSystem *psys);
 int psys_check_enabled(struct Object *ob, struct ParticleSystem *psys);
 
+void psys_free_boid_rules(struct ListBase *list);
 void psys_free_settings(struct ParticleSettings *part);
 void free_child_path_cache(struct ParticleSystem *psys);
 void psys_free_path_cache(struct ParticleSystem *psys);
@@ -288,6 +292,7 @@ void psys_thread_create_path(ParticleThread *thread, struct ChildParticle *cpa,
 void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3], float zvec[3], float center[3]);
 
 /* particle_system.c */
+struct ParticleSystem *psys_get_target_system(struct Object *ob, struct ParticleTarget *pt);
 void psys_count_keyed_targets(struct Object *ob, struct ParticleSystem *psys);
 void psys_get_reactor_target(struct Object *ob, struct ParticleSystem *psys, struct Object **target_ob, struct ParticleSystem **target_psys);
 
@@ -298,6 +303,8 @@ void psys_make_temp_pointcache(struct Object *ob, struct ParticleSystem *psys);
 void psys_end_temp_pointcache(struct ParticleSystem *psys);
 void psys_get_pointcache_start_end(struct Scene *scene, struct ParticleSystem *psys, int *sfra, int *efra);
 
+void psys_check_boid_data(struct ParticleSystem *psys);
+
 void particle_system_update(struct Scene *scene, struct Object *ob, struct ParticleSystem *psys);
 
 /* ----------- functions needed only inside particlesystem ------------ */
@@ -321,11 +328,13 @@ float psys_interpolate_value_from_verts(struct DerivedMesh *dm, short from, int
 void psys_get_from_key(struct ParticleKey *key, float *loc, float *vel, float *rot, float *time);
 
 int psys_intersect_dm(struct Scene *scene, struct Object *ob, struct DerivedMesh *dm, float *vert_cos, float *co1, float* co2, float *min_d, int *min_face, float *min_uv, float *face_minmax, float *pa_minmax, float radius, float *ipoint);
+void particle_intersect_face(void *userdata, int index, const struct BVHTreeRay *ray, struct BVHTreeRayHit *hit);
 void psys_particle_on_dm(struct DerivedMesh *dm, int from, int index, int index_dmcache, float *fw, float foffset, float *vec, float *nor, float *utan, float *vtan, float *orco, float *ornor);
 
 /* particle_system.c */
 void initialize_particle(struct ParticleData *pa, int p, struct Object *ob, struct ParticleSystem *psys, struct ParticleSystemModifierData *psmd);
 
+int effector_find_co(struct Scene *scene, float *pco, struct SurfaceModifierData *sur, struct Object *ob, struct PartDeflect *pd, float *co, float *nor, float *vel, int *index);
 void do_effectors(int pa_no, struct ParticleData *pa, struct ParticleKey *state, struct Scene *scene, struct Object *ob, struct ParticleSystem *psys, float *texco, float *force_field, float *vel,float framestep, float cfra);
 
 void psys_calc_dmcache(struct Object *ob, struct DerivedMesh *dm, struct ParticleSystem *psys);
index 6af1deda72705d49359b719b76eab0912b24348c..78a9ecddaaca8807824f167d517094dfccff1d8c 100644 (file)
@@ -41,6 +41,7 @@ struct bProperty *copy_property(struct bProperty *prop);
 void copy_properties(struct ListBase *lbn, struct ListBase *lbo);
 void init_property(struct bProperty *prop);
 struct bProperty *new_property(int type);
+void unique_property(struct bProperty *first, struct  bProperty *prop, int force);
 struct bProperty *get_ob_property(struct Object *ob, char *name);
 void set_ob_property(struct Object *ob, struct bProperty *propc);
 int compare_property(struct bProperty *prop, char *str);
index 26853866ebbc1ca9f395d223604bfa82f9acfa6a..1d72b1c81f0edafa935822c05ee16767a4387ab7 100644 (file)
 extern "C" {
 #endif
 
-#include "DNA_listBase.h"
+#include "DNA_windowmanager_types.h"
 
 /* Reporting Information and Errors
  *
  * These functions also accept NULL in case no error reporting
  * is needed. */
 
-typedef enum ReportType {
-       RPT_DEBUG                                       = 1<<0,
-       RPT_INFO                                        = 1<<1,
-       RPT_OPERATOR                            = 1<<2,
-       RPT_WARNING                                     = 1<<3,
-       RPT_ERROR                                       = 1<<4,
-       RPT_ERROR_INVALID_INPUT         = 1<<5,
-       RPT_ERROR_INVALID_CONTEXT       = 1<<6,
-       RPT_ERROR_OUT_OF_MEMORY         = 1<<7
-} ReportType;
-
-#define RPT_DEBUG_ALL          (RPT_DEBUG)
-#define RPT_INFO_ALL           (RPT_INFO)
-#define RPT_OPERATOR_ALL       (RPT_OPERATOR)
-#define RPT_WARNING_ALL                (RPT_WARNING)
-#define RPT_ERROR_ALL          (RPT_ERROR|RPT_ERROR_INVALID_INPUT|RPT_ERROR_INVALID_CONTEXT|RPT_ERROR_OUT_OF_MEMORY)
-
-enum ReportListFlags {
-       RPT_PRINT = 1,
-       RPT_STORE = 2,
-};
-
-typedef struct Report {
-       struct Report *next, *prev;
-       ReportType type;
-       char *typestr;
-       char *message;
-} Report;
-
-typedef struct ReportList {
-       ListBase list;
-       ReportType printlevel;
-       ReportType storelevel;
-       int flag;
-} ReportList;
+/* report structures are stored in DNA */
 
 void BKE_reports_init(ReportList *reports, int flag);
 void BKE_reports_clear(ReportList *reports);
index be625fb856aaeab843ec2531c29cbf2197456c91..5a12c04780a35efa07758042506e7d6640e01698 100644 (file)
@@ -194,6 +194,12 @@ typedef struct HeaderType {
        void                            (*py_free)(void *py_data);
 } HeaderType;
 
+typedef struct Header {
+       struct HeaderType *type;        /* runtime */
+       struct uiLayout *layout;        /* runtime for drawing */
+} Header;
+
+
 /* menu types */
 
 typedef struct MenuType {
@@ -215,6 +221,11 @@ typedef struct MenuType {
        void                            (*py_free)(void *py_data);
 } MenuType;
 
+typedef struct Menu {
+       struct MenuType *type;          /* runtime */
+       struct uiLayout *layout;        /* runtime for drawing */
+} Menu;
+
 /* spacetypes */
 struct SpaceType *BKE_spacetype_from_id(int spaceid);
 struct ARegionType *BKE_regiontype_from_id(struct SpaceType *st, int regionid);
index ebe0ea74c285070d8ea7a3e72e994851c069be0e..92cc206667cedccce355588f8cc0300df095a475 100644 (file)
@@ -34,7 +34,6 @@ SET(INC
   ../../../extern/bullet2/src
   ../nodes ../../../extern/glew/include ../gpu ../makesrna
   ../../../intern/bsp/extern
-  ${SDL_INC}
   ${ZLIB_INC}
 )
 
@@ -55,6 +54,12 @@ IF(WITH_QUICKTIME)
   ADD_DEFINITIONS(-DWITH_QUICKTIME)
 ENDIF(WITH_QUICKTIME)
 
+IF(WITH_SDL)
+  SET(INC ${INC} ${SDL_INC})
+ELSE(WITH_SDL)
+  ADD_DEFINITIONS(-DDISABLE_SDL)
+ENDIF(WITH_SDL)
+
 IF(WITH_FFMPEG)
   SET(INC ${INC} ${FFMPEG_INC})
   ADD_DEFINITIONS(-DWITH_FFMPEG)
index 96896509f601d198ceb4907c445ddb04b9e79d8a..f4d4eb1cc9c3109b4a86100f197142b4082440fc 100644 (file)
@@ -21,6 +21,7 @@
  * All rights reserved.
  *
  * Contributor(s): Full recode, Ton Roosendaal, Crete 2005
+ *                              Full recode, Joshua Leung, 2009
  *
  * ***** END GPL LICENSE BLOCK *****
  */
@@ -31,7 +32,8 @@
 
 #include <string.h>
 #include <math.h>
-#include <stdlib.h>    /* for NULL */
+#include <stdlib.h>
+#include <stddef.h>    
 
 #include "MEM_guardedalloc.h"
 
@@ -68,8 +70,6 @@
 #include "RNA_access.h"
 #include "RNA_types.h"
 
-//XXX #include "nla.h"
-
 /* *********************** NOTE ON POSE AND ACTION **********************
 
   - Pose is the local (object level) component of armature. The current
@@ -765,7 +765,57 @@ void framechange_poses_clear_unkeyed(void)
        }
 }
 
-/* ************************ END Pose channels *************** */
+/* ************************** Bone Groups ************************** */
+
+/* Adds a new bone-group */
+void pose_add_group (Object *ob)
+{
+       bPose *pose= (ob) ? ob->pose : NULL;
+       bActionGroup *grp;
+       
+       if (ELEM(NULL, ob, ob->pose))
+               return;
+       
+       grp= MEM_callocN(sizeof(bActionGroup), "PoseGroup");
+       strcpy(grp->name, "Group");
+       BLI_addtail(&pose->agroups, grp);
+       BLI_uniquename(&pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name), 32);
+       
+       pose->active_group= BLI_countlist(&pose->agroups);
+}
+
+/* Remove the active bone-group */
+void pose_remove_group (Object *ob)
+{
+       bPose *pose= (ob) ? ob->pose : NULL;
+       bActionGroup *grp = NULL;
+       bPoseChannel *pchan;
+       
+       /* sanity checks */
+       if (ELEM(NULL, ob, pose))
+               return;
+       if (pose->active_group <= 0)
+               return;
+       
+       /* get group to remove */
+       grp= BLI_findlink(&pose->agroups, pose->active_group-1);
+       if (grp) {
+               /* adjust group references (the trouble of using indices!):
+                *      - firstly, make sure nothing references it 
+                *      - also, make sure that those after this item get corrected
+                */
+               for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) {
+                       if (pchan->agrp_index == pose->active_group)
+                               pchan->agrp_index= 0;
+                       else if (pchan->agrp_index > pose->active_group)
+                               pchan->agrp_index--;
+               }
+               
+               /* now, remove it from the pose */
+               BLI_freelinkN(&pose->agroups, grp);
+               pose->active_group= 0;
+       }
+}
 
 /* ************** time ****************** */
 
index 1b930a74449b7e0353507643de2a48e7b81c87d3..62194caa6583908a7b678fe6b5f1eec9df14a01a 100644 (file)
@@ -140,6 +140,12 @@ void free_armature(bArmature *arm)
                        MEM_freeN(arm->edbo);
                        arm->edbo= NULL;
                }
+
+               /* free sketch */
+               if (arm->sketch) {
+                       ED_freeSketch(arm->sketch);
+                       arm->sketch = NULL;
+               }
        }
 }
 
diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c
new file mode 100644 (file)
index 0000000..931ad0b
--- /dev/null
@@ -0,0 +1,1526 @@
+/* boids.c
+ *
+ *
+ * $Id$
+ *
+ * ***** 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2009 by Janne Karhu.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <string.h>
+#include <math.h>
+
+#include "MEM_guardedalloc.h"
+
+#include "DNA_particle_types.h"
+#include "DNA_modifier_types.h"
+#include "DNA_object_force.h"
+#include "DNA_object_types.h"
+#include "DNA_scene_types.h"
+#include "DNA_boid_types.h"
+#include "DNA_listBase.h"
+
+#include "BLI_rand.h"
+#include "BLI_arithb.h"
+#include "BLI_blenlib.h"
+#include "BLI_kdtree.h"
+#include "BLI_kdopbvh.h"
+#include "BKE_effect.h"
+#include "BKE_boids.h"
+#include "BKE_particle.h"
+#include "BKE_utildefines.h"
+#include "BKE_modifier.h"
+
+#include "RNA_enum_types.h"
+
+typedef struct BoidValues {
+       float max_speed, max_acc;
+       float max_ave, min_speed;
+       float personal_space, jump_speed;
+} BoidValues;
+
+static int apply_boid_rule(BoidBrainData *bbd, BoidRule *rule, BoidValues *val, ParticleData *pa, float fuzziness);
+
+static int rule_none(BoidRule *rule, BoidBrainData *data, BoidValues *val, ParticleData *pa)
+{
+       return 0;
+}
+
+static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, ParticleData *pa)
+{
+       BoidRuleGoalAvoid *gabr = (BoidRuleGoalAvoid*) rule;
+       BoidSettings *boids = bbd->part->boids;
+       ParticleEffectorCache *ec;
+       Object *priority_ob = NULL;
+       float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
+       float mul = (rule->type == eBoidRuleType_Avoid ? 1.0 : -1.0);
+       float priority = 0.0f, len;
+       int ret = 0;
+
+       /* first find out goal/predator with highest priority */
+       /* if rule->ob specified use it */
+       if(gabr->ob && (rule->type != eBoidRuleType_Goal || gabr->ob != pa->stick_ob)) {
+               PartDeflect *pd = gabr->ob->pd;
+               float vec_to_part[3];
+
+               if(pd && pd->forcefield == PFIELD_BOID) {
+                       effector_find_co(bbd->scene, pa->prev_state.co, NULL, gabr->ob, pd, loc, vec, NULL, NULL);
+                       
+                       VecSubf(vec_to_part, pa->prev_state.co, loc);
+
+                       priority = mul * pd->f_strength * effector_falloff(pd, vec, vec_to_part);
+               }
+               else
+                       priority = 1.0;
+
+               priority = 1.0;
+               priority_ob = gabr->ob;
+       }
+       else for(ec=bbd->psys->effectors.first; ec; ec=ec->next) {
+               if(ec->type & PSYS_EC_EFFECTOR) {
+                       Object *eob = ec->ob;
+                       PartDeflect *pd = eob->pd;
+
+                       /* skip current object */
+                       if(rule->type == eBoidRuleType_Goal && eob == pa->stick_ob)
+                               continue;
+
+                       if(pd->forcefield == PFIELD_BOID && mul * pd->f_strength > 0.0f) {
+                               float vec_to_part[3], temp;
+
+                               effector_find_co(bbd->scene, pa->prev_state.co, NULL, eob, pd, loc, vec, NULL, NULL);
+                               
+                               VecSubf(vec_to_part, pa->prev_state.co, loc);
+
+                               temp = mul * pd->f_strength * effector_falloff(pd, vec, vec_to_part);
+
+                               if(temp == 0.0f)
+                                       ; /* do nothing */
+                               else if(temp > priority) {
+                                       priority = temp;
+                                       priority_ob = eob;
+                                       len = VecLength(vec_to_part);
+                               }
+                               /* choose closest object with same priority */
+                               else if(temp == priority) {
+                                       float len2 = VecLength(vec_to_part);
+
+                                       if(len2 < len) {
+                                               priority_ob = eob;
+         &nbs