Smd API (How it starts)

class valvesmd.Smd(path=None)[source]

Bases: SmdRoot

This is the basic class to interact with smd files. To interact with the data, consult SmdRoot which this class inherits

__init__(path=None)[source]

initalize a smd file.

Parameters:

path (str, optional) – The location of the smd file to be parsed

source_path
Type:

(str) - The location of the parsed file

version
Type:

int

nodes
Type:

list[SmdNode]

skeleton
Type:

list[SmdKeyframe]

triangles
Type:

list[SmdTriangle]

save(destination=None)[source]

Saves the current instance of the Smd. Overwrites original smd file if no destination is provided.

Parameters:

destination (str, optional) – A path (directory + filename) to determine where to save the smd file.