GoldenEye: Source Forums

Editing and Customization => Modding Help => Resources, Tools, Tips & Workarounds => Topic started by: Konrad Beerbaum on August 31, 2007, 08:29:30 am

Title: [TIP] Source SDK built in SMD exporter/importer for Maya.
Post by: Konrad Beerbaum on August 31, 2007, 08:29:30 am
- From the Valve Dev Wiki (specifies Maya 7, but can be used with any version of Maya)

The Source SDK comes with scripts that allow Maya to import and export SMD files. In order to use them, we must put them in the correct Maya scripts folder. So, copy the contents of the ...\SteamApps\<account name>\sourcesdk\maya\4.5\scripts\ to the \maya\7.0PLE\scripts\ folder in My Documents. Now we need to tweak two of the script files to avoid version compatibility problems. Go into \maya\7.0PLE\scripts\smd\ (the folder you just pasted), select both smdRead.mel and smdMakeShader.mel, right-click, select Properties, and uncheck "Read-only." Now open smdMakeShader.mel with Notepad and change the line

connectAttr -f ($place + ".mirror") ($fileTex + ".mirror");

to

//connectAttr -f ($place + ".mirror") ($fileTex + ".mirror");

Save and close. Now open smdRead.mel with Notepad and change the line

print `system "time"`;

to

//print `system "time"`;

Save and close.  Open up Maya, and the import smd and export smd options will be in the File menu. 
Title: Re: Source SDK built in SMD exporter/importer for Maya.
Post by: Konrad Beerbaum on February 23, 2008, 08:16:25 pm
There is a new Maya Valve SMD exporter that I think was added in the ep2 sdk.  It is MUCH easier to use, the only downsides are that you have to restart the plugin every time you launch maya(at least for me, curious if this happens to anyone else), and it seems to only work with Maya 7.0.

Locate the runmaya.bat file located in Valve\Steam\SteamApps\username\sourcesdk\maya\7.0

Right click on runmaya.bat and click edit. 

Change the first line to point to your Maya installation.  Mine looks like this: set PATH=%SOURCESDK%\bin;"C:\Program Files\Alias\Maya7.0\bin";%PATH%

Save and close the window.  Doubleclick on the runmaya.bat file.  It will open the command line, run a few lines of code, and then launch Maya automatically. 

In Maya, go to Window>Settings/Preferences>Plug-in Manager. Click the loaded and auto - load checkboxes next to the vstSmdl0.mll plugin.  On my computer, this plugin seems to disappear every time you exit maya, so I need to run the .bat file every time I start maya.