Blender Source Tools Help

Models are imported and exported from Blender with the Blender Source Tools. Any type of object with 2D surfaces can be exported. For details on creating animations for export, see Animation in Blender.
== Importing ==
The "Import SMD/VTA, DMX, QC" operator is used to import models. You can find it:
* By searching the menu (try "SMD")
* Under File > Import
You can import a whole QC at once to save time.
=== Options ===
These can be set in the lower-left area when selecting a file.
; Extend any existing model
: Adds meshes and animations to the armature of the active object, or of the first object found in the scene if none are active. Otherwise a brand new armature is created. Ignored during QC import.
; Import animations
: SMD animations are very large. They take a lot of time to import and take up a lot of disc space. You can skip them when importing a QC by unchecking this box. Ignored during SMD import.
; Up axis
: Rotates everything so that it points upward in Blender if it didn't originally, and configures the Target Up Axis property of the current scene. Automatically set during QC import.
; Make camera at $origin
: Helpful when importing viewmodel QCs. If this is not set, an is created instead.
; Rotation mode
: How keyframes are created. Euler is human-readable, Quaternion avoids gimbal lock.
== Exporting ==
The "Export SMD/VTA/DMX" operator is used to export models, animation and shape keys. You can find it:
* By searching the menu (try "SMD")
* Under File > Export
* On the export configuration panel seen below
The Source Tools are designed to make repeat exports as painless as possible. To that end, once you have set up an Export Folder (see below) objects/groups are exported there using their Blender names.
The Source Tools' three export panels can be found under . Due to the way Blender's addon system works they will start off at the bottom of the area, but you can drag them higher with the grips in the top right corners.
=== Source Engine Export ===
This panel contains scene options, export buttons, and utilities.
; Export
: Pops up a menu presenting export options based on the you currently have selected. 
; Visible layer(s) only
: Restrict scene exports and the UI to objects in the scene's active layers.
; Ignore Blender materials
: The Source Tools will usually export the name of the assigned to each face, or a face-assigned if none is found. Checking this box makes the Tools skip straight to the texture name at all times.
; Export Path
: The root folder into which objects will be exported. 
; Export Format
: Whether to output Studiomdl Data or DMX model files. DMX has more features than SMD but older engine branches and tools don't support it.
; Export Up Axis
: Use for compatibility with existing models. You will want to set this if the QC you are compiling with uses $upaxis (e.g. the TF2 player models are all Y-up).
; SDK Path
: The path to the \bin folder of the engine branch for which you are making a model. This determines DMX version and is used to select the correct version of studiomdl when compiling QCs.
; DMX Version
: Don't panic! These options are only displayed if SDK Path is blank or the SDK version it points to isn't recognised by the tools. They allow you to manually specify versions of DMX binary encoding and DMX model format to export.
; Material Path
: DMX only; the equivalent of the QC command $cdmaterials.
; Help
: Opens this web page.
; Steam Community
: Opens http://steamcommunity.com/groups/BlenderSourceTools.
; Check for updates
: Connects to the Tools' Google Code website and downloads any updates, as long as they are compatible with your version of Blender.
=== Source Engine Exportables ===
This panel contains settings for each of the exportable items in the scene. The checkboxes determine what is exported when you select the Export Scene export mode (filtering the list UI does not do this). There are three types of exportable item:
; 
: Objects which have been grouped together in Blender are merged and exported to the same file.
; 
: Objects not in a valid Group are listed here. They will be exported individually.
; 
: Actions are the source of skeletal animations. Only Actions from are listed.
The "Subfolder" option can be used to change the folder to which an item is written.
There may also be some of the following sub-panels:
==== Group properties ====
This panel lists all of the Group's exportable members. You can disable each one individually.
There are two advanced options:
; Suppress
: Makes the Source Tools ignore the Group, returning its members to the list of exportable items (unless they are in other unsuppressed Groups).
; Merge mechanical parts
: This option only appears when exporting DMX. When enabled, the exporter will run the Join operator on objects which share the same bone parent, reducing the number of individual items written to the output file. This is useful when you are exporting complicated mechanical objects consisting of many bone-parented objects.
==== Flex properties ====
If you are exporting DMX, flex animation controllers are defined in the model file (if you're exporting SMD they are defined in the QC and this panel won't appear).
The Source Tools don't provide any UI for defining flex controllers. Instead there are two options:
; Simple: Generate simple flex controllers every time you export
; Advanced: Insert the flex controllers of another DMX file
===== Advanced mode =====
Advanced mode has the following settings:
; Controller source
: An existing DMX, the flex controllers of which will inserted into your DMX. This can be an on-disc file or a . 
; Generate controllers
: Generates a KeyValues2 DMX file containing a simple set of flex controllers for your model. The file is written to a .
; Flex Controller Help
: Opens this web page.
; Generate Corrective Shape Key Drivers
: Creates animation drivers for all corrective shapes on the active object. This means that you can play around with shapes without having to worry about manually activating the relevant corrective shapes. 
; Stereo sharpness
: Defines the transition from left to right for flex controllers flagged as "stereo". You can have the tools generate a transition across an axis (X by default), or if the item is a you can chose a .
: This property can appear multiple times if a is being exported.
==== Armature properties ====
There are no special Action properties; instead, this panel displays the properties of the relevant Armature.
; Action selection
: You can choose how to select Actions for export: either the active Action or NLA track, or a filtered list of all Actions in the .blend. This is fiddly, but unfortunately Blender does not currently provide a good way of associating multiple Actions with any one Object.
; Implicit motionless bone
: Creates a dummy bone for vertices which don't move. Otherwise Studiomdl will attach them to the root bone.
: Enabling this option emulates Blender's behaviour with regard to unweighted verts, but may break compatibility with existing exports.
; Action selector
: Changes the Armature's current Action. This is a built-in Blender setting that has been placed here simply for convenience.
==== Curve properties ====
Determines which side of an extruded Curve to generate polygons on.
=== Source Engine QC Compiles ===
The Source Tools can automatically run studiomdl on demand or after an export. They will not actually generate a QC for you!
; QC file path
: This is where the Tools should look for QCs to run. You can use the // syntax to make the path relative to the .blend file, and you can also use * and ? to perform a wildcard search for multiple files.
; [QC List]
: This is where any QCs found at the QC path are displayed. You can compile one at any time by clicking its button.
; Compile all on export
: Automatically compiles all QCs when anything is exported.
; Compile all now
: Does exactly what it says.
; Launch HLMV
: Launches HLMV from your SDK folder. If Game Path has been defined, it will override the system VPROJECT value.
== Troubleshooting ==
=== Animation ===
; My animations are messed up!
: Version 1.1 of the Tools changed the way bones are exported. You can fix the problem by re-exporting everything, but if that isn't an option see the panel and enable "Legacy rotation" (only available when exporting SMD).
; My animation won't export!
: Only armature bone animation created in can be exported. See Animation in Blender.
=== Meshes ===
; My mesh is in the wrong place!
: The Source Tools export each object relative to its own origin, not the scene's, unless it is parented to another object. If you need to align meshes with each other (e.g. Groups, collisions, gibs) then make sure that they are all parented. Create an if need be; the parent itself doesn't have to be part of the export.
; Studiomdl always says my collision mesh has "2-dimensional geometry"!
: The edges of collision geometry must be smooth. Use the "Shade Smooth" operator on your object. Also, there cannot be any holes in the mesh. See Collision mesh#Caveats.
=== Export filename ===
; My stuff is exporting with the wrong name!
: Names of Blender objects/data used have an annoying 29-character limitation, which the Source Tools overcame by using a Custom Property called "smd_name". Remove the property (via the "Custom Properties" panel) and the Blender name will be used again.
; I don't want my animations in a subfolder!
: You can use a subfolder of . (which means "current directory") to prevent anims from being inserted.
== I found a bug ==
Please report it.
Category:Blender
Category:Modeling