COLLADA: merge from trunk -r 24390:24522.
authorArystanbek Dyussenov <arystan.d@gmail.com>
Thu, 12 Nov 2009 14:49:54 +0000 (14:49 +0000)
committerArystanbek Dyussenov <arystan.d@gmail.com>
Thu, 12 Nov 2009 14:49:54 +0000 (14:49 +0000)
439 files changed:
CMakeLists.txt
config/darwin-config.py
extern/Makefile
intern/ghost/GHOST_C-api.h
intern/ghost/GHOST_ISystem.h
intern/ghost/GHOST_Types.h
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_EventDragnDrop.h [new file with mode: 0644]
intern/ghost/intern/GHOST_System.cpp
intern/ghost/intern/GHOST_System.h
intern/ghost/intern/GHOST_SystemCocoa.h
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_WindowCocoa.h
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/guardedalloc/MEM_guardedalloc.h
intern/guardedalloc/intern/mallocn.c
intern/smoke/intern/Makefile
projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
release/datafiles/datatoc.py
release/scripts/io/netrender/client.py
release/scripts/modules/bpy_ext/Mesh.py
release/scripts/modules/bpy_ext/Object.py
release/scripts/modules/bpy_ext/__init__.py
release/scripts/modules/bpy_ops.py
release/scripts/modules/bpy_types.py [new file with mode: 0644]
release/scripts/modules/bpy_utils.py
release/scripts/modules/console/complete_calltip.py [new file with mode: 0644]
release/scripts/modules/dynamic_menu.py
release/scripts/op/console_shell.py
release/scripts/op/mesh.py
release/scripts/op/mesh_skin.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/op/vertexpaint_dirt.py
release/scripts/templates/gamelogic.py
release/scripts/templates/gamelogic_basic.py
release/scripts/templates/gamelogic_module.py
release/scripts/templates/operator.py
release/scripts/templates/operator_simple.py
release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_physics_field.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_scene.py
release/scripts/ui/properties_world.py
release/scripts/ui/space_console.py
release/scripts/ui/space_info.py
release/scripts/ui/space_node.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py
source/Makefile
source/blender/blenfont/intern/blf_font.c
source/blender/blenfont/intern/blf_glyph.c
source/blender/blenkernel/BKE_cloth.h
source/blender/blenkernel/BKE_constraint.h
source/blender/blenkernel/BKE_context.h
source/blender/blenkernel/BKE_group.h
source/blender/blenkernel/BKE_key.h
source/blender/blenkernel/BKE_node.h
source/blender/blenkernel/BKE_paint.h
source/blender/blenkernel/intern/BME_tools.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/action.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/anim_sys.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/boids.c
source/blender/blenkernel/intern/booleanops.c
source/blender/blenkernel/intern/booleanops_mesh.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/collision.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/context.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/fcurve.c
source/blender/blenkernel/intern/fluidsim.c
source/blender/blenkernel/intern/fmodifier.c
source/blender/blenkernel/intern/font.c
source/blender/blenkernel/intern/gpencil.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/image.c
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/ipo.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/modifier.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/node.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/scene.c
source/blender/blenkernel/intern/seqeffects.c
source/blender/blenkernel/intern/sequence.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/simple_deform.c
source/blender/blenkernel/intern/sketch.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenkernel/intern/texture.c
source/blender/blenkernel/intern/world.c
source/blender/blenlib/BLI_arithb.h [deleted file]
source/blender/blenlib/BLI_math.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_base.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_color.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_geom.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_matrix.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_rotation.h [new file with mode: 0644]
source/blender/blenlib/BLI_math_vector.h [new file with mode: 0644]
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/blenlib/intern/BLI_kdtree.c
source/blender/blenlib/intern/arithb.c [deleted file]
source/blender/blenlib/intern/boxpack2d.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/graph.c
source/blender/blenlib/intern/jitter.c
source/blender/blenlib/intern/math_base.c [new file with mode: 0644]
source/blender/blenlib/intern/math_color.c [new file with mode: 0644]
source/blender/blenlib/intern/math_geom.c [new file with mode: 0644]
source/blender/blenlib/intern/math_matrix.c [new file with mode: 0644]
source/blender/blenlib/intern/math_rotation.c [new file with mode: 0644]
source/blender/blenlib/intern/math_vector.c [new file with mode: 0644]
source/blender/blenlib/intern/math_vector_inline.c [new file with mode: 0644]
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/util.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/collada/CMakeLists.txt
source/blender/collada/DocumentExporter.cpp
source/blender/collada/DocumentImporter.cpp
source/blender/collada/SConscript
source/blender/collada/collada_internal.h
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_channels_edit.c
source/blender/editors/animation/anim_draw.c
source/blender/editors/animation/anim_filter.c
source/blender/editors/animation/anim_ipo_utils.c
source/blender/editors/animation/drivers.c
source/blender/editors/animation/fmodifier_ui.c
source/blender/editors/animation/keyframes_draw.c
source/blender/editors/animation/keyframes_edit.c
source/blender/editors/animation/keyframes_general.c
source/blender/editors/animation/keyframing.c
source/blender/editors/animation/keyingsets.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_generate.c
source/blender/editors/armature/editarmature_retarget.c
source/blender/editors/armature/editarmature_sketch.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poseSlide.c
source/blender/editors/armature/poselib.c
source/blender/editors/armature/poseobject.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/curve_ops.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/gpencil/drawgpencil.c
source/blender/editors/gpencil/editaction_gpencil.c
source/blender/editors/gpencil/gpencil_buttons.c
source/blender/editors/gpencil/gpencil_edit.c
source/blender/editors/gpencil/gpencil_paint.c
source/blender/editors/include/ED_anim_api.h
source/blender/editors/include/ED_armature.h
source/blender/editors/include/ED_gpencil.h
source/blender/editors/include/ED_object.h
source/blender/editors/include/UI_icons.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_icons.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.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/mesh/editface.c
source/blender/editors/mesh/editmesh.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_lib.c
source/blender/editors/mesh/editmesh_loop.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_group.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
source/blender/editors/object/object_shapekey.c
source/blender/editors/object/object_transform.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/physics/physics_intern.h
source/blender/editors/physics/physics_ops.c
source/blender/editors/render/render_preview.c
source/blender/editors/render/render_shading.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_ops.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/paint_stroke.c
source/blender/editors/sculpt_paint/paint_utils.c
source/blender/editors/sculpt_paint/paint_vertex.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_edit.c
source/blender/editors/space_action/action_select.c
source/blender/editors/space_action/space_action.c
source/blender/editors/space_api/space.c
source/blender/editors/space_buttons/buttons_context.c
source/blender/editors/space_buttons/space_buttons.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_file/space_file.c
source/blender/editors/space_graph/graph_buttons.c
source/blender/editors/space_graph/graph_draw.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_graph/graph_select.c
source/blender/editors/space_graph/graph_utils.c
source/blender/editors/space_graph/space_graph.c
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/space_info.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_logic/space_logic.c
source/blender/editors/space_nla/nla_buttons.c
source/blender/editors/space_nla/nla_channels.c
source/blender/editors/space_nla/nla_draw.c
source/blender/editors/space_nla/nla_edit.c
source/blender/editors/space_nla/nla_header.c
source/blender/editors/space_nla/nla_ops.c
source/blender/editors/space_nla/nla_select.c
source/blender/editors/space_nla/space_nla.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_buttons.c [new file with mode: 0644]
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/space_node.c
source/blender/editors/space_outliner/outliner.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/space_script/script_ops.c
source/blender/editors/space_script/space_script.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_draw.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_sequencer/sequencer_intern.h
source/blender/editors/space_sequencer/sequencer_ops.c
source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_sequencer/space_sequencer.c
source/blender/editors/space_sound/space_sound.c
source/blender/editors/space_text/space_text.c
source/blender/editors/space_view3d/drawarmature.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/space_view3d/space_view3d.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_ops.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_constraints.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_input.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/intern/gpu_buffers.c
source/blender/gpu/intern/gpu_material.c
source/blender/gpu/intern/gpu_shader_material.glsl
source/blender/gpu/intern/gpu_shader_material.glsl.c
source/blender/ikplugin/intern/ikplugin_api.c
source/blender/ikplugin/intern/iksolver_plugin.c
source/blender/ikplugin/intern/itasc_plugin.cpp
source/blender/imbuf/intern/Makefile
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_armature_types.h
source/blender/makesdna/DNA_constraint_types.h
source/blender/makesdna/DNA_node_types.h
source/blender/makesdna/DNA_scene_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_fcurve_api.c
source/blender/makesrna/intern/rna_group.c
source/blender/makesrna/intern/rna_internal.h
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nodetree.c
source/blender/makesrna/intern/rna_nodetree_types.h
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_pose_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/nodes/intern/CMP_nodes/CMP_channelMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_levels.c
source/blender/nodes/intern/CMP_util.h
source/blender/nodes/intern/SHD_nodes/SHD_camera.c
source/blender/nodes/intern/SHD_nodes/SHD_curves.c
source/blender/nodes/intern/SHD_nodes/SHD_mapping.c
source/blender/nodes/intern/SHD_nodes/SHD_material.c
source/blender/nodes/intern/SHD_nodes/SHD_vectMath.c
source/blender/nodes/intern/SHD_util.h
source/blender/nodes/intern/TEX_nodes/TEX_distance.c
source/blender/nodes/intern/TEX_nodes/TEX_rotate.c
source/blender/nodes/intern/TEX_util.h
source/blender/python/BPY_extern.h
source/blender/python/generic/Geometry.c
source/blender/python/generic/Mathutils.c
source/blender/python/generic/euler.c
source/blender/python/generic/matrix.c
source/blender/python/generic/quat.c
source/blender/python/generic/vector.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_operator.c
source/blender/python/intern/bpy_rna.c
source/blender/python/intern/bpy_rna.h
source/blender/python/intern/bpy_util.c
source/blender/quicktime/apple/quicktime_export.c
source/blender/quicktime/quicktime_export.h
source/blender/render/CMakeLists.txt
source/blender/render/SConscript
source/blender/render/intern/raytrace/rayobject.cpp
source/blender/render/intern/raytrace/rayobject_rtbuild.cpp
source/blender/render/intern/raytrace/rayobject_vbvh.cpp
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/envmap.c
source/blender/render/intern/source/imagetexture.c
source/blender/render/intern/source/initrender.c
source/blender/render/intern/source/occlusion.c
source/blender/render/intern/source/pipeline.c
source/blender/render/intern/source/pixelblending.c
source/blender/render/intern/source/pixelshading.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/rayobject_blibvh.c
source/blender/render/intern/source/rayobject_instance.c
source/blender/render/intern/source/rayobject_octree.c
source/blender/render/intern/source/rayshade.c
source/blender/render/intern/source/rendercore.c
source/blender/render/intern/source/renderdatabase.c
source/blender/render/intern/source/shadbuf.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/sss.c
source/blender/render/intern/source/strand.c
source/blender/render/intern/source/sunsky.c
source/blender/render/intern/source/texture.c
source/blender/render/intern/source/volume_precache.c
source/blender/render/intern/source/volumetric.c
source/blender/render/intern/source/voxeldata.c
source/blender/render/intern/source/zbuf.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_subwindow.c
source/blender/windowmanager/intern/wm_window.c
source/blender/windowmanager/wm.h
source/creator/creator.c
source/gameengine/BlenderRoutines/KX_BlenderCanvas.cpp
source/gameengine/BlenderRoutines/KX_BlenderCanvas.h
source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
source/gameengine/BlenderRoutines/KX_BlenderGL.h
source/gameengine/Converter/BL_ActionActuator.cpp
source/gameengine/Converter/BL_ArmatureActuator.cpp
source/gameengine/Converter/BL_ArmatureChannel.cpp
source/gameengine/Converter/BL_ArmatureConstraint.cpp
source/gameengine/Converter/BL_ArmatureObject.cpp
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/BL_MeshDeformer.cpp
source/gameengine/Converter/BL_ModifierDeformer.cpp
source/gameengine/Converter/BL_ShapeActionActuator.cpp
source/gameengine/Converter/BL_ShapeDeformer.cpp
source/gameengine/Converter/BL_SkinDeformer.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/GameLogic/SCA_ExpressionController.cpp
source/gameengine/Ketsji/KX_Dome.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_IPO_SGController.cpp
source/gameengine/VideoTexture/ImageRender.cpp
source/nan_definitions.mk
source/nan_link.mk

index 9360d930a5ab4237ebe5fab970d5000c2c65bfdc..01f1dd69a9aef1947400cd409cf20c21acc7e3b7 100644 (file)
@@ -91,18 +91,6 @@ IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
        MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
 ENDIF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 
-IF (WITH_OPENCOLLADA AND NOT APPLE)
-SET(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
-SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA})
-SET(OPENCOLLADA_LIB OpenCollada)
-SET(PCRE /usr CACHE FILEPATH "PCRE Directory")
-SET(PCRE_LIBPATH ${PCRE}/lib)
-SET(PCRE_LIB pcre)
-SET(EXPAT /usr CACHE FILEPATH "Expat Directory")
-SET(EXPAT_LIBPATH ${EXPAT}/lib)
-SET(EXPAT_LIB expat)
-ENDIF (WITH_OPENCOLLADA AND NOT APPLE)
-
 # For alternate Python locations the commandline can be used to override detected/default cache settings, e.g:
 # On Unix: 
 #   cmake -D PYTHON_LIB=/usr/local/lib/python2.3/config/libpython2.3.so -D PYTHON_INC=/usr/local/include/python2.3 -D PYTHON_BINARY=/usr/local/bin/python2.3 -G "Unix Makefiles" ../blender
@@ -119,6 +107,8 @@ INCLUDE(CMake/macros.cmake)
 #Platform specifics
 
 IF(UNIX AND NOT APPLE)
+
+
        IF(WITH_OPENAL)
                FIND_PACKAGE(OpenAL)
                IF(OPENAL_FOUND)
@@ -217,6 +207,20 @@ IF(UNIX AND NOT APPLE)
 
        FIND_PACKAGE(ZLIB REQUIRED)
 
+       IF (WITH_OPENCOLLADA)
+               SET(OPENCOLLADA /usr/local/opencollada CACHE FILEPATH "OpenCollada Directory")
+               SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA})
+               SET(OPENCOLLADA_LIB OpenCollada)
+               SET(OPENCOLLADA_INC ${OPENCOLLADA})
+               SET(PCRE /usr CACHE FILEPATH "PCRE Directory")
+               SET(PCRE_LIBPATH ${PCRE}/lib)
+               SET(PCRE_LIB pcre)
+               SET(EXPAT /usr CACHE FILEPATH "Expat Directory")
+               SET(EXPAT_LIBPATH ${EXPAT}/lib)
+               SET(EXPAT_LIB expat)
+       ENDIF (WITH_OPENCOLLADA)
+
+
        # Could use ${X11_Xinput_LIB} ${X11_X11_LIB} too
        SET(LLIBS "-lXi -lutil -lc -lm -lpthread -lstdc++ -lX11")
 
@@ -400,6 +404,16 @@ IF(WIN32)
   
        SET(WINTAB_INC ${LIBDIR}/wintab/include) 
 
+       SET(OPENCOLLADA ${LIBDIR}/opencollada)
+       SET(OPENCOLLADA_INC ${OPENCOLLADA}/include)
+       SET(OPENCOLLADA_LIBPATH ${OPENCOLLADA}/lib)
+       SET(OPENCOLLADA_LIB OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 )
+       #pcre is bundled with openCollada
+       #SET(PCRE ${LIBDIR}/pcre)
+       #SET(PCRE_LIBPATH ${PCRE}/lib)
+       SET(PCRE_LIB pcre)
+
+
        IF(CMAKE_CL_64)
                SET(PLATFORM_LINKFLAGS "/MACHINE:X64 /NODEFAULTLIB:libc.lib;MSVCRT.lib ")
        ELSE(CMAKE_CL_64)
@@ -532,10 +546,10 @@ IF(APPLE)
                #SET(PCRE ${LIBDIR}/pcre)
                #SET(PCRE_LIBPATH ${PCRE}/lib)
                SET(PCRE_LIB pcre)
-               #native OSX libxml2 is used
+               #libxml2 is used
                #SET(EXPAT ${LIBDIR}/expat)
                #SET(EXPAT_LIBPATH ${EXPAT}/lib)
-               #SET(EXPAT_LIB expat)
+               SET(EXPAT_LIB)
        ENDIF (WITH_OPENCOLLADA)
 
        SET(SDL ${LIBDIR}/sdl)
index 8a1b0eff6c12d1f168e608a022c1ad0c86a96753..03cc4eb1f8cdbb3a1450ab1be2125bb747263fb0 100644 (file)
@@ -31,7 +31,7 @@ elif cmd_res[0]=='9':
 elif cmd_res[0]=='10':
        MAC_CUR_VER='10.6'
 
-if MAC_PROC == 'powerpc':
+if MACOSX_ARCHITECTURE == 'ppc':
        LCGDIR = '#../lib/darwin-6.1-powerpc'
 else :
        LCGDIR = '#../lib/darwin-9.x.universal'
@@ -39,7 +39,7 @@ LIBDIR = '${LCGDIR}'
 
 BF_PYTHON_VERSION = '3.1'
 
-if MAC_PROC == 'powerpc' and BF_PYTHON_VERSION == '2.3':
+if MACOSX_ARCHITECTURE == 'ppc' and BF_PYTHON_VERSION == '2.3':
        MAC_MIN_VERS = '10.3'
        MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
        CC = 'gcc'
@@ -247,7 +247,20 @@ BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
 BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
 
 #OpenCollada flags
-WITH_BF_COLLADA = False
+WITH_BF_COLLADA = True
+BF_COLLADA = '#source/blender/collada'
+BF_COLLADA_INC = '${BF_COLLADA}'
+BF_COLLADA_LIB = 'bf_collada'
+BF_OPENCOLLADA = LIBDIR + '/opencollada'
+BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
+BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2'
+BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
+BF_PCRE = LIBDIR + '/opencollada'
+BF_PCRE_LIB = 'pcre'
+BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
+#BF_EXPAT = '/usr'
+#BF_EXPAT_LIB = 'expat'
+#BF_EXPAT_LIBPATH = '/usr/lib'
 
 #############################################################################
 ###################  various compile settings and flags    ##################
index a30cd1d7ca3ccacc3a5f7ac55ca93c1b10aa874d..4a2e7a6d59b321850014a2f1f4ee350dc427c42f 100644 (file)
@@ -34,7 +34,7 @@ DIRS = glew/src
 
 # Cloth requires it
 ifeq ($(NAN_USE_BULLET), true)
-       DIRS += bullet2
+    DIRS += bullet2
 endif
 
 ifeq ($(WITH_BINRELOC), true)
@@ -42,7 +42,9 @@ ifeq ($(WITH_BINRELOC), true)
 endif
 
 ifeq ($(WITH_OPENJPEG), true)
-    DIRS += libopenjpeg
+    ifndef BF_OPENJPEG
+        DIRS += libopenjpeg
+    endif
 endif
 
 ifeq ($(WITH_LZO), true)
index bd812177f17d6633a028dc3b21fc36c1e59d6c94..5e434c0eaa09a49da1e4b71ce679ea35ca3894db 100644 (file)
@@ -406,6 +406,17 @@ extern GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
                                                                                   GHOST_TButtonMask mask,
                                                                                   int* isDown);
 
+
+/***************************************************************************************
+ ** Drag'n'drop operations
+ ***************************************************************************************/
+
+/**
+ * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
+ */
+extern void GHOST_setAcceptDragOperation(GHOST_SystemHandle systemhandle, GHOST_TInt8 canAccept);
+       
+       
 /**
  * Returns the event type.
  * @param eventhandle The handle to the event
index 08794dfd085366299b6d83901f49d14c43a108c2..e56a0dae879df1f2282a15fdbbccbb5067d5fbf8 100644 (file)
@@ -351,6 +351,11 @@ public:
         */
        virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const = 0;
 
+       
+       /***************************************************************************************
+        ** Access to clipboard.
+        ***************************************************************************************/
+       
        /**
         * Returns the selection buffer
         * @return Returns "unsinged char" from X11 XA_CUT_BUFFER0 buffer
@@ -363,6 +368,22 @@ public:
         */
        virtual void putClipboard(GHOST_TInt8 *buffer, bool selection) const = 0;
 
+       
+       /***************************************************************************************
+        ** Drag'n'drop operations
+        ***************************************************************************************/
+       
+       /**
+        * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
+        */
+       virtual void setAcceptDragOperation(bool canAccept) = 0;
+       
+       /**
+        * Returns acceptance of the dropped object
+        * Usually called by the "object dropped" event handling function
+        */
+       virtual bool canAcceptDragOperation() const = 0;
+       
 protected:
        /**
         * Initialize the system.
index e98e58740ada8a723cea9c6d561be4e42b540efa..5c888e218d84287ffc0a08856ea59b3a2a049596 100644 (file)
@@ -167,6 +167,12 @@ typedef enum {
        GHOST_kEventWindowUpdate,
        GHOST_kEventWindowSize,
        GHOST_kEventWindowMove,
+       
+       GHOST_kEventDraggingEntered,
+       GHOST_kEventDraggingUpdated,
+       GHOST_kEventDraggingExited,
+       GHOST_kEventDraggingDropDone,
+       GHOST_kEventDraggingDropOnIcon,
 
        GHOST_kEventTimer,
 
@@ -368,6 +374,30 @@ typedef struct {
 } GHOST_TEventWheelData;
 
 
+typedef enum {
+       GHOST_kDragnDropTypeUnknown =0,
+       GHOST_kDragnDropTypeFilenames, /*Array of strings representing file names (full path) */
+       GHOST_kDragnDropTypeString, /* Unformatted text UTF-8 string */
+       GHOST_kDragnDropTypeBitmap /*Bitmap image data */
+} GHOST_TDragnDropTypes;
+
+typedef struct {
+       /** The x-coordinate of the cursor position. */
+       GHOST_TInt32 x;
+       /** The y-coordinate of the cursor position. */
+       GHOST_TInt32 y;
+       /** The dropped item type */
+       GHOST_TDragnDropTypes dataType;
+       /** The "dropped content" */
+       GHOST_TEventDataPtr data;
+} GHOST_TEventDragnDropData;
+
+typedef struct {
+       int count;
+       GHOST_TUns8 **strings;
+} GHOST_TStringArray;
+
+
 /* original patch used floats, but the driver return ints and uns. We will calibrate in view, no sense on doing conversions twice */
 /* as all USB device controls are likely to use ints, this is also more future proof */
 //typedef struct {
index 0160df552cc10df5f04bf3b841ab383bc2a5d057..76b3d7caf7e5bff01589a35e51c5ca82a0a306ee 100644 (file)
@@ -404,6 +404,13 @@ GHOST_TSuccess GHOST_GetButtonState(GHOST_SystemHandle systemhandle,
 }
 
 
+void GHOST_setAcceptDragOperation(GHOST_SystemHandle systemhandle, GHOST_TInt8 canAccept)
+{
+       GHOST_ISystem* system = (GHOST_ISystem*) systemhandle;
+
+       system->setAcceptDragOperation(canAccept);
+}
+
 
 GHOST_TEventType GHOST_GetEventType(GHOST_EventHandle eventhandle)
 {
diff --git a/intern/ghost/intern/GHOST_EventDragnDrop.h b/intern/ghost/intern/GHOST_EventDragnDrop.h
new file mode 100644 (file)
index 0000000..f1810b0
--- /dev/null
@@ -0,0 +1,91 @@
+/**
+ * $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): Damien Plisson 11/2009
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef _GHOST_EVENT_DRAGNDROP_H_
+#define _GHOST_EVENT_DRAGNDROP_H_
+
+#include "GHOST_Event.h"
+
+/**
+ * Drag & drop event
+ * 
+ * The dragging sequence is performed in four phases:
+ * 
+ * <li> Start sequence (GHOST_kEventDraggingEntered) that tells a drag'n'drop operation has started. Already gives the object data type,
+ * and the entering mouse location
+ *
+ * <li> Update mouse position (GHOST_kEventDraggingUpdated) sent upon each mouse move until the drag'n'drop operation stops, to give the updated mouse position.
+ * Useful to highlight a potential destination, and update the status (through GHOST_setAcceptDragOperation) telling if the object can be dropped at
+ * the current cursor position.
+ *
+ * <li> Abort drag'n'drop sequence (GHOST_kEventDraggingExited) sent when the user moved the mouse outside the window.
+ *
+ * <li> Send the dropped data (GHOST_kEventDraggingDropDone)
+ *
+ * <li> Outside of the normal sequence, dropped data can be sent (GHOST_kEventDraggingDropOnIcon). This can happen when the user drops an object
+ * on the application icon. (Also used in OSX to pass the filename of the document the user doubled-clicked in the finder)
+ *
+ * <br><br>Note that the event handler is responsible for freeing the received data.
+ * <br>And the mouse positions are given in Blender coordinates (y=0 at bottom)
+ *
+ * <br>Currently supported object types :
+ * <li>UTF-8 string
+ * <li>array of strings representing filenames (GHOST_TStringArray)
+ * <li>bitmap image
+ */
+class GHOST_EventDragnDrop : public GHOST_Event
+{
+public:
+       /**
+        * Constructor.
+        * @param time          The time this event was generated.
+        * @param type          The type of this event.
+        * @param dataType      The type of the drop candidate object
+        * @param window        The window where the event occured
+        * @param x                     The x-coordinate of the location the cursor was at at the time of the event.
+        * @param y                     The y-coordinate of the location the cursor was at at the time of the event.
+        * @param data          The "content" dropped in the window
+        */
+       GHOST_EventDragnDrop(GHOST_TUns64 time, GHOST_TEventType type, GHOST_TDragnDropTypes dataType, GHOST_IWindow* window,
+                                                int x, int y, GHOST_TEventDataPtr data)
+               : GHOST_Event(time, type, window)
+       {
+               m_dragnDropEventData.x = x;
+               m_dragnDropEventData.y = y;
+               m_dragnDropEventData.dataType = dataType;
+               m_dragnDropEventData.data = data;
+               m_data = &m_dragnDropEventData;
+       }
+
+protected:
+       /** The x,y-coordinates of the cursor position. */
+       GHOST_TEventDragnDropData m_dragnDropEventData;
+};
+
+#endif // _GHOST_EVENT_DRAGNDROP_H_
+
index 84298d3e3ff42370da5c819fe51f82dedfc8a361..cccee12d6964d69fd3436e6007f2275703e2827b 100644 (file)
@@ -54,6 +54,7 @@
 GHOST_System::GHOST_System()
 : m_displayManager(0), m_timerManager(0), m_windowManager(0), m_eventManager(0), m_ndofManager(0)
 {
+       m_canAcceptDragOperation = false;
 }
 
 
@@ -275,6 +276,15 @@ GHOST_TSuccess GHOST_System::getButtonState(GHOST_TButtonMask mask, bool& isDown
        return success;
 }
 
+void GHOST_System::setAcceptDragOperation(bool canAccept)
+{
+       m_canAcceptDragOperation = canAccept;
+}
+
+bool GHOST_System::canAcceptDragOperation() const
+{
+       return m_canAcceptDragOperation;
+}
 
 GHOST_TSuccess GHOST_System::init()
 {
index 066fe4b93d31aa0ba22a45ca33eb60671bd93709..542553e830e7811680979a267b2080917a6f7085 100644 (file)
@@ -231,6 +231,21 @@ public:
         * @return                      Indication of success.
         */
        virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const;
+       
+       /***************************************************************************************
+        ** Drag'n'drop operations
+        ***************************************************************************************/
+       
+       /**
+        * Tells if the ongoing drag'n'drop object can be accepted upon mouse drop
+        */
+       virtual void setAcceptDragOperation(bool canAccept);
+       
+       /**
+        * Returns acceptance of the dropped object
+        * Usually called by the "object dropped" event handling function
+        */
+       virtual bool canAcceptDragOperation() const;
 
        /***************************************************************************************
         ** Other (internal) functionality.
@@ -332,6 +347,9 @@ protected:
 
     /** The N-degree of freedom device manager */
     GHOST_NDOFManager* m_ndofManager;
+       
+       /** The acceptance of the "drop candidate" of the current drag'n'drop operation */
+       bool m_canAcceptDragOperation;
 
        /** Prints all the events. */
 #ifdef GHOST_DEBUG
index e880f8512679eef42f82bb58e2b967da3a53aced..5ba3a2b373ba55bd3c853523ebe1e52cef10506c 100644 (file)
@@ -194,11 +194,25 @@ public:
 
        /**
      * Handles a window event. Called by GHOST_WindowCocoa window delegate
-     * @param eventPtr An NSEvent pointer (casted to void* to enable compilation in standard C++)
+     * @param eventType The type of window event
+        * @param window The window on which the event occured
      * @return Indication whether the event was handled. 
      */
     GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa* window);
        
+       
+       /**
+     * Handles a drag'n'drop destination event. Called by GHOST_WindowCocoa window subclass
+     * @param eventType The type of drag'n'drop event
+        * @param draggedObjectType The type object concerned (currently array of file names, string, TIFF image)
+        * @param mouseX x mouse coordinate (in cocoa base window coordinates)
+        * @param mouseY y mouse coordinate
+        * @param window The window on which the event occured
+     * @return Indication whether the event was handled. 
+     */
+       GHOST_TSuccess handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,
+                                                                          GHOST_WindowCocoa* window, int mouseX, int mouseY, void* data);
+       
 protected:
        /**
         * Initializes the system.
index 73be363dff189756411e54f2dfcf81cbb2cb504e..c7127e26a4abcce3fc45429450daea975fb34f7a 100644 (file)
@@ -41,6 +41,7 @@
 #include "GHOST_EventCursor.h"
 #include "GHOST_EventWheel.h"
 #include "GHOST_EventNDOF.h"
+#include "GHOST_EventDragnDrop.h"
 
 #include "GHOST_TimerManager.h"
 #include "GHOST_TimerTask.h"
@@ -413,6 +414,7 @@ extern "C" int GHOST_HACK_getFirstFile(char buf[FIRSTFILEBUFLG]) {
 - (BOOL)application:(NSApplication *)theApplication openFile:(NSString *)filename
 {
        NSLog(@"\nGet open file event from cocoa : %@",filename);
+       systemCocoa->handleDraggingEvent(GHOST_kEventDraggingDropOnIcon, GHOST_kDragnDropTypeFilenames, nil, 0, 0, [NSArray arrayWithObject:filename]);
        return YES;
 }
 
@@ -880,6 +882,102 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType,
        return GHOST_kSuccess;
 }
 
+//Note: called from NSWindow subclass
+GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,
+                                                                  GHOST_WindowCocoa* window, int mouseX, int mouseY, void* data)
+{
+       if (!validWindow(window)) {
+               return GHOST_kFailure;
+       }
+       switch(eventType) 
+       {
+               case GHOST_kEventDraggingEntered:
+                       setAcceptDragOperation(FALSE); //Drag operation needs to be accepted explicitely by the event manager
+               case GHOST_kEventDraggingUpdated:
+               case GHOST_kEventDraggingExited:
+                       pushEvent(new GHOST_EventDragnDrop(getMilliSeconds(),GHOST_kEventDraggingEntered,draggedObjectType,window,mouseX,mouseY,NULL));
+                       break;
+                       
+               case GHOST_kEventDraggingDropDone:
+               case GHOST_kEventDraggingDropOnIcon:
+               {
+                       GHOST_TUns8 * temp_buff;
+                       GHOST_TStringArray *strArray;
+                       NSArray *droppedArray;
+                       size_t pastedTextSize;  
+                       NSString *droppedStr;
+                       GHOST_TEventDataPtr eventData;
+                       int i;
+
+                       if (!data) return GHOST_kFailure;
+                       
+                       switch (draggedObjectType) {
+                               case GHOST_kDragnDropTypeBitmap:
+                                       //TODO: implement bitmap conversion to a blender friendly format
+                                       break;
+                               case GHOST_kDragnDropTypeFilenames:
+                                       droppedArray = (NSArray*)data;
+                                       
+                                       strArray = (GHOST_TStringArray*)malloc(sizeof(GHOST_TStringArray));
+                                       if (!strArray) return GHOST_kFailure;
+                                       
+                                       strArray->count = [droppedArray count];
+                                       if (strArray->count == 0) return GHOST_kFailure;
+                                       
+                                       strArray->strings = (GHOST_TUns8**) malloc(strArray->count*sizeof(GHOST_TUns8*));
+                                       
+                                       for (i=0;i<strArray->count;i++)
+                                       {
+                                               droppedStr = [droppedArray objectAtIndex:i];
+                                               
+                                               pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
+                                               temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1); 
+                                       
+                                               if (!temp_buff) {
+                                                       strArray->count = i;
+                                                       break;
+                                               }
+                                       
+                                               strncpy((char*)temp_buff, [droppedStr UTF8String], pastedTextSize);
+                                               temp_buff[pastedTextSize] = '\0';
+                                               
+                                               strArray->strings[i] = temp_buff;
+                                       }
+
+                                       eventData = (GHOST_TEventDataPtr) strArray;     
+                                       break;
+                                       
+                               case GHOST_kDragnDropTypeString:
+                                       droppedStr = (NSString*)data;
+                                       pastedTextSize = [droppedStr lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
+                                       
+                                       temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1); 
+                                       
+                                       if (temp_buff == NULL) {
+                                               return GHOST_kFailure;
+                                       }
+                                       
+                                       strncpy((char*)temp_buff, [droppedStr UTF8String], pastedTextSize);
+                                       
+                                       temp_buff[pastedTextSize] = '\0';
+                                       
+                                       eventData = (GHOST_TEventDataPtr) temp_buff;
+                                       break;
+                                       
+                               default:
+                                       return GHOST_kFailure;
+                                       break;
+                       }
+                       pushEvent(new GHOST_EventDragnDrop(getMilliSeconds(),GHOST_kEventDraggingEntered,draggedObjectType,window,mouseX,mouseY,eventData));
+               }
+                       break;
+               default:
+                       return GHOST_kFailure;
+       }
+       return GHOST_kSuccess;
+}
+
+
 GHOST_TUns8 GHOST_SystemCocoa::handleQuitRequest()
 {
        GHOST_Window* window = (GHOST_Window*)m_windowManager->getActiveWindow();
index e3479ada5d69f8c4829e12b09668fa588f66ec2b..e59d9c173330ce69603809fbace61166b998a07d 100644 (file)
@@ -40,6 +40,8 @@
 #include "GHOST_Window.h"
 #include "STR_String.h"
 
+@class CocoaWindow;
+
 class GHOST_SystemCocoa;
 
 /**
@@ -264,7 +266,7 @@ protected:
        virtual GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY);
     
        /** The window containing the OpenGL view */
-    NSWindow *m_window;
+    CocoaWindow *m_window;
        
        /** The openGL view */
        NSOpenGLView *m_openGLView; 
index f0bc8dd4d0f8de6b41ba2808520313eff7ff92b2..459a4a54ee31fe536d2fa32e65be1a22e59f6bbf 100644 (file)
@@ -124,16 +124,86 @@ extern "C" {
 //We need to subclass it to tell that even borderless (fullscreen), it can become key (receive user events)
 @interface CocoaWindow: NSWindow
 {
-
+       GHOST_SystemCocoa *systemCocoa;
+       GHOST_WindowCocoa *associatedWindow;
+       GHOST_TDragnDropTypes m_draggedObjectType;
 }
+- (void)setSystemAndWindowCocoa:(GHOST_SystemCocoa *)sysCocoa windowCocoa:(GHOST_WindowCocoa *)winCocoa;
 @end
 @implementation CocoaWindow
+- (void)setSystemAndWindowCocoa:(GHOST_SystemCocoa *)sysCocoa windowCocoa:(GHOST_WindowCocoa *)winCocoa
+{
+       systemCocoa = sysCocoa;
+       associatedWindow = winCocoa;
+}
 
 -(BOOL)canBecomeKeyWindow
 {
        return YES;
 }
 
+//The drag'n'drop dragging destination methods
+- (NSDragOperation)draggingEntered:(id < NSDraggingInfo >)sender
+{
+       NSPoint mouseLocation = [sender draggingLocation];
+       NSPasteboard *draggingPBoard = [sender draggingPasteboard];
+       
+       if ([[draggingPBoard types] containsObject:NSTIFFPboardType]) m_draggedObjectType = GHOST_kDragnDropTypeBitmap;
+       else if ([[draggingPBoard types] containsObject:NSFilenamesPboardType]) m_draggedObjectType = GHOST_kDragnDropTypeFilenames;
+       else if ([[draggingPBoard types] containsObject:NSStringPboardType]) m_draggedObjectType = GHOST_kDragnDropTypeString;
+       else return NSDragOperationNone;
+       
+       systemCocoa->handleDraggingEvent(GHOST_kEventDraggingEntered, m_draggedObjectType, associatedWindow, mouseLocation.x, mouseLocation.y, nil);
+       return NSDragOperationCopy;
+}
+
+
+- (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender
+{
+       NSPoint mouseLocation = [sender draggingLocation];
+       
+       systemCocoa->handleDraggingEvent(GHOST_kEventDraggingUpdated, m_draggedObjectType, associatedWindow, mouseLocation.x, mouseLocation.y, nil);
+       return NSDragOperationCopy;
+}
+
+- (void)draggingExited:(id < NSDraggingInfo >)sender
+{
+       systemCocoa->handleDraggingEvent(GHOST_kEventDraggingExited, m_draggedObjectType, associatedWindow, 0, 0, nil);
+       m_draggedObjectType = GHOST_kDragnDropTypeUnknown;
+}
+
+- (BOOL)prepareForDragOperation:(id < NSDraggingInfo >)sender
+{
+       if (systemCocoa->canAcceptDragOperation())
+               return YES;
+       else
+               return NO;
+}
+
+- (BOOL)performDragOperation:(id < NSDraggingInfo >)sender
+{
+       NSPoint mouseLocation = [sender draggingLocation];
+       NSPasteboard *draggingPBoard = [sender draggingPasteboard];
+       id data;
+       
+       switch (m_draggedObjectType) {
+               case GHOST_kDragnDropTypeBitmap:
+                       data = [draggingPBoard dataForType:NSTIFFPboardType];
+                       break;
+               case GHOST_kDragnDropTypeFilenames:
+                       data = [draggingPBoard propertyListForType:NSFilenamesPboardType];
+                       break;
+               case GHOST_kDragnDropTypeString:
+                       data = [draggingPBoard stringForType:@"public.utf8-plain-text"];
+                       break;
+               default:
+                       return NO;
+                       break;
+       }
+       systemCocoa->handleDraggingEvent(GHOST_kEventDraggingDropDone, m_draggedObjectType, associatedWindow, mouseLocation.x, mouseLocation.y, (void*)data);
+       return YES;
+}
+
 @end
 
 
@@ -207,6 +277,8 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
                return;
        }
        
+       [m_window setSystemAndWindowCocoa:systemCocoa windowCocoa:this];
+       
        //Forbid to resize the window below the blender defined minimum one
        minSize.width = 320;
        minSize.height = 240;
@@ -259,6 +331,9 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        
        [m_window setAcceptsMouseMovedEvents:YES];
        
+       [m_window registerForDraggedTypes:[NSArray arrayWithObjects:NSFilenamesPboardType,
+                                                                                 NSStringPboardType, NSTIFFPboardType, nil]];
+                                                                                 
        if (state == GHOST_kWindowStateFullScreen)
                setState(GHOST_kWindowStateFullScreen);
                
@@ -684,10 +759,18 @@ GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order)
 {
        GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setOrder(): window invalid")
     if (order == GHOST_kWindowOrderTop) {
-               [m_window orderFront:nil];
+               [m_window makeKeyAndOrderFront:nil];
     }
     else {
+               NSArray *windowsList;
+               
                [m_window orderBack:nil];
+               
+               //Check for other blender opened windows and make the frontmost key
+               windowsList = [NSApp orderedWindows];
+               if ([windowsList count]) {
+                       [[windowsList objectAtIndex:0] makeKeyAndOrderFront:nil];
+               }
     }
     return GHOST_kSuccess;
 }
index 9e3927314d38962e9e0cb5e1ca44a746b2a226f7..e404f1749356d26a3c0bcb9549b4b4eb7cdf560f 100644 (file)
@@ -73,6 +73,12 @@ extern "C" {
         */
        short MEM_freeN(void *vmemh);
 
+
+       /**
+        * Return zero if memory is not in allocated list
+        */
+       short MEM_testN(void *vmemh);
+
        /**
         * Duplicates a block of memory, and returns a pointer to the
         * newly allocated block.  */
@@ -102,6 +108,9 @@ extern "C" {
         * blocks. */ 
        void MEM_printmemlist(void);
 
+       /** calls the function on all allocated memory blocks. */
+       void MEM_callbackmemlist(void (*func)(void*));
+
        /** Print statistics about memory usage */
        void MEM_printmemlist_stats(void);
        
index ca7f2a4d5067bc97a443b411f93e106c0c76e73a..d1114af2437c09e7a5a27e41cdd7ade2574701de 100644 (file)
@@ -460,6 +460,47 @@ static void MEM_printmemlist_internal( int pydict )
        mem_unlock_thread();
 }
 
+void MEM_callbackmemlist(void (*func)(void*)) {
+       MemHead *membl;
+
+       mem_lock_thread();
+
+       membl = membase->first;
+       if (membl) membl = MEMNEXT(membl);
+
+       while(membl) {
+               func(membl+1);
+               if(membl->next)
+                       membl= MEMNEXT(membl->next);
+               else break;
+       }
+
+       mem_unlock_thread();
+}
+
+short MEM_testN(void *vmemh) {
+       MemHead *membl;
+
+       mem_lock_thread();
+
+       membl = membase->first;
+       if (membl) membl = MEMNEXT(membl);
+
+       while(membl) {
+               if (vmemh == membl+1)
+                       return 1;
+
+               if(membl->next)
+                       membl= MEMNEXT(membl->next);
+               else break;
+       }
+
+       mem_unlock_thread();
+
+       print_error("Memoryblock %p: pointer not in memlist\n", vmemh);
+       return 0;
+}
+
 void MEM_printmemlist( void ) {
        MEM_printmemlist_internal(0);
 }
@@ -500,7 +541,6 @@ short MEM_freeN(void *vmemh)                /* anders compileertie niet meer */
        }
 
        mem_lock_thread();
-
        if ((memh->tag1 == MEMTAG1) && (memh->tag2 == MEMTAG2) && ((memh->len & 0x3) == 0)) {
                memt = (MemTail *)(((char *) memh) + sizeof(MemHead) + memh->len);
                if (memt->tag3 == MEMTAG3){
index 2cdd7d3853e8990a65f87513b74fa8db545d0239..760b1627a91b0d8853f915a851f80b47b0f5b9a5 100644 (file)
@@ -41,6 +41,11 @@ ifeq ($(WITH_BF_OPENMP),true)
    CPPFLAGS += -DPARALLEL
 endif
 
+ifeq ($(WITH_FFTW3),true)
+    CPPFLAGS += -DFFTW3=1
+    CPPFLAGS += $(BF_FFTW3_INC)
+endif
+
 CPPFLAGS += -I.
 CPPFLAGS += -I../extern
 CPPFLAGS += -I$(NAN_PNG)/include
index f52dd193150cdeb76e4ea09dd295c33d4b265bab..c0a13bbe26bd8f72dfd26c24557bb668a565e34f 100644 (file)
                                RelativePath="..\..\..\source\blender\makesrna\intern\rna_fcurve.c"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\..\source\blender\makesrna\intern\rna_fcurve_api.c"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\..\source\blender\makesrna\intern\rna_fluidsim.c"\r
                                >\r
index 70bb348ad02efe4c61a1216593a1e3f5fabecbd5..a78b64c5095a3cc92fbfa13ecea7a4946a1ce04d 100755 (executable)
@@ -48,6 +48,7 @@ if filename[0] == ".":
 cname = filename + ".c"
 sys.stdout.write("Making C file <%s>\n" % cname)
 
+filename = filename.split("/")[-1].split("\\")[-1]
 filename = filename.replace(".", "_")
 sys.stdout.write(str(size))
 sys.stdout.write("\n")
index 52643af7d73b96d7702c91e45fb7b1e7b1a7a9cf..9cb176972e60d7df2833899aac71cc10248d5766 100644 (file)
@@ -34,7 +34,9 @@ def addFluidFiles(job, path):
                        match = pattern.match(fluid_file)
                        
                        if match:
-                               current_frame = int(match.groups()[1])
+                               # fluid frames starts at 0, which explains the +1
+                               # This is stupid
+                               current_frame = int(match.groups()[1]) + 1 
                                job.addFile(path + fluid_file, current_frame, current_frame)
 
 def addPointCache(job, ob, point_cache, default_path):
index 961ff83cc0634bb72db4d6d6c10b37d3fdee9245..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,72 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-# 
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-# 
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-def ord_ind(i1,i2):
-    if i1<i2: return i1,i2
-    return i2,i1
-    
-def edge_key(ed):
-    v1, v2 = tuple(ed.verts)
-    return ord_ind(v1, v2)
-
-def face_edge_keys(face):
-    verts = tuple(face.verts)
-    if len(verts)==3:
-        return ord_ind(verts[0], verts[1]),  ord_ind(verts[1], verts[2]),  ord_ind(verts[2], verts[0])
-    
-    return ord_ind(verts[0], verts[1]),  ord_ind(verts[1], verts[2]),  ord_ind(verts[2], verts[3]),  ord_ind(verts[3], verts[0])
-
-def mesh_edge_keys(mesh):
-    return [edge_key for face in mesh.faces for edge_key in face.edge_keys()]
-
-def mesh_edge_face_count_dict(mesh, face_edge_keys=None):
-    
-    # Optional speedup
-    if face_edge_keys==None:
-        face_edge_keys = [face.edge_keys() for face in face_list]
-        
-    face_edge_count = {}
-    for face_keys in face_edge_keys:
-        for key in face_keys:
-            try:
-                face_edge_count[key] += 1
-            except:
-                face_edge_count[key] = 1
-    
-    
-    return face_edge_count
-
-def mesh_edge_face_count(mesh, face_edge_keys=None):
-    edge_face_count_dict = mesh.edge_face_count_dict(face_edge_keys)
-    return [edge_face_count_dict.get(ed.key(), 0) for ed in mesh.edges]
-
-import bpy
-
-# * Edge *
-class_obj = bpy.types.MeshEdge
-class_obj.key = edge_key
-
-# * Face *
-class_obj = bpy.types.MeshFace
-class_obj.edge_keys = face_edge_keys
-
-# * Mesh *
-class_obj = bpy.types.Mesh
-class_obj.edge_keys = mesh_edge_keys
-class_obj.edge_face_count = mesh_edge_face_count
-class_obj.edge_face_count_dict = mesh_edge_face_count_dict
index 59c2ca3ebda1ff01f7e727b21331a9b2f5931798..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,22 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-# 
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-# 
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy
-class_obj = bpy.types.Object
-
-class_obj.getChildren = lambda self: [child for child in bpy.data.objects if child.parent == self]
index 435c545dc757d6d005ad1da1546c3c2979f5e95e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,20 +0,0 @@
-# ##### BEGIN GPL LICENSE BLOCK #####
-#
-#  This program is free software; you can redistribute it and/or
-#  modify it under the terms of the GNU General Public License
-#  as published by the Free Software Foundation; either version 2
-#  of the License, or (at your option) any later version.
-# 
-#  This program is distributed in the hope that it will be useful,
-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#  GNU General Public License for more details.
-# 
-#  You should have received a copy of the GNU General Public License
-#  along with this program; if not, write to the Free Software Foundation,
-#  Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-#
-# ##### END GPL LICENSE BLOCK #####
-
-import bpy_ext.Object
-import bpy_ext.Mesh
index 8078816f982fed373ebac7a03a50ff6bac23aafb..35d986fe09db78e386e78127f56f53acf779be4b 100644 (file)
@@ -4,12 +4,12 @@
 #  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.
@@ -127,11 +127,11 @@ class bpy_ops_submodule_op(object):
     '''
 
     __keys__ = ('module', 'func')
-    
-    
+
+
     def _get_doc(self):
         return op_as_string(self.idname())
-    
+
     __doc__ = property(_get_doc)
 
     def __init__(self, module, func):
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
new file mode 100644 (file)
index 0000000..5a8b46c
--- /dev/null
@@ -0,0 +1,94 @@
+# ##### 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.
+#
+# ##### END GPL LICENSE BLOCK #####
+
+import bpy
+
+StructRNA = bpy.types.Struct.__bases__[0]
+# StructRNA = bpy.types.Struct
+
+
+class Context(StructRNA):
+    
+    def copy(self):
+        new_context = {}
+        generic_keys = StructRNA.__dict__.keys()
+        for item in dir(self):
+            if item not in generic_keys:
+                new_context[item] = getattr(self, item)
+            
+        return new_context
+
+
+class Object(bpy.types.ID):
+
+    def _get_children(self):
+        return [child for child in bpy.data.objects if child.parent == self]
+
+    children = property(_get_children)
+
+
+def ord_ind(i1,i2):
+    if i1<i2: return i1,i2
+    return i2,i1
+
+class Mesh(bpy.types.ID):
+    
+    def _get_edge_keys(self):
+        return [edge_key for face in self.faces for edge_key in face.edge_keys]
+
+    edge_keys = property(_get_edge_keys)
+
+    def _get_edge_face_count_dict(self):
+        face_edge_keys = [face.edge_keys for face in self.faces]
+        face_edge_count = {}
+        for face_keys in face_edge_keys:
+            for key in face_keys:
+                try:
+                    face_edge_count[key] += 1
+                except:
+                    face_edge_count[key] = 1
+
+        return face_edge_count
+
+    edge_face_count_dict = property(_get_edge_face_count_dict)
+
+    def _get_edge_face_count(self):
+        edge_face_count_dict = self.edge_face_count_dict
+        return [edge_face_count_dict.get(ed.key, 0) for ed in mesh.edges]
+
+    edge_face_count = property(_get_edge_face_count)
+
+
+class MeshEdge(StructRNA):
+
+    def _get_key(self):
+        return ord_ind(*tuple(self.verts))
+
+    key = property(_get_key)
+
+
+class MeshFace(StructRNA):
+
+    def _get_edge_keys(self):
+        verts = tuple(self.verts)
+        if len(verts)==3:
+            return ord_ind(verts[0], verts[1]),  ord_ind(verts[1], verts[2]),  ord_ind(verts[2], verts[0])
+
+        return ord_ind(verts[0], verts[1]),  ord_ind(verts[1], verts[2]),  ord_ind(verts[2], verts[3]),  ord_ind(verts[3], verts[0])
+
+    edge_keys = property(_get_edge_keys)
index dde01152daed20e890aba9f164b73f243130239d..5a73364c1b1593b80aef38943b320912559ee810 100644 (file)
@@ -4,12 +4,12 @@
 #  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.
diff --git a/release/scripts/modules/console/complete_calltip.py b/release/scripts/modules/console/complete_calltip.py
new file mode 100644 (file)
index 0000000..486f946
--- /dev/null
@@ -0,0 +1,190 @@
+# Copyright (c) 2009 www.stani.be (GPL license)
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 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 Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+import inspect
+import re
+
+
+# regular expression constants
+DEF_DOC = '%s\s*(\(.*?\))'
+DEF_SOURCE = 'def\s+%s\s*(\(.*?\)):'
+RE_EMPTY_LINE = re.compile('^\s*\n')
+RE_FLAG = re.MULTILINE | re.DOTALL
+RE_NEWLINE = re.compile('\n+')
+RE_SPACE = re.compile('\s+')
+RE_DEF_COMPLETE = re.compile(
+    # don't start with a quote
+    '''(?:^|[^"'a-zA-Z0-9_])'''
+    # start with a \w = [a-zA-Z0-9_]
+    '''((\w+'''
+    # allow also dots and closed bracket pairs []
+    '''(?:\w|[.]|\[.+?\])*'''
+    # allow empty string
+    '''|)'''
+    # allow opening bracket(s)
+    '''(?:\(|\s)*)$''')
+
+
+def reduce_newlines(text):
+    """Reduces multiple newlines to a single newline.
+
+    :param text: text with multiple newlines
+    :type text: str
+    :returns: text with single newlines
+    :rtype: str
+
+    >>> reduce_newlines('hello\\n\\nworld')
+    'hello\\nworld'
+    """
+    return RE_NEWLINE.sub('\n', text)
+
+
+def reduce_spaces(text):
+    """Reduces multiple whitespaces to a single space.
+
+    :param text: text with multiple spaces
+    :type text: str
+    :returns: text with single spaces
+    :rtype: str
+
+    >>> reduce_spaces('hello    \\nworld')
+    'hello world'
+    """
+    return RE_SPACE.sub(' ', text)
+
+
+def get_doc(object):
+    """Get the doc string or comments for an object.
+
+    :param object: object
+    :returns: doc string
+    :rtype: str
+
+    >>> get_doc(abs)
+    'abs(number) -> number\\n\\nReturn the absolute value of the argument.'
+    """
+    result = inspect.getdoc(object) or inspect.getcomments(object)
+    return result and RE_EMPTY_LINE.sub('', result.rstrip()) or ''
+
+
+def get_argspec(func, strip_self=True, doc=None, source=None):
+    """Get argument specifications.
+
+    :param strip_self: strip `self` from argspec
+    :type strip_self: bool
+    :param doc: doc string of func (optional)
+    :type doc: str
+    :param source: source code of func (optional)
+    :type source: str
+    :returns: argument specification
+    :rtype: str
+
+    >>> get_argspec(inspect.getclasstree)
+    '(classes, unique=0)'
+    >>> get_argspec(abs)
+    '(number)'
+    """
+    # get the function object of the class
+    try:
+        func = func.__func__
+    except AttributeError:
+        try:
+            # py 2.X
+            func = func.im_func
+        except AttributeError:
+            pass
+    # is callable?
+    if not hasattr(func, '__call__'):
+        return ''
+    # func should have a name
+    try:
+        func_name = func.__name__
+    except AttributeError:
+        return ''
+    # from docstring
+    if doc is None:
+        doc = get_doc(func)
+    match = re.search(DEF_DOC % func_name, doc, RE_FLAG)
+    # from source code
+    if not match:
+        if source is None:
+            try:
+                source = inspect.getsource(func)
+            except TypeError:
+                source = ''
+        if source:
+            match = re.search(DEF_SOURCE % func_name, source, RE_FLAG)
+    if match:
+        argspec = reduce_spaces(match.group(1))
+    else:
+        # try with the inspect.getarg* functions
+        try:
+            argspec = inspect.formatargspec(*inspect.getfullargspec(func))
+        except:
+            try:
+                # py 2.X
+                argspec = inspect.formatargspec(*inspect.getargspec(func))
+            except:
+                try:
+                    argspec = inspect.formatargvalues(
+                        *inspect.getargvalues(func))
+                except:
+                    argspec = ''
+        if strip_self:
+            argspec = argspec.replace('self, ', '')
+    return argspec
+
+
+def complete(line, cursor, namespace):
+    """Complete callable with calltip.
+
+    :param line: incomplete text line
+    :type line: str
+    :param cursor: current character position
+    :type cursor: int
+    :param namespace: namespace
+    :type namespace: dict
+    :returns: (matches, world, scrollback)
+    :rtype: (list of str, str, str)
+
+    >>> import os
+    >>> complete('os.path.isdir(', 14, {'os': os})[-1]
+    'isdir(s)\\nReturn true if the pathname refers to an existing directory.'
+    >>> complete('abs(', 4, {})[-1]
+    'abs(number) -> number\\nReturn the absolute value of the argument.'
+    """
+    matches = []
+    match = RE_DEF_COMPLETE.search(line[:cursor])
+    if match:
+        word = match.group(1)
+        func_word = match.group(2)
+        try:
+            func = eval(func_word, namespace)
+        except Exception:
+            func = None
+            scrollback = ''
+        if func:
+            doc = get_doc(func)
+            argspec = get_argspec(func, doc=doc)
+            scrollback = func_word.split('.')[-1] + (argspec or '()')
+            if doc.startswith(scrollback):
+                scrollback = doc
+            elif doc:
+                scrollback += '\n' + doc
+            scrollback = reduce_newlines(scrollback)
+    else:
+        word = ''
+        scrollback = ''
+    return matches, word, scrollback
index 8d124f222a1eccaf6036af2185d5ee951655db10..e176626aac34d9b78faf78029546f4a08886dbd9 100644 (file)
@@ -4,12 +4,12 @@
 #  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.
index 4bf20e470e87ba66285120eb9bc99622529ac60f..874101d1c798d66b1ee4f3638a88f58c37aa846a 100644 (file)
 
 # <pep8 compliant>
 import sys
+import os
+
 import bpy
 
+
 language_id = 'shell'
 
 def add_scrollback(text, text_type):
@@ -27,10 +30,17 @@ def add_scrollback(text, text_type):
         bpy.ops.console.scrollback_append(text=l.replace('\t', '    '),
             type=text_type)
 
-
 def shell_run(text):
-    import os
-    add_scrollback(os.popen(text).read(), 'OUTPUT')
+    import subprocess
+    val, output= subprocess.getstatusoutput(text)
+
+    if not val:
+        style= 'OUTPUT'
+    else:
+        style= 'ERROR'
+
+    add_scrollback(output, style)
+
 
 class ShellConsoleExec(bpy.types.Operator):
     '''Execute the current console line as a python expression.'''
@@ -64,6 +74,7 @@ class ShellConsoleExec(bpy.types.Operator):
         bpy.ops.console.history_append(text="", current_character=0,
             remove_duplicates=True)
 
+        sc.prompt = os.getcwd()+ShellConsoleExec.PROMPT
         return ('FINISHED',)
 
 
@@ -93,7 +104,7 @@ class ShellConsoleBanner(bpy.types.Operator):
         sc = context.space_data
         
         shell_run("bash --version")
-        sc.prompt = ShellConsoleExec.PROMPT
+        sc.prompt = os.getcwd()+ShellConsoleExec.PROMPT
 
         return ('FINISHED',)
 
index 8ea9ea030625ae52325a97ca581ee6f1240ad285..f78e33730f0907191f9c9c28ffb7f85f08f0ee3e 100644 (file)
@@ -28,9 +28,9 @@ def main(context):
     mesh = ob.data
     
     face_list = [face for face in mesh.faces]
-    face_edge_keys = [face.edge_keys() for face in face_list]
+    face_edge_keys = [face.edge_keys for face in face_list]
 
-    edge_face_count = mesh.edge_face_count_dict(face_edge_keys)
+    edge_face_count = mesh.edge_face_count_dict
     
     def test_interior(index):
         for key in face_edge_keys[index]:
index 85df6463eb0a78823480ea253ec86802a4857238..f9a92c8cd82225d26a04c531e8d1f918dc85b75a 100644 (file)
@@ -256,11 +256,11 @@ def getSelectedEdges(context, me, ob):
        if MESH_MODE == 'FACE':
                context.scene.tool_settings.mesh_selection_mode = 'EDGE'
                # value is [edge, face_sel_user_in]
-               edge_dict=  dict((ed.key(), [ed, 0]) for ed in me.edges)
+               edge_dict=  dict((ed.key, [ed, 0]) for ed in me.edges)
                
                for f in me.faces:
                        if f.selected:
-                               for edkey in f.edge_keys():
+                               for edkey in f.edge_keys:
                                        edge_dict[edkey][1] += 1
                
                context.scene.tool_settings.mesh_selection_mode = MESH_MODE
@@ -280,7 +280,7 @@ def getVertLoops(selEdges, me):
        vert_used = [False] * tot
        
        for ed in selEdges:
-               i1, i2 = ed.key()
+               i1, i2 = ed.key
                vert_siblings[i1].append(i2)
                vert_siblings[i2].append(i1)
        
index 454cb2f23ecdab75892b1618a11f18604b3dc05c..11202329a3da367eb919b1a7af7afe371ac6b466 100644 (file)
@@ -800,7 +800,7 @@ class thickface(object):
                        
                self.no = face.normal
                self.area = face.area
-               self.edge_keys = face.edge_keys()
+               self.edge_keys = face.edge_keys
 
 global ob
 ob = None
index 7d32c153d0461c55e2d83408ee856d2fe95734d5..04398dfa8cec2a9bd45b310e366fb260b4c9e1cc 100644 (file)
@@ -117,7 +117,7 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean,
         active_col_layer = me.vertex_colors[0].data
 
     if not active_col_layer:
-        return("CANCELLED", )
+        return('CANCELLED', )
 
     for i, f in enumerate(me.faces):
         if not me.use_paint_mask or f.selected:
index 203a693de5ac070ab15368211504cf7ccc05b968..37d354d0e6bb038a0877918a6236784cc30fb3e3 100644 (file)
@@ -4,12 +4,12 @@
 #  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.
index b3fe0a4a6cae30546d4f65bfade459ce7005d2bb..0accb57ccc26f14a9f53158acdbee48626ddb145 100644 (file)
@@ -4,12 +4,12 @@
 #  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.
index c19ec7d9116baeafbbecce331a0c70c8a08341de..8cb4fd7ca8dad01a600775807cf333a8743a5784 100644 (file)
@@ -4,12 +4,12 @@
 #  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.
index 7eb21ad4f8b2e2d5357b8fbd907eca9c34cf97e6..1ed45f3e2119f38db4e3b6633a39509157b6fb99 100644 (file)
@@ -4,12 +4,12 @@
 #  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.
index 6e166a3e97014856de890fb75cbde3761998712d..438df083d4de6bfec516a9dafd70d1c8f797132d 100644 (file)
@@ -4,12 +4,12 @@
 #  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.
index 76d37a5931f50ddf0ee2c863ca175d1368bf4a4e..49e26a2e8c2fcd70d349280c55eca6b560385d09 100644 (file)
@@ -159,42 +159,42 @@ class DATA_PT_shape_keys(DataButtonsPanel):
 
         col = row.column()
 
-        subcol = col.column(align=True)
-        subcol.itemO("object.shape_key_add", icon='ICON_ZOOMIN', text="")
-        subcol.itemO("object.shape_key_remove", icon='ICON_ZOOMOUT', text="")
+        sub = col.column(align=True)
+        sub.itemO("object.shape_key_add", icon='ICON_ZOOMIN', text="")
+        sub.itemO("object.shape_key_remove", icon='ICON_ZOOMOUT', text="")
 
         if kb:
             col.itemS()
 
-            subcol = col.column(align=True)
-            subcol.item_enumO("object.shape_key_move", "type", 'UP', icon='ICON_TRIA_UP', text="")
-            subcol.item_enumO("object.shape_key_move", "type", 'DOWN', icon='ICON_TRIA_DOWN', text="")
+            sub = col.column(align=True)
+            sub.item_enumO("object.shape_key_move", "type", 'UP', icon='ICON_TRIA_UP', text="")
+            sub.item_enumO("object.shape_key_move", "type", 'DOWN', icon='ICON_TRIA_DOWN', text="")
 
             split = layout.split(percentage=0.4)
-            sub = split.row()
-            sub.enabled = enable_edit
-            sub.itemR(key, "relative")
+            row = split.row()
+            row.enabled = enable_edit
+            row.itemR(key, "relative")
 
-            sub = split.row()
-            sub.alignment = 'RIGHT'
+            row = split.row()
+            row.alignment = 'RIGHT'
 
-            subrow = sub.row(align=True)
-            subrow1 = subrow.row(align=True)
-            subrow1.active = enable_edit_value
+            sub = row.row(align=True)
+            subsub = sub.row(align=True)
+            subsub.active = enable_edit_value
             if ob.shape_key_lock:
-                subrow1.itemR(ob, "shape_key_lock", icon='ICON_PINNED', text="")
+                subsub.itemR(ob, "shape_key_lock", icon='ICON_PINNED', text="")
             else:
-                subrow1.itemR(ob, "shape_key_lock", icon='ICON_UNPINNED', text="")
+                subsub.itemR(ob, "shape_key_lock", icon='ICON_UNPINNED', text="")
             if kb.mute:
-                subrow1.itemR(kb, "mute", icon='ICON_MUTE_IPO_ON', text="")
+                subsub.itemR(kb, "mute", icon='ICON_MUTE_IPO_ON', text="")
             else:
-                subrow1.itemR(kb, "mute", icon='ICON_MUTE_IPO_OFF', text="")
-            subrow.itemR(ob, "shape_key_edit_mode", text="")
-            
-            subrow = sub.row(align=True)
-            subrow.itemO("object.shape_key_mirror", icon='ICON_ARROW_LEFTRIGHT', text="")
-            subrow.itemO("object.shape_key_clear", icon='ICON_X', text="")
-            
+                subsub.itemR(kb, "mute", icon='ICON_MUTE_IPO_OFF', text="")
+            sub.itemR(ob, "shape_key_edit_mode", text="")
+
+            sub = row.row(align=True)
+            sub.itemO("object.shape_key_mirror", icon='ICON_ARROW_LEFTRIGHT', text="")
+            sub.itemO("object.shape_key_clear", icon='ICON_X', text="")
+
 
             row = layout.row()
             row.itemR(kb, "name")
@@ -206,17 +206,18 @@ class DATA_PT_shape_keys(DataButtonsPanel):
                     row.itemR(kb, "value")
 
                     split = layout.split()
-                    sub = split.column(align=True)
-                    sub.active = enable_edit_value
-                    sub.itemL(text="Range:")
-                    sub.itemR(kb, "slider_min", text="Min")
-                    sub.itemR(kb, "slider_max", text="Max")
-
-                    sub = split.column(align=True)
-                    sub.active = enable_edit_value
-                    sub.itemL(text="Blend:")
-                    sub.item_pointerR(kb, "vertex_group", ob, "vertex_groups", text="")
-                    sub.item_pointerR(kb, "relative_key", key, "keys", text="")
+
+                    col = split.column(align=True)
+                    col.active = enable_edit_value
+                    col.itemL(text="Range:")
+                    col.itemR(kb, "slider_min", text="Min")
+                    col.itemR(kb, "slider_max", text="Max")
+
+                    col = split.column(align=True)
+                    col.active = enable_edit_value
+                    col.itemL(text="Blend:")
+                    col.item_pointerR(kb, "vertex_group", ob, "vertex_groups", text="")
+                    col.item_pointerR(kb, "relative_key", key, "keys", text="")
 
             else:
                 row = layout.row()
index 67d9cea09345ebf3acf8074b332209a80ef7bec8..8cdc53a50946b0ce1631b424c6d653cd64f0ca1f 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 import bpy
 
+narrowui = 180
 
 def active_node_mat(mat):
     # TODO, 2.4x has a pipeline section, for 2.5 we need to communicate
@@ -72,6 +73,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
         ob = context.object
         slot = context.material_slot
         space = context.space_data
+        col2 = context.region.width > narrowui
 
         if ob:
             row = layout.row()
@@ -89,22 +91,28 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel):
                 row.itemO("object.material_slot_select", text="Select")
                 row.itemO("object.material_slot_deselect", text="Deselect")
 
-        split = layout.split(percentage=0.65)
-
-        if ob:
-            split.template_ID(ob, "active_material", new="material.new")
-            row = split.row()
-            if slot:
-                row.itemR(slot, "link", text="")
-            else:
-                row.itemL()
-        elif mat:
-            split.template_ID(space, "pin_id")
-            split.itemS()
+        if col2:
+            split = layout.split(percentage=0.65)
+    
+            if ob:
+                split.template_ID(ob, "active_material", new="material.new")
+                row = split.row()
+                if slot:
+                    row.itemR(slot, "link", text="")
+                else:
+                    row.itemL()
+            elif mat:
+                split.template_ID(space, "pin_id")
+                split.itemS()
+        else:
+            layout.template_ID(ob, "active_material", new="material.new")
 
         if mat:
-            layout.itemR(mat, "type", expand=True)
-
+            if col2:
+                layout.itemR(mat, "type", expand=True)
+            else:
+                layout.itemR(mat, "type", text="")
+                
 
 class MATERIAL_PT_shading(MaterialButtonsPanel):
     bl_label = "Shading"
@@ -119,6 +127,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel):
         layout = self.layout
 
         mat = active_node_mat(context.material)
+        col2 = context.region.width > narrowui
 
         if mat.type in ('SURFACE', 'WIRE'):
             split = layout.split()
@@ -131,7 +140,8 @@ class MATERIAL_PT_shading(MaterialButtonsPanel):
             sub = col.column()
             sub.itemR(mat, "translucency")
 
-            col = split.column()
+            if col2:
+                col = split.column()
             col.itemR(mat, "shadeless")
             sub = col.column()
             sub.active = not mat.shadeless
@@ -157,21 +167,24 @@ class MATERIAL_PT_strand(MaterialButtonsPanel):
 
         mat = context.material # dont use node material
         tan = mat.strand
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
-        col = split.column(align=True)
-        col.itemL(text="Size:")
-        col.itemR(tan, "root_size", text="Root")
-        col.itemR(tan, "tip_size", text="Tip")
-        col.itemR(tan, "min_size", text="Minimum")
-        col.itemR(tan, "blender_units")
+        col = split.column()
+        sub = col.column(align=True)
+        sub.itemL(text="Size:")
+        sub.itemR(tan, "root_size", text="Root")
+        sub.itemR(tan, "tip_size", text="Tip")
+        sub.itemR(tan, "min_size", text="Minimum")
+        sub.itemR(tan, "blender_units")
         sub = col.column()
         sub.active = (not mat.shadeless)
         sub.itemR(tan, "tangent_shading")
         col.itemR(tan, "shape")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemL(text="Shading:")
         col.itemR(tan, "width_fade")
         ob = context.object
@@ -196,7 +209,8 @@ class MATERIAL_PT_physics(MaterialButtonsPanel):
         layout = self.layout
 
         phys = context.material.physics # dont use node material
-
+        col2 = context.region.width > narrowui
+        
         split = layout.split()
 
         col = split.column()
@@ -204,7 +218,8 @@ class MATERIAL_PT_physics(MaterialButtonsPanel):
         col.itemR(phys, "friction")
         col.itemR(phys, "align_to_normal")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(phys, "force", slider=True)
         col.itemR(phys, "elasticity", slider=True)
         col.itemR(phys, "damp", slider=True)
@@ -223,6 +238,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
         layout = self.layout
 
         mat = active_node_mat(context.material)
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
@@ -242,7 +258,8 @@ class MATERIAL_PT_options(MaterialButtonsPanel):
         row.active = mat.light_group
         row.itemR(mat, "light_group_exclusive", text="Exclusive")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(mat, "face_texture")
         sub = col.column()
         sub.active = mat.face_texture
@@ -267,6 +284,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
         layout = self.layout
 
         mat = active_node_mat(context.material)
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
@@ -277,7 +295,8 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
         col.itemR(mat, "cast_shadows_only", text="Cast Only")
         col.itemR(mat, "shadow_casting_alpha", text="Casting Alpha")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(mat, "cast_buffer_shadows")
         sub = col.column()
         sub.active = mat.cast_buffer_shadows
@@ -301,6 +320,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
         layout = self.layout
 
         mat = active_node_mat(context.material)
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
@@ -310,7 +330,8 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
         sub.active = (not mat.shadeless)
         sub.itemR(mat, "diffuse_intensity", text="Intensity")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.active = (not mat.shadeless)
         col.itemR(mat, "diffuse_shader", text="")
         col.itemR(mat, "use_diffuse_ramp", text="Ramp")
@@ -322,25 +343,37 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel):
         elif mat.diffuse_shader == 'MINNAERT':
             col.itemR(mat, "darkness")
         elif mat.diffuse_shader == 'TOON':
-            row = col.row()
-            row.itemR(mat, "diffuse_toon_size", text="Size")
-            row.itemR(mat, "diffuse_toon_smooth", text="Smooth")
+            split = col.split()
+            
+            col = split.column()
+            col.itemR(mat, "diffuse_toon_size", text="Size")
+            
+            if col2:
+                col = split.column()
+            col.itemR(mat, "diffuse_toon_smooth", text="Smooth")
         elif mat.diffuse_shader == 'FRESNEL':
-            row = col.row()
-            row.itemR(mat, "diffuse_fresnel", text="Fresnel")
-            row.itemR(mat, "diffuse_fresnel_factor", text="Factor")
+            split = col.split()
+            
+            col = split.column()
+            col.itemR(mat, "diffuse_fresnel", text="Fresnel")
+            
+            if col2:
+                col = split.column()
+            col.itemR(mat, "diffuse_fresnel_factor", text="Factor")
 
         if mat.use_diffuse_ramp:
             layout.itemS()
             layout.template_color_ramp(mat, "diffuse_ramp", expand=True)
             layout.itemS()
-            row = layout.row()
-            split = row.split(percentage=0.3)
-            split.itemL(text="Input:")
-            split.itemR(mat, "diffuse_ramp_input", text="")
-            split = row.split(percentage=0.3)
-            split.itemL(text="Blend:")
-            split.itemR(mat, "diffuse_ramp_blend", text="")
+            
+            split = layout.split()
+            
+            col = split.column()
+            col.itemR(mat, "diffuse_ramp_input", text="Input")
+            
+            if col2:
+                col = split.column()
+            col.itemR(mat, "diffuse_ramp_blend", text="Blend")
             row = layout.row()
             row.itemR(mat, "diffuse_ramp_factor", text="Factor")
 
@@ -358,6 +391,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
         layout = self.layout
 
         mat = active_node_mat(context.material)
+        col2 = context.region.width > narrowui
 
         layout.active = (not mat.shadeless)
 
@@ -367,7 +401,8 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
         col.itemR(mat, "specular_color", text="")
         col.itemR(mat, "specular_intensity", text="Intensity")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(mat, "specular_shader", text="")
         col.itemR(mat, "use_specular_ramp", text="Ramp")
 
@@ -375,27 +410,39 @@ class MATERIAL_PT_specular(MaterialButtonsPanel):
         if mat.specular_shader in ('COOKTORR', 'PHONG'):
             col.itemR(mat, "specular_hardness", text="Hardness")
         elif mat.specular_shader == 'BLINN':
-            row = col.row()
-            row.itemR(mat, "specular_hardness", text="Hardness")
-            row.itemR(mat, "specular_ior", text="IOR")
+            split = layout.split()
+            
+            col = split.column()
+            col.itemR(mat, "specular_hardness", text="Hardness")
+            
+            if col2:
+                col = split.column()
+            col.itemR(mat, "specular_ior", text="IOR")
         elif mat.specular_shader == 'WARDISO':
             col.itemR(mat, "specular_slope", text="Slope")
         elif mat.specular_shader == 'TOON':
-            row = col.row()
-            row.itemR(mat, "specular_toon_size", text="Size")
-            row.itemR(mat, "specular_toon_smooth", text="Smooth")
+            split = layout.split()
+            
+            col = split.column()
+            col.itemR(mat, "specular_toon_size", text="Size")
+            
+            if col2:
+                col = split.column()
+            col.itemR(mat, "specular_toon_smooth", text="Smooth")
 
         if mat.use_specular_ramp:
             layout.itemS()
             layout.template_color_ramp(mat, "specular_ramp", expand=True)
             layout.itemS()
-            row = layout.row()
-            split = row.split(percentage=0.3)
-            split.itemL(text="Input:")
-            split.itemR(mat, "specular_ramp_input", text="")
-            split = row.split(percentage=0.3)
-            split.itemL(text="Blend:")
-            split.itemR(mat, "specular_ramp_blend", text="")
+            split = layout.split()
+            
+            col = split.column()
+            col.itemR(mat, "specular_ramp_input", text="Input")
+            
+            if col2:
+                col = split.column()
+            col.itemR(mat, "specular_ramp_blend", text="Blend")
+            
             row = layout.row()
             row.itemR(mat, "specular_ramp_factor", text="Factor")
 
@@ -422,6 +469,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
 
         mat = active_node_mat(context.material)
         sss = mat.subsurface_scattering
+        col2 = context.region.width > narrowui
 
         layout.active = sss.enabled
 
@@ -434,7 +482,8 @@ class MATERIAL_PT_sss(MaterialButtonsPanel):
         col.itemR(sss, "color", text="")
         col.itemR(sss, "radius", text="RGB Radius")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         sub = col.column(align=True)
         sub.itemL(text="Blend:")
         sub.itemR(sss, "color_factor", text="Color")
@@ -466,6 +515,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
 
         mat = active_node_mat(context.material)
         raym = mat.raytrace_mirror
+        col2 = context.region.width > narrowui
 
         layout.active = raym.enabled
 
@@ -475,7 +525,8 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
         col.itemR(raym, "reflect_factor")
         col.itemR(mat, "mirror_color", text="")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(raym, "fresnel")
         sub = col.column()
         sub.active = raym.fresnel > 0
@@ -492,7 +543,8 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel):
         sub.itemL(text="Fade To:")
         sub.itemR(raym, "fade_to", text="")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemL(text="Gloss:")
         col.itemR(raym, "gloss_factor", text="Amount")
         sub = col.column()
@@ -522,10 +574,14 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
 
         mat = active_node_mat(context.material)
         rayt = mat.raytrace_transparency
+        col2 = context.region.width > narrowui
 
         row = layout.row()
         row.active = mat.transparency and (not mat.shadeless)
-        row.itemR(mat, "transparency_method", expand=True)
+        if col2:
+            row.itemR(mat, "transparency_method", expand=True)
+        else:
+            row.itemR(mat, "transparency_method", text="")
 
         split = layout.split()
 
@@ -535,7 +591,8 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
         row.active = mat.transparency and (not mat.shadeless)
         row.itemR(mat, "specular_alpha", text="Specular")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.active = (not mat.shadeless)
         col.itemR(rayt, "fresnel")
         sub = col.column()
@@ -554,7 +611,8 @@ class MATERIAL_PT_transp(MaterialButtonsPanel):
             col.itemR(rayt, "limit")
             col.itemR(rayt, "depth")
 
-            col = split.column()
+            if col2:
+                col = split.column()
             col.itemL(text="Gloss:")
             col.itemR(rayt, "gloss_factor", text="Amount")
             sub = col.column()
@@ -577,6 +635,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
 
         mat = context.material # dont use node material
         halo = mat.halo
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
@@ -592,7 +651,8 @@ class MATERIAL_PT_halo(MaterialButtonsPanel):
         col.itemR(halo, "shaded")
         col.itemR(halo, "soft")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(halo, "ring")
         sub = col.column()
         sub.active = halo.ring
@@ -630,6 +690,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel):
 
         mat = context.material # dont use node material
         halo = mat.halo
+        col2 = context.region.width > narrowui
 
         layout.active = halo.flare_mode
 
@@ -639,7 +700,8 @@ class MATERIAL_PT_flare(MaterialButtonsPanel):
         col.itemR(halo, "flare_size", text="Size")
         col.itemR(halo, "flare_boost", text="Boost")
         col.itemR(halo, "flare_seed", text="Seed")
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(halo, "flares_sub", text="Subflares")
         col.itemR(halo, "flare_subsize", text="Subsize")
 
@@ -679,11 +741,15 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel):
         layout = self.layout
 
         vol = context.material.volume # dont use node material
+        col2 = context.region.width > narrowui
 
         split = layout.split()
-        row = split.row()
-        row.itemR(vol, "density")
-        row.itemR(vol, "density_scale")
+        col = split.column()
+        col.itemR(vol, "density")
+        
+        if col2:
+            col = split.column()
+        col.itemR(vol, "density_scale")
 
 
 class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
@@ -695,6 +761,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
         layout = self.layout
 
         vol = context.material.volume # dont use node material
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
@@ -703,7 +770,8 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel):
         col.itemR(vol, "asymmetry")
         col.itemR(vol, "transmission_color")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         sub = col.column(align=True)
         sub.itemR(vol, "emission")
         sub.itemR(vol, "emission_color", text="")
@@ -721,13 +789,15 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel):
         layout = self.layout
 
         vol = context.material.volume # dont use node material
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
         col = split.column()
         col.itemR(vol, "lighting_mode", text="")
 
-        col = split.column()
+        if col2:
+            col = split.column()
 
         if vol.lighting_mode == 'SHADED':
             col.itemR(vol, "external_shadows")
@@ -756,8 +826,12 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel):
         layout = self.layout
 
         mat = context.material # dont use node material
+        col2 = context.region.width > narrowui
 
-        layout.itemR(mat, "transparency_method", expand=True)
+        if col2:
+            layout.itemR(mat, "transparency_method", expand=True)
+        else:
+            layout.itemR(mat, "transparency_method", text="")
 
 
 class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
@@ -769,6 +843,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
         layout = self.layout
 
         vol = context.material.volume # dont use node material
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
@@ -778,7 +853,8 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel):
         col = col.column(align=True)
         col.itemR(vol, "step_size")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemL()
         col.itemR(vol, "depth_cutoff")
 
index fe1458a080a8b6d22970c72e3dc8f267c3d85dae..68bf57e923858a880453557d5908d2ef89a79a42 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 import bpy
 
+narrowui = 180
 
 class ObjectButtonsPanel(bpy.types.Panel):
     bl_space_type = 'PROPERTIES'
@@ -47,23 +48,36 @@ class OBJECT_PT_transform(ObjectButtonsPanel):
         layout = self.layout
 
         ob = context.object
+        col2 = context.region.width > narrowui
 
-        row = layout.row()
-
-        row.column().itemR(ob, "location")
-        if ob.rotation_mode == 'QUATERNION':
-            row.column().itemR(ob, "rotation_quaternion", text="Rotation")
-        elif ob.rotation_mode == 'AXIS_ANGLE':
-            #row.column().itemL(text="Rotation")
-            #row.column().itemR(pchan, "rotation_angle", text="Angle")
-            #row.column().itemR(pchan, "rotation_axis", text="Axis")
-            row.column().itemR(ob, "rotation_axis_angle", text="Rotation")
+        if col2:
+            row = layout.row()
+            
+            row.column().itemR(ob, "location")
+            if ob.rotation_mode == 'QUATERNION':
+                row.column().itemR(ob, "rotation_quaternion", text="Rotation")
+            elif ob.rotation_mode == 'AXIS_ANGLE':
+                #row.column().itemL(text="Rotation")
+                #row.column().itemR(pchan, "rotation_angle", text="Angle")
+                #row.column().itemR(pchan, "rotation_axis", text="Axis")
+                row.column().itemR(ob, "rotation_axis_angle", text="Rotation")
+            else:
+                row.column().itemR(ob, "rotation_euler", text="Rotation")
+    
+            row.column().itemR(ob, "scale")
+    
+            layout.itemR(ob, "rotation_mode")
         else:
-            row.column().itemR(ob, "rotation_euler", text="Rotation")
-
-        row.column().itemR(ob, "scale")
-
-        layout.itemR(ob, "rotation_mode")
+            col = layout.column()
+            col.itemR(ob, "location")
+            col.itemR(ob, "rotation_mode", text="")
+            if ob.rotation_mode == 'QUATERNION':
+                col.itemR(ob, "rotation_quaternion")
+            elif ob.rotation_mode == 'AXIS_ANGLE':
+                col.itemR(ob, "rotation_axis_angle", text="Rotation")
+            else:
+                col.itemR(ob, "rotation_euler", text="Rotation")
+            col.itemR(ob, "scale")
 
 
 class OBJECT_PT_transform_locks(ObjectButtonsPanel):
@@ -74,22 +88,23 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel):
         layout = self.layout
 
         ob = context.object
+        col2 = context.region.width > narrowui
 
         row = layout.row()
 
         col = row.column()
-        col.itemR(ob, "lock_location")
+        col.itemR(ob, "lock_location", text="Location")
 
         col = row.column()
         if ob.rotation_mode in ('QUATERNION', 'AXIS_ANGLE'):
-            col.itemR(ob, "lock_rotations_4d", text="Lock Rotation")
+            col.itemR(ob, "lock_rotations_4d", text="Rotation")
             if ob.lock_rotations_4d:
                 col.itemR(ob, "lock_rotation_w", text="W")
             col.itemR(ob, "lock_rotation", text="")
         else:
             col.itemR(ob, "lock_rotation", text="Rotation")
 
-        row.column().itemR(ob, "lock_scale")
+        row.column().itemR(ob, "lock_scale", text="Scale")
 
 
 class OBJECT_PT_relations(ObjectButtonsPanel):
@@ -99,6 +114,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel):
         layout = self.layout
 
         ob = context.object
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
@@ -107,14 +123,13 @@ class OBJECT_PT_relations(ObjectButtonsPanel):
         col.itemS()
         col.itemR(ob, "pass_index")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemL(text="Parent:")
         col.itemR(ob, "parent", text="")
 
         sub = col.column()
-        split = sub.split(percentage=0.3)
-        split.itemL(text="Type:")
-        split.itemR(ob, "parent_type", text="")
+        sub.itemR(ob, "parent_type", text="")
         parent = ob.parent
         if parent and ob.parent_type == 'BONE' and parent.type == 'ARMATURE':
             sub.item_pointerR(ob, "parent_bone", parent.data, "bones", text="")
@@ -128,10 +143,14 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
         layout = self.layout
 
         ob = context.object
-
-        split = layout.split()
-        split.item_menu_enumO("object.group_add", "group", text="Add to Group")
-        split.itemL()
+        col2 = context.region.width > narrowui
+        
+        if col2:
+            split = layout.split()
+            split.item_menu_enumO("object.group_add", "group", text="Add to Group")
+            split.itemL()
+        else:
+            layout.item_menu_enumO("object.group_add", "group", text="Add to Group")
 
         for group in bpy.data.groups:
             if ob.name in group.objects:
@@ -144,8 +163,13 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
                 row.itemO("object.group_remove", text="", icon='VICON_X')
 
                 split = col.box().split()
-                split.column().itemR(group, "layer", text="Dupli")
-                split.column().itemR(group, "dupli_offset", text="")
+                
+                col = split.column()
+                col.itemR(group, "layer", text="Dupli")
+                
+                if col2:
+                    col = split.column()
+                col.itemR(group, "dupli_offset", text="")
 
 
 class OBJECT_PT_display(ObjectButtonsPanel):
@@ -155,24 +179,32 @@ class OBJECT_PT_display(ObjectButtonsPanel):
         layout = self.layout
 
         ob = context.object
-
+        col2 = context.region.width > narrowui
+        
         split = layout.split()
         col = split.column()
         col.itemR(ob, "max_draw_type", text="Type")
-        col = split.column()
+        
+        if col2:
+            col = split.column()
         row = col.row()
         row.itemR(ob, "draw_bounds", text="Bounds")
         sub = row.row()
         sub.active = ob.draw_bounds
         sub.itemR(ob, "draw_bounds_type", text="")
 
-        flow = layout.column_flow()
-        flow.itemR(ob, "draw_name", text="Name")
-        flow.itemR(ob, "draw_axis", text="Axis")
-        flow.itemR(ob, "draw_wire", text="Wire")
-        flow.itemR(ob, "draw_texture_space", text="Texture Space")
-        flow.itemR(ob, "x_ray", text="X-Ray")
-        flow.itemR(ob, "draw_transparent", text="Transparency")
+        split = layout.split()
+        
+        col = split.column()
+        col.itemR(ob, "draw_name", text="Name")
+        col.itemR(ob, "draw_axis", text="Axis")
+        col.itemR(ob, "draw_wire", text="Wire")
+        
+        if col2:
+            col = split.column()
+        col.itemR(ob, "draw_texture_space", text="Texture Space")
+        col.itemR(ob, "x_ray", text="X-Ray")
+        col.itemR(ob, "draw_transparent", text="Transparency")
 
 
 class OBJECT_PT_duplication(ObjectButtonsPanel):
@@ -182,9 +214,13 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
         layout = self.layout
 
         ob = context.object
-
-        layout.itemR(ob, "dupli_type", expand=True)
-
+        col2 = context.region.width > narrowui
+        
+        if col2:
+            layout.itemR(ob, "dupli_type", expand=True)
+        else:
+            layout.itemR(ob, "dupli_type", text="")
+        
         if ob.dupli_type == 'FRAMES':
             split = layout.split()
 
@@ -192,7 +228,8 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
             col.itemR(ob, "dupli_frames_start", text="Start")
             col.itemR(ob, "dupli_frames_end", text="End")
 
-            col = split.column(align=True)
+            if col2:
+                col = split.column(align=True)
             col.itemR(ob, "dupli_frames_on", text="On")
             col.itemR(ob, "dupli_frames_off", text="Off")
 
@@ -202,12 +239,20 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
             layout.itemR(ob, "dupli_verts_rotation", text="Rotation")
 
         elif ob.dupli_type == 'FACES':
-            row = layout.row()
-            row.itemR(ob, "dupli_faces_scale", text="Scale")
-            row.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale")
+            split = layout.split()
+
+            col = split.column()
+            col.itemR(ob, "dupli_faces_scale", text="Scale")
+            
+            if col2:
+                col = split.column()
+            col.itemR(ob, "dupli_faces_inherit_scale", text="Inherit Scale")
 
         elif ob.dupli_type == 'GROUP':
-            layout.itemR(ob, "dupli_group", text="Group")
+            if col2:
+                layout.itemR(ob, "dupli_group", text="Group")
+            else:
+                layout.itemR(ob, "dupli_group", text="")
 
 
 class OBJECT_PT_animation(ObjectButtonsPanel):
@@ -217,7 +262,8 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
         layout = self.layout
 
         ob = context.object
-
+        col2 = context.region.width > narrowui
+        
         split = layout.split()
 
         col = split.column()
@@ -234,7 +280,8 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
         row.active = ob.parent != None
         col.itemR(ob, "time_offset", text="Offset")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemL(text="Track:")
         col.itemR(ob, "track", text="")
         col.itemR(ob, "track_axis", text="Axis")
index e6c68c081f3048880f23cde63cc527e003154f76..49a228f38c934ba544d13872ac97f6357f41f9e3 100644 (file)
@@ -88,7 +88,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         col = split.column()
         col.itemR(con, "chain_length")
         col.itemR(con, "targetless")
-    
+
     def CHILD_OF(self, context, layout, con):
         self.target_template(layout, con)
 
@@ -129,11 +129,11 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         row.itemR(con, "target_z")
 
         self.space_template(layout, con)
-    
+
     def IK(self, context, layout, con):
         if context.object.pose.ik_solver == "ITASC":
             layout.itemR(con, "ik_type")
-            getattr(self, "IK_" + con.ik_type)(context, layout, con)
+            getattr(self, 'IK_' + con.ik_type)(context, layout, con)
         else:
             # Legacy IK constraint
             self.target_template(layout, con)
@@ -168,7 +168,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
             sub = col.column()
             sub.active = con.rotation
             sub.itemR(con, "orient_weight", text="Rotation", slider=True)
-    
+
     def IK_COPY_POSE(self, context, layout, con):
         self.target_template(layout, con)
         self.ik_template(layout, con)
@@ -212,7 +212,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         row = layout.row()
         row.itemR(con, "weight", text="Weight", slider=True)
         row.itemR(con, "distance", text="Distance", slider=True)
-    
+
     def FOLLOW_PATH(self, context, layout, con):
         self.target_template(layout, con)
 
@@ -310,7 +310,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         row = layout.row()
         row.itemL(text="Convert:")
         row.itemR(con, "owner_space", text="")
-    
+
     def LIMIT_SCALE(self, context, layout, con):
         split = layout.split()
 
@@ -351,7 +351,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         row = layout.row()
         row.itemL(text="Convert:")
         row.itemR(con, "owner_space", text="")
-    
+
     def COPY_ROTATION(self, context, layout, con):
         self.target_template(layout, con)
 
@@ -378,7 +378,7 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         layout.itemR(con, "offset")
 
         self.space_template(layout, con)
-    
+
     def COPY_LOCATION(self, context, layout, con):
         self.target_template(layout, con)
 
@@ -602,11 +602,11 @@ class ConstraintButtonsPanel(bpy.types.Panel):
         col.itemL(text="Spline Fitting:")
         col.itemR(con, "chain_length")
         col.itemR(con, "even_divisions")
-        #col.itemR(con, "affect_root") # XXX: this is not that useful yet
+        col.itemR(con, "chain_offset")
 
         col = layout.column()
         col.itemL(text="Chain Scaling:")
-        col.itemR(con, "keep_max_length")
+        col.itemR(con, "y_scaling")
         col.itemR(con, "xz_scaling_mode")
 
 
@@ -702,7 +702,7 @@ class BONE_PT_inverse_kinematics(ConstraintButtonsPanel):
         split.itemR(pchan, "ik_stretch", text="Stretch", slider=True)
         split.itemL()
 
-        if ob.pose.ik_solver == "ITASC":
+        if ob.pose.ik_solver == 'ITASC':
             row = layout.row()
             row.itemR(pchan, "ik_rot_control", text="Control Rotation")
             row.itemR(pchan, "ik_rot_weight", text="Weight", slider=True)
@@ -723,7 +723,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
 
         if ob and bone:
             pchan = ob.pose.pose_channels[bone.name]
-            return pchan.has_ik and ob.pose.ik_solver == "ITASC" and ob.pose.ik_param
+            return pchan.has_ik and ob.pose.ik_solver == 'ITASC' and ob.pose.ik_param
 
         return False
 
@@ -734,7 +734,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
         itasc = ob.pose.ik_param
 
         layout.itemR(itasc, "mode", expand=True)
-        simulation = itasc.mode == "SIMULATION"
+        simulation = itasc.mode == 'SIMULATION'
         if simulation:
             layout.itemL(text="Reiteration:")
             layout.itemR(itasc, "reiteration", expand=True)
@@ -742,7 +742,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
         flow = layout.column_flow()
         flow.itemR(itasc, "precision", text="Prec")
         flow.itemR(itasc, "num_iter", text="Iter")
-        flow.active = not simulation or itasc.reiteration != "NEVER"
+        flow.active = not simulation or itasc.reiteration != 'NEVER'
 
         if simulation:
             layout.itemR(itasc, "auto_step")
@@ -757,7 +757,7 @@ class BONE_PT_iksolver_itasc(ConstraintButtonsPanel):
         if simulation:
             layout.itemR(itasc, "feedback")
             layout.itemR(itasc, "max_velocity")
-        if itasc.solver == "DLS":
+        if itasc.solver == 'DLS':
             row = layout.row()
             row.itemR(itasc, "dampmax", text="Damp", slider=True)
             row.itemR(itasc, "dampeps", text="Eps", slider=True)
index b61f2172d94b1a6daa2fce5cc9c80692af228c3c..3e2630e38f53b4c02141689d744472023c1712fd 100644 (file)
@@ -77,7 +77,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel):
             layout.itemS()
 
             layout.itemR(field, "guide_kink_type")
-            if (field.guide_kink_type != "NONE"):
+            if (field.guide_kink_type != 'NONE'):
                 layout.itemR(field, "guide_kink_axis")
 
                 flow = layout.column_flow()
index 6aafc8085023bde16f3767acbc698c601b1a6766..51b381478d787610f72175e209bb22984f57e9a1 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 import bpy
 
+narrowui = 180
 
 class RenderButtonsPanel(bpy.types.Panel):
     bl_space_type = 'PROPERTIES'
@@ -26,10 +27,13 @@ class RenderButtonsPanel(bpy.types.Panel):
     bl_context = "render"
     # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
 
+    
+
     def poll(self, context):
         rd = context.scene.render_data
         return (context.scene and rd.use_game_engine == False) and (rd.engine in self.COMPAT_ENGINES)
-
+   
+    
 
 class RENDER_PT_render(RenderButtonsPanel):
     bl_label = "Render"
@@ -39,10 +43,16 @@ class RENDER_PT_render(RenderButtonsPanel):
         layout = self.layout
 
         rd = context.scene.render_data
-
-        row = layout.row()
-        row.itemO("screen.render", text="Image", icon='ICON_RENDER_STILL')
-        row.item_booleanO("screen.render", "animation", True, text="Animation", icon='ICON_RENDER_ANIMATION')
+        col2 = context.region.width > narrowui
+        
+        split = layout.split()
+        
+        col = split.column()
+        col.itemO("screen.render", text="Image", icon='ICON_RENDER_STILL')
+        
+        if col2:
+            col = split.column()
+        col.item_booleanO("screen.render", "animation", True, text="Animation", icon='ICON_RENDER_ANIMATION')
 
         layout.itemR(rd, "display_mode", text="Display")
 
@@ -57,7 +67,8 @@ class RENDER_PT_layers(RenderButtonsPanel):
 
         scene = context.scene
         rd = scene.render_data
-
+        col2 = context.region.width > narrowui
+        
         row = layout.row()
         row.template_list(rd, "layers", rd, "active_layer_index", rows=2)
 
@@ -74,7 +85,8 @@ class RENDER_PT_layers(RenderButtonsPanel):
 
         col = split.column()
         col.itemR(scene, "visible_layers", text="Scene")
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(rl, "visible_layers", text="Layer")
 
         layout.itemR(rl, "light_override", text="Light")
@@ -121,7 +133,8 @@ class RENDER_PT_layers(RenderButtonsPanel):
         col.itemR(rl, "pass_mist")
         col.itemR(rl, "pass_object_index")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemL()
         col.itemR(rl, "pass_color")
         col.itemR(rl, "pass_diffuse")
@@ -150,7 +163,8 @@ class RENDER_PT_shading(RenderButtonsPanel):
         layout = self.layout
 
         rd = context.scene.render_data
-
+        col2 = context.region.width > narrowui
+        
         split = layout.split()
 
         col = split.column()
@@ -158,8 +172,9 @@ class RENDER_PT_shading(RenderButtonsPanel):
         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()
+        
+        if col2:
+            col = split.column()
         col.itemR(rd, "render_raytracing", text="Ray Tracing")
         col.itemR(rd, "color_management")
         col.itemR(rd, "alpha_mode", text="Alpha")
@@ -174,7 +189,8 @@ class RENDER_PT_performance(RenderButtonsPanel):
         layout = self.layout
 
         rd = context.scene.render_data
-
+        col2 = context.region.width > narrowui
+        
         split = layout.split()
 
         col = split.column(align=True)
@@ -187,7 +203,8 @@ class RENDER_PT_performance(RenderButtonsPanel):
         col.itemR(rd, "parts_x", text="X")
         col.itemR(rd, "parts_y", text="Y")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemL(text="Memory:")
         sub = col.column()
         sub.itemR(rd, "save_buffers")
@@ -199,7 +216,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
         sub.active = rd.render_raytracing
         sub.itemL(text="Acceleration structure:")
         sub.itemR(rd, "raytrace_structure", text="")
-        if rd.raytrace_structure == "OCTREE":
+        if rd.raytrace_structure == 'OCTREE':
             sub.itemR(rd, "octree_resolution", text="Resolution")
         else:
             sub.itemR(rd, "use_instances", text="Instances")
@@ -213,16 +230,18 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
 
     def draw(self, context):
         layout = self.layout
-
+        
         rd = context.scene.render_data
-
+        col2 = context.region.width > narrowui
+        
         split = layout.split()
 
         col = split.column()
         col.itemR(rd, "use_compositing")
         col.itemR(rd, "use_sequencer")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(rd, "dither_intensity", text="Dither", slider=True)
 
         layout.itemS()
@@ -236,7 +255,11 @@ class RENDER_PT_post_processing(RenderButtonsPanel):
         sub.row().itemR(rd, "field_order", expand=True)
         sub.itemR(rd, "fields_still", text="Still")
 
-        col = split.column()
+
+        if col2:
+            col = split.column()
+        else:
+            col.itemS()
         col.itemR(rd, "edge")
         sub = col.column()
         sub.active = rd.edge
@@ -250,9 +273,10 @@ class RENDER_PT_output(RenderButtonsPanel):
 
     def draw(self, context):
         layout = self.layout
-
+        
         rd = context.scene.render_data
-
+        col2 = context.region.width > narrowui
+        
         layout.itemR(rd, "output_path", text="")
 
         split = layout.split()
@@ -260,7 +284,8 @@ class RENDER_PT_output(RenderButtonsPanel):
         col.itemR(rd, "file_format", text="")
         col.row().itemR(rd, "color_mode", text="Color", expand=True)
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(rd, "file_extensions")
         col.itemR(rd, "use_overwrite")
         col.itemR(rd, "use_placeholder")
@@ -275,12 +300,15 @@ class RENDER_PT_output(RenderButtonsPanel):
             col = split.column()
             col.itemL(text="Codec:")
             col.itemR(rd, "exr_codec", text="")
-
-            subsplit = split.split()
-            col = subsplit.column()
+            
+            if col2:
+                subsplit = split.split()
+                col = subsplit.column()
             col.itemR(rd, "exr_half")
             col.itemR(rd, "exr_zbuf")
-            col = subsplit.column()
+            
+            if col2:
+                col = subsplit.column()
             col.itemR(rd, "exr_preview")
 
         elif rd.file_format == 'JPEG2000':
@@ -289,7 +317,8 @@ class RENDER_PT_output(RenderButtonsPanel):
             col.itemL(text="Depth:")
             col.row().itemR(rd, "jpeg2k_depth", expand=True)
 
-            col = split.column()
+            if col2:
+                col = split.column()
             col.itemR(rd, "jpeg2k_preset", text="")
             col.itemR(rd, "jpeg2k_ycc")
 
@@ -298,7 +327,8 @@ class RENDER_PT_output(RenderButtonsPanel):
             col = split.column()
             col.itemR(rd, "cineon_log", text="Convert to Log")
 
-            col = split.column(align=True)
+            if col2:
+                col = split.column(align=True)
             col.active = rd.cineon_log
             col.itemR(rd, "cineon_black", text="Black")
             col.itemR(rd, "cineon_white", text="White")
@@ -322,6 +352,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
         layout = self.layout
 
         rd = context.scene.render_data
+        col2 = context.region.width > narrowui
 
         split = layout.split()
 
@@ -340,7 +371,8 @@ class RENDER_PT_encoding(RenderButtonsPanel):
         col.itemR(rd, "ffmpeg_maxrate", text="Maximum")
         col.itemR(rd, "ffmpeg_buffersize", text="Buffer")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(rd, "ffmpeg_gopsize")
         col.itemR(rd, "ffmpeg_autosplit")
         col.itemL(text="Mux:")
@@ -357,7 +389,9 @@ class RENDER_PT_encoding(RenderButtonsPanel):
         col = split.column()
         col.itemR(rd, "ffmpeg_audio_bitrate")
         col.itemR(rd, "ffmpeg_audio_mixrate")
-        col = split.column()
+        
+        if col2:
+            col = split.column()
         col.itemR(rd, "ffmpeg_multiplex_audio")
         col.itemR(rd, "ffmpeg_audio_volume")
 
@@ -375,16 +409,17 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
         layout = self.layout
 
         rd = context.scene.render_data
-
+        col2 = context.region.width > narrowui
         layout.active = rd.antialiasing
-
+        
         split = layout.split()
 
         col = split.column()
         col.row().itemR(rd, "antialiasing_samples", expand=True)
         col.itemR(rd, "full_sample")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.itemR(rd, "pixel_filter", text="")
         col.itemR(rd, "filter_size", text="Size", slider=True)
 
@@ -398,7 +433,8 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
 
         scene = context.scene
         rd = scene.render_data
-
+        col2 = context.region.width > narrowui
+        
         split = layout.split()
 
         col = split.column()
@@ -418,15 +454,18 @@ class RENDER_PT_dimensions(RenderButtonsPanel):
         rowsub.active = rd.use_border
         rowsub.itemR(rd, "crop_to_border", text="Crop")
 
-        col = split.column(align=True)
-        col.itemL(text="Frame Range:")
-        col.itemR(scene, "start_frame", text="Start")
-        col.itemR(scene, "end_frame", text="End")
-        col.itemR(scene, "frame_step", text="Step")
-
-        col.itemL(text="Frame Rate:")
-        col.itemR(rd, "fps")
-        col.itemR(rd, "fps_base", text="/")
+        if col2:
+            col = split.column()
+        sub = col.column(align=True)
+        sub.itemL(text="Frame Range:")
+        sub.itemR(scene, "start_frame", text="Start")
+        sub.itemR(scene, "end_frame", text="End")
+        sub.itemR(scene, "frame_step", text="Step")
+        
+        sub = col.column(align=True)
+        sub.itemL(text="Frame Rate:")
+        sub.itemR(rd, "fps")
+        sub.itemR(rd, "fps_base", text="/")
 
 
 class RENDER_PT_stamp(RenderButtonsPanel):
@@ -443,6 +482,7 @@ class RENDER_PT_stamp(RenderButtonsPanel):
         layout = self.layout
 
         rd = context.scene.render_data
+        col2 = context.region.width > narrowui
 
         layout.active = rd.render_stamp
 
@@ -459,7 +499,8 @@ class RENDER_PT_stamp(RenderButtonsPanel):
         col.itemR(rd, "stamp_marker", text="Marker")
         col.itemR(rd, "stamp_sequence_strip", text="Seq. Strip")
 
-        col = split.column()
+        if col2:
+            col = split.column()
         col.active = rd.render_stamp
         col.itemR(rd, "stamp_foreground", slider=True)
         col.itemR(rd, "stamp_background", slider=True)
index 9ab431a2d6df7494615a377233deb37b3c7679d0..170c561820dbd6b7babf4968bf32e5e84fc58bad 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 import bpy
 
+narrowui = 180
 
 class SceneButtonsPanel(bpy.types.Panel):
     bl_space_type = 'PROPERTIES'
@@ -37,9 +38,13 @@ class SCENE_PT_scene(SceneButtonsPanel):
         layout = self.layout
 
         scene = context.scene
-
-        layout.itemR(scene, "camera")
-        layout.itemR(scene, "set", text="Background")
+        
+        if col2:
+            layout.itemR(scene, "camera")
+            layout.itemR(scene, "set", text="Background")
+        else:
+            layout.itemR(scene, "camera", text="")
+            layout.itemR(scene, "set", text="")
 
 
 class SCENE_PT_unit(SceneButtonsPanel):
@@ -48,16 +53,21 @@ class SCENE_PT_unit(SceneButtonsPanel):
 
     def draw(self, context):
         layout = self.layout
-
+        col2 = context.region.width > narrowui
         unit = context.scene.unit_settings
 
         col = layout.column()
         col.row().itemR(unit, "system", expand=True)
 
-        row = layout.row()
-        row.active = (unit.system != 'NONE')
-        row.itemR(unit, "scale_length", text="Scale")
-        row.itemR(unit, "use_separate")
+        split = layout.split()
+        split.active = (unit.system != 'NONE')
+        
+        col = split.column()
+        col.itemR(unit, "scale_length", text="Scale")
+        
+        if col2:
+            col = split.column()
+        col.itemR(unit, "use_separate")
 
 
 class SCENE_PT_keying_sets(SceneButtonsPanel):
@@ -67,7 +77,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel):
         layout = self.layout
 
         scene = context.scene
-
+        col2 = context.region.width > narrowui
         row = layout.row()
 
         col = row.column()
@@ -85,7 +95,8 @@ class SCENE_PT_keying_sets(SceneButtonsPanel):
             col.itemR(ks, "name")
             col.itemR(ks, "absolute")
 
-            col = row.column()
+            if col2:
+                col = row.column()
             col.itemL(text="Keyframing Settings:")
             col.itemR(ks, "insertkey_needed", text="Needed")
             col.itemR(ks, "insertkey_visual", text="Visual")
@@ -102,6 +113,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel):
 
         scene = context.scene
         ks = scene.active_keying_set
+        col2 = context.region.width > narrowui
 
         row = layout.row()
         row.itemL(text="Paths:")
@@ -131,7 +143,8 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel):
             if ksp.entire_array == False:
                 col.itemR(ksp, "array_index")
 
-            col = row.column()
+            if col2:
+                col = row.column()
             col.itemL(text="F-Curve Grouping:")
             col.itemR(ksp, "grouping")
             if ksp.grouping == 'NAMED':
@@ -149,10 +162,14 @@ class SCENE_PT_physics(SceneButtonsPanel):
         layout = self.layout
 
         scene = context.scene
-
+        col2 = context.region.width > narrowui
+        
         layout.active = scene.use_gravity
-
-        layout.itemR(scene, "gravity", text="")
+        
+        if col2:
+            layout.itemR(scene, "gravity", text="")
+        else:
+            layout.column().itemR(scene, "gravity", text="")
 
 bpy.types.register(SCENE_PT_scene)
 bpy.types.register(SCENE_PT_unit)
index d00592470f05c54bfa3d7bfb169b6384ccc336d7..f08cff38dfc3f706dbfd1d7e75e09fb704f690ec 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 import bpy
 
+narrowui = 180
 
 class WorldButtonsPanel(bpy.types.Panel):
     bl_space_type = 'PROPERTIES'
@@ -69,13 +70,19 @@ class WORLD_PT_world(WorldButtonsPanel):
 
     def draw(self, context):
         layout = self.layout
-
+        col2 = context.region.width > narrowui
         world = context.world
-
-        row = layout.row()
-        row.itemR(world, "paper_sky")
-        row.itemR(world, "blend_sky")
-        row.itemR(world, "real_sky")
+        
+        if col2:
+            row = layout.row()
+            row.itemR(world, "paper_sky")
+            row.itemR(world, "blend_sky")
+            row.itemR(world, "real_sky")
+        else:
+            col = layout.column()
+            col.itemR(world, "paper_sky")
+            col.itemR(world, "blend_sky")
+            col.itemR(world, "real_sky")
 
         row = layout.row()
         row.column().itemR(world, "horizon_color")
@@ -96,16 +103,21 @@ class WORLD_PT_mist(WorldButtonsPanel):
 
     def draw(self, context):
         layout = self.layout
-
+        col2 = context.region.width > narrowui
         world = context.world
 
         layout.active = world.mist.enabled
+        
+        split = layout.split()
+        
+        col = split.column()
+        col.itemR(world.mist, "intensity", slider=True)
+        col.itemR(world.mist, "start")
 
-        flow = layout.column_flow()
-        flow.itemR(world.mist, "intensity", slider=True)
-        flow.itemR(world.mist, "start")
-        flow.itemR(world.mist, "depth")
-        flow.itemR(world.mist, "height")
+        if col2:
+            col = split.column()
+        col.itemR(world.mist, "depth")
+        col.itemR(world.mist, "height")
 
         layout.itemR(world.mist, "falloff")
 
@@ -121,16 +133,21 @@ class WORLD_PT_stars(WorldButtonsPanel):
 
     def draw(self, context):
         layout = self.layout
-
+        col2 = context.region.width > narrowui
         world = context.world
 
         layout.active = world.stars.enabled
 
-        flow = layout.column_flow()
-        flow.itemR(world.stars, "size")
-        flow.itemR(world.stars, "color_randomization", text="Colors")
-        flow.itemR(world.stars, "min_distance", text="Min. Dist")
-        flow.itemR(world.stars, "average_separation", text="Separation")
+        split = layout.split()
+        
+        col = split.column()
+        col.itemR(world.stars, "size")
+        col.itemR(world.stars, "color_randomization", text="Colors")
+
+        if col2:
+            col = split.column()
+        col.itemR(world.stars, "min_distance", text="Min. Dist")
+        col.itemR(world.stars, "average_separation", text="Separation")
 
 
 class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
@@ -144,7 +161,7 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
 
     def draw(self, context):
         layout = self.layout
-
+        col2 = context.region.width > narrowui
         ao = context.world.ambient_occlusion
 
         layout.active = ao.enabled
@@ -163,7 +180,8 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
         sub.itemR(ao, "falloff_strength", text="Strength")
 
         if ao.gather_method == 'RAYTRACE':
-            col = split.column()
+            if col2:
+                col = split.column()
 
             col.itemL(text="Sampling:")
             col.itemR(ao, "sample_method", text="")
@@ -178,7 +196,8 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
                 sub.itemR(ao, "bias")
 
         if ao.gather_method == 'APPROXIMATE':
-            col = split.column()
+            if col2:
+                col = split.column()
 
             col.itemL(text="Sampling:")
             col.itemR(ao, "passes")
@@ -196,10 +215,9 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel):
         col = split.column()
         col.itemR(ao, "energy")
 
-        col = split.column()
-        sub = col.split(percentage=0.3)
-        sub.itemL(text="Color:")
-        sub.itemR(ao, "color", text="")
+        if col2:
+            col = split.column()
+        col.itemR(ao, "color")
 
 bpy.types.register(WORLD_PT_context_world)
 bpy.types.register(WORLD_PT_preview)
index 06754ea81cb13790a0395c2cdd4227fa78fd7041..d5392645387c8edd0d64a17b5e2e4e097056b3b3 100644 (file)
@@ -89,16 +89,16 @@ class CONSOLE_MT_language(bpy.types.Menu):
     def draw(self, context):
         layout = self.layout
         layout.column()
-        
+
         mod = bpy.ops.console
         languages = []
         for opname in dir(mod):
             # execute_python, execute_shell etc.
             if opname.startswith("execute_"):
                 languages.append(opname.split('_', 1)[-1])
-        
+
         languages.sort()
-        
+
         for language in languages:
             layout.item_stringO("console.language", "language", language, text=language[0].upper() + language[1:])
 
@@ -155,13 +155,13 @@ class ConsoleBanner(bpy.types.Operator):
 
     def execute(self, context):
         sc = context.space_data
-        
+
         # default to python
         if not sc.language:
             sc.language = 'python'
 
         banner = getattr(bpy.ops.console, "banner_" + sc.language, None)
-        
+
         if banner:
             banner()
         else:
@@ -178,12 +178,12 @@ class ConsoleLanguage(bpy.types.Operator):
 
     def execute(self, context):
         sc = context.space_data
-        
+
         # defailt to python
         sc.language = self.language
-        
+
         bpy.ops.console.banner()
-        
+
         # insert a new blank line
         bpy.ops.console.history_append(text="", current_character=0,
             remove_duplicates=True)
index cb1112c9dac912948875e79d93db1347f4fdce02..b5e73e6058207f4b07a0c55acffa09be364d4e86 100644 (file)
@@ -123,7 +123,8 @@ class INFO_MT_file_import(dynamic_menu.DynMenu):
     bl_label = "Import"
 
     def draw(self, context):
-        self.layout.itemO("WM_OT_collada_import", text="COLLADA (.dae)...")
+        if "collada_import" in dir(bpy.ops.wm):
+            self.layout.itemO("wm.collada_import", text="COLLADA (.dae)...")
 
 
 class INFO_MT_file_export(dynamic_menu.DynMenu):
@@ -131,7 +132,8 @@ class INFO_MT_file_export(dynamic_menu.DynMenu):
     bl_label = "Export"
 
     def draw(self, context):
-        self.layout.itemO("WM_OT_collada_export", text="COLLADA (.dae)...")
+        if "collada_export" in dir(bpy.ops.wm):
+            self.layout.itemO("wm.collada_export", text="COLLADA (.dae)...")
 
 
 class INFO_MT_file_external_data(bpy.types.Menu):
@@ -187,9 +189,9 @@ class INFO_MT_add(bpy.types.Menu):
         layout.itemO("object.text_add", text="Text", icon='ICON_OUTLINER_OB_FONT')
 
         layout.itemS()
-        
+
         layout.operator_context = "INVOKE_SCREEN"
-        
+
         layout.itemO("object.armature_add", text="Armature", icon='ICON_OUTLINER_OB_ARMATURE')
         layout.item_enumO("object.add", "type", 'LATTICE', icon='ICON_OUTLINER_OB_LATTICE')
         layout.item_enumO("object.add", "type", 'EMPTY', icon='ICON_OUTLINER_OB_EMPTY')
@@ -197,9 +199,9 @@ class INFO_MT_add(bpy.types.Menu):
         layout.itemS()
 
         layout.item_enumO("object.add", "type", 'CAMERA', icon='ICON_OUTLINER_OB_CAMERA')
-        
+
         layout.operator_context = "EXEC_SCREEN"
-        
+
         layout.item_menu_enumO("object.lamp_add", "type", 'LAMP', text="Lamp", icon='ICON_OUTLINER_OB_LAMP')
 
         layout.itemS()
index 9880a320e25c1bc3b19c2e047c2d3ab6bd240f9f..5c93bede635d580859b40579330fa2f58de28176 100644 (file)
@@ -72,6 +72,9 @@ class NODE_MT_view(bpy.types.Menu):
 
     def draw(self, context):
         layout = self.layout
+        
+        layout.itemO("node.properties", icon='ICON_MENU_PANEL')
+        layout.itemS()
 
         # layout.itemO("grease_pencil..")
         # layout.itemS()
index ec90d15968dcf7f7782b871bf5e6bb1abe424e03..9468510c7a56eccaf7948c58eae30f8ac43fdab0 100644 (file)
@@ -245,12 +245,14 @@ class SEQUENCER_MT_strip(bpy.types.Menu):
             elif stype == 'IMAGE':
                 layout.itemS()
                 layout.itemO("sequencer.image_change")
+                layout.itemO("sequencer.rendersize")
             elif stype == 'SCENE':
                 layout.itemS()
                 layout.itemO("sequencer.scene_change", text="Change Scene")
             elif stype == 'MOVIE':
                 layout.itemS()
                 layout.itemO("sequencer.movie_change")
+                layout.itemO("sequencer.rendersize")
 
         layout.itemS()
 
index 935e3b4087489a19f6e9a0d3f51a30533e514625..68f01146026c9a29fc15bc8db1aaa5c1944a667d 100644 (file)
@@ -371,29 +371,26 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(v3d, "back")
-            col.itemR(v3d, "title")
-            col.itemR(v3d, "text")
-            col.itemR(v3d, "text_hi")
+            col.itemR(v3d, "button")
+            col.itemR(v3d, "button_title")
+            col.itemR(v3d, "button_text")
             col.itemR(v3d, "header")
-            col.itemR(v3d, "header_text")
 
             col = split.column()
-            col.itemR(v3d, "header_text_hi")
             col.itemR(v3d, "grid")
-            col.itemR(v3d, "panel", slider=True)
             col.itemR(v3d, "wire")
             col.itemR(v3d, "lamp", slider=True)
+            col.itemR(v3d, "editmesh_active", slider=True)
 
             col = split.column()
-            col.itemR(v3d, "current_frame")
-            col.itemR(v3d, "editmesh_active", slider=True)
+            
             col.itemR(v3d, "object_selected")
             col.itemR(v3d, "object_active")
             col.itemR(v3d, "object_grouped")
             col.itemR(v3d, "object_grouped_active")
+            col.itemR(v3d, "transform")
 
             col = split.column()
-            col.itemR(v3d, "transform")
             col.itemR(v3d, "vertex")
             col.itemR(v3d, "face", slider=True)
             col.itemR(v3d, "normal")
@@ -736,54 +733,46 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(graph, "back")
-            col.itemR(graph, "title")
-            col.itemR(graph, "text")
-            col.itemR(graph, "text_hi")
-            col.itemR(graph, "header")
-
+            col.itemR(graph, "button")
+            col.itemR(graph, "button_title")
+            col.itemR(graph, "button_text")
+            
             col = split.column()
-            col.itemR(graph, "header_text")
-            col.itemR(graph, "header_text_hi")
+            col.itemR(graph, "header")
             col.itemR(graph, "grid")
-            col.itemR(graph, "panel")
-            col.itemR(graph, "window_sliders")
-
+            col.itemR(graph, "list")
+            col.itemR(graph, "channel_group")
+            
             col = split.column()
-            col.itemR(graph, "channels_region")
+            col.itemR(graph, "active_channels_group")
+            col.itemR(graph, "dopesheet_channel")
+            col.itemR(graph, "dopesheet_subchannel")
             col.itemR(graph, "vertex")
+            
+            col = split.column()
             col.itemR(graph, "current_frame")
             col.itemR(graph, "handle_vertex")
             col.itemR(graph, "handle_vertex_select")
-
-            col = split.column()
+            col.itemS()
             col.itemR(graph, "handle_vertex_size")
-            col.itemR(graph, "channel_group")
-            col.itemR(graph, "active_channels_group")
-            col.itemR(graph, "dopesheet_channel")
-            col.itemR(graph, "dopesheet_subchannel")
-
-
+            
         elif theme.active_theme == 'FILE_BROWSER':
             file = theme.file_browser
 
             col = split.column()
             col.itemR(file, "back")
-            col.itemR(file, "title")
             col.itemR(file, "text")
             col.itemR(file, "text_hi")
 
             col = split.column()
             col.itemR(file, "header")
-            col.itemR(file, "header_text")
-            col.itemR(file, "header_text_hi")
+            col.itemR(file, "list")
 
             col = split.column()
             col.itemR(file, "selected_file")
             col.itemR(file, "tiles")
-            col.itemR(file, "scrollbar")
 
             col = split.column()
-            col.itemR(file, "scroll_handle")
             col.itemR(file, "active_file")
             col.itemR(file, "active_file_text")
 
@@ -792,21 +781,19 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(nla, "back")
-            col.itemR(nla, "title")
-            col.itemR(nla, "text")
-            col.itemR(nla, "text_hi")
-
+            col.itemR(nla, "button")
+            col.itemR(nla, "button_title")
+            
             col = split.column()
+            col.itemR(nla, "button_text")
+            col.itemR(nla, "text")
             col.itemR(nla, "header")
-            col.itemR(nla, "header_text")
-            col.itemR(nla, "header_text_hi")
-            col.itemR(nla, "grid")
-
+            
             col = split.column()
-            col.itemR(nla, "view_sliders")
+            col.itemR(nla, "grid")
             col.itemR(nla, "bars")
             col.itemR(nla, "bars_selected")
-
+            
             col = split.column()
             col.itemR(nla, "strips")
             col.itemR(nla, "strips_selected")
@@ -817,27 +804,22 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(dope, "back")
-            col.itemR(dope, "title")
+            col.itemR(dope, "list")
             col.itemR(dope, "text")
-            col.itemR(dope, "text_hi")
             col.itemR(dope, "header")
 
             col = split.column()
-            col.itemR(dope, "header_text")
-            col.itemR(dope, "header_text_hi")
             col.itemR(dope, "grid")
-            col.itemR(dope, "value_sliders")
-            col.itemR(dope, "view_sliders")
-
-            col = split.column()
             col.itemR(dope, "channels")
             col.itemR(dope, "channels_selected")
             col.itemR(dope, "channel_group")
+
+            col = split.column()
             col.itemR(dope, "active_channels_group")
             col.itemR(dope, "long_key")
+            col.itemR(dope, "long_key_selected")
 
             col = split.column()
-            col.itemR(dope, "long_key_selected")
             col.itemR(dope, "current_frame")
             col.itemR(dope, "dopesheet_channel")
             col.itemR(dope, "dopesheet_subchannel")
@@ -847,18 +829,16 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(image, "back")
-            col.itemR(image, "title")
-
+            col.itemR(image, "button")
+            
             col = split.column()
-            col.itemR(image, "text")
-            col.itemR(image, "text_hi")
+            col.itemR(image, "button_title")
+            col.itemR(image, "button_text")
 
             col = split.column()
             col.itemR(image, "header")
-            col.itemR(image, "header_text")
 
             col = split.column()
-            col.itemR(image, "header_text_hi")
             col.itemR(image, "editmesh_active", slider=True)
 
         elif theme.active_theme == 'SEQUENCE_EDITOR':
@@ -866,27 +846,25 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(seq, "back")
-            col.itemR(seq, "title")
+            col.itemR(seq, "button")
+            col.itemR(seq, "button_title")
+            col.itemR(seq, "button_text")
             col.itemR(seq, "text")
-            col.itemR(seq, "text_hi")
-            col.itemR(seq, "header")
 
             col = split.column()
-            col.itemR(seq, "header_text")
-            col.itemR(seq, "header_text_hi")
+            col.itemR(seq, "header")
             col.itemR(seq, "grid")
-            col.itemR(seq, "window_sliders")
             col.itemR(seq, "movie_strip")
-
-            col = split.column()
             col.itemR(seq, "image_strip")
             col.itemR(seq, "scene_strip")
+
+            col = split.column()
             col.itemR(seq, "audio_strip")
             col.itemR(seq, "effect_strip")
             col.itemR(seq, "plugin_strip")
+            col.itemR(seq, "transition_strip")
 
             col = split.column()
-            col.itemR(seq, "transition_strip")
             col.itemR(seq, "meta_strip")
             col.itemR(seq, "current_frame")
             col.itemR(seq, "keyframe")
@@ -897,43 +875,38 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(prop, "back")
+            
+            col = split.column()
             col.itemR(prop, "title")
 
             col = split.column()
             col.itemR(prop, "text")
-            col.itemR(prop, "text_hi")
 
             col = split.column()
             col.itemR(prop, "header")
-            col.itemR(prop, "header_text")
-
-            col = split.column()
-            col.itemR(prop, "header_text_hi")
-            col.itemR(prop, "panel")
 
         elif theme.active_theme == 'TEXT_EDITOR':
             text = theme.text_editor
 
             col = split.column()
             col.itemR(text, "back")
-            col.itemR(text, "title")
+            col.itemR(text, "button")
+            col.itemR(text, "button_title")
+            col.itemR(text, "button_text")
+            
+            col = split.column()
             col.itemR(text, "text")
             col.itemR(text, "text_hi")
-
-            col = split.column()
             col.itemR(text, "header")
-            col.itemR(text, "header_text")
-            col.itemR(text, "header_text_hi")
             col.itemR(text, "line_numbers_background")
 
             col = split.column()
-            col.itemR(text, "scroll_bar")
             col.itemR(text, "selected_text")
             col.itemR(text, "cursor")
             col.itemR(text, "syntax_builtin")
+            col.itemR(text, "syntax_special")
 
             col = split.column()
-            col.itemR(text, "syntax_special")
             col.itemR(text, "syntax_comment")
             col.itemR(text, "syntax_string")
             col.itemR(text, "syntax_numbers")
@@ -943,19 +916,15 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(time, "back")
-            col.itemR(time, "title")
             col.itemR(time, "text")
 
             col = split.column()
-            col.itemR(time, "text_hi")
             col.itemR(time, "header")
 
-            col = split.column()
-            col.itemR(time, "header_text")
-            col.itemR(time, "header_text_hi")
-
             col = split.column()
             col.itemR(time, "grid")
+            
+            col = split.column()
             col.itemR(time, "current_frame")
 
         elif theme.active_theme == 'NODE_EDITOR':
@@ -963,20 +932,21 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(node, "back")
-            col.itemR(node, "title")
-            col.itemR(node, "text")
-            col.itemR(node, "text_hi")
+            col.itemR(node, "button")
+            col.itemR(node, "button_title")
+            col.itemR(node, "button_text")
+            
 
             col = split.column()
+            col.itemR(node, "text")
+            col.itemR(node, "text_hi")
             col.itemR(node, "header")
-            col.itemR(node, "header_text")
-            col.itemR(node, "header_text_hi")
             col.itemR(node, "wires")
 
             col = split.column()
             col.itemR(node, "wire_select")
             col.itemR(node, "selected_text")
-            col.itemR(node, "node_backdrop")
+            col.itemR(node, "node_backdrop", slider=True)
             col.itemR(node, "in_out_node")
 
             col = split.column()
@@ -989,18 +959,17 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(logic, "back")
-            col.itemR(logic, "title")
+            col.itemR(logic, "button")
 
             col = split.column()
-            col.itemR(logic, "text")
-            col.itemR(logic, "text_hi")
+            col.itemR(logic, "button_title")
+            col.itemR(logic, "button_text")
 
             col = split.column()
+            col.itemR(logic, "text")
             col.itemR(logic, "header")
-            col.itemR(logic, "header_text")
 
             col = split.column()
-            col.itemR(logic, "header_text_hi")
             col.itemR(logic, "panel")
 
         elif theme.active_theme == 'OUTLINER':
@@ -1008,54 +977,44 @@ class USERPREF_PT_theme(bpy.types.Panel):
 
             col = split.column()
             col.itemR(out, "back")
-            col.itemR(out, "title")
 
             col = split.column()
             col.itemR(out, "text")
+            
+            col = split.column()
             col.itemR(out, "text_hi")
 
             col = split.column()
             col.itemR(out, "header")
-            col.itemR(out, "header_text")
-
-            col = split.column()
-            col.itemR(out, "header_text_hi")
 
         elif theme.active_theme == 'INFO':
             info = theme.info
 
             col = split.column()
             col.itemR(info, "back")
-            col.itemR(info, "title")
 
             col = split.column()
-            col.itemR(info, "text")
-            col.itemR(info, "text_hi")
+            col.itemR(info, "header")
 
             col = split.column()
-            col.itemR(info, "header")
             col.itemR(info, "header_text")
 
             col = split.column()
-            col.itemR(info, "header_text_hi")
 
         elif theme.active_theme == 'USER_PREFERENCES':
             prefs = theme.user_preferences
 
             col = split.column()
             col.itemR(prefs, "back")
-            col.itemR(prefs, "title")
 
             col = split.column()
             col.itemR(prefs, "text")
-            col.itemR(prefs, "text_hi")
-
+            
             col = split.column()
             col.itemR(prefs, "header")
-            col.itemR(prefs, "header_text")
 
             col = split.column()
-            col.itemR(prefs, "header_text_hi")
+            col.itemR(prefs, "header_text")
 
 
 class USERPREF_PT_file(bpy.types.Panel):
@@ -1224,16 +1183,16 @@ class USERPREF_PT_input(bpy.types.Panel):
             row = subcol.row()
 
             if kmi.expanded:
-                row.itemR(kmi, "expanded", text="", icon="ICON_TRIA_DOWN")
+                row.itemR(kmi, "expanded", text="", icon='ICON_TRIA_DOWN')
             else:
-                row.itemR(kmi, "expanded", text="", icon="ICON_TRIA_RIGHT")
+                row.itemR(kmi, "expanded", text="", icon='ICON_TRIA_RIGHT')
 
             itemrow = row.row()
             itemrow.enabled = km.user_defined
             if kmi.active:
-                itemrow.itemR(kmi, "active", text="", icon="ICON_CHECKBOX_HLT")
+                itemrow.itemR(kmi, "active", text="", icon='ICON_CHECKBOX_HLT')
             else:
-                itemrow.itemR(kmi, "active", text="", icon="ICON_CHECKBOX_DEHLT")
+                itemrow.itemR(kmi, "active", text="", icon='ICON_CHECKBOX_DEHLT')
 
             itemcol = itemrow.column()
             itemcol.active = kmi.active
@@ -1290,11 +1249,11 @@ class USERPREF_PT_input(bpy.types.Panel):
 
                 itemcol.itemS()
 
-            itemrow.itemO("wm.keyitem_remove", text="", icon="ICON_ZOOMOUT")
+            itemrow.itemO("wm.keyitem_remove", text="", icon='ICON_ZOOMOUT')
 
         itemrow = col.row()
         itemrow.itemL()
-        itemrow.itemO("wm.keyitem_add", text="", icon="ICON_ZOOMIN")
+        itemrow.itemO("wm.keyitem_add", text="", icon='ICON_ZOOMIN')
         itemrow.enabled = km.user_defined
 
 bpy.types.register(USERPREF_HT_header)
@@ -1439,7 +1398,7 @@ class WM_OT_keyitem_add(bpy.types.Operator):
     def execute(self, context):
         wm = context.manager
         km = wm.active_keymap
-        kmi = km.add_item("", "A", "PRESS")
+        kmi = km.add_item("", 'A', 'PRESS')
         return ('FINISHED',)
 
 
index 863bab35f131d51e7f5ccbf15acdbb00cfc76f28..309d46307e707804e5be17ff02c80cb1d67ec057 100644 (file)
@@ -306,12 +306,18 @@ class VIEW3D_MT_select_particle(bpy.types.Menu):
 
         layout.itemO("particle.select_all_toggle", text="Select/Deselect All")
         layout.itemO("particle.select_linked")
+        layout.itemO("particle.select_inverse")
 
         layout.itemS()
 
         layout.itemO("particle.select_more")
         layout.itemO("particle.select_less")
 
+        layout.itemS()
+
+        layout.itemO("particle.select_first", text="Roots")
+        layout.itemO("particle.select_last", text="Tips")
+
 
 class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
     bl_label = "Select"
@@ -644,7 +650,7 @@ class VIEW3D_MT_make_links(bpy.types.Menu):
 
     def draw(self, context):
         layout = self.layout
-        
+
         layout.item_menu_enumO("object.make_links_scene", "type", text="Objects to Scene...")
 
         layout.items_enumO("object.make_links_data", property="type") # inline
@@ -1373,29 +1379,25 @@ class VIEW3D_PT_3dview_item(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
     bl_label = "Item"
+
     def poll(self, context):
-        return (context.active_object or context.bone or context.edit_bone)
+        return (context.active_object or context.active_bone or context.active_pchan)
+
     def draw(self, context):
         layout = self.layout
-       
-        ob = context.object
+
+        ob = context.active_object
+
         row = layout.row()
         row.itemL(text="", icon='ICON_OBJECT_DATA')
         row.itemR(ob, "name", text="")
-       
-        if ((context.active_bone or context.active_pchan) and ob.type == 'ARMATURE' and (ob.mode == 'EDIT' or ob.mode == 'POSE')):
+
+        if ob.type == 'ARMATURE' and ob.mode in ('EDIT', 'POSE'):
             bone = context.active_bone
-            if not bone:
-                pchan = context.active_pchan
-                if pchan:
-                    bone = pchan.bone
-           
-            row = layout.row()
-            row.itemL(text="", icon='ICON_BONE_DATA')
-            row.itemR(bone, "name", text="")
+            if bone:
+                row = layout.row()
+                row.itemL(text="", icon='ICON_BONE_DATA')
+                row.itemR(bone, "name", text="")
 
 class VIEW3D_PT_3dview_display(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
@@ -1592,13 +1594,13 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
 
         col.itemR(toolsettings, "etch_convert_mode")
 
-        if toolsettings.etch_convert_mode == "LENGTH":
+        if toolsettings.etch_convert_mode == 'LENGTH':
             col.itemR(toolsettings, "etch_length_limit")
-        elif toolsettings.etch_convert_mode == "ADAPTIVE":
+        elif toolsettings.etch_convert_mode == 'ADAPTIVE':
             col.itemR(toolsettings, "etch_adaptive_limit")
-        elif toolsettings.etch_convert_mode == "FIXED":
+        elif toolsettings.etch_convert_mode == 'FIXED':
             col.itemR(toolsettings, "etch_subdivision_number")
-        elif toolsettings.etch_convert_mode == "RETARGET":
+        elif toolsettings.etch_convert_mode == 'RETARGET':
             col.itemR(toolsettings, "etch_template")
             col.itemR(toolsettings, "etch_roll_mode")
             col.itemR(toolsettings, "etch_autoname")
index 49c284277244d19161a9c1e7a2f6c11eb26fdfa2..771e1e9046b9f3ae38e2b8aff122d69389b17ded 100644 (file)
@@ -111,7 +111,7 @@ class VIEW3D_PT_tools_meshedit(View3DPanel):
         col = layout.column(align=True)
         col.itemL(text="UV Mapping:")
         col.item_stringO("wm.call_menu", "name", "VIEW3D_MT_uv_map", text="Unwrap")
-        
+
         col.itemO("mesh.uvs_rotate")
         col.itemO("mesh.uvs_mirror")
 
index 783b51b81de757959221b7a65b11db51406a638f..a106e655e78933ad691e76ee26c219cf8708d2c2 100644 (file)
@@ -188,7 +188,11 @@ ifeq ($(WITH_OPENEXR), true)
 endif
 
 ifeq ($(WITH_OPENJPEG), true)
-    COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
+    ifndef BF_OPENJPEG_LIBS
+        COMLIB += $(OCGDIR)/extern/openjpeg/$(DEBUG_DIR)libopenjpeg.a
+    else
+        COMLIB += $(BF_OPENJPEG_LIBS)
+    endif
 endif
 
 COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a
index 8721e49f06b23b53d537ac538f0713db05644411..c1b54c393c75d7c3255eb9eba6cc90564b88fdee 100644 (file)
@@ -46,7 +46,7 @@
 #include "BLI_blenlib.h"
 #include "BLI_linklist.h"      /* linknode */
 #include "BLI_string.h"
-#include "BLI_arithb.h"
+#include "BLI_math.h"
 
 #include "BIF_gl.h"
 #include "BLF_api.h"
@@ -459,7 +459,7 @@ static void blf_font_fill(FontBLF *font)
        font->pos[0]= 0.0f;
        font->pos[1]= 0.0f;
        font->angle= 0.0f;
-       Mat4One(font->mat);
+       unit_m4(font->mat);
        font->clip_rec.xmin= 0.0f;
        font->clip_rec.xmax= 0.0f;
        font->clip_rec.ymin= 0.0f;
index 7d1e43a38dfd2287bfd75bdba8b13109d1cf848d..1174197dce7f861c15290e9fbde38d0ece7477be 100644 (file)
@@ -131,7 +131,8 @@ void blf_glyph_cache_free(GlyphCacheBLF *gc)
                }
        }
 
-       glDeleteTextures(gc->cur_tex+1, gc->textures);
+       if (gc->cur_tex+1 > 0)
+               glDeleteTextures(gc->cur_tex+1, gc->textures);
        free((void *)gc->textures);
        MEM_freeN(gc);
 }
index e5b3adbd0c0c1b22de180ff0f994bb58ee686040..54dd82317fc9f124a97fff9cc7268caafddb5be9 100644 (file)
@@ -38,7 +38,7 @@
 #include "BKE_DerivedMesh.h"
 
 #include "BLI_blenlib.h"
-#include "BLI_arithb.h"
+#include "BLI_math.h"
 #include "BLI_edgehash.h"
 
 #include "DNA_cloth_types.h"
index 6446b48d553e6ea74b5cdfc69b5751994f7df43c..7e0bb9fa08efda19b5aafb7f28cc3a1a770dbf1d 100644 (file)
@@ -52,7 +52,7 @@ typedef struct bConstraintOb {
        float startmat[4][4];           /* original matrix (before constraint solving) */
        
        short type;                                     /* type of owner  */
-       short rotOrder;                         /* rotation order for constraint owner (as defined in eEulerRotationOrders in BLI_arithb.h) */
+       short rotOrder;                         /* rotation order for constraint owner (as defined in eEulerRotationOrders in BLI_math.h) */
 } bConstraintOb;
 
 /* ---------------------------------------------------------------------------- */
@@ -102,6 +102,9 @@ typedef struct bConstraintTypeInfo {
 bConstraintTypeInfo *constraint_get_typeinfo(struct bConstraint *con);
 bConstraintTypeInfo *get_constraint_typeinfo(int type);
 
+struct bConstraint *add_ob_constraint(struct Object *ob, const char *name, short type);
+struct bConstraint *add_pose_constraint(struct Object *ob, struct bPoseChannel *pchan, const char *name, short type);
+
 /* ---------------------------------------------------------------------------- */
 /* Useful macros for testing various common flag combinations */
 
index feba39ee11db2de1ef327d6f8c4c0a336a701c8d..7f64538b10d09802c0073eefecfd4058fb0e51c2 100644 (file)
@@ -174,7 +174,7 @@ PointerRNA CTX_data_pointer_get(const bContext *C, const char *member);
 PointerRNA CTX_data_pointer_get_type(const bContext *C, const char *member, StructRNA *type);
 ListBase CTX_data_collection_get(const bContext *C, const char *member);
 ListBase CTX_data_dir_get(const bContext *C);
-void CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb);
+int CTX_data_get(const bContext *C, const char *member, PointerRNA *r_ptr, ListBase *r_lb);
 
 void CTX_data_id_pointer_set(bContextDataResult *result, struct ID *id);
 void CTX_data_pointer_set(bContextDataResult *result, struct ID *id, StructRNA *type, void *data);
index b66ddf13527a63beea134ecaee206e68973cccb0..877e09b037fbbe4c762523bf0d3715e2f0b03823 100644 (file)
@@ -42,8 +42,8 @@ void          free_group(struct Group *group);
 void           unlink_group(struct Group *group);
 struct Group *add_group(char *name);
 struct Group *copy_group(struct Group *group);
-void           add_to_group(struct Group *group, struct Object *ob);
-int                    rem_from_group(struct Group *group, struct Object *ob);
+int                    add_to_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
+int                    rem_from_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
 struct Group *find_group(struct Object *ob, struct Group *group);
 int                    object_in_group(struct Object *ob, struct Group *group);
 int                    group_is_animated(struct Object *parent, struct Group *group);
index b70801a9edd5c2a4aee4e8e399d9361b168c6c6b..c81d837689ff5aac0f4600bc06ba74134d358c95 100644 (file)
@@ -60,6 +60,7 @@ float *do_ob_key(struct Scene *scene, struct Object *ob);
 
 struct Key *ob_get_key(struct Object *ob);
 struct KeyBlock *ob_get_keyblock(struct Object *ob);
+struct KeyBlock *ob_get_reference_keyblock(struct Object *ob);
 struct KeyBlock *key_get_keyblock(struct Key *key, int index);
 struct KeyBlock *key_get_named_keyblock(struct Key *key, const char name[]);
 char *key_get_curValue_rnaPath(struct Key *key, struct KeyBlock *kb);
index 66776d086d605422225feb99974c0d9688cc39ff..f9130e24a0866d5c42938f6a68f93cdcf1654465 100644 (file)
@@ -53,6 +53,7 @@ struct GPUMaterial;
 struct GPUNode;
 struct GPUNodeStack;
 struct PointerRNA;
+struct bContext;
 
 /* ************** NODE TYPE DEFINITIONS ***** */
 
@@ -83,7 +84,7 @@ typedef struct bNodeType {
        void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **);
        
        /* this line is set on startup of blender */
-       void (*uifunc)(struct uiLayout *, struct PointerRNA *ptr);
+       void (*uifunc)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr);
 
        void (*initfunc)(struct bNode *);
        void (*freestoragefunc)(struct bNode *);
@@ -161,6 +162,7 @@ void                        nodeVerifyType(struct bNodeTree *ntree, struct bNode *node);
 void                   nodeAddToPreview(struct bNode *, float *, int, int);
 
 void                   nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node);
+void                   nodeUniqueName(struct bNodeTree *ntree, struct bNode *node);
 void                   nodeAddSockets(struct bNode *node, struct bNodeType *ntype);
 struct bNode   *nodeAddNodeType(struct bNodeTree *ntree, int type, struct bNodeTree *ngroup, struct ID *id);
 void                   nodeRegisterType(struct ListBase *typelist, const struct bNodeType *ntype) ;
index ba42aca18724864098a46c798672f0bf78518ee3..b532b0820d7e18c960642bebbf2e640509317cb7 100644 (file)
@@ -68,6 +68,9 @@ typedef struct SculptSession {
        struct MFace *mface;
        int totvert, totface;
        float *face_normals;
+
+       struct Object *ob;
+       struct KeyBlock *kb, *refkb;
        
        /* Mesh connectivity */
        struct ListBase *fmap;
index 32065ea5151513f7a096a0fcd2e45fe51bd85c24..d92e8fe422717c231334df295e502b13feeb1685 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "BKE_utildefines.h"
 #include "BKE_bmesh.h"
-#include "BLI_arithb.h"
+#include "BLI_math.h"
 #include "BLI_blenlib.h"
 
 /*split this all into a seperate bevel.c file in src*/
@@ -88,7 +88,7 @@ BME_TransData *BME_assign_transdata(BME_TransData_Head *td, BME_Mesh *bm, BME_Ve
        else if (org != NULL) VECCOPY(vtd->org,org);
        if (vec != NULL) {
                VECCOPY(vtd->vec,vec);
-               Normalize(vtd->vec);
+               normalize_v3(vtd->vec);
        }
        vtd->loc = loc;
 
@@ -261,7 +261,7 @@ static BME_Vert *BME_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Edge *e, BME_Edge
        nv = BME_SEMV(bm,v,e,ne);
        if (nv == NULL) return NULL;
        VECSUB(nv->co,v2->co,v->co);
-       len = VecLength(nv->co);
+       len = len_v3(nv->co);
        VECADDFAC(nv->co,v->co,nv->co,len*percent);
        nv->flag = v->flag;
        nv->bweight = v->bweight;
@@ -335,17 +335,17 @@ static int BME_bevel_get_vec(float *vec, BME_Vert *v1, BME_Vert *v2, BME_TransDa
        /* compare the transform origins to see if we can use the vert co's;
         * if they belong to different origins, then we will use the origins to determine
         * the vector */
-       if (VecCompare(vtd1->org,vtd2->org,0.000001f)) {
+       if (compare_v3v3(vtd1->org,vtd2->org,0.000001f)) {
                VECSUB(vec,v2->co,v1->co);
-               if (VecLength(vec) < 0.000001f) {
-                       VecMulf(vec,0);
+               if (len_v3(vec) < 0.000001f) {
+                       mul_v3_fl(vec,0);
                }
                return 0;
        }
        else {
                VECSUB(vec,vtd2->org,vtd1->org);
-               if (VecLength(vec) < 0.000001f) {
-                       VecMulf(vec,0);
+               if (len_v3(vec) < 0.000001f) {
+                       mul_v3_fl(vec,0);
                }
                return 1;
        }
@@ -363,18 +363,18 @@ static int BME_bevel_get_vec(float *vec, BME_Vert *v1, BME_Vert *v2, BME_TransDa
 static float BME_bevel_project_vec(float *vec1, float *vec2, float *up_vec, int is_forward, BME_TransData_Head *td) {
        float factor, vec3[3], tmp[3],c1,c2;
 
-       Crossf(tmp,vec1,vec2);
-       Normalize(tmp);
-       factor = Inpf(up_vec,tmp);
+       cross_v3_v3v3(tmp,vec1,vec2);
+       normalize_v3(tmp);
+       factor = dot_v3v3(up_vec,tmp);
        if ((factor > 0 && is_forward) || (factor < 0 && !is_forward)) {
-               Crossf(vec3,vec2,tmp); /* hmm, maybe up_vec should be used instead of tmp */
+               cross_v3_v3v3(vec3,vec2,tmp); /* hmm, maybe up_vec should be used instead of tmp */
        }
        else {
-               Crossf(vec3,tmp,vec2); /* hmm, maybe up_vec should be used instead of tmp */
+               cross_v3_v3v3(vec3,tmp,vec2); /* hmm, maybe up_vec should be used instead of tmp */
        }
-       Normalize(vec3);
-       c1 = Inpf(vec3,vec1);
-       c2 = Inpf(vec1,vec1);
+       normalize_v3(vec3);
+       c1 = dot_v3v3(vec3,vec1);
+       c2 = dot_v3v3(vec1,vec1);
        if (fabs(c1) < 0.000001f || fabs(c2) < 0.000001f) {
                factor = 0.0f;
        }
@@ -435,8 +435,8 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B
                ne->tflag1 = BME_BEVEL_ORIG; /* mark edge as original, even though it isn't */
                BME_bevel_get_vec(vec1,v1,v,td);
                BME_bevel_get_vec(vec2,v2,v,td);
-               Crossf(t_up_vec,vec1,vec2);
-               Normalize(t_up_vec);
+               cross_v3_v3v3(t_up_vec,vec1,vec2);
+               normalize_v3(t_up_vec);
                up_vec = t_up_vec;
        }
        else {
@@ -486,8 +486,8 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B
 
        is_edge = BME_bevel_get_vec(vec1,v,v1,td); /* get the vector we will be projecting onto */
        BME_bevel_get_vec(vec2,v,v2,td); /* get the vector we will be projecting parallel to */
-       len = VecLength(vec1);
-       Normalize(vec1);
+       len = len_v3(vec1);
+       normalize_v3(vec1);
 
        vtd = BME_get_transdata(td, sv);
        vtd1 = BME_get_transdata(td, v);
@@ -525,8 +525,8 @@ static BME_Vert *BME_bevel_split_edge(BME_Mesh *bm, BME_Vert *v, BME_Vert *v1, B
        }
        VECADDFAC(sv->co,v->co,vec1,dis);
        VECSUB(vec1,sv->co,vtd1->org);
-       dis = VecLength(vec1);
-       Normalize(vec1);
+       dis = len_v3(vec1);
+       normalize_v3(vec1);
        BME_assign_transdata(td, bm, sv, vtd1->org, vtd1->org, vec1, sv->co, dis, scale, maxfactor, vtd->max);
 
        return sv;
@@ -545,10 +545,10 @@ static float BME_bevel_set_max(BME_Vert *v1, BME_Vert *v2, float value, BME_Tran
        }
        else {
                VECCOPY(vec2,vtd1->vec);
-               VecMulf(vec2,vtd1->factor);
-               if (Inpf(vec1, vec1)) {
-                       Projf(vec2,vec2,vec1);
-                       fac1 = VecLength(vec2)/value;
+               mul_v3_fl(vec2,vtd1->factor);
+               if (dot_v3v3(vec1, vec1)) {
+                       project_v3_v3v3(vec2,vec2,vec1);
+                       fac1 = len_v3(vec2)/value;
                }
                else {
                        fac1 = 0;
@@ -560,10 +560,10 @@ static float BME_bevel_set_max(BME_Vert *v1, BME_Vert *v2, float value, BME_Tran
        }
        else {
                VECCOPY(vec3,vtd2->vec);
-               VecMulf(vec3,vtd2->factor);
-               if (Inpf(vec1, vec1)) {
-                       Projf(vec2,vec3,vec1);
-                       fac2 = VecLength(vec2)/value;
+               mul_v3_fl(vec3,vtd2->factor);
+               if (dot_v3v3(vec1, vec1)) {
+                       project_v3_v3v3(vec2,vec3,vec1);
+                       fac2 = len_v3(vec2)/value;
                }
                else {
                        fac2 = 0;
@@ -571,7 +571,7 @@ static float BME_bevel_set_max(BME_Vert *v1, BME_Vert *v2, float value, BME_Tran
        }
 
        if (fac1 || fac2) {
-               max = VecLength(vec1)/(fac1 + fac2);
+               max = len_v3(vec1)/(fac1 + fac2);
                if (vtd1->max && (*vtd1->max < 0 || max < *vtd1->max)) {
                        *vtd1->max = max;
                }
@@ -760,12 +760,12 @@ static BME_Poly *BME_bevel_poly(BME_Mesh *bm, BME_Poly *f, float value, int opti
        for (i=0,ol=f->loopbase,l=ol->next; l->next!=ol; l=l->next) {
                BME_bevel_get_vec(vec1,l->next->v,ol->v,td);
                BME_bevel_get_vec(vec2,l->v,ol->v,td);
-               Crossf(vec3,vec2,vec1);
+               cross_v3_v3v3(vec3,vec2,vec1);
                VECADD(up_vec,up_vec,vec3);
                i++;
        }
-       VecMulf(up_vec,1.0f/i);
-       Normalize(up_vec);
+       mul_v3_fl(up_vec,1.0f/i);
+       normalize_v3(up_vec);
 
        for (i=0,len=f->len; i<len; i++,l=l->next) {
                if ((l->e->tflag1 & BME_BEVEL_BEVEL) && (l->e->tflag1 & BME_BEVEL_ORIG)) {
@@ -791,10 +791,10 @@ static BME_Poly *BME_bevel_poly(BME_Mesh *bm, BME_Poly *f, float value, int opti
                                }
                                else {
                                        VECCOPY(vec2,vtd1->vec);
-                                       VecMulf(vec2,vtd1->factor);
-                                       if (Inpf(vec1, vec1)) {
-                                               Projf(vec2,vec2,vec1);
-                                               fac1 = VecLength(vec2)/value;
+                                       mul_v3_fl(vec2,vtd1->factor);
+                                       if (dot_v3v3(vec1, vec1)) {
+                                               project_v3_v3v3(vec2,vec2,vec1);
+                                               fac1 = len_v3(vec2)/value;
                                        }
                                        else {
                                                fac1 = 0;
@@ -805,17 +805,17 @@ static BME_Poly *BME_bevel_poly(BME_Mesh *bm, BME_Poly *f, float value, int opti
                                }
                                else {
                                        VECCOPY(vec3,vtd2->vec);
-                                       VecMulf(vec3,vtd2->factor);
-                                       if (Inpf(vec1, vec1)) {
-                                               Projf(vec2,vec3,vec1);
-                                               fac2 = VecLength(vec2)/value;
+                                       mul_v3_fl(vec3,vtd2->factor);
+                                       if (dot_v3v3(vec1, vec1)) {
+                                               project_v3_v3v3(vec2,vec3,vec1);
+                                               fac2 = len_v3(vec2)/value;
                                        }
                                        else {
                                                fac2 = 0;
                                        }
                                }
                                if (fac1 || fac2) {
-                                       max = VecLength(vec1)/(fac1 + fac2);
+                                       max = len_v3(vec1)/(fac1 + fac2);
                                        if (vtd1->max && (*vtd1->max < 0 || max < *vtd1->max)) {
                                                *vtd1->max = max;
                                        }
@@ -880,7 +880,7 @@ static float BME_bevel_get_angle(BME_Mesh *bm, BME_Edge *e, BME_Vert *v) {
        }
        VECSUB(vec1,v1->co,v->co);
        VECSUB(vec2,v2->co,v->co);
-       Crossf(vec3,vec1,vec2);
+       cross_v3_v3v3(vec3,vec1,vec2);
 
        l1 = l2;
        if (l1->v == v) {
@@ -893,12 +893,12 @@ static float BME_bevel_get_angle(BME_Mesh *bm, BME_Edge *e, BME_Vert *v) {
        }
        VECSUB(vec1,v1->co,v->co);
        VECSUB(vec2,v2->co,v->co);
-       Crossf(vec4,vec2,vec1);
+       cross_v3_v3v3(vec4,vec2,vec1);
 
-       Normalize(vec3);
-       Normalize(vec4);
+       normalize_v3(vec3);
+       normalize_v3(vec4);
 
-       return Inpf(vec3,vec4);
+       return dot_v3v3(vec3,vec4);
 }
 static int BME_face_sharededges(BME_Poly *f1, BME_Poly *f2){
        BME_Loop *l;
index 11e58203bb3615508c780f6ab4e3bef389ea633d..f9abaa9da0244108919d9c4e01e799e8b7b783b1 100644 (file)
@@ -52,7 +52,7 @@
 #include "DNA_space_types.h"
 #include "DNA_particle_types.h"
 
-#include "BLI_arithb.h"
+#include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_edgehash.h"
 #include "BLI_editVert.h"
@@ -619,20 +619,20 @@ static void emDM__calcFaceCent(EditFace *efa, float cent[3], float (*vertexCos)[
 {
        if (vertexCos) {
                VECCOPY(cent, vertexCos[(int) efa->v1->tmp.l]);
-               VecAddf(cent, cent, vertexCos[(int) efa->v2->tmp.l]);
-               VecAddf(cent, cent, vertexCos[(int) efa->v3->tmp.l]);
-               if (efa->v4) VecAddf(cent, cent, vertexCos[(int) efa->v4->tmp.l]);
+               add_v3_v3v3(cent, cent, vertexCos[(int) efa->v2->tmp.l]);
+               add_v3_v3v3(cent, cent, vertexCos[(int) efa->v3->tmp.l]);
+               if (efa->v4) add_v3_v3v3(cent, cent, vertexCos[(int) efa->v4->tmp.l]);
        } else {
                VECCOPY(cent, efa->v1->co);
-               VecAddf(cent, cent, efa->v2->co);
-               VecAddf(cent, cent, efa->v3->co);
-               if (efa->v4) VecAddf(cent, cent, efa->v4->co);
+               add_v3_v3v3(cent, cent, efa->v2->co);
+               add_v3_v3v3(cent, cent, efa->v3->co);
+               if (efa->v4) add_v3_v3v3(cent, cent, efa->v4->co);
        }
 
        if (efa->v4) {
-               VecMulf(cent, 0.25f);
+               mul_v3_fl(cent, 0.25f);
        } else {
-               VecMulf(cent, 0.33333333333f);
+               mul_v3_fl(cent, 0.33333333333f);
        }
 }
 static void emDM_foreachMappedFaceCenter(DerivedMesh *dm, void (*func)(void *userData, int index, float *co, float *no), void *userData)
@@ -1498,25 +1498,25 @@ static DerivedMesh *getEditMeshDerivedMesh(EditMesh *em, Object *ob,
                        if(efa->v4) {
                                float *v4 = vertexCos[(int) efa->v4->tmp.l];
 
-                               CalcNormFloat4(v1, v2, v3, v4, no);
-                               VecAddf(emdm->vertexNos[(int) efa->v4->tmp.l], emdm->vertexNos[(int) efa->v4->tmp.l], no);
+                               normal_quad_v3( no,v1, v2, v3, v4);
+                               add_v3_v3v3(emdm->vertexNos[(int) efa->v4->tmp.l], emdm->vertexNos[(int) efa->v4->tmp.l], no);
                        }
                        else {
-                               CalcNormFloat(v1, v2, v3, no);
+                               normal_tri_v3( no,v1, v2, v3);
                        }
 
-                       VecAddf(emdm->vertexNos[(int) efa->v1->tmp.l], emdm->vertexNos[(int) efa->v1->tmp.l], no);
-                       VecAddf(emdm->vertexNos[(int) efa->v2->tmp.l], emdm->vertexNos[(int) efa->v2->tmp.l], no);
-                       VecAddf(emdm->vertexNos[(int) efa->v3->tmp.l], emdm->vertexNos[(int) efa->v3->tmp.l], no);
+                       add_v3_v3v3(emdm->vertexNos[(int) efa->v1->tmp.l], emdm->vertexNos[(int) efa->v1->tmp.l], no);
+                       add_v3_v3v3(emdm->vertexNos[(int) efa->v2->tmp.l], emdm->vertexNos[(int) efa->v2->tmp.l], no);
+                       add_v3_v3v3(emdm->vertexNos[(int) efa->v3->tmp.l], emdm->vertexNos[(int) efa->v3->tmp.l], no);
                }
 
                for(i=0, eve= em->verts.first; eve; i++, eve=eve->next) {
                        float *no = emdm->vertexNos[i];
                        /* following Mesh convention; we use vertex coordinate itself
                         * for normal in this case */
-                       if (Normalize(no)==0.0) {
+                       if (normalize_v3(no)==0.0) {
                                VECCOPY(no, vertexCos[i]);
-                               Normalize(no);
+                               normalize_v3(no);
                        }
                }
        }
@@ -2482,7 +2482,7 @@ int editmesh_get_first_deform_matrices(Object *ob, EditMesh *em, float (**deform
                                defmats= MEM_callocN(sizeof(*defmats)*numVerts, "defmats");
 
                                for(a=0; a<numVerts; a++)
-                                       Mat3One(defmats[a]);
+                                       unit_m3(defmats[a]);
                        }
 
                        mti->deformMatricesEM(md, ob, em, dm, deformedVerts, defmats,
@@ -2554,11 +2554,11 @@ void DM_add_tangent_layer(DerivedMesh *dm)
 
                if (mf->v4) {
                        v4= &mvert[mf->v4];
-                       CalcNormFloat4(v4->co, v3->co, v2->co, v1->co, fno);
+                       normal_quad_v3( fno,v4->co, v3->co, v2->co, v1->co);
                }
                else {
                        v4= NULL;
-                       CalcNormFloat(v3->co, v2->co, v1->co, fno);
+                       normal_tri_v3( fno,v3->co, v2->co, v1->co);
                }
                
                if(mtface) {
@@ -2569,11 +2569,11 @@ void DM_add_tangent_layer(DerivedMesh *dm)
                }
                else {
                        uv1= uv[0]; uv2= uv[1]; uv3= uv[2]; uv4= uv[3];
-                       spheremap(orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2], &uv[0][0], &uv[0][1]);
-                       spheremap(orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2], &uv[1][0], &uv[1][1]);
-                       spheremap(orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2], &uv[2][0], &uv[2][1]);
+                       map_to_sphere( &uv[0][0], &uv[0][1],orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
+                       map_to_sphere( &uv[1][0], &uv[1][1],orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
+                       map_to_sphere( &uv[2][0], &uv[2][1],orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
                        if(v4)
-                               spheremap(orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2], &uv[3][0], &uv[3][1]);
+                               map_to_sphere( &uv[3][0], &uv[3][1],orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
                }
                
                tangent_from_uv(uv1, uv2, uv3, v1->co, v2->co, v3->co, fno, tang);
@@ -2603,11 +2603,11 @@ void DM_add_tangent_layer(DerivedMesh *dm)
                }
                else {
                        uv1= uv[0]; uv2= uv[1]; uv3= uv[2]; uv4= uv[3];
-                       spheremap(orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2], &uv[0][0], &uv[0][1]);
-                       spheremap(orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2], &uv[1][0], &uv[1][1]);
-                       spheremap(orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2], &uv[2][0], &uv[2][1]);
+                       map_to_sphere( &uv[0][0], &uv[0][1],orco[mf->v1][0], orco[mf->v1][1], orco[mf->v1][2]);
+                       map_to_sphere( &uv[1][0], &uv[1][1],orco[mf->v2][0], orco[mf->v2][1], orco[mf->v2][2]);
+                       map_to_sphere( &uv[2][0], &uv[2][1],orco[mf->v3][0], orco[mf->v3][1], orco[mf->v3][2]);
                        if(len==4)
-                               spheremap(orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2], &uv[3][0], &uv[3][1]);
+                               map_to_sphere( &uv[3][0], &uv[3][1],orco[mf->v4][0], orco[mf->v4][1], orco[mf->v4][2]);
                }
                
                mf_vi[0]= mf->v1;
@@ -2619,7 +2619,7 @@ void DM_add_tangent_layer(DerivedMesh *dm)
                        vtang= find_vertex_tangent(vtangents[mf_vi[j]], mtface ? tf->uv[j] : uv[j]);
 
                        VECCOPY(tangent[j], vtang);
-                       Normalize(tangent[j]);
+                       normalize_v3(tangent[j]);
                }
        }
        
index 2dec76d1b6b86bf358e3f3826fe2c0022136588f..358a482c3cf85dc9a3c8d7c9bc8fe42dd5053356 100644 (file)
@@ -64,7 +64,7 @@
 #include "BKE_utildefines.h"
 #include "BIK_api.h"
 
-#include "BLI_arithb.h"
+#include "BLI_math.h"
 #include "BLI_blenlib.h"
 #include "BLI_ghash.h"
 
@@ -453,7 +453,7 @@ bPoseChannel *verify_pose_channel(bPose* pose, const char* name)
        chan->limitmax[0]= chan->limitmax[1]= chan->limitmax[2]= 180.0f;
        chan->stiffness[0]= chan->stiffness[1]= chan->stiffness[2]= 0.0f;
        chan->ikrotweight = chan->iklinweight = 0.0f;
-       Mat4One(chan->constinv);
+       unit_m4(chan->constinv);
        
        BLI_addtail(&pose->chanbase, chan);
        
@@ -471,7 +471,7 @@ bPoseChannel *get_active_posechannel (Object *ob)
        
        /* find active */
        for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
-               if ((pchan->bone) && (pchan->bone->flag & BONE_ACTIVE) && (pchan->bone->layer & arm->layer))
+               if ((pchan->bone) && (pchan->bone == arm->act_bone) && (pchan->bone->layer & arm->layer))
                        return pchan;
        }
        
@@ -611,8 +611,8 @@ static void copy_pose_channel_data(bPoseChannel *pchan, const bPoseChannel *chan
        pchan->rotAngle= chan->rotAngle;
        QUATCOPY(pchan->quat, chan->quat);
        pchan->rotmode= chan->rotmode;
-       Mat4CpyMat4(pchan->chan_mat, (float(*)[4])chan->chan_mat);
-       Mat4CpyMat4(pchan->pose_mat, (float(*)[4])chan->pose_mat);
+       copy_m4_m4(pchan->chan_mat, (float(*)[4])chan->chan_mat);
+       copy_m4_m4(pchan->pose_mat, (float(*)[4])chan->pose_mat);
        pchan->flag= chan->flag;
        
        con= chan->constraints.first;
@@ -1013,8 +1013,8 @@ void copy_pose_result(bPose *to, bPose *from)
        for(pchanfrom= from->chanbase.first; pchanfrom; pchanfrom= pchanfrom->next) {
                pchanto= get_pose_channel(to, pchanfrom->name);
                if(pchanto) {
-                       Mat4CpyMat4(pchanto->pose_mat, pchanfrom->pose_mat);
-                       Mat4CpyMat4(pchanto->chan_mat, pchanfrom->chan_mat);
+                       copy_m4_m4(pchanto->pose_mat, pchanfrom->pose_mat);
+                       copy_m4_m4(pchanto->chan_mat, pchanfrom->chan_mat);
                        
                        /* used for local constraints */
                        VECCOPY(pchanto->loc, pchanfrom->loc);
@@ -1040,9 +1040,9 @@ void what_does_obaction (Scene *scene, Object *ob, Object *workob, bPose *pose,
        clear_workob(workob);
        
        /* init workob */
-       Mat4CpyMat4(workob->obmat, ob->obmat);
-       Mat4CpyMat4(workob->parentinv, ob->parentinv);
-       Mat4CpyMat4(workob->constinv, ob->constinv);
+       copy_m4_m4(workob->obmat, ob->obmat);
+       copy_m4_m4(workob->parentinv, ob->parentinv);
+       copy_m4_m4(workob->constinv, ob->constinv);
        workob->parent= ob->parent;
        workob->track= ob->track;
 
@@ -1109,7 +1109,7 @@ static void blend_pose_strides(bPose *dst, bPose *src, float srcweight, short mo
                        dstweight = 1.0F;
        }
        
-       VecLerpf(dst->stride_offset, dst->stride_offset, src->stride_offset, srcweight);
+       interp_v3_v3v3(dst->stride_offset, dst->stride_offset, src->stride_offset, srcweight);
 }
 
 
@@ -1169,27 +1169,27 @@ static void blend_pose_offset_bone(bActionStrip *strip, bPose *dst, bPose *src,
                          &nbs