summaryrefslogtreecommitdiffstats
path: root/tools/objectsnapper
diff options
context:
space:
mode:
Diffstat (limited to 'tools/objectsnapper')
-rw-r--r--tools/objectsnapper/build/Debug/objectsnapper.log8
-rw-r--r--tools/objectsnapper/build/objectsnapper.dsp295
-rw-r--r--tools/objectsnapper/build/objectsnapper.vcproj347
-rw-r--r--tools/objectsnapper/build/objectsnapper.vcxproj228
-rw-r--r--tools/objectsnapper/build/objectsnapper.vcxproj.filters92
-rw-r--r--tools/objectsnapper/code/commands/snapselected.cpp435
-rw-r--r--tools/objectsnapper/code/commands/snapselected.h59
-rw-r--r--tools/objectsnapper/code/main/mayaincludes.h49
-rw-r--r--tools/objectsnapper/code/main/pluginMain.cpp76
-rw-r--r--tools/objectsnapper/code/main/pluginMain.h40
-rw-r--r--tools/objectsnapper/code/main/stdafx.h19
-rw-r--r--tools/objectsnapper/code/precompiled/PCH.cpp1
-rw-r--r--tools/objectsnapper/code/precompiled/PCH.h50
-rw-r--r--tools/objectsnapper/code/scripts/os_cleanup.mel3
-rw-r--r--tools/objectsnapper/code/scripts/os_main.mel228
15 files changed, 1930 insertions, 0 deletions
diff --git a/tools/objectsnapper/build/Debug/objectsnapper.log b/tools/objectsnapper/build/Debug/objectsnapper.log
new file mode 100644
index 0000000..d96726d
--- /dev/null
+++ b/tools/objectsnapper/build/Debug/objectsnapper.log
@@ -0,0 +1,8 @@
+Build started 11/7/2015 5:44:23 PM.
+ 1>Project "G:\Code\Simpsons Hit&Run\tools\objectsnapper\build\objectsnapper.vcxproj" on node 6 (Build target(s)).
+ 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppBuild.targets(369,5): error MSB8031: Building an MFC project for a non-Unicode character set is deprecated. You must change the project property to Unicode or download an additional library. See http://go.microsoft.com/fwlink/p/?LinkId=286820 for more information.
+ 1>Done Building Project "G:\Code\Simpsons Hit&Run\tools\objectsnapper\build\objectsnapper.vcxproj" (Build target(s)) -- FAILED.
+
+Build FAILED.
+
+Time Elapsed 00:00:00.66
diff --git a/tools/objectsnapper/build/objectsnapper.dsp b/tools/objectsnapper/build/objectsnapper.dsp
new file mode 100644
index 0000000..8506a0f
--- /dev/null
+++ b/tools/objectsnapper/build/objectsnapper.dsp
@@ -0,0 +1,295 @@
+# Microsoft Developer Studio Project File - Name="objectsnapper" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 60000
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Application" 0x0101
+
+CFG=objectsnapper - Win32 Tools Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "objectsnapper.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "objectsnapper.mak" CFG="objectsnapper - Win32 Tools Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "objectsnapper - Win32 Tools Release" (based on "Win32 (x86) Application")
+!MESSAGE "objectsnapper - Win32 Tools Debug" (based on "Win32 (x86) Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName "objectsnapper"
+# PROP Scc_LocalPath "."
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "objectsnapper - Win32 Tools Release"
+
+# PROP BASE Use_MFC 2
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "objectsnapper___Win32_Tools_Release"
+# PROP BASE Intermediate_Dir "objectsnapper___Win32_Tools_Release"
+# PROP BASE Ignore_Export_Lib 1
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 2
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\code\\" /I "C:\AW\Maya4.0\include" /I "..\..\..\game\libs\pure3d\toollib\inc" /I "..\..\..\game\libs\pure3d\toollib\chunks16\inc" /I "." /I "..\..\..\game\libs\pure3d\constants" /D "_WIN32" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NT_PLUGIN" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\game\libs\pure3d\sdks\Maya4_0\include\\" /I "..\code\\" /I "..\..\..\game\libs\pure3d\toollib\inc" /I "..\..\..\game\libs\pure3d\toollib\chunks16\inc" /I "." /I "..\..\..\game\libs\pure3d\constants" /I "..\..\globalcode" /I "..\..\..\game\libs\radmath" /D "_WIN32" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NT_PLUGIN" /D "RAD_WIN32" /D "RAD_PC" /D "RAD_RELEASE" /YX /FD /c
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x1009 /d "NDEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 user32.lib gdi32.lib glu32.lib version.lib Foundation.lib OpenGL32.lib OpenMaya.lib OpenMayaFX.lib OpenMayaRender.lib OpenMayaUI.lib OpenMayaAnim.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release\objectsnapper.mll" /libpath:"C:\AW\Maya4.0\lib" /export:initializePlugin /export:uninitializePlugin
+# ADD LINK32 user32.lib gdi32.lib glu32.lib version.lib Foundation.lib OpenGL32.lib OpenMaya.lib OpenMayaFX.lib OpenMayaRender.lib OpenMayaUI.lib OpenMayaAnim.lib /nologo /subsystem:windows /dll /machine:I386 /out:"Release\objectsnapper.mll" /libpath:"..\..\..\game\libs\pure3d\sdks\Maya4_0\lib" /export:initializePlugin /export:uninitializePlugin
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Copy trackeditor.mll to Distribution and Maya dir.
+PostBuild_Cmds=copy .\Release\objectsnapper.mll ..\..\MayaTools\Maya4.0\bin\plug-ins\objectsnapper.mll copy .\Release\objectsnapper.mll C:\AW\Maya4.0\bin\plug-ins\objectsnapper.mll
+# End Special Build Tool
+
+!ELSEIF "$(CFG)" == "objectsnapper - Win32 Tools Debug"
+
+# PROP BASE Use_MFC 2
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "objectsnapper___Win32_Tools_Debug"
+# PROP BASE Intermediate_Dir "objectsnapper___Win32_Tools_Debug"
+# PROP BASE Ignore_Export_Lib 1
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 2
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 1
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\code\\" /I "C:\AW\Maya4.0\include" /I "..\..\..\game\libs\pure3d\toollib\inc" /I "..\..\..\game\libs\pure3d\toollib\chunks16\inc" /I "." /I "..\..\..\game\libs\pure3d\constants" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NT_PLUGIN" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\code\\" /I "..\..\..\game\libs\pure3d\toollib\inc" /I "..\..\..\game\libs\pure3d\toollib\chunks16\inc" /I "." /I "..\..\..\game\libs\pure3d\constants" /I "..\..\globalcode" /I "..\..\..\game\libs\radmath" /I "..\..\..\game\libs\pure3d\sdks\Maya4_0\include\\" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_AFXDLL" /D "_MBCS" /D "NT_PLUGIN" /D "RAD_WIN32" /D "RAD_PC" /D "RAD_DEBUG" /FR /YX /FD /GZ /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL"
+# ADD RSC /l 0x1009 /d "_DEBUG" /d "_AFXDLL"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 user32.lib gdi32.lib glu32.lib version.lib Foundation.lib OpenGL32.lib OpenMaya.lib OpenMayaFX.lib OpenMayaRender.lib OpenMayaUI.lib OpenMayaAnim.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug\objectsnapper.mll" /pdbtype:sept /libpath:"C:\AW\Maya4.0\lib" /export:initializePlugin /export:uninitializePlugin
+# ADD LINK32 user32.lib gdi32.lib glu32.lib version.lib Foundation.lib OpenGL32.lib OpenMaya.lib OpenMayaFX.lib OpenMayaRender.lib OpenMayaUI.lib OpenMayaAnim.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"Debug\objectsnapper.mll" /pdbtype:sept /libpath:"..\..\..\game\libs\pure3d\sdks\Maya4_0\lib" /export:initializePlugin /export:uninitializePlugin
+# Begin Special Build Tool
+SOURCE="$(InputPath)"
+PostBuild_Desc=Copy trackeditor.mll to Distribution and Maya dir.
+PostBuild_Cmds=copy .\Debug\objectsnapper.mll C:\AW\Maya4.0\bin\plug-ins\objectsnapperd.mll
+# End Special Build Tool
+
+!ENDIF
+
+# Begin Target
+
+# Name "objectsnapper - Win32 Tools Release"
+# Name "objectsnapper - Win32 Tools Debug"
+# Begin Group "main"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\code\main\mayaincludes.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\code\main\pluginMain.cpp
+# ADD CPP /YX"precompiled\PCH.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\code\main\pluginMain.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\code\main\stdafx.h
+# End Source File
+# End Group
+# Begin Group "mel scripts"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\code\scripts\os_cleanup.mel
+
+!IF "$(CFG)" == "objectsnapper - Win32 Tools Release"
+
+# Begin Custom Build - Copy $(InputPath) to Maya (dist and install)
+InputPath=..\code\scripts\os_cleanup.mel
+InputName=os_cleanup
+
+BuildCmds= \
+ copy $(InputPath) C:\AW\Maya4.0\scripts\others\$(InputName).mel \
+ copy $(InputPath) ..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel \
+
+
+"C:\AW\Maya4.0\scripts\others\$(InputName).mel" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "objectsnapper - Win32 Tools Debug"
+
+# Begin Custom Build - Copy $(InputPath) to Maya (dist and install)
+InputPath=..\code\scripts\os_cleanup.mel
+InputName=os_cleanup
+
+BuildCmds= \
+ copy $(InputPath) C:\AW\Maya4.0\scripts\others\$(InputName).mel \
+ copy $(InputPath) ..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel \
+
+
+"C:\AW\Maya4.0\scripts\others\$(InputName).mel" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\code\scripts\os_main.mel
+
+!IF "$(CFG)" == "objectsnapper - Win32 Tools Release"
+
+# Begin Custom Build - Copy $(InputPath) to Maya (dist and install)
+InputPath=..\code\scripts\os_main.mel
+InputName=os_main
+
+BuildCmds= \
+ copy $(InputPath) C:\AW\Maya4.0\scripts\others\$(InputName).mel \
+ copy $(InputPath) ..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel \
+
+
+"C:\AW\Maya4.0\scripts\others\$(InputName).mel" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "objectsnapper - Win32 Tools Debug"
+
+# Begin Custom Build - Copy $(InputPath) to Maya (dist and install)
+InputPath=..\code\scripts\os_main.mel
+InputName=os_main
+
+BuildCmds= \
+ copy $(InputPath) C:\AW\Maya4.0\scripts\others\$(InputName).mel \
+ copy $(InputPath) ..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel \
+
+
+"C:\AW\Maya4.0\scripts\others\$(InputName).mel" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "commands"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\code\commands\snapselected.cpp
+# ADD CPP /YX"precompiled\PCH.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\code\commands\snapselected.h
+# End Source File
+# End Group
+# Begin Group "utility"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\mayahandles.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\mayahandles.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\MExt.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\MExt.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\MExt_template.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\MExt_template.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\MUI.cpp
+# ADD CPP /YX"precompiled\PCH.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\MUI.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\util.c
+# ADD CPP /YX"precompiled\PCH.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\util.h
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\winutil.c
+# ADD CPP /YX"precompiled\PCH.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\globalcode\utility\winutil.h
+# End Source File
+# End Group
+# Begin Group "precompiled header"
+
+# PROP Default_Filter ""
+# Begin Source File
+
+SOURCE=..\code\precompiled\PCH.cpp
+# ADD CPP /Yc"PCH.h"
+# End Source File
+# Begin Source File
+
+SOURCE=..\code\precompiled\PCH.h
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/tools/objectsnapper/build/objectsnapper.vcproj b/tools/objectsnapper/build/objectsnapper.vcproj
new file mode 100644
index 0000000..26a8685
--- /dev/null
+++ b/tools/objectsnapper/build/objectsnapper.vcproj
@@ -0,0 +1,347 @@
+<?xml version="1.0" encoding = "Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.00"
+ Name="objectsnapper"
+ SccProjectName="Perforce Project"
+ SccAuxPath=""
+ SccLocalPath="."
+ SccProvider="MSSCCI:Perforce SCM"
+ Keyword="MFCProj">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Tools Release|Win32"
+ OutputDirectory=".\Release"
+ IntermediateDirectory=".\Release"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ InlineFunctionExpansion="1"
+ OptimizeForWindowsApplication="TRUE"
+ AdditionalIncludeDirectories="..\..\..\game\libs\pure3d\sdks\Maya4_0\include\,..\code\,..\..\..\game\libs\pure3d\toollib\inc,..\..\..\game\libs\pure3d\toollib\chunks16\inc,.,..\..\..\game\libs\pure3d\constants,..\..\globalcode,..\..\..\game\libs\radmath"
+ PreprocessorDefinitions="_WIN32;NDEBUG;WIN32;_WINDOWS;NT_PLUGIN;RAD_WIN32;RAD_PC;RAD_RELEASE"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Release/objectsnapper.pch"
+ AssemblerListingLocation=".\Release/"
+ ObjectFile=".\Release/"
+ ProgramDataBaseFileName=".\Release/"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalOptions="/MACHINE:I386 /EXPORT:initializePlugin /EXPORT:uninitializePlugin"
+ AdditionalDependencies="user32.lib gdi32.lib glu32.lib version.lib Foundation.lib OpenGL32.lib OpenMaya.lib OpenMayaUI.lib OpenMayaFX.lib OpenMayaRender.lib OpenMayaAnim.lib"
+ OutputFile="Release\objectsnapper.mll"
+ LinkIncremental="1"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\game\libs\pure3d\sdks\Maya4_0\lib"
+ IgnoreDefaultLibraryNames="LIBC.lib;LIBCMT.lib;LIBCPMT.lib"
+ ProgramDatabaseFile=".\Release/objectsnapper.pdb"
+ SubSystem="2"
+ ImportLibrary=".\Release/objectsnapper.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="NDEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Release/objectsnapper.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy trackeditor.mll to Distribution and Maya dir."
+ CommandLine="copy .\Release\objectsnapper.mll ..\..\MayaTools\Maya4.0\bin\plug-ins\objectsnapper.mll
+copy .\Release\objectsnapper.mll C:\AW\Maya4.0\bin\plug-ins\objectsnapper.mll
+"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;NDEBUG"
+ Culture="4105"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ <Configuration
+ Name="Tools Debug|Win32"
+ OutputDirectory=".\Debug"
+ IntermediateDirectory=".\Debug"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="..\code\,..\..\..\game\libs\pure3d\toollib\inc,..\..\..\game\libs\pure3d\toollib\chunks16\inc,.,..\..\..\game\libs\pure3d\constants,..\..\globalcode,..\..\..\game\libs\radmath,..\..\..\game\libs\pure3d\sdks\Maya4_0\include\"
+ PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;NT_PLUGIN;RAD_WIN32;RAD_PC;RAD_DEBUG"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="2"
+ PrecompiledHeaderFile=".\Debug/objectsnapper.pch"
+ AssemblerListingLocation=".\Debug/"
+ ObjectFile=".\Debug/"
+ ProgramDataBaseFileName=".\Debug/"
+ BrowseInformation="1"
+ WarningLevel="3"
+ SuppressStartupBanner="TRUE"
+ DebugInformationFormat="4"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLinkerTool"
+ IgnoreImportLibrary="TRUE"
+ AdditionalOptions="/MACHINE:I386"
+ AdditionalDependencies="user32.lib gdi32.lib glu32.lib version.lib Foundation.lib OpenGL32.lib OpenMaya.lib OpenMayaFX.lib OpenMayaRender.lib OpenMayaUI.lib OpenMayaAnim.lib"
+ OutputFile="Debug\objectsnapper.mll"
+ LinkIncremental="2"
+ SuppressStartupBanner="TRUE"
+ AdditionalLibraryDirectories="..\..\..\game\libs\pure3d\sdks\Maya4_0\lib"
+ GenerateDebugInformation="TRUE"
+ ProgramDatabaseFile=".\Debug/objectsnapper.pdb"
+ SubSystem="2"
+ ImportLibrary=".\Debug/objectsnapper.lib"/>
+ <Tool
+ Name="VCMIDLTool"
+ PreprocessorDefinitions="_DEBUG"
+ MkTypLibCompatible="TRUE"
+ SuppressStartupBanner="TRUE"
+ TargetEnvironment="1"
+ TypeLibraryName=".\Debug/objectsnapper.tlb"/>
+ <Tool
+ Name="VCPostBuildEventTool"
+ Description="Copy trackeditor.mll to Distribution and Maya dir."
+ CommandLine="copy .\Debug\objectsnapper.mll C:\AW\Maya4.0\bin\plug-ins\objectsnapperd.mll"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_AFXDLL;_DEBUG"
+ Culture="4105"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCWebDeploymentTool"/>
+ </Configuration>
+ </Configurations>
+ <Files>
+ <Filter
+ Name="main"
+ Filter="">
+ <File
+ RelativePath="..\code\main\mayaincludes.h">
+ </File>
+ <File
+ RelativePath="..\code\main\pluginMain.cpp">
+ <FileConfiguration
+ Name="Tools Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Tools Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\code\main\pluginMain.h">
+ </File>
+ <File
+ RelativePath="..\code\main\stdafx.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="mel scripts"
+ Filter="">
+ <File
+ RelativePath="..\code\scripts\os_cleanup.mel">
+ <FileConfiguration
+ Name="Tools Release|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Copy $(InputPath) to Maya (dist and install)"
+ CommandLine="copy &quot;$(InputPath)&quot; &quot;C:\AW\Maya4.0\scripts\others\$(InputName).mel&quot;
+copy &quot;$(InputPath)&quot; &quot;..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel&quot;"
+ Outputs="C:\AW\Maya4.0\scripts\others\$(InputName).mel;..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Tools Debug|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Copy $(InputPath) to Maya (dist and install)"
+ CommandLine="copy &quot;$(InputPath)&quot; &quot;C:\AW\Maya4.0\scripts\others\$(InputName).mel&quot;
+copy &quot;$(InputPath)&quot; &quot;..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel&quot;"
+ Outputs="C:\AW\Maya4.0\scripts\others\$(InputName).mel;..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\code\scripts\os_main.mel">
+ <FileConfiguration
+ Name="Tools Release|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Copy $(InputPath) to Maya (dist and install)"
+ CommandLine="copy &quot;$(InputPath)&quot; &quot;C:\AW\Maya4.0\scripts\others\$(InputName).mel&quot;
+copy &quot;$(InputPath)&quot; &quot;..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel&quot;"
+ Outputs="C:\AW\Maya4.0\scripts\others\$(InputName).mel;..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Tools Debug|Win32">
+ <Tool
+ Name="VCCustomBuildTool"
+ Description="Copy $(InputPath) to Maya (dist and install)"
+ CommandLine="copy &quot;$(InputPath)&quot; &quot;C:\AW\Maya4.0\scripts\others\$(InputName).mel&quot;
+copy &quot;$(InputPath)&quot; &quot;..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel&quot;"
+ Outputs="C:\AW\Maya4.0\scripts\others\$(InputName).mel;..\..\MayaTools\Maya4.0\scripts\others\$(InputName).mel"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="commands"
+ Filter="">
+ <File
+ RelativePath="..\code\commands\snapselected.cpp">
+ <FileConfiguration
+ Name="Tools Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Tools Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\code\commands\snapselected.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="utility"
+ Filter="">
+ <File
+ RelativePath="..\..\globalcode\utility\MExt.cpp">
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\MExt.h">
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\MExt_template.cpp">
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\MExt_template.h">
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\MUI.cpp">
+ <FileConfiguration
+ Name="Tools Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Tools Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\MUI.h">
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\mayahandles.cpp">
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\mayahandles.h">
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\util.c">
+ <FileConfiguration
+ Name="Tools Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Tools Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\util.h">
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\winutil.c">
+ <FileConfiguration
+ Name="Tools Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Tools Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ PrecompiledHeaderThrough="precompiled\PCH.h"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\globalcode\utility\winutil.h">
+ </File>
+ </Filter>
+ <Filter
+ Name="precompiled header"
+ Filter="">
+ <File
+ RelativePath="..\code\precompiled\PCH.cpp">
+ <FileConfiguration
+ Name="Tools Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="PCH.h"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Tools Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ PrecompiledHeaderThrough="PCH.h"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\code\precompiled\PCH.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/tools/objectsnapper/build/objectsnapper.vcxproj b/tools/objectsnapper/build/objectsnapper.vcxproj
new file mode 100644
index 0000000..f174963
--- /dev/null
+++ b/tools/objectsnapper/build/objectsnapper.vcxproj
@@ -0,0 +1,228 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Tools Debug|Win32">
+ <Configuration>Tools Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Tools Release|Win32">
+ <Configuration>Tools Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <SccProjectName>
+ </SccProjectName>
+ <SccAuxPath />
+ <SccLocalPath>
+ </SccLocalPath>
+ <SccProvider>
+ </SccProvider>
+ <Keyword>MFCProj</Keyword>
+ <ProjectGuid>{278283D0-FEC2-4B06-8AED-8DDB745215B4}</ProjectGuid>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'" Label="Configuration">
+ <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <PlatformToolset>v120</PlatformToolset>
+ <UseOfMfc>Dynamic</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup>
+ <_ProjectFileVersion>12.0.21005.1</_ProjectFileVersion>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">
+ <OutDir>.\Release\</OutDir>
+ <IntDir>.\Release\</IntDir>
+ <IgnoreImportLibrary>true</IgnoreImportLibrary>
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">
+ <OutDir>.\Debug\</OutDir>
+ <IntDir>.\Debug\</IntDir>
+ <IgnoreImportLibrary>true</IgnoreImportLibrary>
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">
+ <ClCompile>
+ <InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
+ <AdditionalIncludeDirectories>..\..\..\game\libs\pure3d\sdks\Maya4_0\include\;..\code\;..\..\..\game\libs\pure3d\toollib\inc;..\..\..\game\libs\pure3d\toollib\chunks16\inc;.;..\..\..\game\libs\pure3d\constants;..\..\globalcode;..\..\..\game\libs\radmath;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_WIN32;NDEBUG;WIN32;_WINDOWS;NT_PLUGIN;RAD_WIN32;RAD_PC;RAD_RELEASE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <StringPooling>true</StringPooling>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <PrecompiledHeader />
+ <PrecompiledHeaderOutputFile>.\Release/objectsnapper.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Release/</AssemblerListingLocation>
+ <ObjectFileName>.\Release/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Release/</ProgramDataBaseFileName>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 /EXPORT:initializePlugin /EXPORT:uninitializePlugin %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>user32.lib;gdi32.lib;glu32.lib;version.lib;Foundation.lib;OpenGL32.lib;OpenMaya.lib;OpenMayaUI.lib;OpenMayaFX.lib;OpenMayaRender.lib;OpenMayaAnim.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>Release\objectsnapper.mll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalLibraryDirectories>..\..\..\game\libs\pure3d\sdks\Maya4_0\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <IgnoreSpecificDefaultLibraries>LIBC.lib;LIBCMT.lib;LIBCPMT.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
+ <ProgramDatabaseFile>.\Release/objectsnapper.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>.\Release/objectsnapper.lib</ImportLibrary>
+ </Link>
+ <Midl>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Release/objectsnapper.tlb</TypeLibraryName>
+ </Midl>
+ <PostBuildEvent>
+ <Message>Copy trackeditor.mll to Distribution and Maya dir.</Message>
+ <Command>copy .\Release\objectsnapper.mll ..\..\MayaTools\Maya4.0\bin\plug-ins\objectsnapper.mll
+copy .\Release\objectsnapper.mll C:\AW\Maya4.0\bin\plug-ins\objectsnapper.mll
+</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_AFXDLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x1009</Culture>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">
+ <ClCompile>
+ <Optimization>Disabled</Optimization>
+ <AdditionalIncludeDirectories>..\code\;..\..\..\game\libs\pure3d\toollib\inc;..\..\..\game\libs\pure3d\toollib\chunks16\inc;.;..\..\..\game\libs\pure3d\constants;..\..\globalcode;..\..\..\game\libs\radmath;..\..\..\game\libs\pure3d\sdks\Maya4_0\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <PreprocessorDefinitions>_DEBUG;WIN32;_WINDOWS;NT_PLUGIN;RAD_WIN32;RAD_PC;RAD_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+ <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+ <PrecompiledHeader />
+ <PrecompiledHeaderOutputFile>.\Debug/objectsnapper.pch</PrecompiledHeaderOutputFile>
+ <AssemblerListingLocation>.\Debug/</AssemblerListingLocation>
+ <ObjectFileName>.\Debug/</ObjectFileName>
+ <ProgramDataBaseFileName>.\Debug/</ProgramDataBaseFileName>
+ <BrowseInformation>true</BrowseInformation>
+ <WarningLevel>Level3</WarningLevel>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <CompileAs>Default</CompileAs>
+ </ClCompile>
+ <Link>
+ <AdditionalOptions>/MACHINE:I386 %(AdditionalOptions)</AdditionalOptions>
+ <AdditionalDependencies>user32.lib;gdi32.lib;glu32.lib;version.lib;Foundation.lib;OpenGL32.lib;OpenMaya.lib;OpenMayaFX.lib;OpenMayaRender.lib;OpenMayaUI.lib;OpenMayaAnim.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <OutputFile>Debug\objectsnapper.mll</OutputFile>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <AdditionalLibraryDirectories>..\..\..\game\libs\pure3d\sdks\Maya4_0\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <ProgramDatabaseFile>.\Debug/objectsnapper.pdb</ProgramDatabaseFile>
+ <SubSystem>Windows</SubSystem>
+ <ImportLibrary>.\Debug/objectsnapper.lib</ImportLibrary>
+ </Link>
+ <Midl>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <MkTypLibCompatible>true</MkTypLibCompatible>
+ <SuppressStartupBanner>true</SuppressStartupBanner>
+ <TargetEnvironment>Win32</TargetEnvironment>
+ <TypeLibraryName>.\Debug/objectsnapper.tlb</TypeLibraryName>
+ </Midl>
+ <PostBuildEvent>
+ <Message>Copy trackeditor.mll to Distribution and Maya dir.</Message>
+ <Command>copy .\Debug\objectsnapper.mll C:\AW\Maya4.0\bin\plug-ins\objectsnapperd.mll</Command>
+ </PostBuildEvent>
+ <ResourceCompile>
+ <PreprocessorDefinitions>_AFXDLL;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <Culture>0x1009</Culture>
+ </ResourceCompile>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClInclude Include="..\code\main\mayaincludes.h" />
+ <ClInclude Include="..\code\main\pluginMain.h" />
+ <ClInclude Include="..\code\main\stdafx.h" />
+ <ClInclude Include="..\code\commands\snapselected.h" />
+ <ClInclude Include="..\..\globalcode\utility\MExt.h" />
+ <ClInclude Include="..\..\globalcode\utility\MExt_template.h" />
+ <ClInclude Include="..\..\globalcode\utility\MUI.h" />
+ <ClInclude Include="..\..\globalcode\utility\mayahandles.h" />
+ <ClInclude Include="..\..\globalcode\utility\util.h" />
+ <ClInclude Include="..\..\globalcode\utility\winutil.h" />
+ <ClInclude Include="..\code\precompiled\PCH.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\code\main\pluginMain.cpp">
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="..\code\commands\snapselected.cpp">
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\MExt.cpp" />
+ <ClCompile Include="..\..\globalcode\utility\MExt_template.cpp" />
+ <ClCompile Include="..\..\globalcode\utility\MUI.cpp">
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\mayahandles.cpp" />
+ <ClCompile Include="..\..\globalcode\utility\util.c">
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\winutil.c">
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">precompiled\PCH.h</PrecompiledHeaderFile>
+ </ClCompile>
+ <ClCompile Include="..\code\precompiled\PCH.cpp">
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">PCH.h</PrecompiledHeaderFile>
+ <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">Create</PrecompiledHeader>
+ <PrecompiledHeaderFile Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">PCH.h</PrecompiledHeaderFile>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\code\scripts\os_cleanup.mel">
+ <Message Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">Copy %(FullPath) to Maya (dist and install)</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">copy "%(FullPath)" "C:\AW\Maya4.0\scripts\others\%(Filename).mel"
+copy "%(FullPath)" "..\..\MayaTools\Maya4.0\scripts\others\%(Filename).mel"</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">C:\AW\Maya4.0\scripts\others\%(Filename).mel;..\..\MayaTools\Maya4.0\scripts\others\%(Filename).mel;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">Copy %(FullPath) to Maya (dist and install)</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">copy "%(FullPath)" "C:\AW\Maya4.0\scripts\others\%(Filename).mel"
+copy "%(FullPath)" "..\..\MayaTools\Maya4.0\scripts\others\%(Filename).mel"</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">C:\AW\Maya4.0\scripts\others\%(Filename).mel;..\..\MayaTools\Maya4.0\scripts\others\%(Filename).mel;%(Outputs)</Outputs>
+ </CustomBuild>
+ <CustomBuild Include="..\code\scripts\os_main.mel">
+ <Message Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">Copy %(FullPath) to Maya (dist and install)</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">copy "%(FullPath)" "C:\AW\Maya4.0\scripts\others\%(Filename).mel"
+copy "%(FullPath)" "..\..\MayaTools\Maya4.0\scripts\others\%(Filename).mel"</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Tools Debug|Win32'">C:\AW\Maya4.0\scripts\others\%(Filename).mel;..\..\MayaTools\Maya4.0\scripts\others\%(Filename).mel;%(Outputs)</Outputs>
+ <Message Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">Copy %(FullPath) to Maya (dist and install)</Message>
+ <Command Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">copy "%(FullPath)" "C:\AW\Maya4.0\scripts\others\%(Filename).mel"
+copy "%(FullPath)" "..\..\MayaTools\Maya4.0\scripts\others\%(Filename).mel"</Command>
+ <Outputs Condition="'$(Configuration)|$(Platform)'=='Tools Release|Win32'">C:\AW\Maya4.0\scripts\others\%(Filename).mel;..\..\MayaTools\Maya4.0\scripts\others\%(Filename).mel;%(Outputs)</Outputs>
+ </CustomBuild>
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\game\libs\pure3d\toollib\toollib_extras.vcxproj">
+ <Project>{cdb92e4a-1e5d-49a8-8153-34264b3fef29}</Project>
+ <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+ </ProjectReference>
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project> \ No newline at end of file
diff --git a/tools/objectsnapper/build/objectsnapper.vcxproj.filters b/tools/objectsnapper/build/objectsnapper.vcxproj.filters
new file mode 100644
index 0000000..a5e3f99
--- /dev/null
+++ b/tools/objectsnapper/build/objectsnapper.vcxproj.filters
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="main">
+ <UniqueIdentifier>{63629421-51a6-4cb5-92ec-c9b7b0171f2c}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="mel scripts">
+ <UniqueIdentifier>{6b7682fb-ce25-4823-b2de-c37177e8f8ab}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="commands">
+ <UniqueIdentifier>{a320b2f6-fc00-42dd-8379-fbfa8f7e1c5a}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="utility">
+ <UniqueIdentifier>{ad0a5a1d-fa73-4b0a-995e-ad7c04385634}</UniqueIdentifier>
+ </Filter>
+ <Filter Include="precompiled header">
+ <UniqueIdentifier>{ceba181d-db94-4612-8b9c-7698e86ea53e}</UniqueIdentifier>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="..\code\main\mayaincludes.h">
+ <Filter>main</Filter>
+ </ClInclude>
+ <ClInclude Include="..\code\main\pluginMain.h">
+ <Filter>main</Filter>
+ </ClInclude>
+ <ClInclude Include="..\code\main\stdafx.h">
+ <Filter>main</Filter>
+ </ClInclude>
+ <ClInclude Include="..\code\commands\snapselected.h">
+ <Filter>commands</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\globalcode\utility\MExt.h">
+ <Filter>utility</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\globalcode\utility\MExt_template.h">
+ <Filter>utility</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\globalcode\utility\MUI.h">
+ <Filter>utility</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\globalcode\utility\mayahandles.h">
+ <Filter>utility</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\globalcode\utility\util.h">
+ <Filter>utility</Filter>
+ </ClInclude>
+ <ClInclude Include="..\..\globalcode\utility\winutil.h">
+ <Filter>utility</Filter>
+ </ClInclude>
+ <ClInclude Include="..\code\precompiled\PCH.h">
+ <Filter>precompiled header</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="..\code\main\pluginMain.cpp">
+ <Filter>main</Filter>
+ </ClCompile>
+ <ClCompile Include="..\code\commands\snapselected.cpp">
+ <Filter>commands</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\MExt.cpp">
+ <Filter>utility</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\MExt_template.cpp">
+ <Filter>utility</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\MUI.cpp">
+ <Filter>utility</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\mayahandles.cpp">
+ <Filter>utility</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\util.c">
+ <Filter>utility</Filter>
+ </ClCompile>
+ <ClCompile Include="..\..\globalcode\utility\winutil.c">
+ <Filter>utility</Filter>
+ </ClCompile>
+ <ClCompile Include="..\code\precompiled\PCH.cpp">
+ <Filter>precompiled header</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <CustomBuild Include="..\code\scripts\os_cleanup.mel">
+ <Filter>mel scripts</Filter>
+ </CustomBuild>
+ <CustomBuild Include="..\code\scripts\os_main.mel">
+ <Filter>mel scripts</Filter>
+ </CustomBuild>
+ </ItemGroup>
+</Project> \ No newline at end of file
diff --git a/tools/objectsnapper/code/commands/snapselected.cpp b/tools/objectsnapper/code/commands/snapselected.cpp
new file mode 100644
index 0000000..e6ab048
--- /dev/null
+++ b/tools/objectsnapper/code/commands/snapselected.cpp
@@ -0,0 +1,435 @@
+//=============================================================================
+// Copyright (C) 2002 Radical Entertainment Ltd. All rights reserved.
+//
+// File:
+//
+// Description: Implement SnapSelectedCmd
+//
+// History: 18/03/2002 + Created -- Cary Brisebois
+//
+//=============================================================================
+
+//========================================
+// System Includes
+//========================================
+// Foundation Tech
+
+//========================================
+// Project Includes
+//========================================
+#include "snapselected.h"
+#include "utility/MUI.h"
+#include "utility/mext.h"
+
+
+//******************************************************************************
+//
+// Global Data, Local Data, Local Classes
+//
+//******************************************************************************
+
+const char* SnapSelectedCmd::stringId = "OS_SnapSelected";
+const double OSScale = 100.0;
+
+enum SnapType
+{
+ ALL,
+ SINGLE,
+ TREELINE
+};
+
+//******************************************************************************
+//
+// Public Member Functions
+//
+//******************************************************************************
+
+//==============================================================================
+// SnapSelectedCmd::SnapSelectedCmd
+//==============================================================================
+// Description: Constructor.
+//
+// Parameters: None.
+//
+// Return: N/A.
+//
+//==============================================================================
+SnapSelectedCmd::SnapSelectedCmd()
+{
+ mObjDagPaths.clear();
+ mNewPositions.clear();
+ mOldPositions.clear();
+}
+
+//==============================================================================
+// SnapSelectedCmd::~SnapSelectedCmd
+//==============================================================================
+// Description: Destructor.
+//
+// Parameters: None.
+//
+// Return: N/A.
+//
+//==============================================================================
+SnapSelectedCmd::~SnapSelectedCmd()
+{
+}
+
+//==============================================================================
+// SnapSelectedCmd::creator
+//==============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: void
+//
+//==============================================================================
+void* SnapSelectedCmd::creator()
+{
+ return new SnapSelectedCmd();
+}
+
+//==============================================================================
+// SnapSelectedCmd::doit
+//==============================================================================
+// Description: Comment
+//
+// Parameters: ( const MArgList& args )
+//
+// Return: MStatus
+//
+//==============================================================================
+MStatus SnapSelectedCmd::doIt( const MArgList& args )
+{
+ if ( !MUI::ConfirmDialog( "Are you sure you want to snap these objects?\nYou can not UNDO this command." ) == MUI::YES )
+ {
+ //quit.
+ return MStatus::kSuccess;
+ }
+
+ assert( args.length() == 2 );
+
+ double OFFSET = 0;
+ int snapType = ALL;
+
+ args.get( 0, OFFSET );
+ args.get( 1, snapType );
+
+ OFFSET *= OSScale;
+
+ MSelectionList list;
+ MGlobal::getActiveSelectionList( list );
+
+ MItSelectionList i( list );
+
+ MFnDagNode fnDagNode;
+ MDagPath dagPath;
+ MItDag itDag;
+ MObject obj;
+ MDagPath objDagPath;
+ MObject childObj;
+
+ //For all selected objects.
+ for ( ; !i.isDone(); i.next() )
+ {
+ i.getDagPath( dagPath );
+
+ itDag.reset( dagPath, MItDag::kBreadthFirst, MFn::kTransform );
+
+ for ( ; !itDag.isDone() && itDag.depth() < 2; itDag.next() )
+ {
+ obj = itDag.item();
+ fnDagNode.setObject( obj );
+
+ const char* objName = fnDagNode.name().asChar();
+ const char* objTypeName = fnDagNode.typeName().asChar();
+
+ int childCount = fnDagNode.childCount();
+
+ int whichChild;
+
+ for ( whichChild = 0; whichChild < childCount; ++whichChild )
+ {
+ childObj = fnDagNode.child( whichChild );
+ fnDagNode.setObject( childObj );
+
+ const char* childObjName = fnDagNode.name().asChar();
+ const char* childObjTypeName = fnDagNode.typeName().asChar();
+
+ //Find a mesh below me and move my pivot to the intersection.
+ itDag.getPath( objDagPath );
+ MFnTransform fnTrans( objDagPath );
+
+ //Get all the child meshes of this obj node to prevent snapping to
+ //something that is part of me.
+
+ MStringArray meshNames;
+
+ GetChildMeshNames( objDagPath, meshNames );
+
+
+ MVector pos = fnTrans.translation( MSpace::kWorld );
+ MPoint rotate = fnTrans.rotatePivot( MSpace::kWorld );
+ MVector rayDir( 0, -1.0, 0 );
+
+ MItDag meshIt( MItDag::kDepthFirst, MFn::kMesh );
+ MDagPath meshDagPath;
+ MPointArray intersectPoints;
+
+ bool found = false;
+
+ for ( ; !meshIt.isDone(); meshIt.next() )
+ {
+ meshIt.getPath( meshDagPath );
+ MFnMesh mesh( meshDagPath );
+
+ const char* meshName = mesh.name().asChar();
+
+ unsigned int i;
+ bool nameFound = false;
+ for ( i = 0; i < meshNames.length(); ++i )
+ {
+ if ( meshNames[i] == mesh.name() )
+ {
+ nameFound = true;
+ break;
+ }
+ }
+
+ if ( nameFound )
+ {
+ continue;
+ }
+
+ if ( snapType == TREELINE )
+ {
+
+ }
+ else
+ {
+ mesh.intersect( rotate, rayDir, intersectPoints, 0.001f, MSpace::kWorld );
+
+ if ( intersectPoints.length() > 0 )
+ {
+ MVector diff( intersectPoints[ 0 ] - rotate );
+ diff.y += OFFSET;
+
+ //Prepare the command for the redo it ( which does all the work )
+ mObjDagPaths.append( fnTrans.dagPath() );
+ mNewPositions.append( diff );
+
+ //Save the old position.
+ MVector vector = fnTrans.translation( MSpace::kObject );
+ mOldPositions.append( vector );
+
+// //Move the transform.
+// fnTrans.translateBy( diff, MSpace::kWorld );
+
+ found = true;
+
+ break;
+ }
+ }
+ }
+
+ if ( !found )
+ {
+ //Look up
+ MPoint rotate = fnTrans.rotatePivot( MSpace::kWorld );
+ MVector rayDir( 0, 1.0, 0 );
+
+ MItDag meshIt( MItDag::kDepthFirst, MFn::kMesh );
+ MDagPath meshDagPath;
+ MPointArray intersectPoints;
+
+ for ( ; !meshIt.isDone(); meshIt.next() )
+ {
+ meshIt.getPath( meshDagPath );
+ MFnMesh mesh( meshDagPath );
+
+ const char* meshName = mesh.name().asChar();
+
+ unsigned int i;
+ bool nameFound = false;
+ for ( i = 0; i < meshNames.length(); ++i )
+ {
+ if ( meshNames[i] == mesh.name() )
+ {
+ nameFound = true;
+ break;
+ }
+ }
+
+ if ( nameFound )
+ {
+ continue;
+ }
+
+ if ( snapType == TREELINE )
+ {
+
+ }
+ else
+ {
+ mesh.intersect( rotate, rayDir, intersectPoints, 0.001f, MSpace::kWorld );
+
+ if ( intersectPoints.length() > 0 )
+ {
+ MVector diff( intersectPoints[ 0 ] - rotate );
+ diff.y -= OFFSET;
+
+ //Prepare the command for the redo it ( which does all the work )
+ mObjDagPaths.append( fnTrans.dagPath() );
+ mNewPositions.append( diff );
+
+ //Save the old position.
+ MVector vector = fnTrans.translation( MSpace::kObject );
+ mOldPositions.append( vector );
+
+// //Move the transform.
+// fnTrans.translateBy( diff, MSpace::kWorld );
+
+ found = true;
+
+ break;
+ }
+ }
+ }
+ }
+
+ if ( !found )
+ {
+ MString errorMsg( "The object: " );
+ errorMsg += fnTrans.name();
+ errorMsg += MString( " has no mesh below it.\nNo snapping done on it." );
+
+ MUI::InfoDialog( errorMsg.asChar() );
+ }
+ }
+
+ if ( snapType == SINGLE )
+ {
+ //No more iterations.
+ break;
+ }
+ }
+ }
+
+ redoIt();
+
+ return MStatus::kSuccess;
+}
+
+//=============================================================================
+// SnapSelectedCmd::undoIt
+//=============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: MStatus
+//
+//=============================================================================
+MStatus SnapSelectedCmd::undoIt()
+{
+ unsigned int i;
+ for ( i = 0; i < mObjDagPaths.length(); ++i )
+ {
+ if ( mObjDagPaths[i].isValid() )
+ {
+ //Move this guy to the new position.
+ MFnTransform fnTransform( mObjDagPaths[i] );
+
+ fnTransform.setTranslation( mOldPositions[i], MSpace::kObject );
+ }
+ else
+ {
+ MExt::DisplayError( "Error performing snap due to invalid object or change in heirarchy" );
+ }
+ }
+
+ return MStatus::kSuccess;
+}
+
+//=============================================================================
+// SnapSelectedCmd::redoIt
+//=============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: MStatus
+//
+//=============================================================================
+MStatus SnapSelectedCmd::redoIt()
+{
+ unsigned int i;
+ for ( i = 0; i < mObjDagPaths.length(); ++i )
+ {
+ if ( mObjDagPaths[i].isValid() )
+ {
+ //Move this guy to the new position.
+ MFnTransform fnTransform( mObjDagPaths[i] );
+
+ fnTransform.translateBy( mNewPositions[i], MSpace::kWorld );
+ }
+ else
+ {
+ MExt::DisplayError( "Error performing snap due to invalid object or change in heirarchy" );
+ }
+ }
+
+ return MStatus::kSuccess;
+}
+
+//=============================================================================
+// SnapSelectedCmd::isUndoable
+//=============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: bool
+//
+//=============================================================================
+bool SnapSelectedCmd::isUndoable() const
+{
+ return true;
+}
+
+//******************************************************************************
+//
+// Private Member Functions
+//
+//******************************************************************************
+
+//==============================================================================
+// SnapSelectedCmd::GetChildMeshNames
+//==============================================================================
+// Description: Comment
+//
+// Parameters: ( MDagPath objDagPath, MStringArray& names )
+//
+// Return: void
+//
+//==============================================================================
+void SnapSelectedCmd::GetChildMeshNames( MDagPath objDagPath, MStringArray& names )
+{
+ names.clear();
+
+ MItDag itDag;
+ itDag.reset( objDagPath, MItDag::kDepthFirst, MFn::kMesh );
+
+ for ( ; !itDag.isDone(); itDag.next() )
+ {
+ MDagPath dagPath;
+ itDag.getPath( dagPath );
+ MFnMesh fnMesh( dagPath );
+
+ names.append( fnMesh.name() );
+
+ const char* meshName = fnMesh.name().asChar();
+ }
+
+}
diff --git a/tools/objectsnapper/code/commands/snapselected.h b/tools/objectsnapper/code/commands/snapselected.h
new file mode 100644
index 0000000..55e0f0d
--- /dev/null
+++ b/tools/objectsnapper/code/commands/snapselected.h
@@ -0,0 +1,59 @@
+//=============================================================================
+// Copyright (C) 2002 Radical Entertainment Ltd. All rights reserved.
+//
+// File: snapselectedcmd.h
+//
+// Description: Blahblahblah
+//
+// History: 18/03/2002 + Created -- Cary Brisebois
+//
+//=============================================================================
+
+#ifndef SNAPSELECTEDCMD_H
+#define SNAPSELECTEDCMD_H
+
+//========================================
+// Nested Includes
+//========================================
+#include "main/mayaincludes.h"
+#include "precompiled/PCH.h"
+
+//========================================
+// Forward References
+//========================================
+
+//=============================================================================
+//
+// Synopsis: Blahblahblah
+//
+//=============================================================================
+
+class SnapSelectedCmd : public MPxCommand
+{
+public:
+ SnapSelectedCmd();
+ virtual ~SnapSelectedCmd();
+
+ static void* creator();
+ virtual MStatus doIt( const MArgList& args );
+ virtual MStatus undoIt();
+ virtual MStatus redoIt();
+ virtual bool isUndoable() const;
+
+ static const char* stringId;
+
+private:
+
+ MDagPathArray mObjDagPaths;
+ MVectorArray mOldPositions;
+ MVectorArray mNewPositions;
+
+ void GetChildMeshNames( MDagPath objDagPath, MStringArray& names );
+
+ //Prevent wasteful constructor creation.
+SnapSelectedCmd( const SnapSelectedCmd& snapselectedcmd );
+SnapSelectedCmd& operator=( const SnapSelectedCmd& snapselectedcmd );
+};
+
+#endif //SNAPSELECTEDCMD_H
+
diff --git a/tools/objectsnapper/code/main/mayaincludes.h b/tools/objectsnapper/code/main/mayaincludes.h
new file mode 100644
index 0000000..5f91009
--- /dev/null
+++ b/tools/objectsnapper/code/main/mayaincludes.h
@@ -0,0 +1,49 @@
+#include <maya/M3dView.h>
+#include <maya/MArgList.h>
+#include <maya/MCursor.h>
+#include <maya/MDagPath.h>
+#include <maya/MDGMessage.h>
+#include <maya/MDGModifier.h>
+#include <maya/MDoubleArray.h>
+#include <maya/MEulerRotation.h>
+#include <maya/MFnData.h>
+#include <maya/MFnDagNode.h>
+#include <maya/MFnDependencyNode.h>
+#include <maya/MFnDoubleArrayData.h>
+#include <maya/MFnIkJoint.h>
+#include <maya/MFnIntArrayData.h>
+#include <maya/MFnMatrixData.h>
+#include <maya/MFnMesh.h>
+#include <maya/MFnMessageAttribute.h>
+#include <maya/MFnNumericAttribute.h>
+#include <maya/MFnStringArrayData.h>
+#include <maya/MFnTransform.h>
+#include <maya/MFnTypedAttribute.h>
+#include <maya/MGlobal.h>
+#include <maya/MIntArray.h>
+#include <maya/MItDag.h>
+#include <maya/MItMeshVertex.h>
+#include <maya/MItSelectionList.h>
+#include <maya/MMatrix.h>
+#include <maya/MNodeMessage.h>
+#include <maya/MObject.h>
+#include <maya/MObjectArray.h>
+#include <maya/MPlug.h>
+#include <maya/MPlugArray.h>
+#include <maya/MPoint.h>
+#include <maya/MPointArray.h>
+#include <maya/MPxCommand.h>
+#include <maya/MPxContext.h>
+#include <maya/MPxContextCommand.h>
+#include <maya/MPxLocatorNode.h>
+#include <maya/MQuaternion.h>
+#include <maya/MSelectionList.h>
+#include <maya/MStatus.h>
+#include <maya/MString.h>
+#include <maya/MStringArray.h>
+#include <maya/MTransformationMatrix.h>
+#include <maya/MTypeId.h>
+#include <maya/MUiMessage.h>
+#include <maya/MVector.h>
+
+#include <assert.h> \ No newline at end of file
diff --git a/tools/objectsnapper/code/main/pluginMain.cpp b/tools/objectsnapper/code/main/pluginMain.cpp
new file mode 100644
index 0000000..0e38b04
--- /dev/null
+++ b/tools/objectsnapper/code/main/pluginMain.cpp
@@ -0,0 +1,76 @@
+//
+// Copyright (C) 2002 Radical Entertainment
+//
+// File: pluginMain.cpp
+//
+// Author: Maya SDK Wizard
+//
+#include <maya/MFnPlugin.h>
+
+#include "utility/mayahandles.h"
+
+#include "pluginmain.h"
+#include "commands/snapselected.h"
+
+MStatus initializePlugin( MObject obj )
+//
+// Description:
+// this method is called when the plug-in is loaded into Maya. It
+// registers all of the services that this plug-in provides with
+// Maya.
+//
+// Arguments:
+// obj - a handle to the plug-in object (use MFnPlugin to access it)
+//
+{
+ MStatus status;
+
+ MayaHandles::SetHInstance( (void*)(MhInstPlugin) );
+
+ MFnPlugin plugin( obj, "Radical Entertainment", "4.0.1", "Any");
+
+ // Add plug-in feature registration here
+ //
+
+ //Register Nodes
+
+ //Register Contexts
+
+ //Register Commands
+ REGISTER_COMMAND( plugin, SnapSelectedCmd );
+
+
+ //Run any startup scripts.
+ MGlobal::sourceFile( "os_main.mel" );
+
+ return status;
+}
+
+MStatus uninitializePlugin( MObject obj )
+//
+// Description:
+// this method is called when the plug-in is unloaded from Maya. It
+// deregisters all of the services that it was providing.
+//
+// Arguments:
+// obj - a handle to the plug-in object (use MFnPlugin to access it)
+//
+{
+ MStatus status;
+ MFnPlugin plugin( obj );
+
+ // Add plug-in feature deregistration here
+ //
+
+ //Run any cleanup scripts.
+ MGlobal::sourceFile( "os_cleanup.mel" );
+
+ //Unregister Commands
+
+ //Unregister Contexts
+
+ //Unregister Nodes
+
+ return status;
+}
+
diff --git a/tools/objectsnapper/code/main/pluginMain.h b/tools/objectsnapper/code/main/pluginMain.h
new file mode 100644
index 0000000..502f6fb
--- /dev/null
+++ b/tools/objectsnapper/code/main/pluginMain.h
@@ -0,0 +1,40 @@
+#include "mayaincludes.h"
+
+//----------------------------------------
+// MACROS
+//----------------------------------------
+
+#define REGISTER_COMMAND( p, c ) if ( ! ( ( p ).registerCommand( c##::stringId, \
+ c##::creator ) \
+ ) \
+ ) return MS::kFailure
+
+#define REGISTER_CONTEXT( p, c ) if ( ! ( ( p ).registerContextCommand( c##::stringId, \
+ c##Cmd::creator ) \
+ ) \
+ ) return MS::kFailure
+
+
+#define REGISTER_LOCATOR( p, n ) if ( ! ( ( p ).registerNode( n##::stringId, \
+ n##::id, \
+ n##::creator, \
+ n##::initialize, \
+ MPxNode::kLocatorNode ) \
+ ) \
+ ) return MS::kFailure
+
+#define REGISTER_NODE( p, n ) if ( ! ( ( p ).registerNode( n##::stringId, \
+ n##::id, \
+ n##::creator, \
+ n##::initialize ) \
+ ) \
+ ) return MS::kFailure
+
+#define DEREGISTER_COMMAND( p, c ) ( p ).deregisterCommand( c##::stringId )
+
+#define DEREGISTER_CONTEXT( p, c ) ( p ).deregisterContextCommand( c##::stringId )
+
+//#define DEREGISTER_NODE( p, n ) n##::Unload();\
+// ( p ).deregisterNode( n##::id )
+
+#define DEREGISTER_NODE( p, n ) ( p ).deregisterNode( n##::id )
diff --git a/tools/objectsnapper/code/main/stdafx.h b/tools/objectsnapper/code/main/stdafx.h
new file mode 100644
index 0000000..3152a3f
--- /dev/null
+++ b/tools/objectsnapper/code/main/stdafx.h
@@ -0,0 +1,19 @@
+#ifndef STDAFX
+#define STDAFX
+
+//-----------------------------------------------------------------------------
+// Copyright (C) 2001 Radical Entertainment Ltd. All rights reserved.
+//
+// stdafx.h
+//
+// Description: Header wrapper for using MFC.
+//
+// Modification History:
+// + Created Oct 12, 2001 -- bkusy
+//-----------------------------------------------------------------------------
+#define VC_EXTRALEAN
+#include <afxwin.h>
+#include <afxdlgs.h>
+
+
+#endif \ No newline at end of file
diff --git a/tools/objectsnapper/code/precompiled/PCH.cpp b/tools/objectsnapper/code/precompiled/PCH.cpp
new file mode 100644
index 0000000..5f77b4a
--- /dev/null
+++ b/tools/objectsnapper/code/precompiled/PCH.cpp
@@ -0,0 +1 @@
+#include "PCH.h" \ No newline at end of file
diff --git a/tools/objectsnapper/code/precompiled/PCH.h b/tools/objectsnapper/code/precompiled/PCH.h
new file mode 100644
index 0000000..c14ca45
--- /dev/null
+++ b/tools/objectsnapper/code/precompiled/PCH.h
@@ -0,0 +1,50 @@
+#include <maya/M3dView.h>
+#include <maya/MArgList.h>
+#include <maya/MCursor.h>
+#include <maya/MDagPath.h>
+#include <maya/MDagPathArray.h>
+#include <maya/MDGMessage.h>
+#include <maya/MDGModifier.h>
+#include <maya/MDoubleArray.h>
+#include <maya/MEulerRotation.h>
+#include <maya/MFnData.h>
+#include <maya/MFnDagNode.h>
+#include <maya/MFnDependencyNode.h>
+#include <maya/MFnDoubleArrayData.h>
+#include <maya/MFnIkJoint.h>
+#include <maya/MFnIntArrayData.h>
+#include <maya/MFnMatrixData.h>
+#include <maya/MFnMesh.h>
+#include <maya/MFnMessageAttribute.h>
+#include <maya/MFnNumericAttribute.h>
+#include <maya/MFnStringArrayData.h>
+#include <maya/MFnTransform.h>
+#include <maya/MFnTypedAttribute.h>
+#include <maya/MGlobal.h>
+#include <maya/MIntArray.h>
+#include <maya/MItDag.h>
+#include <maya/MItMeshVertex.h>
+#include <maya/MItSelectionList.h>
+#include <maya/MMatrix.h>
+#include <maya/MNodeMessage.h>
+#include <maya/MObject.h>
+#include <maya/MObjectArray.h>
+#include <maya/MPlug.h>
+#include <maya/MPlugArray.h>
+#include <maya/MPoint.h>
+#include <maya/MPointArray.h>
+#include <maya/MPxCommand.h>
+#include <maya/MPxContext.h>
+#include <maya/MPxContextCommand.h>
+#include <maya/MPxLocatorNode.h>
+#include <maya/MQuaternion.h>
+#include <maya/MSelectionList.h>
+#include <maya/MStatus.h>
+#include <maya/MString.h>
+#include <maya/MStringArray.h>
+#include <maya/MTransformationMatrix.h>
+#include <maya/MTypeId.h>
+#include <maya/MUiMessage.h>
+#include <maya/MVector.h>
+
+#include <assert.h> \ No newline at end of file
diff --git a/tools/objectsnapper/code/scripts/os_cleanup.mel b/tools/objectsnapper/code/scripts/os_cleanup.mel
new file mode 100644
index 0000000..020de04
--- /dev/null
+++ b/tools/objectsnapper/code/scripts/os_cleanup.mel
@@ -0,0 +1,3 @@
+
+
+os_RemoveUI(); \ No newline at end of file
diff --git a/tools/objectsnapper/code/scripts/os_main.mel b/tools/objectsnapper/code/scripts/os_main.mel
new file mode 100644
index 0000000..7a8c567
--- /dev/null
+++ b/tools/objectsnapper/code/scripts/os_main.mel
@@ -0,0 +1,228 @@
+//-----------------------------------------------------------------------------
+// Copyright (C) 2001 Radical Entertainment Ltd. All rights reserved.
+//
+// TE_main.mel
+//
+// Description: Installs the Object Snapper (OS) interface.
+// As a convention all Object Snapper global procedures
+// and global variables are prefixed with "os_". All commands
+// exposed through OS plugins are prefixed with "OS_".
+//
+// MCB = Menu Call Back
+// BCB = Button Call Back
+//
+// Modification History:
+// + Created March 18 2002 -- Cary Brisebois
+//-----------------------------------------------------------------------------
+
+
+global float $gOS_Offset = 0.10;
+
+
+//-----------------------------------------------------------------------------
+// o s _ b r e a k p o i n t
+//
+// Synopsis:
+//
+// Parameters: NONE
+//
+// Returns: NOTHING
+//
+// Constraints: NONE
+//
+//-----------------------------------------------------------------------------
+global proc os_breakpoint( string $tag )
+{
+ confirmDialog -m ( "BreakPoint: " + $tag );
+}
+
+//-----------------------------------------------------------------------------
+// o s _ M C B _ A b o u t
+//
+// Synopsis: Display an About Object Snapper window.
+//
+// Parameters: NONE
+//
+// Returns: NOTHING
+//
+// Constraints: NONE
+//
+//-----------------------------------------------------------------------------
+global proc os_MCB_About()
+{
+ string $pluginVersion = "1.0";
+
+ string $message = ( "\nSimpsons Road Rage Object Snapper.\n\n" +
+ "Release " + $pluginVersion + "\n" +
+ "(c) 2001, Radical Entertainment, Ltd.\n\n" );
+
+
+ confirmDialog -title "About Object Snapper"
+ -message $message
+ -button "OK"
+ -defaultButton "OK";
+}
+
+//-----------------------------------------------------------------------------
+// o s _ d o M a i n M e n u I t e m s
+//
+// Synopsis: Creates the OS menu on the menu handle passed in.
+//
+// Parameters: NONE
+//
+// Returns: NOTHING
+//
+// Constraints: NONE
+//
+//-----------------------------------------------------------------------------
+global proc os_doMainMenuItems( string $menu )
+{
+ menu -edit -tearOff true -allowOptionBoxes true $menu;
+
+ menuItem -label "Snap Single Selected" -command ( "os_MCB_SnapSingleSelected()" );
+
+ menuItem -divider true;
+
+ menuItem -label "Snap All Selected" -command ( "os_MCB_SnapSelected()" );
+
+ menuItem -divider true;
+
+ menuItem -label "Snap Tree Line" -command ( "os_MCB_SnapTreeLine()" );
+
+ menuItem -divider true;
+
+ menuItem -label "About" -command "os_MCB_About()";
+
+ menuItem -optionBox true -command "os_MCB_OSOptions()";
+
+ setParent -m ..;
+}
+
+//-----------------------------------------------------------------------------
+// o s _ I n s t a l l U I
+//
+// Synopsis:
+//
+// Parameters: NONE
+//
+// Returns: NOTHING
+//
+// Constraints: NONE
+//
+//-----------------------------------------------------------------------------
+global proc os_InstallUI()
+{
+
+ global string $gMainWindow;
+
+ //
+ // Install OS menu as a root menu.
+ //
+ if ( `menu -exists os_MainMenu` ) deleteUI os_MainMenu;
+ menu -label "Object Snapper" -allowOptionBoxes true -parent $gMainWindow os_MainMenu;
+
+ os_doMainMenuItems "os_MainMenu";
+}
+
+//==============================================================================
+// global proc os_RemoveUI
+//==============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: global
+//
+//==============================================================================
+global proc os_RemoveUI()
+{
+ if ( `menu -exists os_MainMenu` ) deleteUI os_MainMenu;
+ if ( `window -exists os_OptionWindow` ) deleteUI os_OptionWindow;
+}
+
+//==============================================================================
+// global proc os_MCB_SnapSelected
+//==============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: global
+//
+//==============================================================================
+global proc os_MCB_SnapSelected()
+{
+ global float $gOS_Offset;
+
+ OS_SnapSelected( $gOS_Offset, 0 );
+}
+
+
+//==============================================================================
+// global proc os_MCB_SnapSingleSelected
+//==============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: global
+//
+//==============================================================================
+global proc os_MCB_SnapSingleSelected()
+{
+ global float $gOS_Offset;
+
+ OS_SnapSelected( $gOS_Offset, 1 );
+}
+
+//=============================================================================
+// global proc os_MCB_SnapTreeLine
+//=============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: global
+//
+//=============================================================================
+global proc os_MCB_SnapTreeLine()
+{
+ global float $gOS_Offset;
+
+ OS_SnapSelected( $gOS_Offset, 2 );
+}
+
+//==============================================================================
+// global proc os_MCB_OSOptions
+//==============================================================================
+// Description: Comment
+//
+// Parameters: ()
+//
+// Return: global
+//
+//==============================================================================
+global proc os_MCB_OSOptions()
+{
+ global float $gOS_Offset;
+
+ if ( `window -exists os_OptionWindow` ) deleteUI os_OptionWindow;
+
+ window -title "Object Snapper Options" os_OptionWindow;
+
+ columnLayout;
+
+ rowLayout -nc 2;
+
+ text -label "Offset (M):";
+
+ floatField -min -10.0 -max 10.0 -value $gOS_Offset -cc ("$gOS_Offset = #1");
+
+ setParent ..;
+
+ setParent ..;
+
+ showWindow;
+}
+
+evalDeferred "os_InstallUI"; \ No newline at end of file