part 1 of merge from trunk at r30358; it compiles, but doesn't link quite yet :)
authorJoseph Eagar <joeedh@gmail.com>
Mon, 19 Jul 2010 04:44:37 +0000 (04:44 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Mon, 19 Jul 2010 04:44:37 +0000 (04:44 +0000)
252 files changed:
1  2 
SConstruct
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
projectfiles_vc9/blender/BPY_python/BPY_python.vcproj
projectfiles_vc9/blender/blender.sln
projectfiles_vc9/blender/blender.vcproj
projectfiles_vc9/blender/blenkernel/BKE_blenkernel.vcproj
projectfiles_vc9/blender/blenlib/BLI_blenlib.vcproj
projectfiles_vc9/blender/editors/ED_editors.vcproj
projectfiles_vc9/blender/makesrna/RNA_makesrna.vcproj
projectfiles_vc9/blender/makesrna/RNA_rna.vcproj
projectfiles_vc9/gameengine/videotexture/TEX_Video.vcproj
source/blender/CMakeLists.txt
source/blender/SConscript
source/blender/blenkernel/BKE_DerivedMesh.h
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_bmesh.h
source/blender/blenkernel/BKE_cdderivedmesh.h
source/blender/blenkernel/BKE_customdata.h
source/blender/blenkernel/BKE_key.h
source/blender/blenkernel/BKE_mesh.h
source/blender/blenkernel/BKE_modifier.h
source/blender/blenkernel/BKE_paint.h
source/blender/blenkernel/BKE_subsurf.h
source/blender/blenkernel/BKE_utildefines.h
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/blenkernel/intern/BME_Customdata.c
source/blender/blenkernel/intern/BME_conversions.c
source/blender/blenkernel/intern/BME_eulers.c
source/blender/blenkernel/intern/BME_mesh.c
source/blender/blenkernel/intern/BME_structure.c
source/blender/blenkernel/intern/BME_tools.c
source/blender/blenkernel/intern/DerivedMesh.c
source/blender/blenkernel/intern/anim.c
source/blender/blenkernel/intern/armature.c
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/booleanops.c
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenkernel/intern/cdderivedmesh.c
source/blender/blenkernel/intern/cloth.c
source/blender/blenkernel/intern/constraint.c
source/blender/blenkernel/intern/curve.c
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/displist.c
source/blender/blenkernel/intern/editderivedbmesh.c
source/blender/blenkernel/intern/effect.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/fluidsim.c
source/blender/blenkernel/intern/fmodifier.c
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/modifiers_bmesh.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/shrinkwrap.c
source/blender/blenkernel/intern/smoke.c
source/blender/blenkernel/intern/softbody.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenlib/BLI_ghash.h
source/blender/blenlib/BLI_math_vector.h
source/blender/blenlib/SConscript
source/blender/blenlib/intern/BLI_ghash.c
source/blender/blenlib/intern/edgehash.c
source/blender/blenlib/intern/math_vector_inline.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/bmesh/CMakeLists.txt
source/blender/bmesh/bmesh_operator_api.h
source/blender/bmesh/intern/bmesh_operators.c
source/blender/bmesh/intern/bmesh_walkers.c
source/blender/bmesh/operators/bmesh_dupeops.c
source/blender/bmesh/operators/createops.c
source/blender/bmesh/operators/subdivideop.c
source/blender/editors/CMakeLists.txt
source/blender/editors/armature/editarmature.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/armature/poseobject.c
source/blender/editors/armature/reeb.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editfont.c
source/blender/editors/include/ED_mesh.h
source/blender/editors/include/ED_util.h
source/blender/editors/include/ED_uvedit.h
source/blender/editors/include/ED_view3d.h
source/blender/editors/include/UI_resources.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/resources.c
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/mesh/bmesh_select.c
source/blender/editors/mesh/bmesh_tools.c
source/blender/editors/mesh/editbmesh_add.c
source/blender/editors/mesh/editbmesh_bvh.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/loopcut.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_ops.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/metaball/mball_edit.c
source/blender/editors/object/CMakeLists.txt
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_lattice.c
source/blender/editors/object/object_modifier.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/physics/particle_object.c
source/blender/editors/render/CMakeLists.txt
source/blender/editors/render/render_shading.c
source/blender/editors/screen/CMakeLists.txt
source/blender/editors/screen/SConscript
source/blender/editors/screen/screen_edit.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/SConscript
source/blender/editors/sculpt_paint/paint_image.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_api/CMakeLists.txt
source/blender/editors/space_api/SConscript
source/blender/editors/space_api/spacetypes.c
source/blender/editors/space_buttons/SConscript
source/blender/editors/space_image/CMakeLists.txt
source/blender/editors/space_image/Makefile
source/blender/editors/space_image/SConscript
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_header.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_info/CMakeLists.txt
source/blender/editors/space_info/SConscript
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_logic/logic_buttons.c
source/blender/editors/space_view3d/CMakeLists.txt
source/blender/editors/space_view3d/SConscript
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/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_view.c
source/blender/editors/transform/CMakeLists.txt
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
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_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/ed_util.c
source/blender/editors/util/editmode_undo.c
source/blender/editors/uvedit/CMakeLists.txt
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_intern.h
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_parametrizer.h
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/GPU_extensions.h
source/blender/gpu/GPU_material.h
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.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/makesdna/DNA_customdata_types.h
source/blender/makesdna/DNA_object_types.h
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/SConscript
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_animviz.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_mesh_api.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_pose_api.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/modifiers/CMakeLists.txt
source/blender/modifiers/intern/MOD_array.c
source/blender/modifiers/intern/MOD_bevel.c
source/blender/modifiers/intern/MOD_boolean_util.c
source/blender/modifiers/intern/MOD_build.c
source/blender/modifiers/intern/MOD_collision.c
source/blender/modifiers/intern/MOD_decimate.c
source/blender/modifiers/intern/MOD_displace.c
source/blender/modifiers/intern/MOD_edgesplit.c
source/blender/modifiers/intern/MOD_explode.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_mask.c
source/blender/modifiers/intern/MOD_meshdeform.c
source/blender/modifiers/intern/MOD_mirror.c
source/blender/modifiers/intern/MOD_multires.c
source/blender/modifiers/intern/MOD_particleinstance.c
source/blender/modifiers/intern/MOD_particlesystem.c
source/blender/modifiers/intern/MOD_screw.c
source/blender/modifiers/intern/MOD_solidify.c
source/blender/modifiers/intern/MOD_subsurf.c
source/blender/modifiers/intern/MOD_surface.c
source/blender/modifiers/intern/MOD_util.c
source/blender/modifiers/intern/MOD_uvproject.c
source/blender/modifiers/intern/MOD_wave.c
source/blender/python/generic/bgl.c
source/blender/python/generic/bpy_internal_import.c
source/blender/python/generic/bpy_internal_import.h
source/blender/python/intern/bpy_operator_wrap.c
source/blender/readblenfile/intern/BLO_readblenfile.c
source/blender/render/CMakeLists.txt
source/blender/render/intern/include/rayobject.h
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pointdensity.c
source/blender/render/intern/source/rayobject_instance.c
source/blender/render/intern/source/shadeoutput.c
source/blender/render/intern/source/strand.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/SConscript
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/creator/CMakeLists.txt
source/creator/creator.c
source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
source/gameengine/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/GameLogic/SCA_BasicEventManager.cpp
source/gameengine/GameLogic/SCA_BasicEventManager.h
source/gameengine/Ketsji/KX_ArmatureSensor.cpp

diff --cc SConstruct
Simple merge
 -/**
 - * $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,
 +/**\r
 + * $Id: GHOST_SystemCocoa.mm 23854 2009-10-15 08:27:31Z damien78 $\r
 + * ***** BEGIN GPL LICENSE BLOCK *****\r
 + *\r
 + * This program is free software; you can redistribute it and/or\r
 + * modify it under the terms of the GNU General Public License\r
 + * as published by the Free Software Foundation; either version 2\r
 + * of the License, or (at your option) any later version.\r
 + *\r
 + * This program is distributed in the hope that it will be useful,\r
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
 + * GNU General Public License for more details.\r
 + *\r
 + * You should have received a copy of the GNU General Public License\r
 + * along with this program; if not, write to the Free Software Foundation,\r
   * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
++<<<<<<< .working\r
 + *\r
 + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.\r
 + * All rights reserved.\r
 + *\r
 + * The Original Code is: all of this file.\r
 + *\r
 + * Contributor(s):    Maarten Gribnau 05/2001\r
 + *                                    Damien Plisson 09/2009\r
 + *\r
 + * ***** END GPL LICENSE BLOCK *****\r
 + */\r
 +\r
 +#import <Cocoa/Cocoa.h>\r
 +\r
 +#include <sys/time.h>\r
 +#include <sys/types.h>\r
 +#include <sys/sysctl.h>\r
 +\r
 +#include "GHOST_SystemCocoa.h"\r
 +\r
 +#include "GHOST_DisplayManagerCocoa.h"\r
 +#include "GHOST_EventKey.h"\r
 +#include "GHOST_EventButton.h"\r
 +#include "GHOST_EventCursor.h"\r
 +#include "GHOST_EventWheel.h"\r
 +#include "GHOST_EventNDOF.h"\r
++=======\r
+  *
+  * 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):    Maarten Gribnau 05/2001
+  *                                    Damien Plisson 09/2009
+  *
+  * ***** END GPL LICENSE BLOCK *****
+  */
+ #import <Cocoa/Cocoa.h>
+ /*For the currently not ported to Cocoa keyboard layout functions (64bit & 10.6 compatible)*/
+ #include <Carbon/Carbon.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <sys/sysctl.h>
+ #include "GHOST_SystemCocoa.h"
+ #include "GHOST_DisplayManagerCocoa.h"
+ #include "GHOST_EventKey.h"
+ #include "GHOST_EventButton.h"
+ #include "GHOST_EventCursor.h"
+ #include "GHOST_EventWheel.h"
+ #include "GHOST_EventNDOF.h"
++>>>>>>> .merge-right.r30358\r
  #include "GHOST_EventTrackpad.h"
  #include "GHOST_EventDragnDrop.h"
  #include "GHOST_EventString.h"
++<<<<<<< .working\r
 +\r
 +#include "GHOST_TimerManager.h"\r
 +#include "GHOST_TimerTask.h"\r
 +#include "GHOST_WindowManager.h"\r
 +#include "GHOST_WindowCocoa.h"\r
 +#include "GHOST_NDOFManager.h"\r
 +#include "AssertMacros.h"\r
 +\r
 +#pragma mark KeyMap, mouse converters\r
 +\r
 +\r
 +/* Keycodes from Carbon include file */\r
 +/*  \r
 + *  Summary:\r
 + *    Virtual keycodes\r
 + *  \r
 + *  Discussion:\r
 + *    These constants are the virtual keycodes defined originally in\r
 + *    Inside Mac Volume V, pg. V-191. They identify physical keys on a\r
 + *    keyboard. Those constants with "ANSI" in the name are labeled\r
 + *    according to the key position on an ANSI-standard US keyboard.\r
 + *    For example, kVK_ANSI_A indicates the virtual keycode for the key\r
 + *    with the letter 'A' in the US keyboard layout. Other keyboard\r
 + *    layouts may have the 'A' key label on a different physical key;\r
 + *    in this case, pressing 'A' will generate a different virtual\r
 + *    keycode.\r
 + */\r
 +enum {\r
 +      kVK_ANSI_A                    = 0x00,\r
 +      kVK_ANSI_S                    = 0x01,\r
 +      kVK_ANSI_D                    = 0x02,\r
 +      kVK_ANSI_F                    = 0x03,\r
 +      kVK_ANSI_H                    = 0x04,\r
 +      kVK_ANSI_G                    = 0x05,\r
 +      kVK_ANSI_Z                    = 0x06,\r
 +      kVK_ANSI_X                    = 0x07,\r
 +      kVK_ANSI_C                    = 0x08,\r
 +      kVK_ANSI_V                    = 0x09,\r
 +      kVK_ANSI_B                    = 0x0B,\r
 +      kVK_ANSI_Q                    = 0x0C,\r
 +      kVK_ANSI_W                    = 0x0D,\r
 +      kVK_ANSI_E                    = 0x0E,\r
 +      kVK_ANSI_R                    = 0x0F,\r
 +      kVK_ANSI_Y                    = 0x10,\r
 +      kVK_ANSI_T                    = 0x11,\r
 +      kVK_ANSI_1                    = 0x12,\r
 +      kVK_ANSI_2                    = 0x13,\r
 +      kVK_ANSI_3                    = 0x14,\r
 +      kVK_ANSI_4                    = 0x15,\r
 +      kVK_ANSI_6                    = 0x16,\r
 +      kVK_ANSI_5                    = 0x17,\r
 +      kVK_ANSI_Equal                = 0x18,\r
 +      kVK_ANSI_9                    = 0x19,\r
 +      kVK_ANSI_7                    = 0x1A,\r
 +      kVK_ANSI_Minus                = 0x1B,\r
 +      kVK_ANSI_8                    = 0x1C,\r
 +      kVK_ANSI_0                    = 0x1D,\r
 +      kVK_ANSI_RightBracket         = 0x1E,\r
 +      kVK_ANSI_O                    = 0x1F,\r
 +      kVK_ANSI_U                    = 0x20,\r
 +      kVK_ANSI_LeftBracket          = 0x21,\r
 +      kVK_ANSI_I                    = 0x22,\r
 +      kVK_ANSI_P                    = 0x23,\r
 +      kVK_ANSI_L                    = 0x25,\r
 +      kVK_ANSI_J                    = 0x26,\r
 +      kVK_ANSI_Quote                = 0x27,\r
 +      kVK_ANSI_K                    = 0x28,\r
 +      kVK_ANSI_Semicolon            = 0x29,\r
 +      kVK_ANSI_Backslash            = 0x2A,\r
 +      kVK_ANSI_Comma                = 0x2B,\r
 +      kVK_ANSI_Slash                = 0x2C,\r
 +      kVK_ANSI_N                    = 0x2D,\r
 +      kVK_ANSI_M                    = 0x2E,\r
 +      kVK_ANSI_Period               = 0x2F,\r
 +      kVK_ANSI_Grave                = 0x32,\r
 +      kVK_ANSI_KeypadDecimal        = 0x41,\r
 +      kVK_ANSI_KeypadMultiply       = 0x43,\r
 +      kVK_ANSI_KeypadPlus           = 0x45,\r
 +      kVK_ANSI_KeypadClear          = 0x47,\r
 +      kVK_ANSI_KeypadDivide         = 0x4B,\r
 +      kVK_ANSI_KeypadEnter          = 0x4C,\r
 +      kVK_ANSI_KeypadMinus          = 0x4E,\r
 +      kVK_ANSI_KeypadEquals         = 0x51,\r
 +      kVK_ANSI_Keypad0              = 0x52,\r
 +      kVK_ANSI_Keypad1              = 0x53,\r
 +      kVK_ANSI_Keypad2              = 0x54,\r
 +      kVK_ANSI_Keypad3              = 0x55,\r
 +      kVK_ANSI_Keypad4              = 0x56,\r
 +      kVK_ANSI_Keypad5              = 0x57,\r
 +      kVK_ANSI_Keypad6              = 0x58,\r
 +      kVK_ANSI_Keypad7              = 0x59,\r
 +      kVK_ANSI_Keypad8              = 0x5B,\r
 +      kVK_ANSI_Keypad9              = 0x5C\r
 +};\r
 +\r
 +/* keycodes for keys that are independent of keyboard layout*/\r
 +enum {\r
 +      kVK_Return                    = 0x24,\r
 +      kVK_Tab                       = 0x30,\r
 +      kVK_Space                     = 0x31,\r
 +      kVK_Delete                    = 0x33,\r
 +      kVK_Escape                    = 0x35,\r
 +      kVK_Command                   = 0x37,\r
 +      kVK_Shift                     = 0x38,\r
 +      kVK_CapsLock                  = 0x39,\r
 +      kVK_Option                    = 0x3A,\r
 +      kVK_Control                   = 0x3B,\r
 +      kVK_RightShift                = 0x3C,\r
 +      kVK_RightOption               = 0x3D,\r
 +      kVK_RightControl              = 0x3E,\r
 +      kVK_Function                  = 0x3F,\r
 +      kVK_F17                       = 0x40,\r
 +      kVK_VolumeUp                  = 0x48,\r
 +      kVK_VolumeDown                = 0x49,\r
 +      kVK_Mute                      = 0x4A,\r
 +      kVK_F18                       = 0x4F,\r
 +      kVK_F19                       = 0x50,\r
 +      kVK_F20                       = 0x5A,\r
 +      kVK_F5                        = 0x60,\r
 +      kVK_F6                        = 0x61,\r
 +      kVK_F7                        = 0x62,\r
 +      kVK_F3                        = 0x63,\r
 +      kVK_F8                        = 0x64,\r
 +      kVK_F9                        = 0x65,\r
 +      kVK_F11                       = 0x67,\r
 +      kVK_F13                       = 0x69,\r
 +      kVK_F16                       = 0x6A,\r
 +      kVK_F14                       = 0x6B,\r
 +      kVK_F10                       = 0x6D,\r
 +      kVK_F12                       = 0x6F,\r
 +      kVK_F15                       = 0x71,\r
 +      kVK_Help                      = 0x72,\r
 +      kVK_Home                      = 0x73,\r
 +      kVK_PageUp                    = 0x74,\r
 +      kVK_ForwardDelete             = 0x75,\r
 +      kVK_F4                        = 0x76,\r
 +      kVK_End                       = 0x77,\r
 +      kVK_F2                        = 0x78,\r
 +      kVK_PageDown                  = 0x79,\r
 +      kVK_F1                        = 0x7A,\r
 +      kVK_LeftArrow                 = 0x7B,\r
 +      kVK_RightArrow                = 0x7C,\r
 +      kVK_DownArrow                 = 0x7D,\r
 +      kVK_UpArrow                   = 0x7E\r
 +};\r
 +\r
 +/* ISO keyboards only*/\r
 +enum {\r
 +      kVK_ISO_Section               = 0x0A\r
 +};\r
 +\r
 +/* JIS keyboards only*/\r
 +enum {\r
 +      kVK_JIS_Yen                   = 0x5D,\r
 +      kVK_JIS_Underscore            = 0x5E,\r
 +      kVK_JIS_KeypadComma           = 0x5F,\r
 +      kVK_JIS_Eisu                  = 0x66,\r
 +      kVK_JIS_Kana                  = 0x68\r
 +};\r
 +\r
 +\r
 +static GHOST_TButtonMask convertButton(int button)\r
 +{\r
 +      switch (button) {\r
 +              case 0:\r
 +                      return GHOST_kButtonMaskLeft;\r
 +              case 1:\r
 +                      return GHOST_kButtonMaskRight;\r
 +              case 2:\r
 +                      return GHOST_kButtonMaskMiddle;\r
 +              case 3:\r
 +                      return GHOST_kButtonMaskButton4;\r
 +              case 4:\r
 +                      return GHOST_kButtonMaskButton5;\r
 +              default:\r
 +                      return GHOST_kButtonMaskLeft;\r
 +      }\r
 +}\r
 +\r
 +/**\r
 + * Converts Mac rawkey codes (same for Cocoa & Carbon)\r
 + * into GHOST key codes\r
 + * @param rawCode The raw physical key code\r
 + * @param recvChar the character ignoring modifiers (except for shift)\r
 + * @return Ghost key code\r
 + */\r
 +static GHOST_TKey convertKey(int rawCode, unichar recvChar) \r
 +{     \r
 +      \r
 +      //printf("\nrecvchar %c 0x%x",recvChar,recvChar);\r
 +      switch (rawCode) {\r
 +              /*Physical keycodes not used due to map changes in int'l keyboards\r
 +              case kVK_ANSI_A:        return GHOST_kKeyA;\r
 +              case kVK_ANSI_B:        return GHOST_kKeyB;\r
 +              case kVK_ANSI_C:        return GHOST_kKeyC;\r
 +              case kVK_ANSI_D:        return GHOST_kKeyD;\r
 +              case kVK_ANSI_E:        return GHOST_kKeyE;\r
 +              case kVK_ANSI_F:        return GHOST_kKeyF;\r
 +              case kVK_ANSI_G:        return GHOST_kKeyG;\r
 +              case kVK_ANSI_H:        return GHOST_kKeyH;\r
 +              case kVK_ANSI_I:        return GHOST_kKeyI;\r
 +              case kVK_ANSI_J:        return GHOST_kKeyJ;\r
 +              case kVK_ANSI_K:        return GHOST_kKeyK;\r
 +              case kVK_ANSI_L:        return GHOST_kKeyL;\r
 +              case kVK_ANSI_M:        return GHOST_kKeyM;\r
 +              case kVK_ANSI_N:        return GHOST_kKeyN;\r
 +              case kVK_ANSI_O:        return GHOST_kKeyO;\r
 +              case kVK_ANSI_P:        return GHOST_kKeyP;\r
 +              case kVK_ANSI_Q:        return GHOST_kKeyQ;\r
 +              case kVK_ANSI_R:        return GHOST_kKeyR;\r
 +              case kVK_ANSI_S:        return GHOST_kKeyS;\r
 +              case kVK_ANSI_T:        return GHOST_kKeyT;\r
 +              case kVK_ANSI_U:        return GHOST_kKeyU;\r
 +              case kVK_ANSI_V:        return GHOST_kKeyV;\r
 +              case kVK_ANSI_W:        return GHOST_kKeyW;\r
 +              case kVK_ANSI_X:        return GHOST_kKeyX;\r
 +              case kVK_ANSI_Y:        return GHOST_kKeyY;\r
 +              case kVK_ANSI_Z:        return GHOST_kKeyZ;*/\r
 +              \r
 +              /* Numbers keys mapped to handle some int'l keyboard (e.g. French)*/\r
 +              case kVK_ISO_Section: return    GHOST_kKeyUnknown;\r
 +              case kVK_ANSI_1:        return GHOST_kKey1;\r
 +              case kVK_ANSI_2:        return GHOST_kKey2;\r
 +              case kVK_ANSI_3:        return GHOST_kKey3;\r
 +              case kVK_ANSI_4:        return GHOST_kKey4;\r
 +              case kVK_ANSI_5:        return GHOST_kKey5;\r
 +              case kVK_ANSI_6:        return GHOST_kKey6;\r
 +              case kVK_ANSI_7:        return GHOST_kKey7;\r
 +              case kVK_ANSI_8:        return GHOST_kKey8;\r
 +              case kVK_ANSI_9:        return GHOST_kKey9;\r
 +              case kVK_ANSI_0:        return GHOST_kKey0;\r
 +      \r
 +              case kVK_ANSI_Keypad0:                  return GHOST_kKeyNumpad0;\r
 +              case kVK_ANSI_Keypad1:                  return GHOST_kKeyNumpad1;\r
 +              case kVK_ANSI_Keypad2:                  return GHOST_kKeyNumpad2;\r
 +              case kVK_ANSI_Keypad3:                  return GHOST_kKeyNumpad3;\r
 +              case kVK_ANSI_Keypad4:                  return GHOST_kKeyNumpad4;\r
 +              case kVK_ANSI_Keypad5:                  return GHOST_kKeyNumpad5;\r
 +              case kVK_ANSI_Keypad6:                  return GHOST_kKeyNumpad6;\r
 +              case kVK_ANSI_Keypad7:                  return GHOST_kKeyNumpad7;\r
 +              case kVK_ANSI_Keypad8:                  return GHOST_kKeyNumpad8;\r
 +              case kVK_ANSI_Keypad9:                  return GHOST_kKeyNumpad9;\r
 +              case kVK_ANSI_KeypadDecimal:    return GHOST_kKeyNumpadPeriod;\r
 +              case kVK_ANSI_KeypadEnter:              return GHOST_kKeyNumpadEnter;\r
 +              case kVK_ANSI_KeypadPlus:               return GHOST_kKeyNumpadPlus;\r
 +              case kVK_ANSI_KeypadMinus:              return GHOST_kKeyNumpadMinus;\r
 +              case kVK_ANSI_KeypadMultiply:   return GHOST_kKeyNumpadAsterisk;\r
 +              case kVK_ANSI_KeypadDivide:     return GHOST_kKeyNumpadSlash;\r
 +              case kVK_ANSI_KeypadClear:              return GHOST_kKeyUnknown;\r
 +\r
 +              case kVK_F1:                            return GHOST_kKeyF1;\r
 +              case kVK_F2:                            return GHOST_kKeyF2;\r
 +              case kVK_F3:                            return GHOST_kKeyF3;\r
 +              case kVK_F4:                            return GHOST_kKeyF4;\r
 +              case kVK_F5:                            return GHOST_kKeyF5;\r
 +              case kVK_F6:                            return GHOST_kKeyF6;\r
 +              case kVK_F7:                            return GHOST_kKeyF7;\r
 +              case kVK_F8:                            return GHOST_kKeyF8;\r
 +              case kVK_F9:                            return GHOST_kKeyF9;\r
 +              case kVK_F10:                           return GHOST_kKeyF10;\r
 +              case kVK_F11:                           return GHOST_kKeyF11;\r
 +              case kVK_F12:                           return GHOST_kKeyF12;\r
 +              case kVK_F13:                           return GHOST_kKeyF13;\r
 +              case kVK_F14:                           return GHOST_kKeyF14;\r
 +              case kVK_F15:                           return GHOST_kKeyF15;\r
 +              case kVK_F16:                           return GHOST_kKeyF16;\r
 +              case kVK_F17:                           return GHOST_kKeyF17;\r
 +              case kVK_F18:                           return GHOST_kKeyF18;\r
 +              case kVK_F19:                           return GHOST_kKeyF19;\r
 +              case kVK_F20:                           return GHOST_kKeyF20;\r
 +                      \r
 +              case kVK_UpArrow:                       return GHOST_kKeyUpArrow;\r
 +              case kVK_DownArrow:                     return GHOST_kKeyDownArrow;\r
 +              case kVK_LeftArrow:                     return GHOST_kKeyLeftArrow;\r
 +              case kVK_RightArrow:            return GHOST_kKeyRightArrow;\r
 +                      \r
 +              case kVK_Return:                        return GHOST_kKeyEnter;\r
 +              case kVK_Delete:                        return GHOST_kKeyBackSpace;\r
 +              case kVK_ForwardDelete:         return GHOST_kKeyDelete;\r
 +              case kVK_Escape:                        return GHOST_kKeyEsc;\r
 +              case kVK_Tab:                           return GHOST_kKeyTab;\r
 +              case kVK_Space:                         return GHOST_kKeySpace;\r
 +                      \r
 +              case kVK_Home:                          return GHOST_kKeyHome;\r
 +              case kVK_End:                           return GHOST_kKeyEnd;\r
 +              case kVK_PageUp:                        return GHOST_kKeyUpPage;\r
 +              case kVK_PageDown:                      return GHOST_kKeyDownPage;\r
 +                      \r
 +              /*case kVK_ANSI_Minus:          return GHOST_kKeyMinus;\r
 +              case kVK_ANSI_Equal:            return GHOST_kKeyEqual;\r
 +              case kVK_ANSI_Comma:            return GHOST_kKeyComma;\r
 +              case kVK_ANSI_Period:           return GHOST_kKeyPeriod;\r
 +              case kVK_ANSI_Slash:            return GHOST_kKeySlash;\r
 +              case kVK_ANSI_Semicolon:        return GHOST_kKeySemicolon;\r
 +              case kVK_ANSI_Quote:            return GHOST_kKeyQuote;\r
 +              case kVK_ANSI_Backslash:        return GHOST_kKeyBackslash;\r
 +              case kVK_ANSI_LeftBracket:      return GHOST_kKeyLeftBracket;\r
 +              case kVK_ANSI_RightBracket:     return GHOST_kKeyRightBracket;\r
 +              case kVK_ANSI_Grave:            return GHOST_kKeyAccentGrave;*/\r
 +                      \r
 +              case kVK_VolumeUp:\r
 +              case kVK_VolumeDown:\r
 +              case kVK_Mute:\r
 +                      return GHOST_kKeyUnknown;\r
 +                      \r
 +              default:\r
 +                      /*Then detect on character value for "remappable" keys in int'l keyboards*/\r
 +                      if ((recvChar >= 'A') && (recvChar <= 'Z')) {\r
 +                              return (GHOST_TKey) (recvChar - 'A' + GHOST_kKeyA);\r
 +                      } else if ((recvChar >= 'a') && (recvChar <= 'z')) {\r
 +                              return (GHOST_TKey) (recvChar - 'a' + GHOST_kKeyA);\r
 +                      } else\r
 +                      switch (recvChar) {\r
 +                              case '-':       return GHOST_kKeyMinus;\r
 +                              case '=':       return GHOST_kKeyEqual;\r
 +                              case ',':       return GHOST_kKeyComma;\r
 +                              case '.':       return GHOST_kKeyPeriod;\r
 +                              case '/':       return GHOST_kKeySlash;\r
 +                              case ';':       return GHOST_kKeySemicolon;\r
 +                              case '\'':      return GHOST_kKeyQuote;\r
 +                              case '\\':      return GHOST_kKeyBackslash;\r
 +                              case '[':       return GHOST_kKeyLeftBracket;\r
 +                              case ']':       return GHOST_kKeyRightBracket;\r
 +                              case '`':       return GHOST_kKeyAccentGrave;\r
 +                              default:\r
 +                                      return GHOST_kKeyUnknown;\r
 +                      }\r
 +      }\r
 +      return GHOST_kKeyUnknown;\r
 +}\r
 +\r
 +\r
++=======\r
+ #include "GHOST_TimerManager.h"
+ #include "GHOST_TimerTask.h"
+ #include "GHOST_WindowManager.h"
+ #include "GHOST_WindowCocoa.h"
+ #include "GHOST_NDOFManager.h"
+ #include "AssertMacros.h"
+ #pragma mark KeyMap, mouse converters
+ #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
+ /* Keycodes not defined in Tiger */
+ /*  
+  *  Summary:
+  *    Virtual keycodes
+  *  
+  *  Discussion:
+  *    These constants are the virtual keycodes defined originally in
+  *    Inside Mac Volume V, pg. V-191. They identify physical keys on a
+  *    keyboard. Those constants with "ANSI" in the name are labeled
+  *    according to the key position on an ANSI-standard US keyboard.
+  *    For example, kVK_ANSI_A indicates the virtual keycode for the key
+  *    with the letter 'A' in the US keyboard layout. Other keyboard
+  *    layouts may have the 'A' key label on a different physical key;
+  *    in this case, pressing 'A' will generate a different virtual
+  *    keycode.
+  */
+ enum {
+       kVK_ANSI_A                    = 0x00,
+       kVK_ANSI_S                    = 0x01,
+       kVK_ANSI_D                    = 0x02,
+       kVK_ANSI_F                    = 0x03,
+       kVK_ANSI_H                    = 0x04,
+       kVK_ANSI_G                    = 0x05,
+       kVK_ANSI_Z                    = 0x06,
+       kVK_ANSI_X                    = 0x07,
+       kVK_ANSI_C                    = 0x08,
+       kVK_ANSI_V                    = 0x09,
+       kVK_ANSI_B                    = 0x0B,
+       kVK_ANSI_Q                    = 0x0C,
+       kVK_ANSI_W                    = 0x0D,
+       kVK_ANSI_E                    = 0x0E,
+       kVK_ANSI_R                    = 0x0F,
+       kVK_ANSI_Y                    = 0x10,
+       kVK_ANSI_T                    = 0x11,
+       kVK_ANSI_1                    = 0x12,
+       kVK_ANSI_2                    = 0x13,
+       kVK_ANSI_3                    = 0x14,
+       kVK_ANSI_4                    = 0x15,
+       kVK_ANSI_6                    = 0x16,
+       kVK_ANSI_5                    = 0x17,
+       kVK_ANSI_Equal                = 0x18,
+       kVK_ANSI_9                    = 0x19,
+       kVK_ANSI_7                    = 0x1A,
+       kVK_ANSI_Minus                = 0x1B,
+       kVK_ANSI_8                    = 0x1C,
+       kVK_ANSI_0                    = 0x1D,
+       kVK_ANSI_RightBracket         = 0x1E,
+       kVK_ANSI_O                    = 0x1F,
+       kVK_ANSI_U                    = 0x20,
+       kVK_ANSI_LeftBracket          = 0x21,
+       kVK_ANSI_I                    = 0x22,
+       kVK_ANSI_P                    = 0x23,
+       kVK_ANSI_L                    = 0x25,
+       kVK_ANSI_J                    = 0x26,
+       kVK_ANSI_Quote                = 0x27,
+       kVK_ANSI_K                    = 0x28,
+       kVK_ANSI_Semicolon            = 0x29,
+       kVK_ANSI_Backslash            = 0x2A,
+       kVK_ANSI_Comma                = 0x2B,
+       kVK_ANSI_Slash                = 0x2C,
+       kVK_ANSI_N                    = 0x2D,
+       kVK_ANSI_M                    = 0x2E,
+       kVK_ANSI_Period               = 0x2F,
+       kVK_ANSI_Grave                = 0x32,
+       kVK_ANSI_KeypadDecimal        = 0x41,
+       kVK_ANSI_KeypadMultiply       = 0x43,
+       kVK_ANSI_KeypadPlus           = 0x45,
+       kVK_ANSI_KeypadClear          = 0x47,
+       kVK_ANSI_KeypadDivide         = 0x4B,
+       kVK_ANSI_KeypadEnter          = 0x4C,
+       kVK_ANSI_KeypadMinus          = 0x4E,
+       kVK_ANSI_KeypadEquals         = 0x51,
+       kVK_ANSI_Keypad0              = 0x52,
+       kVK_ANSI_Keypad1              = 0x53,
+       kVK_ANSI_Keypad2              = 0x54,
+       kVK_ANSI_Keypad3              = 0x55,
+       kVK_ANSI_Keypad4              = 0x56,
+       kVK_ANSI_Keypad5              = 0x57,
+       kVK_ANSI_Keypad6              = 0x58,
+       kVK_ANSI_Keypad7              = 0x59,
+       kVK_ANSI_Keypad8              = 0x5B,
+       kVK_ANSI_Keypad9              = 0x5C
+ };
+ /* keycodes for keys that are independent of keyboard layout*/
+ enum {
+       kVK_Return                    = 0x24,
+       kVK_Tab                       = 0x30,
+       kVK_Space                     = 0x31,
+       kVK_Delete                    = 0x33,
+       kVK_Escape                    = 0x35,
+       kVK_Command                   = 0x37,
+       kVK_Shift                     = 0x38,
+       kVK_CapsLock                  = 0x39,
+       kVK_Option                    = 0x3A,
+       kVK_Control                   = 0x3B,
+       kVK_RightShift                = 0x3C,
+       kVK_RightOption               = 0x3D,
+       kVK_RightControl              = 0x3E,
+       kVK_Function                  = 0x3F,
+       kVK_F17                       = 0x40,
+       kVK_VolumeUp                  = 0x48,
+       kVK_VolumeDown                = 0x49,
+       kVK_Mute                      = 0x4A,
+       kVK_F18                       = 0x4F,
+       kVK_F19                       = 0x50,
+       kVK_F20                       = 0x5A,
+       kVK_F5                        = 0x60,
+       kVK_F6                        = 0x61,
+       kVK_F7                        = 0x62,
+       kVK_F3                        = 0x63,
+       kVK_F8                        = 0x64,
+       kVK_F9                        = 0x65,
+       kVK_F11                       = 0x67,
+       kVK_F13                       = 0x69,
+       kVK_F16                       = 0x6A,
+       kVK_F14                       = 0x6B,
+       kVK_F10                       = 0x6D,
+       kVK_F12                       = 0x6F,
+       kVK_F15                       = 0x71,
+       kVK_Help                      = 0x72,
+       kVK_Home                      = 0x73,
+       kVK_PageUp                    = 0x74,
+       kVK_ForwardDelete             = 0x75,
+       kVK_F4                        = 0x76,
+       kVK_End                       = 0x77,
+       kVK_F2                        = 0x78,
+       kVK_PageDown                  = 0x79,
+       kVK_F1                        = 0x7A,
+       kVK_LeftArrow                 = 0x7B,
+       kVK_RightArrow                = 0x7C,
+       kVK_DownArrow                 = 0x7D,
+       kVK_UpArrow                   = 0x7E
+ };
+ /* ISO keyboards only*/
+ enum {
+       kVK_ISO_Section               = 0x0A
+ };
+ /* JIS keyboards only*/
+ enum {
+       kVK_JIS_Yen                   = 0x5D,
+       kVK_JIS_Underscore            = 0x5E,
+       kVK_JIS_KeypadComma           = 0x5F,
+       kVK_JIS_Eisu                  = 0x66,
+       kVK_JIS_Kana                  = 0x68
+ };
+ #endif
+ static GHOST_TButtonMask convertButton(int button)
+ {
+       switch (button) {
+               case 0:
+                       return GHOST_kButtonMaskLeft;
+               case 1:
+                       return GHOST_kButtonMaskRight;
+               case 2:
+                       return GHOST_kButtonMaskMiddle;
+               case 3:
+                       return GHOST_kButtonMaskButton4;
+               case 4:
+                       return GHOST_kButtonMaskButton5;
+               default:
+                       return GHOST_kButtonMaskLeft;
+       }
+ }
+ /**
+  * Converts Mac rawkey codes (same for Cocoa & Carbon)
+  * into GHOST key codes
+  * @param rawCode The raw physical key code
+  * @param recvChar the character ignoring modifiers (except for shift)
+  * @return Ghost key code
+  */
+ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction) 
+ {     
+       
+       //printf("\nrecvchar %c 0x%x",recvChar,recvChar);
+       switch (rawCode) {
+               /*Physical keycodes not used due to map changes in int'l keyboards
+               case kVK_ANSI_A:        return GHOST_kKeyA;
+               case kVK_ANSI_B:        return GHOST_kKeyB;
+               case kVK_ANSI_C:        return GHOST_kKeyC;
+               case kVK_ANSI_D:        return GHOST_kKeyD;
+               case kVK_ANSI_E:        return GHOST_kKeyE;
+               case kVK_ANSI_F:        return GHOST_kKeyF;
+               case kVK_ANSI_G:        return GHOST_kKeyG;
+               case kVK_ANSI_H:        return GHOST_kKeyH;
+               case kVK_ANSI_I:        return GHOST_kKeyI;
+               case kVK_ANSI_J:        return GHOST_kKeyJ;
+               case kVK_ANSI_K:        return GHOST_kKeyK;
+               case kVK_ANSI_L:        return GHOST_kKeyL;
+               case kVK_ANSI_M:        return GHOST_kKeyM;
+               case kVK_ANSI_N:        return GHOST_kKeyN;
+               case kVK_ANSI_O:        return GHOST_kKeyO;
+               case kVK_ANSI_P:        return GHOST_kKeyP;
+               case kVK_ANSI_Q:        return GHOST_kKeyQ;
+               case kVK_ANSI_R:        return GHOST_kKeyR;
+               case kVK_ANSI_S:        return GHOST_kKeyS;
+               case kVK_ANSI_T:        return GHOST_kKeyT;
+               case kVK_ANSI_U:        return GHOST_kKeyU;
+               case kVK_ANSI_V:        return GHOST_kKeyV;
+               case kVK_ANSI_W:        return GHOST_kKeyW;
+               case kVK_ANSI_X:        return GHOST_kKeyX;
+               case kVK_ANSI_Y:        return GHOST_kKeyY;
+               case kVK_ANSI_Z:        return GHOST_kKeyZ;*/
+               
+               /* Numbers keys mapped to handle some int'l keyboard (e.g. French)*/
+               case kVK_ISO_Section: return    GHOST_kKeyUnknown;
+               case kVK_ANSI_1:        return GHOST_kKey1;
+               case kVK_ANSI_2:        return GHOST_kKey2;
+               case kVK_ANSI_3:        return GHOST_kKey3;
+               case kVK_ANSI_4:        return GHOST_kKey4;
+               case kVK_ANSI_5:        return GHOST_kKey5;
+               case kVK_ANSI_6:        return GHOST_kKey6;
+               case kVK_ANSI_7:        return GHOST_kKey7;
+               case kVK_ANSI_8:        return GHOST_kKey8;
+               case kVK_ANSI_9:        return GHOST_kKey9;
+               case kVK_ANSI_0:        return GHOST_kKey0;
+       
+               case kVK_ANSI_Keypad0:                  return GHOST_kKeyNumpad0;
+               case kVK_ANSI_Keypad1:                  return GHOST_kKeyNumpad1;
+               case kVK_ANSI_Keypad2:                  return GHOST_kKeyNumpad2;
+               case kVK_ANSI_Keypad3:                  return GHOST_kKeyNumpad3;
+               case kVK_ANSI_Keypad4:                  return GHOST_kKeyNumpad4;
+               case kVK_ANSI_Keypad5:                  return GHOST_kKeyNumpad5;
+               case kVK_ANSI_Keypad6:                  return GHOST_kKeyNumpad6;
+               case kVK_ANSI_Keypad7:                  return GHOST_kKeyNumpad7;
+               case kVK_ANSI_Keypad8:                  return GHOST_kKeyNumpad8;
+               case kVK_ANSI_Keypad9:                  return GHOST_kKeyNumpad9;
+               case kVK_ANSI_KeypadDecimal:    return GHOST_kKeyNumpadPeriod;
+               case kVK_ANSI_KeypadEnter:              return GHOST_kKeyNumpadEnter;
+               case kVK_ANSI_KeypadPlus:               return GHOST_kKeyNumpadPlus;
+               case kVK_ANSI_KeypadMinus:              return GHOST_kKeyNumpadMinus;
+               case kVK_ANSI_KeypadMultiply:   return GHOST_kKeyNumpadAsterisk;
+               case kVK_ANSI_KeypadDivide:     return GHOST_kKeyNumpadSlash;
+               case kVK_ANSI_KeypadClear:              return GHOST_kKeyUnknown;
+               case kVK_F1:                            return GHOST_kKeyF1;
+               case kVK_F2:                            return GHOST_kKeyF2;
+               case kVK_F3:                            return GHOST_kKeyF3;
+               case kVK_F4:                            return GHOST_kKeyF4;
+               case kVK_F5:                            return GHOST_kKeyF5;
+               case kVK_F6:                            return GHOST_kKeyF6;
+               case kVK_F7:                            return GHOST_kKeyF7;
+               case kVK_F8:                            return GHOST_kKeyF8;
+               case kVK_F9:                            return GHOST_kKeyF9;
+               case kVK_F10:                           return GHOST_kKeyF10;
+               case kVK_F11:                           return GHOST_kKeyF11;
+               case kVK_F12:                           return GHOST_kKeyF12;
+               case kVK_F13:                           return GHOST_kKeyF13;
+               case kVK_F14:                           return GHOST_kKeyF14;
+               case kVK_F15:                           return GHOST_kKeyF15;
+               case kVK_F16:                           return GHOST_kKeyF16;
+               case kVK_F17:                           return GHOST_kKeyF17;
+               case kVK_F18:                           return GHOST_kKeyF18;
+               case kVK_F19:                           return GHOST_kKeyF19;
+               case kVK_F20:                           return GHOST_kKeyF20;
+                       
+               case kVK_UpArrow:                       return GHOST_kKeyUpArrow;
+               case kVK_DownArrow:                     return GHOST_kKeyDownArrow;
+               case kVK_LeftArrow:                     return GHOST_kKeyLeftArrow;
+               case kVK_RightArrow:            return GHOST_kKeyRightArrow;
+                       
+               case kVK_Return:                        return GHOST_kKeyEnter;
+               case kVK_Delete:                        return GHOST_kKeyBackSpace;
+               case kVK_ForwardDelete:         return GHOST_kKeyDelete;
+               case kVK_Escape:                        return GHOST_kKeyEsc;
+               case kVK_Tab:                           return GHOST_kKeyTab;
+               case kVK_Space:                         return GHOST_kKeySpace;
+                       
+               case kVK_Home:                          return GHOST_kKeyHome;
+               case kVK_End:                           return GHOST_kKeyEnd;
+               case kVK_PageUp:                        return GHOST_kKeyUpPage;
+               case kVK_PageDown:                      return GHOST_kKeyDownPage;
+                       
+               /*case kVK_ANSI_Minus:          return GHOST_kKeyMinus;
+               case kVK_ANSI_Equal:            return GHOST_kKeyEqual;
+               case kVK_ANSI_Comma:            return GHOST_kKeyComma;
+               case kVK_ANSI_Period:           return GHOST_kKeyPeriod;
+               case kVK_ANSI_Slash:            return GHOST_kKeySlash;
+               case kVK_ANSI_Semicolon:        return GHOST_kKeySemicolon;
+               case kVK_ANSI_Quote:            return GHOST_kKeyQuote;
+               case kVK_ANSI_Backslash:        return GHOST_kKeyBackslash;
+               case kVK_ANSI_LeftBracket:      return GHOST_kKeyLeftBracket;
+               case kVK_ANSI_RightBracket:     return GHOST_kKeyRightBracket;
+               case kVK_ANSI_Grave:            return GHOST_kKeyAccentGrave;*/
+                       
+               case kVK_VolumeUp:
+               case kVK_VolumeDown:
+               case kVK_Mute:
+                       return GHOST_kKeyUnknown;
+                       
+               default:
+                       /* alphanumerical or punctuation key that is remappable in int'l keyboards */
+                       if ((recvChar >= 'A') && (recvChar <= 'Z')) {
+                               return (GHOST_TKey) (recvChar - 'A' + GHOST_kKeyA);
+                       } else if ((recvChar >= 'a') && (recvChar <= 'z')) {
+                               return (GHOST_TKey) (recvChar - 'a' + GHOST_kKeyA);
+                       } else {
+ #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4
+                               KeyboardLayoutRef keyLayout;
+                               UCKeyboardLayout *uchrData;
+                               
+                               KLGetCurrentKeyboardLayout(&keyLayout);
+                               KLGetKeyboardLayoutProperty(keyLayout, kKLuchrData, (const void **)
+                                                                                       &uchrData);
+                               /*get actual character value of the "remappable" keys in int'l keyboards,
+                                if keyboard layout is not correctly reported (e.g. some non Apple keyboards in Tiger),
+                                then fallback on using the received charactersIgnoringModifiers */
+                               if (uchrData)
+                               {
+                                       UInt32 deadKeyState=0;
+                                       UniCharCount actualStrLength=0;
+                                       
+                                       UCKeyTranslate(uchrData, rawCode, keyAction, 0,
+                                                                  LMGetKbdType(), kUCKeyTranslateNoDeadKeysBit, &deadKeyState, 1, &actualStrLength, &recvChar);
+                                       
+                               }                               
+ #else
+                               /* Leopard and Snow Leopard 64bit compatible API*/
+                               CFDataRef uchrHandle; /*the keyboard layout*/
+                               TISInputSourceRef kbdTISHandle;
+                               
+                               kbdTISHandle = TISCopyCurrentKeyboardLayoutInputSource();
+                               uchrHandle = (CFDataRef)TISGetInputSourceProperty(kbdTISHandle,kTISPropertyUnicodeKeyLayoutData);
+                               CFRelease(kbdTISHandle);
+                               
+                               /*get actual character value of the "remappable" keys in int'l keyboards,
+                                if keyboard layout is not correctly reported (e.g. some non Apple keyboards in Tiger),
+                                then fallback on using the received charactersIgnoringModifiers */
+                               if (uchrHandle)
+                               {
+                                       UInt32 deadKeyState=0;
+                                       UniCharCount actualStrLength=0;
+                                       
+                                       UCKeyTranslate((UCKeyboardLayout*)CFDataGetBytePtr(uchrHandle), rawCode, keyAction, 0,
+                                                                  LMGetKbdType(), kUCKeyTranslateNoDeadKeysBit, &deadKeyState, 1, &actualStrLength, &recvChar);
+                                       
+                               }
+ #endif
+                               switch (recvChar) {
+                                       case '-':       return GHOST_kKeyMinus;
+                                       case '=':       return GHOST_kKeyEqual;
+                                       case ',':       return GHOST_kKeyComma;
+                                       case '.':       return GHOST_kKeyPeriod;
+                                       case '/':       return GHOST_kKeySlash;
+                                       case ';':       return GHOST_kKeySemicolon;
+                                       case '\'':      return GHOST_kKeyQuote;
+                                       case '\\':      return GHOST_kKeyBackslash;
+                                       case '[':       return GHOST_kKeyLeftBracket;
+                                       case ']':       return GHOST_kKeyRightBracket;
+                                       case '`':       return GHOST_kKeyAccentGrave;
+                                       default:
+                                               return GHOST_kKeyUnknown;
+                               }
+                       }
+       }
+       return GHOST_kKeyUnknown;
+ }
++>>>>>>> .merge-right.r30358\r
  #pragma mark defines for 10.6 api not documented in 10.5
  #ifndef MAC_OS_X_VERSION_10_6
  enum {
@@@ -643,108 -687,110 +1051,156 @@@ GHOST_TUns64 GHOST_SystemCocoa::getMill
        //Return timestamp of system uptime
        
        return ((currentTime.tv_sec*1000)+(currentTime.tv_usec/1000)-m_start_time);
 -}
 -
 -
 -GHOST_TUns8 GHOST_SystemCocoa::getNumDisplays() const
 -{
 -      //Note that OS X supports monitor hot plug
 -      // We do not support multiple monitors at the moment
 -      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 -
 -      GHOST_TUns8 count = [[NSScreen screens] count];
 -
 -      [pool drain];
 -      return count;
 -}
 -
 -
 -void GHOST_SystemCocoa::getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const
 -{
 -      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 -      //Get visible frame, that is frame excluding dock and top menu bar
 -      NSRect frame = [[NSScreen mainScreen] visibleFrame];
 -      
 -      //Returns max window contents (excluding title bar...)
 -      NSRect contentRect = [NSWindow contentRectForFrameRect:frame
 -                                                                                               styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask)];
 -      
 -      width = contentRect.size.width;
 -      height = contentRect.size.height;
 -
 -      [pool drain];
 -}
 -
 -
 -GHOST_IWindow* GHOST_SystemCocoa::createWindow(
 -      const STR_String& title, 
 -      GHOST_TInt32 left,
 -      GHOST_TInt32 top,
 -      GHOST_TUns32 width,
 -      GHOST_TUns32 height,
 -      GHOST_TWindowState state,
 -      GHOST_TDrawingContextType type,
 -      bool stereoVisual,
 +}\r
 +\r
 +\r
 +GHOST_TUns8 GHOST_SystemCocoa::getNumDisplays() const\r
 +{\r
 +      //Note that OS X supports monitor hot plug\r
 +      // We do not support multiple monitors at the moment\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +\r
 +      GHOST_TUns8 count = [[NSScreen screens] count];\r
 +\r
 +      [pool drain];\r
 +      return count;\r
 +}\r
 +\r
 +\r
 +void GHOST_SystemCocoa::getMainDisplayDimensions(GHOST_TUns32& width, GHOST_TUns32& height) const\r
 +{\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      //Get visible frame, that is frame excluding dock and top menu bar\r
 +      NSRect frame = [[NSScreen mainScreen] visibleFrame];\r
 +      \r
 +      //Returns max window contents (excluding title bar...)\r
 +      NSRect contentRect = [NSWindow contentRectForFrameRect:frame\r
 +                                                                                               styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask)];\r
 +      \r
 +      width = contentRect.size.width;\r
 +      height = contentRect.size.height;\r
 +\r
 +      [pool drain];\r
 +}\r
 +\r
 +\r
 +GHOST_IWindow* GHOST_SystemCocoa::createWindow(\r
 +      const STR_String& title, \r
 +      GHOST_TInt32 left,\r
 +      GHOST_TInt32 top,\r
 +      GHOST_TUns32 width,\r
 +      GHOST_TUns32 height,\r
 +      GHOST_TWindowState state,\r
 +      GHOST_TDrawingContextType type,\r
 +      bool stereoVisual,\r
        const GHOST_TUns16 numOfAASamples,
 -      const GHOST_TEmbedderWindowID parentWindow
 -)
 -{
 -    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 -      GHOST_IWindow* window = 0;
 -      
 -      //Get the available rect for including window contents
 -      NSRect frame = [[NSScreen mainScreen] visibleFrame];
 -      NSRect contentRect = [NSWindow contentRectForFrameRect:frame
 -                                                                                               styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask)];
 -      
 -      //Ensures window top left is inside this available rect
 -      left = left > contentRect.origin.x ? left : contentRect.origin.x;
 -      top = top > contentRect.origin.y ? top : contentRect.origin.y;
 -      
 +      const GHOST_TEmbedderWindowID parentWindow\r
 +)\r
 +{\r
 +    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      GHOST_IWindow* window = 0;\r
 +      \r
 +      //Get the available rect for including window contents\r
 +      NSRect frame = [[NSScreen mainScreen] visibleFrame];\r
 +      NSRect contentRect = [NSWindow contentRectForFrameRect:frame\r
 +                                                                                               styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask)];\r
 +      \r
 +      //Ensures window top left is inside this available rect\r
 +      left = left > contentRect.origin.x ? left : contentRect.origin.x;\r
 +      top = top > contentRect.origin.y ? top : contentRect.origin.y;\r
 +      \r
        window = new GHOST_WindowCocoa (this, title, left, top, width, height, state, type, stereoVisual, numOfAASamples);
++<<<<<<< .working\r
 +\r
 +    if (window) {\r
 +        if (window->getValid()) {\r
 +            // Store the pointer to the window \r
 +            GHOST_ASSERT(m_windowManager, "m_windowManager not initialized");\r
 +            m_windowManager->addWindow(window);\r
 +            m_windowManager->setActiveWindow(window);\r
 +                      //Need to tell window manager the new window is the active one (Cocoa does not send the event activate upon window creation)\r
 +            pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowActivate, window));\r
 +                      pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window));\r
 +\r
 +        }\r
 +        else {\r
 +                      GHOST_PRINT("GHOST_SystemCocoa::createWindow(): window invalid\n");\r
 +            delete window;\r
 +            window = 0;\r
 +        }\r
 +    }\r
 +      else {\r
 +              GHOST_PRINT("GHOST_SystemCocoa::createWindow(): could not create window\n");\r
 +      }\r
 +      [pool drain];\r
 +    return window;\r
 +}\r
 +\r
 +GHOST_TSuccess GHOST_SystemCocoa::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, const bool stereoVisual)\r
 +{     \r
 +      GHOST_IWindow* currentWindow = m_windowManager->getActiveWindow();\r
 +\r
 +      *window = currentWindow;\r
 +      \r
 +      return currentWindow->setState(GHOST_kWindowStateFullScreen);\r
 +}\r
 +\r
 +GHOST_TSuccess GHOST_SystemCocoa::endFullScreen(void)\r
 +{     \r
 +      GHOST_IWindow* currentWindow = m_windowManager->getActiveWindow();\r
 +      \r
 +      return currentWindow->setState(GHOST_kWindowStateNormal);\r
 +}\r
 +\r
 +\r
 +      \r
++=======\r
+     if (window) {
+         if (window->getValid()) {
+             // Store the pointer to the window 
+             GHOST_ASSERT(m_windowManager, "m_windowManager not initialized");
+             m_windowManager->addWindow(window);
+             m_windowManager->setActiveWindow(window);
+                       //Need to tell window manager the new window is the active one (Cocoa does not send the event activate upon window creation)
+             pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowActivate, window));
+                       pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window));
+         }
+         else {
+                       GHOST_PRINT("GHOST_SystemCocoa::createWindow(): window invalid\n");
+             delete window;
+             window = 0;
+         }
+     }
+       else {
+               GHOST_PRINT("GHOST_SystemCocoa::createWindow(): could not create window\n");
+       }
+       [pool drain];
+     return window;
+ }
+ GHOST_TSuccess GHOST_SystemCocoa::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window, const bool stereoVisual)
+ {     
+       GHOST_IWindow* currentWindow = m_windowManager->getActiveWindow();
+       *window = currentWindow;
+       
+       if(!currentWindow) return GHOST_kFailure;
+       
+       return currentWindow->setState(GHOST_kWindowStateFullScreen);
+ }
+ GHOST_TSuccess GHOST_SystemCocoa::endFullScreen(void)
+ {     
+       GHOST_IWindow* currentWindow = m_windowManager->getActiveWindow();
+       if(!currentWindow) return GHOST_kFailure;
+       
+       return currentWindow->setState(GHOST_kWindowStateNormal);
+ }
+       
++>>>>>>> .merge-right.r30358\r
  /**
   * @note : returns coordinates in Cocoa screen coordinates
   */
@@@ -761,28 -807,52 +1217,67 @@@ GHOST_TSuccess GHOST_SystemCocoa::getCu
  /**
   * @note : expect Cocoa screen coordinates
   */
++<<<<<<< .working\r
 +GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y) const\r
 +{\r
 +      float xf=(float)x, yf=(float)y;\r
++=======\r
+ GHOST_TSuccess GHOST_SystemCocoa::setCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
+ {
+       GHOST_TInt32 wx,wy;
        GHOST_WindowCocoa* window = (GHOST_WindowCocoa*)m_windowManager->getActiveWindow();
+       if (!window) return GHOST_kFailure;
+       //Cursor and mouse dissociation placed here not to interfere with continuous grab
+       // (in cont. grab setMouseCursorPosition is directly called)
+       CGAssociateMouseAndMouseCursorPosition(false);
+       setMouseCursorPosition(x, y);
+       CGAssociateMouseAndMouseCursorPosition(true);
+       
+       //Force mouse move event (not pushed by Cocoa)
+       window->screenToClient(x, y, wx, wy);
+       pushEvent(new GHOST_EventCursor(getMilliSeconds(), GHOST_kEventCursorMove, window, wx,wy));
+       m_outsideLoopEventProcessed = true;
+       
+       return GHOST_kSuccess;
+ }
+ GHOST_TSuccess GHOST_SystemCocoa::setMouseCursorPosition(GHOST_TInt32 x, GHOST_TInt32 y)
+ {
+       float xf=(float)x, yf=(float)y;
++>>>>>>> .merge-right.r30358\r
+       GHOST_WindowCocoa* window = (GHOST_WindowCocoa*)m_windowManager->getActiveWindow();
+       if (!window) return GHOST_kFailure;
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        NSScreen *windowScreen = window->getScreen();
        NSRect screenRect = [windowScreen frame];
 -      
 +      \r
        //Set position relative to current screen
        xf -= screenRect.origin.x;
        yf -= screenRect.origin.y;
        
 -      //Quartz Display Services uses the old coordinates (top left origin)
 +      //Quartz Display Services uses the old coordinates (top left origin)\r
        yf = screenRect.size.height -yf;
 -
 +\r
        CGDisplayMoveCursorToPoint((CGDirectDisplayID)[[[windowScreen deviceDescription] objectForKey:@"NSScreenNumber"] unsignedIntValue], CGPointMake(xf, yf));
  
++<<<<<<< .working\r
 +    return GHOST_kSuccess;\r
 +}\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_SystemCocoa::getModifierKeys(GHOST_ModifierKeys& keys) const\r
 +{\r
++=======\r
+       [pool drain];
+     return GHOST_kSuccess;
+ }
+ GHOST_TSuccess GHOST_SystemCocoa::getModifierKeys(GHOST_ModifierKeys& keys) const
+ {
++>>>>>>> .merge-right.r30358\r
        keys.set(GHOST_kModifierKeyCommand, (m_modifierMask & NSCommandKeyMask) ? true : false);
        keys.set(GHOST_kModifierKeyLeftAlt, (m_modifierMask & NSAlternateKeyMask) ? true : false);
        keys.set(GHOST_kModifierKeyLeftShift, (m_modifierMask & NSShiftKeyMask) ? true : false);
@@@ -1541,41 -1611,43 +2036,47 @@@ GHOST_TSuccess GHOST_SystemCocoa::handl
                case NSEventTypeEndGesture:
                        m_isGestureInProgress = false;
                        break;
 -              default:
 -                      return GHOST_kFailure;
 -                      break;
 -              }
 -      
 -      return GHOST_kSuccess;
 -}
 -
 -
 -GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
 -{
 -      NSEvent *event = (NSEvent *)eventPtr;
 +              default:\r
 +                      return GHOST_kFailure;\r
 +                      break;\r
 +              }\r
 +      \r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)\r
 +{\r
 +      NSEvent *event = (NSEvent *)eventPtr;\r
        GHOST_IWindow* window;
 -      unsigned int modifiers;
 -      NSString *characters;
 +      unsigned int modifiers;\r
 +      NSString *characters;\r
        NSData *convertedCharacters;
 -      GHOST_TKey keyCode;
 -      unsigned char ascii;
 +      GHOST_TKey keyCode;\r
 +      unsigned char ascii;\r
        NSString* charsIgnoringModifiers;
 -
 +\r
        window = m_windowManager->getWindowAssociatedWithOSWindow((void*)[event window]);
 -      if (!window) {
 +      if (!window) {\r
                //printf("\nW failure for event 0x%x",[event type]);
 -              return GHOST_kFailure;
 -      }
 -      
 -      switch ([event type]) {
 -              case NSKeyDown:
 -              case NSKeyUp:
 +              return GHOST_kFailure;\r
 +      }\r
 +      \r
 +      switch ([event type]) {\r
 +              case NSKeyDown:\r
 +              case NSKeyUp:\r
                        charsIgnoringModifiers = [event charactersIgnoringModifiers];
                        if ([charsIgnoringModifiers length]>0)
 -                              keyCode = convertKey([event keyCode],
 +                              keyCode = convertKey([event keyCode],\r
-                                                                        [charsIgnoringModifiers characterAtIndex:0]);
+                                                                        [charsIgnoringModifiers characterAtIndex:0],
+                                                                        [event type] == NSKeyDown?kUCKeyActionDown:kUCKeyActionUp);
                        else
++<<<<<<< .working\r
 +                              keyCode = convertKey([event keyCode],0);\r
++=======\r
+                               keyCode = convertKey([event keyCode],0,
+                                                                        [event type] == NSKeyDown?kUCKeyActionDown:kUCKeyActionUp);
++>>>>>>> .merge-right.r30358\r
  
                                
                        characters = [event characters];
                                        ascii =((char*)[convertedCharacters bytes])[0];
                                else
                                        ascii = 0; //Character not available in iso latin 1 encoding
 -                      }
 +                      }\r
                        else
                                ascii= 0;
 -                      
 -                      if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & NSCommandKeyMask))
 -                              break; //Cmd-Q is directly handled by Cocoa
 -
 -                      if ([event type] == NSKeyDown) {
 +                      \r
 +                      if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & NSCommandKeyMask))\r
 +                              break; //Cmd-Q is directly handled by Cocoa\r
 +\r
 +                      if ([event type] == NSKeyDown) {\r
                                pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyDown, window, keyCode, ascii) );
++<<<<<<< .working\r
 +                              //printf("\nKey pressed keyCode=%u ascii=%i %c",keyCode,ascii,ascii);\r
 +                      } else {\r
++=======\r
+                               //printf("\nKey down rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii);
+                       } else {
++>>>>>>> .merge-right.r30358\r
                                pushEvent( new GHOST_EventKey([event timestamp]*1000, GHOST_kEventKeyUp, window, keyCode, ascii) );
++<<<<<<< .working\r
 +                      }\r
 +                      break;\r
 +      \r
 +              case NSFlagsChanged: \r
 +                      modifiers = [event modifierFlags];\r
++=======\r
+                               //printf("\nKey up rawCode=0x%x charsIgnoringModifiers=%c keyCode=%u ascii=%i %c",[event keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers characterAtIndex:0]:' ',keyCode,ascii,ascii);
+                       }
+                       break;
+       
+               case NSFlagsChanged: 
+                       modifiers = [event modifierFlags];
++>>>>>>> .merge-right.r30358\r
                        
 -                      if ((modifiers & NSShiftKeyMask) != (m_modifierMask & NSShiftKeyMask)) {
 +                      if ((modifiers & NSShiftKeyMask) != (m_modifierMask & NSShiftKeyMask)) {\r
                                pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSShiftKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftShift) );
 -                      }
 -                      if ((modifiers & NSControlKeyMask) != (m_modifierMask & NSControlKeyMask)) {
 +                      }\r
 +                      if ((modifiers & NSControlKeyMask) != (m_modifierMask & NSControlKeyMask)) {\r
                                pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSControlKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftControl) );
 -                      }
 -                      if ((modifiers & NSAlternateKeyMask) != (m_modifierMask & NSAlternateKeyMask)) {
 +                      }\r
 +                      if ((modifiers & NSAlternateKeyMask) != (m_modifierMask & NSAlternateKeyMask)) {\r
                                pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSAlternateKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyLeftAlt) );
 -                      }
 -                      if ((modifiers & NSCommandKeyMask) != (m_modifierMask & NSCommandKeyMask)) {
 +                      }\r
 +                      if ((modifiers & NSCommandKeyMask) != (m_modifierMask & NSCommandKeyMask)) {\r
                                pushEvent( new GHOST_EventKey([event timestamp]*1000, (modifiers & NSCommandKeyMask)?GHOST_kEventKeyDown:GHOST_kEventKeyUp, window, GHOST_kKeyCommand) );
 -                      }
 -                      
 -                      m_modifierMask = modifiers;
 -                      break;
 -                      
 -              default:
 -                      return GHOST_kFailure;
 -                      break;
 -      }
 -      
 -      return GHOST_kSuccess;
 -}
 -
 -
 -
 -#pragma mark Clipboard get/set
 -
 -GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const
 -{
 -      GHOST_TUns8 * temp_buff;
 -      size_t pastedTextSize;  
 -      
 -      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 -      
 -      NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];
 -      
 -      if (pasteBoard == nil) {
 -              [pool drain];
 -              return NULL;
 -      }
 -      
 -      NSArray *supportedTypes =
 +                      }\r
 +                      \r
 +                      m_modifierMask = modifiers;\r
 +                      break;\r
 +                      \r
 +              default:\r
 +                      return GHOST_kFailure;\r
 +                      break;\r
 +      }\r
 +      \r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +\r
 +\r
 +#pragma mark Clipboard get/set\r
 +\r
 +GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const\r
 +{\r
 +      GHOST_TUns8 * temp_buff;\r
 +      size_t pastedTextSize;  \r
 +      \r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      \r
 +      NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];\r
 +      \r
 +      if (pasteBoard == nil) {\r
 +              [pool drain];\r
 +              return NULL;\r
 +      }\r
 +      \r
 +      NSArray *supportedTypes =\r
                [NSArray arrayWithObjects: NSStringPboardType, nil];
 -      
 -      NSString *bestType = [[NSPasteboard generalPasteboard]
 -                                                availableTypeFromArray:supportedTypes];
 -      
 -      if (bestType == nil) {
 -              [pool drain];
 -              return NULL;
 -      }
 -      
 +      \r
 +      NSString *bestType = [[NSPasteboard generalPasteboard]\r
 +                                                availableTypeFromArray:supportedTypes];\r
 +      \r
 +      if (bestType == nil) {\r
 +              [pool drain];\r
 +              return NULL;\r
 +      }\r
 +      \r
        NSString * textPasted = [pasteBoard stringForType:NSStringPboardType];
 -
 -      if (textPasted == nil) {
 -              [pool drain];
 -              return NULL;
 -      }
 -      
 +\r
 +      if (textPasted == nil) {\r
 +              [pool drain];\r
 +              return NULL;\r
 +      }\r
 +      \r
        pastedTextSize = [textPasted lengthOfBytesUsingEncoding:NSISOLatin1StringEncoding];
 -      
 -      temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1); 
 -
 -      if (temp_buff == NULL) {
 -              [pool drain];
 -              return NULL;
 -      }
 -      
 +      \r
 +      temp_buff = (GHOST_TUns8*) malloc(pastedTextSize+1); \r
 +\r
 +      if (temp_buff == NULL) {\r
 +              [pool drain];\r
 +              return NULL;\r
 +      }\r
 +      \r
        strncpy((char*)temp_buff, [textPasted cStringUsingEncoding:NSISOLatin1StringEncoding], pastedTextSize);
 -      
 -      temp_buff[pastedTextSize] = '\0';
 -      
 -      [pool drain];
 -
 -      if(temp_buff) {
 -              return temp_buff;
 -      } else {
 -              return NULL;
 -      }
 -}
 -
 -void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
 -{
 -      NSString *textToCopy;
 -      
 -      if(selection) {return;} // for copying the selection, used on X11
 -
 -      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 -              
 -      NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];
 -      
 -      if (pasteBoard == nil) {
 -              [pool drain];
 -              return;
 -      }
 -      
 +      \r
 +      temp_buff[pastedTextSize] = '\0';\r
 +      \r
 +      [pool drain];\r
 +\r
 +      if(temp_buff) {\r
 +              return temp_buff;\r
 +      } else {\r
 +              return NULL;\r
 +      }\r
 +}\r
 +\r
 +void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const\r
 +{\r
 +      NSString *textToCopy;\r
 +      \r
 +      if(selection) {return;} // for copying the selection, used on X11\r
 +\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +              \r
 +      NSPasteboard *pasteBoard = [NSPasteboard generalPasteboard];\r
 +      \r
 +      if (pasteBoard == nil) {\r
 +              [pool drain];\r
 +              return;\r
 +      }\r
 +      \r
        NSArray *supportedTypes = [NSArray arrayWithObject:NSStringPboardType];
 -      
 -      [pasteBoard declareTypes:supportedTypes owner:nil];
 -      
 +      \r
 +      [pasteBoard declareTypes:supportedTypes owner:nil];\r
 +      \r
        textToCopy = [NSString stringWithCString:buffer encoding:NSISOLatin1StringEncoding];
 -      
 +      \r
        [pasteBoard setString:textToCopy forType:NSStringPboardType];
 -      
 -      [pool drain];
 -}
 +      \r
 +      [pool drain];\r
 +}\r
  
  #pragma mark Base directories retrieval
  
@@@ -474,396 -475,402 +475,720 @@@ void* GHOST_WindowCocoa::getOSWindow() 
  {
        return (void*)m_window;
  }
 -
 +\r
 +void GHOST_WindowCocoa::setTitle(const STR_String& title)\r
 +{\r
 +    GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setTitle(): window invalid")\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +\r
 +      NSString *windowTitle = [[NSString alloc] initWithUTF8String:title];\r
 +      \r
 +      //Set associated file if applicable\r
 +      if ([windowTitle hasPrefix:@"Blender"])\r
 +      {\r
 +              NSRange fileStrRange;\r
 +              NSString *associatedFileName;\r
 +              int len;\r
 +              \r
 +              fileStrRange.location = [windowTitle rangeOfString:@"["].location+1;\r
 +              len = [windowTitle rangeOfString:@"]"].location - fileStrRange.location;\r
 +      \r
 +              if (len >0)\r
 +              {\r
 +                      fileStrRange.length = len;\r
 +                      associatedFileName = [windowTitle substringWithRange:fileStrRange];\r
 +                      @try {\r
 +                              [m_window setRepresentedFilename:associatedFileName];\r
 +                      }\r
 +                      @catch (NSException * e) {\r
 +                              printf("\nInvalid file path given in window title");\r
 +                      }\r
 +                      [m_window setTitle:[associatedFileName lastPathComponent]];\r
 +              }\r
 +              else {\r
 +                      [m_window setTitle:windowTitle];\r
 +                      [m_window setRepresentedFilename:@""];\r
 +              }\r
 +\r
 +      } else {\r
 +              [m_window setTitle:windowTitle];\r
 +              [m_window setRepresentedFilename:@""];\r
 +      }\r
 +\r
 +      \r
 +      [windowTitle release];\r
 +      [pool drain];\r
 +}\r
 +\r
 +\r
 +void GHOST_WindowCocoa::getTitle(STR_String& title) const\r
 +{\r
 +    GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getTitle(): window invalid")\r
 +\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +\r
 +      NSString *windowTitle = [m_window title];\r
 +\r
 +      if (windowTitle != nil) {\r
 +              title = [windowTitle UTF8String];               \r
 +      }\r
 +      \r
 +      [pool drain];\r
 +}\r
 +\r
 +\r
 +void GHOST_WindowCocoa::getWindowBounds(GHOST_Rect& bounds) const\r
 +{\r
 +      NSRect rect;\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getWindowBounds(): window invalid")\r
 +\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      \r
 +      NSRect screenSize = [[m_window screen] visibleFrame];\r
 +\r
 +      rect = [m_window frame];\r
 +\r
 +      bounds.m_b = screenSize.size.height - (rect.origin.y -screenSize.origin.y);\r
 +      bounds.m_l = rect.origin.x -screenSize.origin.x;\r
 +      bounds.m_r = rect.origin.x-screenSize.origin.x + rect.size.width;\r
 +      bounds.m_t = screenSize.size.height - (rect.origin.y + rect.size.height -screenSize.origin.y);\r
 +      \r
 +      [pool drain];\r
 +}\r
 +\r
 +\r
 +void GHOST_WindowCocoa::getClientBounds(GHOST_Rect& bounds) const\r
 +{\r
 +      NSRect rect;\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getClientBounds(): window invalid")\r
 +      \r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      \r
 +      if (!m_fullScreen)\r
 +      {\r
 +              NSRect screenSize = [[m_window screen] visibleFrame];\r
 +\r
 +              //Max window contents as screen size (excluding title bar...)\r
 +              NSRect contentRect = [CocoaWindow contentRectForFrameRect:screenSize\r
 +                                                                                                       styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];\r
 +\r
 +              rect = [m_window contentRectForFrameRect:[m_window frame]];\r
 +              \r
 +              bounds.m_b = contentRect.size.height - (rect.origin.y -contentRect.origin.y);\r
 +              bounds.m_l = rect.origin.x -contentRect.origin.x;\r
 +              bounds.m_r = rect.origin.x-contentRect.origin.x + rect.size.width;\r
 +              bounds.m_t = contentRect.size.height - (rect.origin.y + rect.size.height -contentRect.origin.y);\r
 +      }\r
 +      else {\r
 +              NSRect screenSize = [[m_window screen] frame];\r
 +              \r
 +              bounds.m_b = screenSize.origin.y + screenSize.size.height;\r
 +              bounds.m_l = screenSize.origin.x;\r
 +              bounds.m_r = screenSize.origin.x + screenSize.size.width;\r
 +              bounds.m_t = screenSize.origin.y;\r
 +      }\r
 +      [pool drain];\r
 +}\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::setClientWidth(GHOST_TUns32 width)\r
 +{\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientWidth(): window invalid")\r
 +      GHOST_Rect cBnds, wBnds;\r
 +      getClientBounds(cBnds);\r
 +      if (((GHOST_TUns32)cBnds.getWidth()) != width) {\r
 +              NSSize size;\r
 +              size.width=width;\r
 +              size.height=cBnds.getHeight();\r
 +              [m_window setContentSize:size];\r
 +      }\r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::setClientHeight(GHOST_TUns32 height)\r
 +{\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientHeight(): window invalid")\r
 +      GHOST_Rect cBnds, wBnds;\r
 +      getClientBounds(cBnds);\r
 +      if (((GHOST_TUns32)cBnds.getHeight()) != height) {\r
 +              NSSize size;\r
 +              size.width=cBnds.getWidth();\r
 +              size.height=height;\r
 +              [m_window setContentSize:size];\r
 +      }\r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::setClientSize(GHOST_TUns32 width, GHOST_TUns32 height)\r
 +{\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientSize(): window invalid")\r
 +      GHOST_Rect cBnds, wBnds;\r
 +      getClientBounds(cBnds);\r
 +      if ((((GHOST_TUns32)cBnds.getWidth()) != width) ||\r
 +          (((GHOST_TUns32)cBnds.getHeight()) != height)) {\r
 +              NSSize size;\r
 +              size.width=width;\r
 +              size.height=height;\r
 +              [m_window setContentSize:size];\r
 +      }\r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +\r
 +GHOST_TWindowState GHOST_WindowCocoa::getState() const\r
 +{\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getState(): window invalid")\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      GHOST_TWindowState state;\r
 +      if (m_fullScreen) {\r
 +              state = GHOST_kWindowStateFullScreen;\r
 +      } \r
 +      else if ([m_window isMiniaturized]) {\r
 +              state = GHOST_kWindowStateMinimized;\r
 +      }\r
 +      else if ([m_window isZoomed]) {\r
 +              state = GHOST_kWindowStateMaximized;\r
 +      }\r
 +      else {\r
 +              state = GHOST_kWindowStateNormal;\r
 +      }\r
 +      [pool drain];\r
 +      return state;\r
 +}\r
 +\r
 +\r
 +void GHOST_WindowCocoa::screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const\r
 +{\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::screenToClient(): window invalid")\r
 +      \r
 +      NSPoint screenCoord;\r
 +      NSPoint baseCoord;\r
 +      \r
 +      screenCoord.x = inX;\r
 +      screenCoord.y = inY;\r
 +      \r
 +      baseCoord = [m_window convertScreenToBase:screenCoord];\r
 +      \r
 +      outX = baseCoord.x;\r
 +      outY = baseCoord.y;\r
 +}\r
 +\r
 +\r
 +void GHOST_WindowCocoa::clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const\r
 +{\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::clientToScreen(): window invalid")\r
 +      \r
 +      NSPoint screenCoord;\r
 +      NSPoint baseCoord;\r
 +      \r
 +      baseCoord.x = inX;\r
 +      baseCoord.y = inY;\r
 +      \r
 +      screenCoord = [m_window convertBaseToScreen:baseCoord];\r
 +      \r
 +      outX = screenCoord.x;\r
 +      outY = screenCoord.y;\r
 +}\r
 +\r
 +
++<<<<<<< .working\r
++=======\r
+ void GHOST_WindowCocoa::setTitle(const STR_String& title)
+ {
+     GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setTitle(): window invalid")
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       NSString *windowTitle = [[NSString alloc] initWithUTF8String:title];
+       
+       //Set associated file if applicable
+       if ([windowTitle hasPrefix:@"Blender"])
+       {
+               NSRange fileStrRange;
+               NSString *associatedFileName;
+               int len;
+               
+               fileStrRange.location = [windowTitle rangeOfString:@"["].location+1;
+               len = [windowTitle rangeOfString:@"]"].location - fileStrRange.location;
+       
+               if (len >0)
+               {
+                       fileStrRange.length = len;
+                       associatedFileName = [windowTitle substringWithRange:fileStrRange];
+                       @try {
+                               [m_window setRepresentedFilename:associatedFileName];
+                       }
+                       @catch (NSException * e) {
+                               printf("\nInvalid file path given in window title");
+                       }
+                       [m_window setTitle:[associatedFileName lastPathComponent]];
+               }
+               else {
+                       [m_window setTitle:windowTitle];
+                       [m_window setRepresentedFilename:@""];
+               }
+       } else {
+               [m_window setTitle:windowTitle];
+               [m_window setRepresentedFilename:@""];
+       }
+       
+       [windowTitle release];
+       [pool drain];
+ }
+ void GHOST_WindowCocoa::getTitle(STR_String& title) const
+ {
+     GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getTitle(): window invalid")
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       NSString *windowTitle = [m_window title];
+       if (windowTitle != nil) {
+               title = [windowTitle UTF8String];               
+       }
+       
+       [pool drain];
+ }
+ void GHOST_WindowCocoa::getWindowBounds(GHOST_Rect& bounds) const
+ {
+       NSRect rect;
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getWindowBounds(): window invalid")
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       
+       NSRect screenSize = [[m_window screen] visibleFrame];
+       rect = [m_window frame];
+       bounds.m_b = screenSize.size.height - (rect.origin.y -screenSize.origin.y);
+       bounds.m_l = rect.origin.x -screenSize.origin.x;
+       bounds.m_r = rect.origin.x-screenSize.origin.x + rect.size.width;
+       bounds.m_t = screenSize.size.height - (rect.origin.y + rect.size.height -screenSize.origin.y);
+       
+       [pool drain];
+ }
+ void GHOST_WindowCocoa::getClientBounds(GHOST_Rect& bounds) const
+ {
+       NSRect rect;
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getClientBounds(): window invalid")
+       
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       
+       if (!m_fullScreen)
+       {
+               NSRect screenSize = [[m_window screen] visibleFrame];
+               //Max window contents as screen size (excluding title bar...)
+               NSRect contentRect = [CocoaWindow contentRectForFrameRect:screenSize
+                                                                                                        styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];
+               rect = [m_window contentRectForFrameRect:[m_window frame]];
+               
+               bounds.m_b = contentRect.size.height - (rect.origin.y -contentRect.origin.y);
+               bounds.m_l = rect.origin.x -contentRect.origin.x;
+               bounds.m_r = rect.origin.x-contentRect.origin.x + rect.size.width;
+               bounds.m_t = contentRect.size.height - (rect.origin.y + rect.size.height -contentRect.origin.y);
+       }
+       else {
+               NSRect screenSize = [[m_window screen] frame];
+               
+               bounds.m_b = screenSize.origin.y + screenSize.size.height;
+               bounds.m_l = screenSize.origin.x;
+               bounds.m_r = screenSize.origin.x + screenSize.size.width;
+               bounds.m_t = screenSize.origin.y;
+       }
+       [pool drain];
+ }
+ GHOST_TSuccess GHOST_WindowCocoa::setClientWidth(GHOST_TUns32 width)
+ {
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientWidth(): window invalid")
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       GHOST_Rect cBnds, wBnds;
+       getClientBounds(cBnds);
+       if (((GHOST_TUns32)cBnds.getWidth()) != width) {
+               NSSize size;
+               size.width=width;
+               size.height=cBnds.getHeight();
+               [m_window setContentSize:size];
+       }
+       [pool drain];
+       return GHOST_kSuccess;
+ }
+ GHOST_TSuccess GHOST_WindowCocoa::setClientHeight(GHOST_TUns32 height)
+ {
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientHeight(): window invalid")
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       GHOST_Rect cBnds, wBnds;
+       getClientBounds(cBnds);
+       if (((GHOST_TUns32)cBnds.getHeight()) != height) {
+               NSSize size;
+               size.width=cBnds.getWidth();
+               size.height=height;
+               [m_window setContentSize:size];
+       }
+       [pool drain];
+       return GHOST_kSuccess;
+ }
+ GHOST_TSuccess GHOST_WindowCocoa::setClientSize(GHOST_TUns32 width, GHOST_TUns32 height)
+ {
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setClientSize(): window invalid")
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       GHOST_Rect cBnds, wBnds;
+       getClientBounds(cBnds);
+       if ((((GHOST_TUns32)cBnds.getWidth()) != width) ||
+           (((GHOST_TUns32)cBnds.getHeight()) != height)) {
+               NSSize size;
+               size.width=width;
+               size.height=height;
+               [m_window setContentSize:size];
+       }
+       [pool drain];
+       return GHOST_kSuccess;
+ }
+ GHOST_TWindowState GHOST_WindowCocoa::getState() const
+ {
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::getState(): window invalid")
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       GHOST_TWindowState state;
+       if (m_fullScreen) {
+               state = GHOST_kWindowStateFullScreen;
+       } 
+       else if ([m_window isMiniaturized]) {
+               state = GHOST_kWindowStateMinimized;
+       }
+       else if ([m_window isZoomed]) {
+               state = GHOST_kWindowStateMaximized;
+       }
+       else {
+               state = GHOST_kWindowStateNormal;
+       }
+       [pool drain];
+       return state;
+ }
+ void GHOST_WindowCocoa::screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
+ {
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::screenToClient(): window invalid")
+       
+       NSPoint screenCoord;
+       NSPoint baseCoord;
+       
+       screenCoord.x = inX;
+       screenCoord.y = inY;
+       
+       baseCoord = [m_window convertScreenToBase:screenCoord];
+       
+       outX = baseCoord.x;
+       outY = baseCoord.y;
+ }
+ void GHOST_WindowCocoa::clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
+ {
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::clientToScreen(): window invalid")
+       
+       NSPoint screenCoord;
+       NSPoint baseCoord;
+       
+       baseCoord.x = inX;
+       baseCoord.y = inY;
+       
+       screenCoord = [m_window convertBaseToScreen:baseCoord];
+       
+       outX = screenCoord.x;
+       outY = screenCoord.y;
+ }
++>>>>>>> .merge-right.r30358\r
  NSScreen* GHOST_WindowCocoa::getScreen()
  {
        return [m_window screen];
  }
  
  
++<<<<<<< .working\r
 +/**\r
 + * @note Fullscreen switch is not actual fullscreen with display capture. As this capture removes all OS X window manager features.\r
 + * Instead, the menu bar and the dock are hidden, and the window is made borderless and enlarged.\r
 + * Thus, process switch, exposé, spaces, ... still work in fullscreen mode\r
 + */\r
 +GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)\r
 +{\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setState(): window invalid")\r
 +    switch (state) {\r
 +              case GHOST_kWindowStateMinimized:\r
 +            [m_window miniaturize:nil];\r
 +            break;\r
 +              case GHOST_kWindowStateMaximized:\r
 +                      [m_window zoom:nil];\r
 +                      break;\r
 +              \r
 +              case GHOST_kWindowStateFullScreen:\r
 +                      if (!m_fullScreen)\r
 +                      {\r
 +                              NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +                      \r
 +                              //This status change needs to be done before Cocoa call to enter fullscreen mode\r
 +                              //to give window delegate hint not to forward its deactivation to ghost wm that doesn't know view/window difference\r
 +                              m_fullScreen = true;\r
 +\r
 +#ifdef MAC_OS_X_VERSION_10_6\r
 +                              //10.6 provides Cocoa functions to autoshow menu bar, and to change a window style\r
 +                              //Hide menu & dock if needed\r
 +                              if ([[m_window screen] isEqual:[NSScreen mainScreen]])\r
 +                              {\r
 +                                      [NSApp setPresentationOptions:(NSApplicationPresentationHideDock | NSApplicationPresentationAutoHideMenuBar)];\r
 +                              }\r
 +                              //Make window borderless and enlarge it\r
 +                              [m_window setStyleMask:NSBorderlessWindowMask];\r
 +                              [m_window setFrame:[[m_window screen] frame] display:YES];\r
++=======\r
+ /**
+  * @note Fullscreen switch is not actual fullscreen with display capture. As this capture removes all OS X window manager features.
+  * Instead, the menu bar and the dock are hidden, and the window is made borderless and enlarged.
+  * Thus, process switch, exposé, spaces, ... still work in fullscreen mode
+  */
+ GHOST_TSuccess GHOST_WindowCocoa::setState(GHOST_TWindowState state)
+ {
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setState(): window invalid")
+     switch (state) {
+               case GHOST_kWindowStateMinimized:
+             [m_window miniaturize:nil];
+             break;
+               case GHOST_kWindowStateMaximized:
+                       [m_window zoom:nil];
+                       break;
+               
+               case GHOST_kWindowStateFullScreen:
+                       if (!m_fullScreen)
+                       {
+                               NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                       
+                               //This status change needs to be done before Cocoa call to enter fullscreen mode
+                               //to give window delegate hint not to forward its deactivation to ghost wm that doesn't know view/window difference
+                               m_fullScreen = true;
+ #ifdef MAC_OS_X_VERSION_10_6
+                               //10.6 provides Cocoa functions to autoshow menu bar, and to change a window style
+                               //Hide menu & dock if needed
+                               if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]])
+                               {
+                                       [NSApp setPresentationOptions:(NSApplicationPresentationHideDock | NSApplicationPresentationAutoHideMenuBar)];
+                               }
+                               //Make window borderless and enlarge it
+                               [m_window setStyleMask:NSBorderlessWindowMask];
+                               [m_window setFrame:[[m_window screen] frame] display:YES];
++>>>>>>> .merge-right.r30358\r
                                [m_window makeFirstResponder:m_openGLView];
++<<<<<<< .working\r
 +#else\r
 +                              //With 10.5, we need to create a new window to change its style to borderless\r
 +                              //Hide menu & dock if needed\r
 +                              if ([[m_window screen] isEqual:[NSScreen mainScreen]])\r
 +                              {\r
 +                                      //Cocoa function in 10.5 does not allow to set the menu bar in auto-show mode [NSMenu setMenuBarVisible:NO];\r
 +                                      //One of the very few 64bit compatible Carbon function\r
 +                                      SetSystemUIMode(kUIModeAllHidden,kUIOptionAutoShowMenuBar);\r
 +                              }\r
 +                              //Create a fullscreen borderless window\r
 +                              CocoaWindow *tmpWindow = [[CocoaWindow alloc]\r
 +                                                                                initWithContentRect:[[m_window screen] frame]\r
 +                                                                                styleMask:NSBorderlessWindowMask\r
 +                                                                                backing:NSBackingStoreBuffered\r
 +                                                                                defer:YES];\r
 +                              //Copy current window parameters\r
 +                              [tmpWindow setTitle:[m_window title]];\r
 +                              [tmpWindow setRepresentedFilename:[m_window representedFilename]];\r
 +                              [tmpWindow setReleasedWhenClosed:NO];\r
 +                              [tmpWindow setAcceptsMouseMovedEvents:YES];\r
 +                              [tmpWindow setDelegate:[m_window delegate]];\r
 +                              \r
 +                              //Assign the openGL view to the new window\r
 +                              [tmpWindow setContentView:m_openGLView];\r
 +                              \r
 +                              //Show the new window\r
 +                              [tmpWindow makeKeyAndOrderFront:nil];\r
 +                              //Close and release old window\r
 +                              [m_window setDelegate:nil]; // To avoid the notification of "window closed" event\r
 +                              [m_window close];\r
 +                              [m_window release];\r
 +                              m_window = tmpWindow;\r
 +#endif\r
 +                      \r
 +                              //Tell WM of view new size\r
 +                              m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);\r
 +                              \r
 +                              [pool drain];\r
 +                              }\r
 +                      break;\r
 +              case GHOST_kWindowStateNormal:\r
 +        default:\r
 +                      if (m_fullScreen)\r
 +                      {\r
 +                              NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +                              m_fullScreen = false;\r
 +\r
 +                              //Exit fullscreen\r
 +#ifdef MAC_OS_X_VERSION_10_6\r
 +                              //Show again menu & dock if needed\r
 +                              if ([[m_window screen] isEqual:[NSScreen mainScreen]])\r
 +                              {\r
 +                                      [NSApp setPresentationOptions:NSApplicationPresentationDefault];\r
 +                              }\r
 +                              //Make window normal and resize it\r
 +                              [m_window setStyleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];\r
 +                              [m_window setFrame:[[m_window screen] visibleFrame] display:YES];\r
++=======\r
+ #else
+                               //With 10.5, we need to create a new window to change its style to borderless
+                               //Hide menu & dock if needed
+                               if ([[m_window screen] isEqual:[[NSScreen screens] objectAtIndex:0]])
+                               {
+                                       //Cocoa function in 10.5 does not allow to set the menu bar in auto-show mode [NSMenu setMenuBarVisible:NO];
+                                       //One of the very few 64bit compatible Carbon function
+                                       SetSystemUIMode(kUIModeAllHidden,kUIOptionAutoShowMenuBar);
+                               }
+                               //Create a fullscreen borderless window
+                               CocoaWindow *tmpWindow = [[CocoaWindow alloc]
+                                                                                 initWithContentRect:[[m_window screen] frame]
+                                                                                 styleMask:NSBorderlessWindowMask
+                                                                                 backing:NSBackingStoreBuffered
+                                                                                 defer:YES];
+                               //Copy current window parameters
+                               [tmpWindow setTitle:[m_window title]];
+                               [tmpWindow setRepresentedFilename:[m_window representedFilename]];
+                               [tmpWindow setReleasedWhenClosed:NO];
+                               [tmpWindow setAcceptsMouseMovedEvents:YES];
+                               [tmpWindow setDelegate:[m_window delegate]];
+                               
+                               //Assign the openGL view to the new window
+                               [tmpWindow setContentView:m_openGLView];
+                               
+                               //Show the new window
+                               [tmpWindow makeKeyAndOrderFront:nil];
+                               //Close and release old window
+                               [m_window setDelegate:nil]; // To avoid the notification of "window closed" event
+                               [m_window close];
+                               [m_window release];
+                               m_window = tmpWindow;
+ #endif
+                       
+                               //Tell WM of view new size
+                               m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);
+                               
+                               [pool drain];
+                               }
+                       break;
+               case GHOST_kWindowStateNormal:
+         default:
+                       if (m_fullScreen)
+                       {
+                               NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+                               m_fullScreen = false;
+                               //Exit fullscreen
+ #ifdef MAC_OS_X_VERSION_10_6
+                               //Show again menu & dock if needed
+                               if ([[m_window screen] isEqual:[NSScreen mainScreen]])
+                               {
+                                       [NSApp setPresentationOptions:NSApplicationPresentationDefault];
+                               }
+                               //Make window normal and resize it
+                               [m_window setStyleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)];
+                               [m_window setFrame:[[m_window screen] visibleFrame] display:YES];
++>>>>>>> .merge-right.r30358\r
                                //TODO for 10.6 only : window title is forgotten after the style change
                                [m_window makeFirstResponder:m_openGLView];
 -#else
 -                              //With 10.5, we need to create a new window to change its style to borderless
 -                              //Show menu & dock if needed
 -                              if ([[m_window screen] isEqual:[NSScreen mainScreen]])
 -                              {
 -                                      //Cocoa function in 10.5 does not allow to set the menu bar in auto-show mode [NSMenu setMenuBarVisible:YES];
 -                                      SetSystemUIMode(kUIModeNormal, 0); //One of the very few 64bit compatible Carbon function
 -                              }
 -                              //Create a fullscreen borderless window
 -                              CocoaWindow *tmpWindow = [[CocoaWindow alloc]
 -                                                                                initWithContentRect:[[m_window screen] frame]
 -                                                                                                      styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)
 -                                                                                                        backing:NSBackingStoreBuffered
 -                                                                                                              defer:YES];
 -                              //Copy current window parameters
 -                              [tmpWindow setTitle:[m_window title]];
 -                              [tmpWindow setRepresentedFilename:[m_window representedFilename]];
 -                              [tmpWindow setReleasedWhenClosed:NO];
 -                              [tmpWindow setAcceptsMouseMovedEvents:YES];
 -                              [tmpWindow setDelegate:[m_window delegate]];
 -                              
 -                              //Assign the openGL view to the new window
 -                              [tmpWindow setContentView:m_openGLView];
 -                              
 -                              //Show the new window
 -                              [tmpWindow makeKeyAndOrderFront:nil];
 -                              //Close and release old window
 -                              [m_window setDelegate:nil]; // To avoid the notification of "window closed" event
 -                              [m_window close];
 -                              [m_window release];
 -                              m_window = tmpWindow;
 -#endif
 -                      
 -                              //Tell WM of view new size
 -                              m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);
 -                              
 -                              [pool drain];
 -                      }
 -            else if ([m_window isMiniaturized])
 -                              [m_window deminiaturize:nil];
 -                      else if ([m_window isZoomed])
 -                              [m_window zoom:nil];
 -            break;
 -    }
 -    return GHOST_kSuccess;
 -}
 -
 -GHOST_TSuccess GHOST_WindowCocoa::setModifiedState(bool isUnsavedChanges)
 -{
 +#else\r
 +                              //With 10.5, we need to create a new window to change its style to borderless\r
 +                              //Show menu & dock if needed\r
 +                              if ([[m_window screen] isEqual:[NSScreen mainScreen]])\r
 +                              {\r
 +                                      //Cocoa function in 10.5 does not allow to set the menu bar in auto-show mode [NSMenu setMenuBarVisible:YES];\r
 +                                      SetSystemUIMode(kUIModeNormal, 0); //One of the very few 64bit compatible Carbon function\r
 +                              }\r
 +                              //Create a fullscreen borderless window\r
 +                              CocoaWindow *tmpWindow = [[CocoaWindow alloc]\r
 +                                                                                initWithContentRect:[[m_window screen] frame]\r
 +                                                                                                      styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)\r
 +                                                                                                        backing:NSBackingStoreBuffered\r
 +                                                                                                              defer:YES];\r
 +                              //Copy current window parameters\r
 +                              [tmpWindow setTitle:[m_window title]];\r
 +                              [tmpWindow setRepresentedFilename:[m_window representedFilename]];\r
 +                              [tmpWindow setReleasedWhenClosed:NO];\r
 +                              [tmpWindow setAcceptsMouseMovedEvents:YES];\r
 +                              [tmpWindow setDelegate:[m_window delegate]];\r
 +                              \r
 +                              //Assign the openGL view to the new window\r
 +                              [tmpWindow setContentView:m_openGLView];\r
 +                              \r
 +                              //Show the new window\r
 +                              [tmpWindow makeKeyAndOrderFront:nil];\r
 +                              //Close and release old window\r
 +                              [m_window setDelegate:nil]; // To avoid the notification of "window closed" event\r
 +                              [m_window close];\r
 +                              [m_window release];\r
 +                              m_window = tmpWindow;\r
 +#endif\r
 +                      \r
 +                              //Tell WM of view new size\r
 +                              m_systemCocoa->handleWindowEvent(GHOST_kEventWindowSize, this);\r
 +                              \r
 +                              [pool drain];\r
 +                      }\r
 +            else if ([m_window isMiniaturized])\r
 +                              [m_window deminiaturize:nil];\r
 +                      else if ([m_window isZoomed])\r
 +                              [m_window zoom:nil];\r
 +            break;\r
 +    }\r
 +    return GHOST_kSuccess;\r
 +}\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::setModifiedState(bool isUnsavedChanges)\r
 +{\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      \r
 +      [m_window setDocumentEdited:isUnsavedChanges];\r
 +      \r
 +      [pool drain];\r
 +      return GHOST_Window::setModifiedState(isUnsavedChanges);\r
 +}\r
 +\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order)\r
 +{\r
        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
        
 -      [m_window setDocumentEdited:isUnsavedChanges];
 -      
 -      [pool drain];
 -      return GHOST_Window::setModifiedState(isUnsavedChanges);
 -}
 -
 -
 -
 -GHOST_TSuccess GHOST_WindowCocoa::setOrder(GHOST_TWindowOrder order)
 -{
 -      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 -      
 -      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setOrder(): window invalid")
 -    if (order == GHOST_kWindowOrderTop) {
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::setOrder(): window invalid")\r
 +    if (order == GHOST_kWindowOrderTop) {\r
                [m_window makeKeyAndOrderFront:nil];
 -    }
 -    else {
 +    }\r
 +    else {\r
                NSArray *windowsList;
                
 -              [m_window orderBack:nil];
 +              [m_window orderBack:nil];\r
                
                //Check for other blender opened windows and make the frontmost key
                windowsList = [NSApp orderedWindows];
@@@ -967,153 -974,213 +1292,349 @@@ GHOST_TSuccess GHOST_WindowCocoa::insta
                        [tmpOpenGLContext setView:m_openGLView];
                        
                        m_openGLContext = tmpOpenGLContext;
 -                      break;
 -      
 +                      break;\r
 +      
++<<<<<<< .working\r
 +              case GHOST_kDrawingContextTypeNone:\r
 +                      success = GHOST_kSuccess;\r
 +                      break;\r
 +              \r
 +              default:\r
 +                      break;\r
 +      }\r
 +      [pool drain];\r
 +      return success;\r
 +}\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::removeDrawingContext()\r
 +{\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      switch (m_drawingContextType) {\r
 +              case GHOST_kDrawingContextTypeOpenGL:\r
 +                      if (m_openGLContext)\r
 +                      {\r
 +                              [m_openGLView clearGLContext];\r
 +                              if (s_firstOpenGLcontext == m_openGLContext) s_firstOpenGLcontext = nil;\r
 +                              m_openGLContext = nil;\r
 +                      }\r
 +                      [pool drain];\r
 +                      return GHOST_kSuccess;\r
 +              case GHOST_kDrawingContextTypeNone:\r
 +                      [pool drain];\r
 +                      return GHOST_kSuccess;\r
 +                      break;\r
 +              default:\r
 +                      [pool drain];\r
 +                      return GHOST_kFailure;\r
 +      }\r
 +}\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::invalidate()\r
 +{\r
 +      GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::invalidate(): window invalid")\r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      [m_openGLView setNeedsDisplay:YES];\r
 +      [pool drain];\r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +#pragma mark Cursor handling\r
 +\r
 +void GHOST_WindowCocoa::loadCursor(bool visible, GHOST_TStandardCursor cursor) const\r
 +{\r
 +      static bool systemCursorVisible = true;\r
 +      \r
 +      NSAutoreleasePool *pool =[[NSAutoreleasePool alloc] init];\r
 +\r
 +      NSCursor *tmpCursor =nil;\r
 +      \r
 +      if (visible != systemCursorVisible) {\r
 +              if (visible) {\r
 +                      [NSCursor unhide];\r
 +                      systemCursorVisible = true;\r
 +              }\r
 +              else {\r
 +                      [NSCursor hide];\r
 +                      systemCursorVisible = false;\r
 +              }\r
 +      }\r
 +\r
 +      if (cursor == GHOST_kStandardCursorCustom && m_customCursor) {\r
 +              tmpCursor = m_customCursor;\r
 +      } else {\r
 +              switch (cursor) {\r
 +                      case GHOST_kStandardCursorDestroy:\r
 +                              tmpCursor = [NSCursor disappearingItemCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorText:\r
 +                              tmpCursor = [NSCursor IBeamCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorCrosshair:\r
 +                              tmpCursor = [NSCursor crosshairCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorUpDown:\r
 +                              tmpCursor = [NSCursor resizeUpDownCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorLeftRight:\r
 +                              tmpCursor = [NSCursor resizeLeftRightCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorTopSide:\r
 +                              tmpCursor = [NSCursor resizeUpCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorBottomSide:\r
 +                              tmpCursor = [NSCursor resizeDownCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorLeftSide:\r
 +                              tmpCursor = [NSCursor resizeLeftCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorRightSide:\r
 +                              tmpCursor = [NSCursor resizeRightCursor];\r
 +                              break;\r
 +                      case GHOST_kStandardCursorRightArrow:\r
 +                      case GHOST_kStandardCursorInfo:\r
 +                      case GHOST_kStandardCursorLeftArrow:\r
 +                      case GHOST_kStandardCursorHelp:\r
 +                      case GHOST_kStandardCursorCycle:\r
 +                      case GHOST_kStandardCursorSpray:\r
 +                      case GHOST_kStandardCursorWait:\r
 +                      case GHOST_kStandardCursorTopLeftCorner:\r
 +                      case GHOST_kStandardCursorTopRightCorner:\r
 +                      case GHOST_kStandardCursorBottomRightCorner:\r
 +                      case GHOST_kStandardCursorBottomLeftCorner:\r
++=======\r
+               case GHOST_kDrawingContextTypeNone:
+                       success = GHOST_kSuccess;
+                       break;
+               
+               default:
+                       break;
+       }
+       [pool drain];
+       return success;
+ }
+ GHOST_TSuccess GHOST_WindowCocoa::removeDrawingContext()
+ {
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       switch (m_drawingContextType) {
+               case GHOST_kDrawingContextTypeOpenGL:
+                       if (m_openGLContext)
+                       {
+                               [m_openGLView clearGLContext];
+                               if (s_firstOpenGLcontext == m_openGLContext) s_firstOpenGLcontext = nil;
+                               m_openGLContext = nil;
+                       }
+                       [pool drain];
+                       return GHOST_kSuccess;
+               case GHOST_kDrawingContextTypeNone:
+                       [pool drain];
+                       return GHOST_kSuccess;
+                       break;
+               default:
+                       [pool drain];
+                       return GHOST_kFailure;
+       }
+ }
+ GHOST_TSuccess GHOST_WindowCocoa::invalidate()
+ {
+       GHOST_ASSERT(getValid(), "GHOST_WindowCocoa::invalidate(): window invalid")
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       [m_openGLView setNeedsDisplay:YES];
+       [pool drain];
+       return GHOST_kSuccess;
+ }
+ #pragma mark Progress bar
+ GHOST_TSuccess GHOST_WindowCocoa::setProgressBar(float progress)
+ {
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       
+       if ((progress >=0.0) && (progress <=1.0)) {
+               NSImage* dockIcon = [[NSImage alloc] initWithSize:NSMakeSize(128,128)];
+               
+               [dockIcon lockFocus];
+         NSRect progressBox = {{4, 4}, {120, 16}};
+         [[NSImage imageNamed:@"NSApplicationIcon"] dissolveToPoint:NSZeroPoint fraction:1.0];
+         
+         // Track & Outline
+         [[NSColor blackColor] setFill];
+         NSRectFill(progressBox);
+         
+         [[NSColor whiteColor] set];
+         NSFrameRect(progressBox);
+         
+         // Progress fill
+         progressBox = NSInsetRect(progressBox, 1, 1);
+         [[NSColor knobColor] setFill];
+         progressBox.size.width = progressBox.size.width * progress;
+               NSRectFill(progressBox);
+               
+               [dockIcon unlockFocus];
+               
+               [NSApp setApplicationIconImage:dockIcon];
+               [dockIcon release];
+               
+               m_progressBarVisible = true;
+       }
+       
+       [pool drain];
+       return GHOST_kSuccess;
+ }
+ GHOST_TSuccess GHOST_WindowCocoa::endProgressBar()
+ {
+       if (!m_progressBarVisible) return GHOST_kFailure;
+       m_progressBarVisible = false;
+       
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       
+       NSImage* dockIcon = [[NSImage alloc] initWithSize:NSMakeSize(128,128)];
+       [dockIcon lockFocus];
+       [[NSImage imageNamed:@"NSApplicationIcon"] dissolveToPoint:NSZeroPoint fraction:1.0];
+       [dockIcon unlockFocus];
+       [NSApp setApplicationIconImage:dockIcon];
+       [dockIcon release];
+       
+       [pool drain];
+       return GHOST_kSuccess;
+ }
+ #pragma mark Cursor handling
+ void GHOST_WindowCocoa::loadCursor(bool visible, GHOST_TStandardCursor cursor) const
+ {
+       static bool systemCursorVisible = true;
+       
+       NSCursor *tmpCursor =nil;
+       
+       if (visible != systemCursorVisible) {
+               if (visible) {
+                       [NSCursor unhide];
+                       systemCursorVisible = true;
+               }
+               else {
+                       [NSCursor hide];
+                       systemCursorVisible = false;
+               }
+       }
+       if (cursor == GHOST_kStandardCursorCustom && m_customCursor) {
+               tmpCursor = m_customCursor;
+       } else {
+               switch (cursor) {
+                       case GHOST_kStandardCursorDestroy:
+                               tmpCursor = [NSCursor disappearingItemCursor];
+                               break;
+                       case GHOST_kStandardCursorText:
+                               tmpCursor = [NSCursor IBeamCursor];
+                               break;
+                       case GHOST_kStandardCursorCrosshair:
+                               tmpCursor = [NSCursor crosshairCursor];
+                               break;
+                       case GHOST_kStandardCursorUpDown:
+                               tmpCursor = [NSCursor resizeUpDownCursor];
+                               break;
+                       case GHOST_kStandardCursorLeftRight:
+                               tmpCursor = [NSCursor resizeLeftRightCursor];
+                               break;
+                       case GHOST_kStandardCursorTopSide:
+                               tmpCursor = [NSCursor resizeUpCursor];
+                               break;
+                       case GHOST_kStandardCursorBottomSide:
+                               tmpCursor = [NSCursor resizeDownCursor];
+                               break;
+                       case GHOST_kStandardCursorLeftSide:
+                               tmpCursor = [NSCursor resizeLeftCursor];
+                               break;
+                       case GHOST_kStandardCursorRightSide:
+                               tmpCursor = [NSCursor resizeRightCursor];
+                               break;
+                       case GHOST_kStandardCursorRightArrow:
+                       case GHOST_kStandardCursorInfo:
+                       case GHOST_kStandardCursorLeftArrow:
+                       case GHOST_kStandardCursorHelp:
+                       case GHOST_kStandardCursorCycle:
+                       case GHOST_kStandardCursorSpray:
+                       case GHOST_kStandardCursorWait:
+                       case GHOST_kStandardCursorTopLeftCorner:
+                       case GHOST_kStandardCursorTopRightCorner:
+                       case GHOST_kStandardCursorBottomRightCorner:
+                       case GHOST_kStandardCursorBottomLeftCorner:
++>>>>>>> .merge-right.r30358\r
                        case GHOST_kStandardCursorCopy:
++<<<<<<< .working\r
 +                      case GHOST_kStandardCursorDefault:\r
 +                      default:\r
 +                              tmpCursor = [NSCursor arrowCursor];\r
 +                              break;\r
 +              };\r
 +      }\r
 +      [tmpCursor set];\r
 +      [pool drain];\r
 +}\r
 +\r
 +\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorVisibility(bool visible)\r
 +{\r
 +      if ([m_window isVisible]) {\r
 +              loadCursor(visible, getCursorShape());\r
 +      }\r
 +      \r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +\r
++=======\r
+                       case GHOST_kStandardCursorDefault:
+                       default:
+                               tmpCursor = [NSCursor arrowCursor];
+                               break;
+               };
+       }
+       [tmpCursor set];
+ }
+ GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorVisibility(bool visible)
+ {
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init];
+       
+       if ([m_window isVisible]) {
+               loadCursor(visible, getCursorShape());
+       }
+       
+       [pool drain];
+       return GHOST_kSuccess;
+ }
++>>>>>>> .merge-right.r30358\r
  GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorGrab(GHOST_TGrabCursorMode mode)
 -{
 +{\r
        GHOST_TSuccess err = GHOST_kSuccess;
 -      
 +      \r
        if (mode != GHOST_kGrabDisable)
 -      {
 -              //No need to perform grab without warp as it is always on in OS X
 +      {\r
 +              //No need to perform grab without warp as it is always on in OS X\r
                if(mode != GHOST_kGrabNormal) {
 -                      GHOST_TInt32 x_old,y_old;
 +                      GHOST_TInt32 x_old,y_old;\r
                        NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
 -
 -                      m_systemCocoa->getCursorPosition(x_old,y_old);
 +\r
 +                      m_systemCocoa->getCursorPosition(x_old,y_old);\r
                        screenToClient(x_old, y_old, m_cursorGrabInitPos[0], m_cursorGrabInitPos[1]);
 -                      //Warp position is stored in client (window base) coordinates
 +                      //Warp position is stored in client (window base) coordinates\r
                        setCursorGrabAccum(0, 0);
                        
                        if(mode == GHOST_kGrabHide) {
                /* Almost works without but important otherwise the mouse GHOST location can be incorrect on exit */
                setCursorGrabAccum(0, 0);
                m_cursorGrabBounds.m_l= m_cursorGrabBounds.m_r= -1; /* disable */
 -      }
 +      }\r
        return err;
++<<<<<<< .working\r
 +}\r
 +      \r
 +GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorShape(GHOST_TStandardCursor shape)\r
 +{\r
 +      if (m_customCursor) {\r
 +              [m_customCursor release];\r
 +              m_customCursor = nil;\r
 +      }\r
 +\r
 +      if ([m_window isVisible]) {\r
 +              loadCursor(getCursorVisibility(), shape);\r
 +      }\r
 +      \r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +/** Reverse the bits in a GHOST_TUns8\r
 +static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)\r
 +{\r
 +      ch= ((ch>>1)&0x55) | ((ch<<1)&0xAA);\r
 +      ch= ((ch>>2)&0x33) | ((ch<<2)&0xCC);\r
 +      ch= ((ch>>4)&0x0F) | ((ch<<4)&0xF0);\r
 +      return ch;\r
 +}\r
 +*/\r
 +\r
 +\r
 +/** Reverse the bits in a GHOST_TUns16 */\r
 +static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)\r
 +{\r
 +      shrt= ((shrt>>1)&0x5555) | ((shrt<<1)&0xAAAA);\r
 +      shrt= ((shrt>>2)&0x3333) | ((shrt<<2)&0xCCCC);\r
 +      shrt= ((shrt>>4)&0x0F0F) | ((shrt<<4)&0xF0F0);\r
 +      shrt= ((shrt>>8)&0x00FF) | ((shrt<<8)&0xFF00);\r
 +      return shrt;\r
 +}\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask,\r
 +                                      int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color)\r
 +{\r
 +      int y,nbUns16;\r
 +      NSPoint hotSpotPoint;\r
 +      NSBitmapImageRep *cursorImageRep;\r
 +      NSImage *cursorImage;\r
 +      NSSize imSize;\r
 +      GHOST_TUns16 *cursorBitmap;\r
 +      \r
 +      \r
 +      NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];\r
 +      \r
 +      if (m_customCursor) {\r
 +              [m_customCursor release];\r
 +              m_customCursor = nil;\r
 +      }\r
 +      \r
 +\r
 +      cursorImageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:nil\r
 +                                                                                                                       pixelsWide:sizex\r
 +                                                                                                                       pixelsHigh:sizey\r
 +                                                                                                                bitsPerSample:1 \r
 +                                                                                                              samplesPerPixel:2\r
 +                                                                                                                         hasAlpha:YES\r
 +                                                                                                                         isPlanar:YES\r
++=======\r
+ }
+       
+ GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorShape(GHOST_TStandardCursor shape)
+ {
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       if (m_customCursor) {
+               [m_customCursor release];
+               m_customCursor = nil;
+       }
+       if ([m_window isVisible]) {
+               loadCursor(getCursorVisibility(), shape);
+       }
+       
+       [pool drain];
+       return GHOST_kSuccess;
+ }
+ /** Reverse the bits in a GHOST_TUns8
+ static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
+ {
+       ch= ((ch>>1)&0x55) | ((ch<<1)&0xAA);
+       ch= ((ch>>2)&0x33) | ((ch<<2)&0xCC);
+       ch= ((ch>>4)&0x0F) | ((ch<<4)&0xF0);
+       return ch;
+ }
+ */
+ /** Reverse the bits in a GHOST_TUns16 */
+ static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
+ {
+       shrt= ((shrt>>1)&0x5555) | ((shrt<<1)&0xAAAA);
+       shrt= ((shrt>>2)&0x3333) | ((shrt<<2)&0xCCCC);
+       shrt= ((shrt>>4)&0x0F0F) | ((shrt<<4)&0xF0F0);
+       shrt= ((shrt>>8)&0x00FF) | ((shrt<<8)&0xFF00);
+       return shrt;
+ }
+ GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask,
+                                       int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color)
+ {
+       int y,nbUns16;
+       NSPoint hotSpotPoint;
+       NSBitmapImageRep *cursorImageRep;
+       NSImage *cursorImage;
+       NSSize imSize;
+       GHOST_TUns16 *cursorBitmap;
+       
+       
+       NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+       
+       if (m_customCursor) {
+               [m_customCursor release];
+               m_customCursor = nil;
+       }
+       
+       cursorImageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:nil
+                                                                                                                        pixelsWide:sizex
+                                                                                                                        pixelsHigh:sizey
+                                                                                                                 bitsPerSample:1 
+                                                                                                               samplesPerPixel:2
+                                                                                                                          hasAlpha:YES
+                                                                                                                          isPlanar:YES
++>>>>>>> .merge-right.r30358\r
                                                                                                                 colorSpaceName:NSDeviceWhiteColorSpace
 -                                                                                                                      bytesPerRow:(sizex/8 + (sizex%8 >0 ?1:0))
 -                                                                                                                 bitsPerPixel:1];
 -      
 -      
 -      cursorBitmap = (GHOST_TUns16*)[cursorImageRep bitmapData];
 -      nbUns16 = [cursorImageRep bytesPerPlane]/2;
 -      
 -      for (y=0; y<nbUns16; y++) {
 -#if !defined(__LITTLE_ENDIAN__)
 +                                                                                                                      bytesPerRow:(sizex/8 + (sizex%8 >0 ?1:0))\r
 +                                                                                                                 bitsPerPixel:1];\r
 +      \r
 +      \r
 +      cursorBitmap = (GHOST_TUns16*)[cursorImageRep bitmapData];\r
 +      nbUns16 = [cursorImageRep bytesPerPlane]/2;\r
 +      \r
 +      for (y=0; y<nbUns16; y++) {\r
 +#if !defined(__LITTLE_ENDIAN__)\r
                cursorBitmap[y] = ~uns16ReverseBits((bitmap[2*y]<<0) | (bitmap[2*y+1]<<8));
 -              cursorBitmap[nbUns16+y] = uns16ReverseBits((mask[2*y]<<0) | (mask[2*y+1]<<8));
 -#else
 +              cursorBitmap[nbUns16+y] = uns16ReverseBits((mask[2*y]<<0) | (mask[2*y+1]<<8));\r
 +#else\r
                cursorBitmap[y] = ~uns16ReverseBits((bitmap[2*y+1]<<0) | (bitmap[2*y]<<8));
 -              cursorBitmap[nbUns16+y] = uns16ReverseBits((mask[2*y+1]<<0) | (mask[2*y]<<8));
 -#endif
 -              
 -      }
 -      
 -      
 -      imSize.width = sizex;
 -      imSize.height= sizey;
 -      cursorImage = [[NSImage alloc] initWithSize:imSize];
 -      [cursorImage addRepresentation:cursorImageRep];
 -      
 -      hotSpotPoint.x = hotX;
 -      hotSpotPoint.y = hotY;
 -      
 -      //foreground and background color parameter is not handled for now (10.6)
 -      m_customCursor = [[NSCursor alloc] initWithImage:cursorImage
 -                                                                                       hotSpot:hotSpotPoint];
 -      
 -      [cursorImageRep release];
 -      [cursorImage release];
 -      
 -      if ([m_window isVisible]) {
 -              loadCursor(getCursorVisibility(), GHOST_kStandardCursorCustom);
 -      }
 -      [pool drain];
 -      return GHOST_kSuccess;
 -}
 -
 -GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], 
 -                                                                                              GHOST_TUns8 mask[16][2], int hotX, int hotY)
 -{
 -      return setWindowCustomCursorShape((GHOST_TUns8*)bitmap, (GHOST_TUns8*) mask, 16, 16, hotX, hotY, 0, 1);
 -}
 +              cursorBitmap[nbUns16+y] = uns16ReverseBits((mask[2*y+1]<<0) | (mask[2*y]<<8));\r
 +#endif\r
 +              \r
 +      }\r
 +      \r
 +      \r
 +      imSize.width = sizex;\r
 +      imSize.height= sizey;\r
 +      cursorImage = [[NSImage alloc] initWithSize:imSize];\r
 +      [cursorImage addRepresentation:cursorImageRep];\r
 +      \r
 +      hotSpotPoint.x = hotX;\r
 +      hotSpotPoint.y = hotY;\r
 +      \r
 +      //foreground and background color parameter is not handled for now (10.6)\r
 +      m_customCursor = [[NSCursor alloc] initWithImage:cursorImage\r
 +                                                                                       hotSpot:hotSpotPoint];\r
 +      \r
 +      [cursorImageRep release];\r
 +      [cursorImage release];\r
 +      \r
 +      if ([m_window isVisible]) {\r
 +              loadCursor(getCursorVisibility(), GHOST_kStandardCursorCustom);\r
 +      }\r
 +      [pool drain];\r
 +      return GHOST_kSuccess;\r
 +}\r
 +\r
 +GHOST_TSuccess GHOST_WindowCocoa::setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], \r
 +                                                                                              GHOST_TUns8 mask[16][2], int hotX, int hotY)\r
 +{\r
 +      return setWindowCustomCursorShape((GHOST_TUns8*)bitmap, (GHOST_TUns8*) mask, 16, 16, hotX, hotY, 0, 1);\r
 +}\r
@@@ -148,44 -144,12 +148,52 @@@ extern "C" 
        uintptr_t MEM_get_mapped_memory_in_use(void);
        int MEM_get_memory_blocks_in_use(void);
  
 -      /*reset the peak memory statistic to zero*/
 -      void MEM_reset_peak_memory(void);
 +/********* Internal structs.   They're only here for the MEM_OVERHEAD macro.*********/
 +
- /* --------------------------------------------------------------------- */
- /* Data definition                                                       */
- /* --------------------------------------------------------------------- */
++/*BMESH_TODO/XXX: note to self, don't merge this into trunk*/
++
 +/* all memory chunks are put in linked lists */
 +typedef struct localLink
 +{
 +      struct localLink *next,*prev;
 +} localLink;
 +
- typedef struct localListBase 
++typedef struct localListBase
 +{
 +      void *first, *last;
 +} localListBase;
 +
 +      /* note: keep this struct aligned (e.g., irix/gcc) - Hos */
 +typedef struct MemHead {
 +      int tag1;
-       int len;
++      size_t len;
 +      struct MemHead *next,*prev;
 +      const char * name;
 +      const char * nextname;
 +      int tag2;
 +      int mmap;       /* if true, memory was mmapped */
++#ifdef DEBUG_MEMCOUNTER
++      int _count;
++#endif
 +} MemHead;
 +
 +typedef struct MemTail {
 +      int tag3, tag4;
 +} MemTail;
 +
 +/*memory bias to hopefully account 
 +  for allocation overhead from
 +  the system allocator.*/
 +#define MEM_OVERHEADBIAS      32
 +
 +#define MEM_OVERHEAD  (sizeof(MemHead) + sizeof(MemTail) + MEM_OVERHEADBIAS)
 +
++/*reset the peak memory statistic to zero*/
++void MEM_reset_peak_memory(void);
 -      /*get the peak memory usage in bytes, including mmap allocations*/
 -      uintptr_t MEM_get_peak_memory(void);
++/*get the peak memory usage in bytes, including mmap allocations*/
++uintptr_t MEM_get_peak_memory(void);
  #ifdef __cplusplus
  }
  #endif
  
  #include "MEM_guardedalloc.h"
  
 -/* Only for debugging:
 - * lets you count the allocations so as to find the allocator of unfreed memory
 - * in situations where the leak is pradictable */
 -
 -// #define DEBUG_MEMCOUNTER
 -
 -#ifdef DEBUG_MEMCOUNTER
 -#define DEBUG_MEMCOUNTER_ERROR_VAL 0 /* set this to the value that isnt being freed */
 -static int _mallocn_count = 0;
 -
 -/* breakpoint here */
 -static void memcount_raise(const char *name)
 -{
 -      fprintf(stderr, "%s: memcount-leak, %d\n", name, _mallocn_count);
 -}
 -#endif
 -
+ /* --------------------------------------------------------------------- */
+ /* Data definition                                                       */
+ /* --------------------------------------------------------------------- */
 -/* all memory chunks are put in linked lists */
 -typedef struct localLink
 -{
 -      struct localLink *next,*prev;
 -} localLink;
 -
 -typedef struct localListBase 
 -{
 -      void *first, *last;
 -} localListBase;
 -
 -      /* note: keep this struct aligned (e.g., irix/gcc) - Hos */
 -typedef struct MemHead {
 -      int tag1;
 -      size_t len;
 -      struct MemHead *next,*prev;
 -      const char * name;
 -      const char * nextname;
 -      int tag2;
 -      int mmap;       /* if true, memory was mmapped */
 -#ifdef DEBUG_MEMCOUNTER
 -      int _count;
 -#endif
 -} MemHead;
 -
 -typedef struct MemTail {
 -      int tag3, pad;
 -} MemTail;
 -
  /* --------------------------------------------------------------------- */
  /* local functions                                                       */
  /* --------------------------------------------------------------------- */
@@@ -175,44 -231,44 +186,44 @@@ size_t MEM_allocN_len(void *vmemh
                return 0;
  }
  
- void *MEM_reallocN(void *vmemh, unsigned int len)
 -void *MEM_dupallocN(void *vmemh)
++void *MEM_reallocN(void *vmemh, size_t len)
  {
        void *newp= NULL;
        
        if (vmemh) {
                MemHead *memh= vmemh;
                memh--;
 -                      newp= MEM_mapallocN(memh->len, "dupli_mapalloc");
+               
+               if(memh->mmap)
 -                      newp= MEM_mallocN(memh->len, "dupli_alloc");
++                      newp= MEM_mapallocN(len, "dupli_mapalloc");
+               else
++                      newp= MEM_mallocN(len, "dupli_alloc");
  
-               newp= MEM_mallocN(len, memh->name);
-               if(newp) {
-                       if(len < memh->len)
-                               memcpy(newp, vmemh, len);
-                       else
-                               memcpy(newp, vmemh, memh->len);
-               }
+               if (newp == NULL) return NULL;
  
-               MEM_freeN(vmemh);
 -              memcpy(newp, vmemh, memh->len);
++              memcpy(newp, vmemh, len<=memh->len ? len : memh->len);
        }
  
        return newp;
  }
  
 -void *MEM_reallocN(void *vmemh, size_t len)
++
 +void *MEM_dupallocN(void *vmemh)
  {
        void *newp= NULL;
--      
++
        if (vmemh) {
                MemHead *memh= vmemh;
                memh--;
-               
 -              newp= MEM_mallocN(len, memh->name);
 -              if(newp) {
 -                      if(len < memh->len)
 -                              memcpy(newp, vmemh, len);
 -                      else
 -                              memcpy(newp, vmemh, memh->len);
 -              }
 +              if(memh->mmap)
 +                      newp= MEM_mapallocN(memh->len, "dupli_mapalloc");
 +              else
 +                      newp= MEM_mallocN(memh->len, "dupli_alloc");
 +
 +              if (newp == NULL) return NULL;
  
 -              MEM_freeN(vmemh);
 +              memcpy(newp, vmemh, memh->len);
        }
  
        return newp;
@@@ -311,7 -379,13 +324,8 @@@ void *MEM_mapallocN(size_t len, const c
                make_memhead_header(memh, len, str);
                memh->mmap= 1;
                mmap_in_use += len;
+               peak_mem = mmap_in_use > peak_mem ? mmap_in_use : peak_mem;
                mem_unlock_thread();
 -#ifdef DEBUG_MEMCOUNTER
 -              if(_mallocn_count==DEBUG_MEMCOUNTER_ERROR_VAL)
 -                      memcount_raise("MEM_mapallocN");
 -              memh->_count= _mallocn_count++;
 -#endif
                return (++memh);
        }
        else {
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\..\..\source\blender\python\generic\bpy_internal_import.c"\r
++<<<<<<< .working\r
++=======\r
+                                       RelativePath="..\..\..\source\blender\python\generic\blf_api.c"\r
                                        >\r
                                </File>\r
                                <File\r
-                                       RelativePath="..\..\..\source\blender\python\generic\euler.c"\r
++>>>>>>> .merge-right.r30358\r
+                                       RelativePath="..\..\..\source\blender\python\generic\bpy_internal_import.c"\r
                                        >\r
                                </File>\r
                                <File\r
                                        >\r
                                </File>\r
                        </Filter>\r
++<<<<<<< .working\r
++=======\r
+                       <Filter\r
+                               Name="generic"\r
+                               >\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\bgl.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\blf_api.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\bpy_internal_import.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\geometry.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\IDProp.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\mathutils.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\mathutils_color.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\mathutils_euler.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\mathutils_matrix.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\mathutils_quat.h"\r
+                                       >\r
+                               </File>\r
+                               <File\r
+                                       RelativePath="..\..\..\source\blender\python\generic\mathutils_vector.h"\r
+                                       >\r
+                               </File>\r
+                       </Filter>\r
++>>>>>>> .merge-right.r30358\r
                </Filter>\r
        </Files>\r
        <Globals>\r
@@@ -5,9 -5,9 +5,10 @@@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C
                {02110D03-59DB-4571-8787-72B3C03B2F2D} = {02110D03-59DB-4571-8787-72B3C03B2F2D}\r
                {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F} = {E5F2F004-C704-4DCC-A08F-6EB1E38EAB9F}\r
                {6E24BF09-9653-4166-A871-F65CC9E98A9B} = {6E24BF09-9653-4166-A871-F65CC9E98A9B}\r
 +              {6A51010A-9393-4D77-84B4-5BBCDA6E7C25} = {6A51010A-9393-4D77-84B4-5BBCDA6E7C25}\r
                {A90C4918-4B21-4277-93BD-AF65F30951D9} = {A90C4918-4B21-4277-93BD-AF65F30951D9}\r
                {FB88301F-F725-401B-ACD7-D2ABBF333B71} = {FB88301F-F725-401B-ACD7-D2ABBF333B71}\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC} = {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}\r
                {76D3102B-7DD2-8BA1-034A-8B19FE2897C2} = {76D3102B-7DD2-8BA1-034A-8B19FE2897C2}\r
                {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE} = {BAAE3F2B-BCF8-4E84-B8BA-CFB2D64945FE}\r
                {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8} = {C66F722C-46BE-40C9-ABAE-2EAC7A697EB8}\r
@@@ -367,8 -338,8 +369,13 @@@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C
  EndProject\r
  Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BF_collada", "collada\BF_collada.vcproj", "{76D3102B-7DD2-8BA1-034A-8B19FE2897C2}"\r
  EndProject\r
++<<<<<<< .working\r
 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BLF_blenfont", "blenfont\BLF_blenfont.vcproj", "{D1A9312F-4557-4982-A0F4-4D08508235F4}"\r
 +EndProject\r
++=======\r
+ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BL_modifiers", "modifiers\modifiers.vcproj", "{7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}"\r
+ EndProject\r
++>>>>>>> .merge-right.r30358\r
  Global\r
        GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
                3D Plugin Debug|Win32 = 3D Plugin Debug|Win32\r
                {76D3102B-7DD2-8BA1-034A-8B19FE2897C2}.Debug|Win32.Build.0 = Blender Debug|Win32\r
                {76D3102B-7DD2-8BA1-034A-8B19FE2897C2}.Release|Win32.ActiveCfg = Blender Release|Win32\r
                {76D3102B-7DD2-8BA1-034A-8B19FE2897C2}.Release|Win32.Build.0 = Blender Release|Win32\r
++<<<<<<< .working\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.3D Plugin Debug|Win32.ActiveCfg = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.3D Plugin Debug|Win32.Build.0 = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.3D Plugin Release|Win32.ActiveCfg = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.3D Plugin Release|Win32.Build.0 = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.3DPlugin Debug|Win32.ActiveCfg = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.3DPlugin Debug|Win32.Build.0 = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.3DPlugin Release|Win32.ActiveCfg = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.3DPlugin Release|Win32.Build.0 = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.Blender Debug|Win32.Build.0 = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.Blender Release|Win32.ActiveCfg = Blender Release|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.Blender Release|Win32.Build.0 = Blender Release|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.BlenderPlayer Debug|Win32.ActiveCfg = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.BlenderPlayer Debug|Win32.Build.0 = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.BlenderPlayer Release|Win32.ActiveCfg = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.BlenderPlayer Release|Win32.Build.0 = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.Debug|Win32.ActiveCfg = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.Debug|Win32.Build.0 = Blender Debug|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.Release|Win32.ActiveCfg = Blender Release|Win32\r
 +              {D1A9312F-4557-4982-A0F4-4D08508235F4}.Release|Win32.Build.0 = Blender Release|Win32\r
++=======\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3D Plugin Debug|Win32.ActiveCfg = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3D Plugin Debug|Win32.Build.0 = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3D Plugin Release|Win32.ActiveCfg = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3D Plugin Release|Win32.Build.0 = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3DPlugin Debug|Win32.ActiveCfg = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3DPlugin Debug|Win32.Build.0 = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3DPlugin Release|Win32.ActiveCfg = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.3DPlugin Release|Win32.Build.0 = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Blender Debug|Win32.ActiveCfg = Blender Debug|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Blender Debug|Win32.Build.0 = Blender Debug|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Blender Release|Win32.ActiveCfg = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Blender Release|Win32.Build.0 = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.BlenderPlayer Debug|Win32.ActiveCfg = BlenderPlayer Debug|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.BlenderPlayer Debug|Win32.Build.0 = BlenderPlayer Debug|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.BlenderPlayer Release|Win32.ActiveCfg = BlenderPlayer Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.BlenderPlayer Release|Win32.Build.0 = BlenderPlayer Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Debug|Win32.ActiveCfg = Blender Debug|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Debug|Win32.Build.0 = Blender Debug|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Release|Win32.ActiveCfg = Blender Release|Win32\r
+               {7CB0C521-91E0-40CE-A7C4-45FEA7ABE8BC}.Release|Win32.Build.0 = Blender Release|Win32\r
++>>>>>>> .merge-right.r30358\r
        EndGlobalSection\r
        GlobalSection(SolutionProperties) = preSolution\r
                HideSolutionNode = FALSE\r
++<<<<<<< .working
 +<?xml version="1.0" encoding="Windows-1252"?>
 +<VisualStudioProject
 +      ProjectType="Visual C++"
 +      Version="9.00"
 +      Name="blender"
 +      ProjectGUID="{F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}"
 +      RootNamespace="blender"
 +      TargetFrameworkVersion="131072"
 +      >
 +      <Platforms>
 +              <Platform
 +                      Name="Win32"
 +              />
 +      </Platforms>
 +      <ToolFiles>
 +      </ToolFiles>
 +      <Configurations>
 +              <Configuration
 +                      Name="Blender Release|Win32"
 +                      OutputDirectory="..\..\bin"
 +                      IntermediateDirectory="..\..\..\build\msvc_9\source\blender"
 +                      ConfigurationType="1"
 +                      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 +                      UseOfMFC="0"
 +                      ATLMinimizesCRunTimeLibraryUsage="false"
 +                      CharacterSet="2"
 +                      >
 +                      <Tool
 +                              Name="VCPreBuildEventTool"
 +                      />
 +                      <Tool
 +                              Name="VCCustomBuildTool"
 +                      />
 +                      <Tool
 +                              Name="VCXMLDataGeneratorTool"
 +                      />
 +                      <Tool
 +                              Name="VCWebServiceProxyGeneratorTool"
 +                      />
 +                      <Tool
 +                              Name="VCMIDLTool"
 +                              TypeLibraryName=".\..\..\obj\windows\blender/blender.tlb"
 +                      />
 +                      <Tool
 +                              Name="VCCLCompilerTool"
 +                              Optimization="2"
 +                              InlineFunctionExpansion="1"
 +                              AdditionalIncludeDirectories="..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\source\blender;..\..\source\blender\imbuf;..\..\source\blender\misc;..\..\source\blender\blenlib;..\..\source\blender\editors\include;..\..\source\blender\python;..\..\source\blender\windowmanager;..\..\source\blender\renderui;..\..\source\blender\makesdna;..\..\source\blender\makesrna;..\..\source\blender\blenkernel;..\..\source\blender\blenloader;..\..\source\blender\renderconverter;..\..\source\blender\render\extern\include;..\..\source\blender\radiosity\extern\include;..\..\source\kernel\gen_system;..\..\source\kernel\gen_messaging;..\..\..\build\msvc_9\extern\glew\include;..\..\source\blender\gpu;..\..\source\blender\bmesh"
 +                              PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;WITH_QUICKTIME;GAMEBLENDER=1;USE_SUMO_SOLID;FTGL_LIBRARY_STATIC"
 +                              StringPooling="true"
 +                              RuntimeLibrary="0"
 +                              EnableFunctionLevelLinking="true"
 +                              DefaultCharIsUnsigned="true"
 +                              UsePrecompiledHeader="0"
 +                              PrecompiledHeaderFile="..\..\..\build\msvc_9\source\blender\blender.pch"
 +                              AssemblerListingLocation="..\..\..\build\msvc_9\source\blender\"
 +                              ObjectFile="..\..\..\build\msvc_9\source\blender\"
 +                              ProgramDataBaseFileName="..\..\..\build\msvc_9\source\blender\"
 +                              WarningLevel="2"
 +                              SuppressStartupBanner="true"
 +                              CompileAs="0"
 +                      />
 +                      <Tool
 +                              Name="VCManagedResourceCompilerTool"
 +                      />
 +                      <Tool
 +                              Name="VCResourceCompilerTool"
 +                              PreprocessorDefinitions="NDEBUG"
 +                              Culture="0"
 +                      />
 +                      <Tool
 +                              Name="VCPreLinkEventTool"
 +                      />
 +                      <Tool
 +                              Name="VCLinkerTool"
 +                              AdditionalOptions="/MACHINE:I386"
 +                              AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib libsndfile-1.lib OpenCOLLADABaseUtils.lib OpenCOLLADAFramework.lib OpenCOLLADAStreamWriter.lib OpenCOLLADASaxFrameworkLoader.lib pcre.lib UTF.lib GeneratedSaxParser.lib MathMLSolver.lib xml2.lib"
 +                              ShowProgress="0"
 +                              OutputFile="..\..\..\install\msvc_9\blender.exe"
 +                              LinkIncremental="1"
 +                              SuppressStartupBanner="true"
 +                              AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_9\libs\intern;..\..\..\build\msvc_9\libs\extern;..\..\..\lib\windows\ffmpeg\lib;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib;..\..\..\lib\windows\opencollada\lib;..\..\..\build\msvc_9\libs"
 +                              IgnoreAllDefaultLibraries="false"
 +                              IgnoreDefaultLibraryNames="msvcprt.lib;glut32.lib;libc.lib;libcd.lib;libcpd.lib;libcp.lib;libcmtd.lib;odbc32.lib;odbccp32.lib"
 +                              GenerateDebugInformation="true"
 +                              ProgramDatabaseFile="..\..\..\build\msvc_9\libs\blender.pdb"
 +                              SubSystem="1"
 +                              RandomizedBaseAddress="1"
 +                              DataExecutionPrevention="0"
 +                      />
 +                      <Tool
 +                              Name="VCALinkTool"
 +                      />
 +                      <Tool
 +                              Name="VCManifestTool"
 +                      />
 +                      <Tool
 +                              Name="VCXDCMakeTool"
 +                      />
 +                      <Tool
 +                              Name="VCBscMakeTool"
 +                      />
 +                      <Tool
 +                              Name="VCFxCopTool"
 +                      />
 +                      <Tool
 +                              Name="VCAppVerifierTool"
 +                      />
 +                      <Tool
 +                              Name="VCPostBuildEventTool"
 +                              CommandLine="ECHO Moving libraries and export definitions...&#x0D;&#x0A;MOVE /Y ..\..\bin\blender.lib ..\..\..\build\msvc_9\libs&#x0D;&#x0A;MOVE /Y ..\..\bin\blender.exp ..\..\..\build\msvc_9\libs&#x0D;&#x0A;ECHO Copying required 3rd party dlls...&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\python\lib\python31.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\zlib\lib\zlib.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sndfile\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;ECHO Copying language folder&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9\.blender MKDIR ..\..\..\install\msvc_9\.blender&#x0D;&#x0A;XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9\.blender /E&#x0D;&#x0A;ECHO Copying python scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9\.blender\scripts MKDIR ..\..\..\install\msvc_9\.blender\scripts&#x0D;&#x0A;XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9\.blender\scripts /E&#x0D;&#x0A;ECHO Copying python ui scripts&#x0D;&#x0A;IF NOT EXIST ..\..\bin\.blender\ui MKDIR ..\..\..\install\msvc_9\.blender\ui&#x0D;&#x0A;XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9\.blender\ui /E&#x0D;&#x0A;ECHO Copying manuals/text&#x0D;&#x0A;XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9 /E&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
 +                      />
 +              </Configuration>
 +              <Configuration
 +                      Name="Blender Debug|Win32"
 +                      OutputDirectory="..\..\bin\debug"
 +                      IntermediateDirectory="..\..\..\build\msvc_9\source\blender\debug"
 +                      ConfigurationType="1"
 +                      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 +                      UseOfMFC="0"
 +                      ATLMinimizesCRunTimeLibraryUsage="false"
 +                      CharacterSet="2"
 +                      DeleteExtensionsOnClean="*.obj;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;$(TargetPath)"
 +                      >
 +                      <Tool
 +                              Name="VCPreBuildEventTool"
 +                      />
 +                      <Tool
 +                              Name="VCCustomBuildTool"
 +                      />
 +                      <Tool
 +                              Name="VCXMLDataGeneratorTool"
 +                      />
 +                      <Tool
 +                              Name="VCWebServiceProxyGeneratorTool"
 +                      />
 +                      <Tool
 +                              Name="VCMIDLTool"
 +                              TypeLibraryName=".\..\..\obj\windows\blender\debug/blender.tlb"
 +                      />
 +                      <Tool
 +                              Name="VCCLCompilerTool"
 +                              Optimization="0"
 +                              AdditionalIncludeDirectories="..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\source\blender;..\..\source\blender\imbuf;..\..\source\blender\misc;..\..\source\blender\blenlib;..\..\source\blender\editors\include;..\..\source\blender\python;..\..\source\blender\windowmanager;..\..\source\blender\renderui;..\..\source\blender\makesdna;..\..\source\blender\makesrna;..\..\source\blender\blenkernel;..\..\source\blender\blenloader;..\..\source\blender\renderconverter;..\..\source\blender\render\extern\include;..\..\source\blender\radiosity\extern\include;..\..\source\kernel\gen_system;..\..\source\kernel\gen_messaging;..\..\..\build\msvc_9\extern\glew\include;..\..\source\blender\gpu;..\..\source\blender\bmesh"
 +                              PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;WITH_QUICKTIME"
 +                              BasicRuntimeChecks="3"
 +                              RuntimeLibrary="1"
 +                              UsePrecompiledHeader="0"
 +                              PrecompiledHeaderFile="..\..\..\build\msvc_9\source\blender\debug\blender.pch"
 +                              AssemblerListingLocation="..\..\..\build\msvc_9\source\blender\debug\"
 +                              ObjectFile="..\..\..\build\msvc_9\source\blender\debug\"
 +                              ProgramDataBaseFileName="..\..\..\build\msvc_9\source\blender\debug\"
 +                              WarningLevel="3"
 +                              SuppressStartupBanner="true"
 +                              DebugInformationFormat="3"
 +                              CompileAs="0"
 +                      />
 +                      <Tool
 +                              Name="VCManagedResourceCompilerTool"
 +                      />
 +                      <Tool
 +                              Name="VCResourceCompilerTool"
 +                              PreprocessorDefinitions="_DEBUG"
 +                              Culture="1033"
 +                      />
 +                      <Tool
 +                              Name="VCPreLinkEventTool"
 +                      />
 +                      <Tool
 +                              Name="VCLinkerTool"
 +                              AdditionalOptions="/MACHINE:I386&#x0D;&#x0A;"
 +                              AdditionalDependencies="libsamplerate.lib SDL.lib gnu_gettext.lib qtmlClient.lib OpenAL32.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib libsndfile-1.lib OpenCOLLADABaseUtils_d.lib OpenCOLLADAFramework_d.lib OpenCOLLADAStreamWriter_d.lib OpenCOLLADASaxFrameworkLoader_d.lib pcre_d.lib UTF_d.lib GeneratedSaxParser_d.lib MathMLSolver_d.lib xml2_d.lib freetype237MT_D.lib"
 +                              ShowProgress="0"
 +                              OutputFile="..\..\..\install\msvc_9d\blender.exe"
 +                              LinkIncremental="2"
 +                              SuppressStartupBanner="true"
 +                              AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_9\libs\intern\debug;..\..\..\build\msvc_9\libs\extern\debug;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib;..\..\..\lib\windows\opencollada\lib"
 +                              IgnoreAllDefaultLibraries="false"
 +                              IgnoreDefaultLibraryNames=""
 +                              GenerateDebugInformation="true"
 +                              ProgramDatabaseFile="..\..\..\build\msvc_9\libs\debug\blender.pdb"
 +                              SubSystem="1"
 +                              RandomizedBaseAddress="1"
 +                              DataExecutionPrevention="0"
 +                      />
 +                      <Tool
 +                              Name="VCALinkTool"
 +                      />
 +                      <Tool
 +                              Name="VCManifestTool"
 +                      />
 +                      <Tool
 +                              Name="VCXDCMakeTool"
 +                      />
 +                      <Tool
 +                              Name="VCBscMakeTool"
 +                      />
 +                      <Tool
 +                              Name="VCFxCopTool"
 +                      />
 +                      <Tool
 +                              Name="VCAppVerifierTool"
 +                      />
 +                      <Tool
 +                              Name="VCPostBuildEventTool"
 +                              CommandLine="ECHO Copying required 3rd party dlls...&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\python\lib\python31_d.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;COPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9d\python31_d.zip&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\zlib\lib\zlib.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\CRTL\lib\msvcrtd.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sndfile\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;ECHO Copying language folder&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender MKDIR ..\..\..\install\msvc_9d\.blender&#x0D;&#x0A;XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9d\.blender /E&#x0D;&#x0A;ECHO Copying python scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender\scripts MKDIR ..\..\..\install\msvc_9d\.blender\scripts&#x0D;&#x0A;XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9d\.blender\scripts /E&#x0D;&#x0A;ECHO Copying python ui scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender\ui MKDIR ..\..\..\install\msvc_9d\.blender\ui&#x0D;&#x0A;XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9d\.blender\ui /E&#x0D;&#x0A;ECHO Copying manuals/text&#x0D;&#x0A;XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9d /E&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"
 +                      />
 +              </Configuration>
 +      </Configurations>
 +      <References>
 +      </References>
 +      <Files>
 +              <Filter
 +                      Name="Resource Files"
 +                      Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
 +                      >
 +                      <File
 +                              RelativePath="..\..\source\icons\winblender.ico"
 +                              >
 +                      </File>
 +                      <File
 +                              RelativePath="..\..\source\icons\winblenderfile.ico"
 +                              >
 +                      </File>
 +              </Filter>
 +              <Filter
 +                      Name="Header Files"
 +                      Filter="h;hpp;hxx;hm;inl"
 +                      >
 +              </Filter>
 +              <Filter
 +                      Name="Source Files"
 +                      Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
 +                      >
 +                      <File
 +                              RelativePath="..\..\source\creator\buildinfo.c"
 +                              >
 +                      </File>
 +                      <File
 +                              RelativePath="..\..\source\creator\creator.c"
 +                              >
 +                      </File>
 +                      <File
 +                              RelativePath="..\..\source\icons\winblender.rc"
 +                              >
 +                              <FileConfiguration
 +                                      Name="Blender Release|Win32"
 +                                      >
 +                                      <Tool
 +                                              Name="VCResourceCompilerTool"
 +                                              AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
 +                                      />
 +                              </FileConfiguration>
 +                              <FileConfiguration
 +                                      Name="Blender Debug|Win32"
 +                                      >
 +                                      <Tool
 +                                              Name="VCResourceCompilerTool"
 +                                              AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"
 +                                      />
 +                              </FileConfiguration>
 +                      </File>
 +              </Filter>
 +      </Files>
 +      <Globals>
 +      </Globals>
 +</VisualStudioProject>
++=======
+ <?xml version="1.0" encoding="Windows-1252"?>\r
+ <VisualStudioProject\r
+       ProjectType="Visual C++"\r
+       Version="9,00"\r
+       Name="blender"\r
+       ProjectGUID="{F78B7FC9-DE32-465E-9F26-BB0B6B7A2EAF}"\r
+       RootNamespace="blender"\r
+       TargetFrameworkVersion="131072"\r
+       >\r
+       <Platforms>\r
+               <Platform\r
+                       Name="Win32"\r
+               />\r
+       </Platforms>\r
+       <ToolFiles>\r
+       </ToolFiles>\r
+       <Configurations>\r
+               <Configuration\r
+                       Name="Blender Release|Win32"\r
+                       OutputDirectory="..\..\bin"\r
+                       IntermediateDirectory="..\..\..\build\msvc_9\source\blender"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\..\..\obj\windows\blender/blender.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="2"\r
+                               InlineFunctionExpansion="1"\r
+                               AdditionalIncludeDirectories="..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\source\blender;..\..\source\blender\imbuf;..\..\source\blender\misc;..\..\source\blender\blenlib;..\..\source\blender\editors\include;..\..\source\blender\python;..\..\source\blender\windowmanager;..\..\source\blender\renderui;..\..\source\blender\makesdna;..\..\source\blender\makesrna;..\..\source\blender\blenkernel;..\..\source\blender\blenloader;..\..\source\blender\renderconverter;..\..\source\blender\render\extern\include;..\..\source\blender\radiosity\extern\include;..\..\source\kernel\gen_system;..\..\source\kernel\gen_messaging;..\..\..\build\msvc_9\extern\glew\include;..\..\source\blender\gpu;..\..\..\lib\windows\pthreads\include"\r
+                               PreprocessorDefinitions="NDEBUG;WIN32;_CONSOLE;WITH_QUICKTIME;GAMEBLENDER=1;USE_SUMO_SOLID;FTGL_LIBRARY_STATIC;WITH_LZMA;WITH_LZO"\r
+                               StringPooling="true"\r
+                               RuntimeLibrary="0"\r
+                               EnableFunctionLevelLinking="true"\r
+                               DefaultCharIsUnsigned="true"\r
+                               UsePrecompiledHeader="0"\r
+                               PrecompiledHeaderFile="..\..\..\build\msvc_9\source\blender\blender.pch"\r
+                               AssemblerListingLocation="..\..\..\build\msvc_9\source\blender\"\r
+                               ObjectFile="..\..\..\build\msvc_9\source\blender\"\r
+                               ProgramDataBaseFileName="..\..\..\build\msvc_9\source\blender\"\r
+                               WarningLevel="2"\r
+                               SuppressStartupBanner="true"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="NDEBUG"\r
+                               Culture="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/MACHINE:I386"\r
+                               AdditionalDependencies="libsamplerate.lib SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half.lib Iex.lib IlmImf.lib Imath.lib IlmThread.lib avcodec-52.lib avformat-52.lib avutil-50.lib swscale-0.lib avdevice-52.lib libsndfile-1.lib OpenCOLLADABaseUtils.lib OpenCOLLADAFramework.lib OpenCOLLADAStreamWriter.lib OpenCOLLADASaxFrameworkLoader.lib pcre.lib GeneratedSaxParser.lib MathMLSolver.lib xml2.lib buffer.lib ftoa.lib"\r
+                               ShowProgress="0"\r
+                               OutputFile="..\..\..\install\msvc_9\blender.exe"\r
+                               LinkIncremental="1"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\build\msvc_9\libs\intern;..\..\..\build\msvc_9\libs\extern;..\..\..\lib\windows\ffmpeg\lib;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib;..\..\..\lib\windows\opencollada\lib;..\..\..\lib\windows\jack\lib"\r
+                               IgnoreAllDefaultLibraries="false"\r
+                               IgnoreDefaultLibraryNames="msvcprt.lib;glut32.lib;libc.lib;libcd.lib;libcpd.lib;libcp.lib;libcmtd.lib;odbc32.lib;odbccp32.lib"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="..\..\..\build\msvc_9\libs\blender.pdb"\r
+                               SubSystem="1"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="ECHO Moving libraries and export definitions...&#x0D;&#x0A;MOVE /Y ..\..\bin\blender.lib ..\..\..\build\msvc_9\libs&#x0D;&#x0A;MOVE /Y ..\..\bin\blender.exp ..\..\..\build\msvc_9\libs&#x0D;&#x0A;ECHO Copying required 3rd party dlls...&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\python\lib\python31.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\zlib\lib\zlib.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\jack\lib\libjack.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sndfile\lib\*.dll ..\..\..\install\msvc_9&#x0D;&#x0A;ECHO Copying language folder&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9\.blender MKDIR ..\..\..\install\msvc_9\.blender&#x0D;&#x0A;XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9\.blender /E&#x0D;&#x0A;ECHO Copying python scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9\.blender\scripts MKDIR ..\..\..\install\msvc_9\.blender\scripts&#x0D;&#x0A;XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9\.blender\scripts /E&#x0D;&#x0A;ECHO Copying python ui scripts&#x0D;&#x0A;IF NOT EXIST ..\..\bin\.blender\ui MKDIR ..\..\..\install\msvc_9\.blender\ui&#x0D;&#x0A;XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9\.blender\ui /E&#x0D;&#x0A;ECHO Copying manuals/text&#x0D;&#x0A;XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9 /E&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"\r
+                       />\r
+               </Configuration>\r
+               <Configuration\r
+                       Name="Blender Debug|Win32"\r
+                       OutputDirectory="..\..\bin\debug"\r
+                       IntermediateDirectory="..\..\..\build\msvc_9\source\blender\debug"\r
+                       ConfigurationType="1"\r
+                       InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"\r
+                       UseOfMFC="0"\r
+                       ATLMinimizesCRunTimeLibraryUsage="false"\r
+                       CharacterSet="2"\r
+                       DeleteExtensionsOnClean="*.obj;*.pdb;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.bat;$(TargetPath)"\r
+                       >\r
+                       <Tool\r
+                               Name="VCPreBuildEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCustomBuildTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXMLDataGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCWebServiceProxyGeneratorTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCMIDLTool"\r
+                               TypeLibraryName=".\..\..\obj\windows\blender\debug/blender.tlb"\r
+                       />\r
+                       <Tool\r
+                               Name="VCCLCompilerTool"\r
+                               Optimization="0"\r
+                               AdditionalIncludeDirectories="..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\source\blender;..\..\source\blender\imbuf;..\..\source\blender\misc;..\..\source\blender\blenlib;..\..\source\blender\editors\include;..\..\source\blender\python;..\..\source\blender\windowmanager;..\..\source\blender\renderui;..\..\source\blender\makesdna;..\..\source\blender\makesrna;..\..\source\blender\blenkernel;..\..\source\blender\blenloader;..\..\source\blender\renderconverter;..\..\source\blender\render\extern\include;..\..\source\blender\radiosity\extern\include;..\..\source\kernel\gen_system;..\..\source\kernel\gen_messaging;..\..\..\build\msvc_9\extern\glew\include;..\..\source\blender\gpu;..\..\..\lib\windows\pthreads\include"\r
+                               PreprocessorDefinitions="_DEBUG;WIN32;_CONSOLE;WITH_QUICKTIME;WITH_LZMA;WITH_LZO"\r
+                               BasicRuntimeChecks="3"\r
+                               RuntimeLibrary="1"\r
+                               UsePrecompiledHeader="0"\r
+                               PrecompiledHeaderFile="..\..\..\build\msvc_9\source\blender\debug\blender.pch"\r
+                               AssemblerListingLocation="..\..\..\build\msvc_9\source\blender\debug\"\r
+                               ObjectFile="..\..\..\build\msvc_9\source\blender\debug\"\r
+                               ProgramDataBaseFileName="..\..\..\build\msvc_9\source\blender\debug\"\r
+                               WarningLevel="3"\r
+                               SuppressStartupBanner="true"\r
+                               DebugInformationFormat="3"\r
+                               CompileAs="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManagedResourceCompilerTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCResourceCompilerTool"\r
+                               PreprocessorDefinitions="_DEBUG"\r
+                               Culture="1033"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPreLinkEventTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCLinkerTool"\r
+                               AdditionalOptions="/MACHINE:I386&#x0D;&#x0A;"\r
+                               AdditionalDependencies="SDL.lib freetype2ST.lib gnu_gettext.lib qtmlClient.lib wrap_oal.lib ws2_32.lib dxguid.lib opengl32.lib libjpeg.lib glu32.lib vfw32.lib winmm.lib libpng_st.lib zlib.lib python31_d.lib pthreadVSE2.lib pthreadVC2.lib libtiff.lib Half_d.lib Iex_d.lib Imath_d.lib IlmImf_d.lib IlmThread_d.lib avcodec-52.lib avformat-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib libsndfile-1.lib libsamplerate.lib libjack.lib OpenCOLLADABaseUtils_d.lib OpenCOLLADAFramework_d.lib OpenCOLLADAStreamWriter_d.lib OpenCOLLADASaxFrameworkLoader_d.lib pcre_d.lib GeneratedSaxParser_d.lib MathMLSolver_d.lib xml2_d.lib buffer_d.lib ftoa_d.lib"\r
+                               ShowProgress="0"\r
+                               OutputFile="..\..\..\install\msvc_9d\blender.exe"\r
+                               LinkIncremental="2"\r
+                               SuppressStartupBanner="true"\r
+                               AdditionalLibraryDirectories="..\..\..\lib\windows\sdl\lib;..\..\..\lib\windows\ode\lib;..\..\..\lib\windows\zlib\lib;..\..\..\lib\windows\png\lib;..\..\..\lib\windows\jpeg\lib;..\..\..\lib\windows\pthreads\lib;..\..\..\lib\windows\tiff\lib;..\..\..\lib\windows\gettext\lib;..\..\..\lib\windows\freetype\lib;..\..\..\lib\windows\python\lib;..\..\..\lib\windows\openal\lib;..\..\..\lib\windows\openexr\lib_vs2008;..\..\..\lib\windows\QTDevWin\Libraries;..\..\..\lib\windows\ffmpeg\lib;..\..\..\build\msvc_9\libs\intern\debug;..\..\..\build\msvc_9\libs\extern\debug;..\..\..\lib\windows\samplerate\lib;..\..\..\lib\windows\sndfile\lib;..\..\..\lib\windows\opencollada\lib;..\..\..\lib\windows\jack\lib"\r
+                               IgnoreDefaultLibraryNames="libc.lib, libcmt.lib, msvcrt.lib, libcd.lib, odbc32.lib, odbccp32.lib"\r
+                               GenerateDebugInformation="true"\r
+                               ProgramDatabaseFile="..\..\..\build\msvc_9\libs\debug\blender.pdb"\r
+                               SubSystem="1"\r
+                               RandomizedBaseAddress="1"\r
+                               DataExecutionPrevention="0"\r
+                       />\r
+                       <Tool\r
+                               Name="VCALinkTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCManifestTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCXDCMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCBscMakeTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCFxCopTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCAppVerifierTool"\r
+                       />\r
+                       <Tool\r
+                               Name="VCPostBuildEventTool"\r
+                               CommandLine="ECHO Copying required 3rd party dlls...&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\gettext\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sdl\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\python\lib\python31_d.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;COPY /Y ..\..\..\lib\windows\release\python31.zip ..\..\..\install\msvc_9d\python31_d.zip&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\zlib\lib\zlib.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\wrap_oal.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\openal\lib\OpenAL32.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\jack\lib\libjack.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\CRTL\lib\msvcrtd.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\tiff\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\pthreads\lib\pthreadVSE2.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\ffmpeg\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;XCOPY /Y ..\..\..\lib\windows\sndfile\lib\*.dll ..\..\..\install\msvc_9d&#x0D;&#x0A;ECHO Copying language folder&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender MKDIR ..\..\..\install\msvc_9d\.blender&#x0D;&#x0A;XCOPY /Y ..\..\bin\.blender ..\..\..\install\msvc_9d\.blender /E&#x0D;&#x0A;ECHO Copying python scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender\scripts MKDIR ..\..\..\install\msvc_9d\.blender\scripts&#x0D;&#x0A;XCOPY /Y ..\..\release\scripts ..\..\..\install\msvc_9d\.blender\scripts /E&#x0D;&#x0A;ECHO Copying python ui scripts&#x0D;&#x0A;IF NOT EXIST ..\..\..\install\msvc_9d\.blender\ui MKDIR ..\..\..\install\msvc_9d\.blender\ui&#x0D;&#x0A;XCOPY /Y ..\..\release\ui ..\..\..\install\msvc_9d\.blender\ui /E&#x0D;&#x0A;ECHO Copying manuals/text&#x0D;&#x0A;XCOPY/Y ..\..\release\text ..\..\..\install\msvc_9d /E&#x0D;&#x0A;ECHO Done&#x0D;&#x0A;"\r
+                       />\r
+               </Configuration>\r
+       </Configurations>\r
+       <References>\r
+       </References>\r
+       <Files>\r
+               <Filter\r
+                       Name="Resource Files"\r
+                       Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\source\icons\winblender.ico"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\source\icons\winblenderfile.ico"\r
+                               >\r
+                       </File>\r
+               </Filter>\r
+               <Filter\r
+                       Name="Header Files"\r
+                       Filter="h;hpp;hxx;hm;inl"\r
+                       >\r
+               </Filter>\r
+               <Filter\r
+                       Name="Source Files"\r
+                       Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"\r
+                       >\r
+                       <File\r
+                               RelativePath="..\..\source\creator\buildinfo.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\source\creator\creator.c"\r
+                               >\r
+                       </File>\r
+                       <File\r
+                               RelativePath="..\..\source\icons\winblender.rc"\r
+                               >\r
+                               <FileConfiguration\r
+                                       Name="Blender Release|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCResourceCompilerTool"\r
+                                               AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"\r
+                                       />\r
+                               </FileConfiguration>\r
+                               <FileConfiguration\r
+                                       Name="Blender Debug|Win32"\r
+                                       >\r
+                                       <Tool\r
+                                               Name="VCResourceCompilerTool"\r
+                                               AdditionalIncludeDirectories="\blenderdev\blender.test2\source\icons;$(NoInherit)"\r
+                                       />\r
+                               </FileConfiguration>\r
+                       </File>\r
+               </Filter>\r
+       </Files>\r
+       <Globals>\r
+       </Globals>\r
+ </VisualStudioProject>\r
++>>>>>>> .merge-right.r30358
                        <Tool\r
                                Name="VCCLCompilerTool"\r
                                Optimization="0"\r
++<<<<<<< .working\r
 +                              AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager;..\..\..\source\blender\bmesh"\r
++=======\r
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\modifiers;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"\r
++>>>>>>> .merge-right.r30358\r
                                PreprocessorDefinitions="_DEBUG;WIN32;_LIB;WITH_OPENEXR;WITH_DDS;WITH_BULLET;WITH_FFMPEG;GLEW_STATIC"\r
                                BasicRuntimeChecks="3"\r
                                RuntimeLibrary="1"\r
                                Name="VCCLCompilerTool"\r
                                Optimization="2"\r
                                InlineFunctionExpansion="1"\r
++<<<<<<< .working\r
 +                              AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager;..\..\..\source\blender\bmesh"\r
++=======\r
+                               AdditionalIncludeDirectories="..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\python\include\python3.1;..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\sdl\include;..\..\..\..\lib\windows\ffmpeg\include;..\..\..\..\lib\windows\ffmpeg\include\msvc;..\..\..\..\build\msvc_9\intern\bmfont\include;..\..\..\..\build\msvc_9\intern\bsp\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\..\build\msvc_9\intern\decimation\include;..\..\..\..\build\msvc_9\intern\elbeem\include;..\..\..\..\build\msvc_9\intern\iksolver\include;..\..\..\..\build\msvc_9\intern\memutil\include;..\..\..\..\build\msvc_9\intern\smoke\include;..\..\..\source\blender;..\..\..\source\blender\avi;..\..\..\source\blender\imbuf;..\..\..\source\blender\editors\include;..\..\..\source\blender\python;..\..\..\source\blender\blenlib;..\..\..\source\blender\blenkernel;..\..\..\source\blender\makesdna;..\..\..\source\blender\makesrna;..\..\..\source\blender\modifiers;..\..\..\source\blender\nodes;..\..\..\source\blender\blenloader;..\..\..\source\kernel\gen_system;..\..\..\source\blender\renderconverter;..\..\..\source\blender\render\extern\include;..\..\..\source\gameengine\SoundSystem;..\..\..\..\build\msvc_9\extern\verse\include;..\..\..\..\build\msvc_9\intern\opennl\include;..\..\..\..\build\msvc_9\extern\bullet\include;..\..\..\..\build\msvc_9\extern\glew\include;..\..\..\source\blender\gpu;..\..\..\intern\audaspace\intern;..\..\..\extern\lzo\minilzo;..\..\..\extern\lzma;..\..\..\source\blender\blenfont;..\..\..\source\blender\ikplugin;..\..\..\source\blender\windowmanager"\r
++>>>>>>> .merge-right.r30358\r
                                PreprocessorDefinitions="NDEBUG;WIN32;_LIB;UNWRAPPER;WITH_OPENEXR;WITH_DDS;WITH_BULLET=1;WITH_FFMPEG;GLEW_STATIC"\r
                                StringPooling="true"\r
                                RuntimeLibrary="0"\r
++<<<<<<< .working
 +<?xml version="1.0" encoding="Windows-1252"?>
 +<VisualStudioProject
 +      ProjectType="Visual C++"
 +      Version="9.00"
 +      Name="BLI_blenlib"
 +      ProjectGUID="{31628053-825D-4C06-8A21-D13883489718}"
 +      RootNamespace="BLI_blenlib"
 +      TargetFrameworkVersion="131072"
 +      >
 +      <Platforms>
 +              <Platform
 +                      Name="Win32"
 +              />
 +      </Platforms>
 +      <ToolFiles>
 +      </ToolFiles>
 +      <Configurations>
 +              <Configuration
 +                      Name="3D Plugin Release|Win32"
 +                      OutputDirectory="..\..\..\..\build\msvc_9\source\blender\blenlib\mtdll"
 +                      IntermediateDirectory="..\..\..\..\build\msvc_9\source\blender\blenlib\mtdll"
 +                      ConfigurationType="4"
 +                      InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
 +                      UseOfMFC="0"
 +                      ATLMinimizesCRunTimeLibraryUsage="false"
 +                      CharacterSet="2"
 +                      >
 +                      <Tool
 +                              Name="VCPreBuildEventTool"
 +                      />
 +                      <Tool
 +                              Name="VCCustomBuildTool"
 +                      />
 +                      <Tool
 +                              Name="VCXMLDataGeneratorTool"
 +                      />
 +                      <Tool
 +                              Name="VCWebServiceProxyGeneratorTool"
 +                      />
 +                      <Tool
 +                              Name="VCMIDLTool"
 +                      />
 +                      <Tool
 +                              Name="VCCLCompilerTool"
 +                              InlineFunctionExpansion="1"
 +                              AdditionalIncludeDirectories="..\..\..\..\lib\windows\zlib\include;..\..\..\..\lib\windows\pthreads\include;..\..\..\..\lib\windows\freetype\include;..\..\..\..\build\msvc_9\intern\guardedalloc\include;..\..\..\source\blender\include;..\..\..\source\blender\blenlib;..\..\..\source\blender\python;..\..\..\source\blender\makesdna;..\..\..\source\blender\blenkernel;..\..\..\source\blender\gpu"\r
 +                              PreprocessorDefinitions="NDEBUG,WIN32,_LIB"
 +                              StringPooling="true"
 +                              RuntimeLibrary="2"
 +                              EnableFunctionLevelLinking="true"
 +                              DefaultCharIsUnsigned="true"
 +                              UsePrecompiledHeader="0"
 +                              PrecompiledHeaderFile="..\..\..\..\build\msvc_9\source\blender\blenlib\mtdll\BLI_blenlib.pch"
 +                              AssemblerListingLocation="..\..\..\..\build\msvc_9\source\blender\blenlib\mtdll\"
 +                              ObjectFile="..\..\..\..\build\msvc_9\source\blender\blenlib\mtdll\"
 +                              ProgramDataBaseFi