Source Filmmaker

Source Filmmaker

Not enough ratings
SFM Python Module Pack [Beta!]
   
Award
Favorite
Favorited
Unfavorite
Universe: Original IP
Script
Tags: SFM
File Size
Posted
12.475 MB
Nov 26, 2015 @ 7:55am
1 Change Note ( view )

Subscribe to download
SFM Python Module Pack [Beta!]

Description
**Please Read Before Subscribing/Installing!**

This "script" adds a bunch of Python modules that you can use in the making of your own scripts. Aside from the fancy Jupyter console, this is not useful to the average SFM'er on its own.

If you have any questions or bug reports, feel free to start a discussion in the "Discussions" tab as the "comments" section is awkward for support!

Main reason for this pack's existence is it can be really painful to install some of this stuff, especially the stuff that needs to be compiled, and this should take some of the pain out of using those modules. You should also be able to add this as a "required item" for your workshop scripts too, though make sure your users know about the small install step needed for this to work!

You'll be able to get to the Jupyter console in the "Windows" menu, near where you get to the Script Editor. There's a screenshot above that shows where.

I also take suggestions for additional Python modules to include in this pack, just starting out basic while I iron out knots in the installation and upgrade process!

# Installation

After you add this script to your SFM, you need to do one more thing to get it working. In the "Scripts" dropdown at the top of SFM, click on "install python pack" and it will extract a zip file and add a ".pth" file which allows SFM's Python to see the modules.

# Uninstallation

After unsubscribing, delete these locations:

* {YOUR SFM FOLDER}\game\sdktools\python\python-pack
* {YOUR SFM FOLDER}\game\sdktools\python\2.7\win32\Lib\site-packages\python-pack.pth

# What this adds to your SFM

* The IPython/Jupyter Console - very handy for playing around with SFM's Python functions!
* Adds the missing "PySide.QtSvg" module which the Jupyter console needs
* PyZMQ, which the Jupyter console needs
* Cython - if you'd like to be able to use it and the cython IPython magic, you'll need to install Visual C++ 2010 Express:
http://download.microsoft.com/download/1/D/9/1D9A6C0E-FC89-43EE-9658-B9F0E3A76983/vc_web.exe
* NumPy
* Enaml, a fancy GUI library
* Atom and Kiwi solver, which is needed by Enaml

Includes:
sfm\mainmenu\install_python_pack.py
Popular Discussions View All (2)
4
Nov 5, 2023 @ 7:33am
Addon kills 'sfm' variable.
Rayko
0
Dec 26, 2020 @ 4:06pm
Other Modules
enem 2012
6 Comments
Raph! Jun 15, 2018 @ 1:11pm 
OMG THX
Emperor Justyce Popescu Oct 4, 2017 @ 10:01pm 
Can It Make Invisable Models Visable?
walropodes  [author] Dec 23, 2015 @ 8:21pm 
I'll see if I can get Phonon working, planning on pushing a new update early next month to address the stuff folks pointed out so far. Also, if anyone is curious, I have not been able to get the PySide QtWebKit module working yet so I won't be able to include it yet.
OMG Theres A Bear In My Oatmeal! Dec 23, 2015 @ 8:28am 
would it be possible for you to include the Phonon module that comes with pyside?
Rayko Nov 27, 2015 @ 12:15am 
I hope with that there will be more scripts around in SFM. (:

I've also tested the installation. For me, it works just fine, although it could have some graphical visualization of downloading the pack. Also, SFM needs to be restarted after addon was downloaded, to make 'download pack' button appear.
walropodes  [author] Nov 26, 2015 @ 8:12am 
Biggest thing I'm curious about right now is if the install process even works for other people. If this workshop project interests anyone, let me know if this script works for them! :D: