Source Filmmaker

Source Filmmaker

31 ratings
Setting up SFM Plugins for Maya
By Sid
A quick guide to easily and painlessly set up your copy of Maya to use the plugins provided with SFM. After correctly setting this up, you will be able to directly access DMX models, SMD models and also be able to export DMX animations.

 
Rate  
Favorite
Favorited
Unfavorite
This Tutorial in Other Languages
This tutorial is also available in other languages!


Any other language translations are welcome!
Requirements
Before we begin, you will need to have the following on your computer.

  • Source Filmmaker[www.sourcefilmmaker.com]
  • Autodesk Maya (Any version between 2009 - 2013, as long as it is a 32 bit version)
  • Notepad ++[notepad-plus-plus.org]

Note: 64 bit versions of Autodesk Maya do not work with the plugins, so please make sure you have the correct version of Maya before you proceed.
Setting up the SDK Plugins for Maya
First, we will need to create a custom batch file which you can place on the desktop for convenience purposes in order to launch Maya along with the plugins.
In order to create a batch file, install Notepad++ and paste the following block of code:

@ECHO OFF

SET MAYAVER=2012
SET VTOOLS=C:/Program Files (x86)/Steam/steamapps/common/SourceFilmmaker/game/sdktools
SET VPROJECT=C:/Program Files (x86)/Steam/steamapps/common/SourceFilmmaker/game/tf
SET PATH=C:\Program Files (x86)\Autodesk\Maya2012\bin;%VPROJECT%\..\bin;%PATH%
IF NOT EXIST "%VPROJECT%" GOTO ERROR_NO_VPROJECT
:END
set MAYA_SCRIPT_PATH=%VTOOLS%/maya/scripts;%VTOOLS%/maya/scripts/valvesource;%VTOOLS%/maya/scripts/vstAttrPaint;%MAYA_SCRIPT_PATH%
set XBMLANGPATH=%VTOOLS%/maya/icons;%XBMLANGPATH%
set MAYA_PLUG_IN_PATH=%VTOOLS%/maya/%MAYAVER%/plug-ins;%MAYA_PLUG_IN_PATH%
echo MAYAVER: %MAYAVER%
echo VTOOLS: %VTOOLS%
echo Program Files: %ProgramFiles(x86)%
echo VPROJECT: %VPROJECT%
maya
goto END
:ERROR_NO_VPROJECT
echo ERROR! VPROJECT directory "%VPROJECT%" doesn't exist
pause
goto END
:END

The above information[facepunch.com] was retrieved from a user named mishappp on the Facepunch forums, in a thread entitled “Maya Plugins![facepunch.com]
Save the above block of text as a .bat file (This should a valid format in Notepad ++ during the saving process). Place it on your desktop or anywhere where you can access easily.
Once this done, try to launch Maya using the .bat file. If done correctly, you should see a command prompt window load up (like in the image below) and Maya should automatically start up.

Activating your plugins in Maya
When Maya loads up, you’ll need to activate your plugins. For this, go to Window > Settings/Preferences > Plug-in Manager. If you have set up your batch file correctly, you should see all the SDK Plugins for Maya loaded correctly, as the picture shows below

Make sure to select Auto Load/Loaded for all of them, and re-start Maya (via the batch file) if necessary. These plugins are essential as they allow you to directly open .mdl files, .smd files and .dmx files to work with, as well as being able to read vtf textures as well.
Troubleshooting/Important Notes
  • Please ensure you have the 32 bit version of Autodesk Maya installed prior to setting up the plugins, as the 64 bit version of Maya causes the plugins to crash.

  • In Line 1 of the .bat, you may be required to change the number depending on which version of Maya you use. In this example, Autodesk Maya 2012 is being used.

  • The above block of code assumes that you are running the scripts on a 64 bit Windows OS. If you are running the scripts on a 32 bit operating system, then you will be required to change the lines

    SET VTOOLS=C:/Program Files (x86)/Steam/steamapps/common/SourceFilmmaker/game/sdktools
    SET VPROJECT=C:/Program Files (x86)/Steam/steamapps/common/SourceFilmmaker/game/tf
    SET PATH=C:\Program Files (x86)\Autodesk\Maya2012\bin;%VPROJECT%\..\bin;%PATH%

    to

    SET VTOOLS=C:/Program Files/Steam/steamapps/common/SourceFilmmaker/game/sdktools
    SET VPROJECT=C:/Program Files/Steam/steamapps/common/SourceFilmmaker/game/tf
    SET PATH=C:\Program Files\Autodesk\Maya2012\bin;%VPROJECT%\..\bin;%PATH%

  • Additionally, you will also be required to change the path to the Autodesk Maya executable, depending on version. Since Autodesk tends to keep the location of the file consistent, you will merely need to change the version number in code itself, as underlined above.
< >
38 Comments
fnovero Jan 7 @ 9:19pm 
HELP..i am having the same problem as Gordon °v° | {LINK REMOVED} , there is nothing else but bones when i import .mdl

I get this error meessage:

// Error: line 0: Cannot find procedure "vsMdlIOTranslatorOptions". //

I have Maya 2013 32 bit installed. I tried importing Genji but bones are the only thing i can see.

I am trying to integrate mocap into SFM.

I am using Perception nueron for Mocap.

Can someone guide to a path i should take regarding the pipeline.

Hope someone can help.

Thanks!
General Lexington Jul 18, 2016 @ 11:18am 
I see the plugin directory is C:/Program Files (x86)/Steam/steamapps/common/SourceFilmmaker but it gets cut off. What is the whole path directory? Are the plugins in that path directory or do i have to download them else where? I know it's a silly question, but i have never done anything like this before. Additional note, I am running Maya 2016
Rantis Apr 14, 2016 @ 5:54pm 
Better version of the bat file that finds all the paths automatically:

@ECHO OFF

SET MAYAVER=%1
IF NOT [%MAYAVER%] == [] GOTO HAVE_MAYAVER

ECHO Expected maya version to be specified as argument to runmaya.bat
SET /P MAYAVER=Enter maya version (e.g. 2012):

:HAVE_MAYAVER

SET MAYA_DIR=%ProgramFiles(x86)%\Autodesk\Maya%MAYAVER%

IF NOT EXIST "%MAYA_DIR%" GOTO ERROR_NO_MAYA

SET PATH=%MAYA_DIR%\bin;%PATH%

REM
REM Figure out where sfmValveSetup.mel is based on the location
REM of this script
REM
SET SFMSETUP=%~dp0
SET SFMSETUP=%SFMSETUP%\scripts\sfmValveSetup.mel

maya -script "%SFMSETUP%"

goto END

:ERROR_NO_MAYA
echo ERROR! Can't find 32 bit Maya Version %MAYAVER% in expected path: %MAYA_DIR%
pause
goto END

:END
gurbo Jan 18, 2016 @ 1:29pm 
When I import a .mdl, it just imports the skeleton? What am I doing wrong?
Nug Cat Nov 23, 2015 @ 10:10pm 
So i get this error when i try to load any of the plug-ins "// Error: line 1: The specified module could not be found." Please help me.
* ReznorsRage * Sep 25, 2015 @ 3:59pm 
I'm in the same boat with not having vsSkinner. I checked the path and found one in each of the previous Maya version folders but just copying it over to the 2013 folder didn't let me load it. Did this stop your process for uploading your mods Nitro?
Anathole le Spermelier Jul 14, 2015 @ 9:43am 
Oh yeah it worked actually :) I opened the cmd tab and tried to launch the .bat from there and it just worked.
I got a new problem now, I've replaced the machete with a random sword to test it, but when I have to save on Valve SMD format, there is an error. I can't access the menu on the right, and the error says :
// Error: line 0: Cannot find procedure "vstSmdModelTranslatorOptions".
PS : I don't have the vsSkinner.mll on my plug-ins menu, is it normal ?
Sid  [author] Jul 13, 2015 @ 11:01pm 
@ Nitro

Apart from this, you should ideally launch the SFM SDK once before, just to be safe that any requisite files needed can be called. It may or may not work, but doesn't hurt!

Also check to see that the paths in the script do, in fact, point to the correct locations to where you installed stuff.

With regards to the command window instantly going away, you could try running the .bat file from the command prompt itself, so if there's any error/feedback message it should stay on screen long enough to see it. There are plenty of tutorials on Google that should help you accomplish this.

Good luck and do let me know if you face any continued difficulty getting it to work!
Johan Jul 11, 2015 @ 7:25pm 
@Nitro

Try running the .bat file as an Administrator.
Anathole le Spermelier Jul 10, 2015 @ 2:14pm 
I found a 32 bit version of Maya 2013 but I'm stuck on the ".bat file step", I opened N++, copied the code into it, changed to SET MAYAVER=2013 and the path to C:\Program Files (x86)\Autodesk\Maya2013\bin;%VPROJECT%\..\bin;%PATH% but when I click I see a command window who appears and instantly go away, Maya doesn't launch.

Any ideas why this is happening ?