Skip to content

Instantly share code, notes, and snippets.

@Schlechtwetterfront
Schlechtwetterfront / SelectPointsByEnvelopeWeight.py
Last active August 29, 2015 14:11
Selects all points on object 'enveloped_mesh' which have a weight value for 'deformer' bigger than 'weight_threshold'.
''' SelectPointsByEnvelope '''
# --------------------------------
# SelectPointsByEnvelopeWeight
#
# Selects all points on object 'enveloped_mesh' which have a weight value for
# 'deformer' bigger than 'weight_threshold'.
#
# Installation:
# Put this file into C:/Users/<username>/Autodesk/Softimage_XX/Application/Plugins.
#
@Schlechtwetterfront
Schlechtwetterfront / gloss2spec_alpha.bat
Last active December 25, 2015 01:39
This is a small python script to speed up texturing using Marmoset Toolbag. After dropping either the Gloss map or the Specular map on a .bat file this script will find the respective other map and then proceed to copy the Gloss map to the Specular map's alpha channel. Only tested with .tga files. It should work with other files which have alpha…
python gloss.py %1
exit
@Schlechtwetterfront
Schlechtwetterfront / vertcolchanger.py
Last active December 25, 2015 01:39
A small python plug-in for (X)SI. Let's you set RGB or HSV colors. This applies the colors to the first vertex color cluster it finds for every model in the current selection. If it doesn't find a cluster it can create one if you check the Create Cluster option. I created a very basic script for a friend who needed to eliminate baked AO from the…
# Changes Vertex Color Values.
# This should go to <USER>\\Autodesk\\<Softimage Version>\\Application\\Plugins.
# It's not important how the file is named.
#
# Code Copyright (C) Benedikt Schatz http://schlechtwetterfront.github.com
#
# GNU General Public License http://www.gnu.org/licenses/.
#
# The command will be added to the Get>Property menu.
import colorsys
'''
Middleware providing the current request for this thread.
Can be used to i.e. retrieve the current user: `user = current_request().user`
Needs to be added to the apps MIDDLEWARE list.
'''
from threading import current_thread
from django.utils.deprecation import MiddlewareMixin
@Schlechtwetterfront
Schlechtwetterfront / pointaligner.py
Created October 9, 2013 05:49
Moves all selected points to an absolute position. Default zeroes all selected points on the X-Axis. Usage: >Copy the code to the script editor and execute it. >OR Create a script button and paste this code into the script button's script window.
from win32com.client import constants as const
xsi = Application
# Possible Values: siX, siY, siZ, siXY, siXZ, siYZ, siXYZ.
axis = const.siX
# Set to desired absolute values.
x = 0
y = 0
z = 0
def move_points():
@Schlechtwetterfront
Schlechtwetterfront / Delete Subword Backward.sublime-macro
Created June 23, 2016 06:47
Subword Delete Macros for Sublime Text. Similar to alt+delete/ alt+backspace in other software packages.
// Delete Backward.
// Put this into your user packages folder. Can be found by navigating to Preferences > Browse Packages... in Sublime Text.
// Then add something like this to your user Key Bindings.
// { "keys": ["alt+backspace"], "command": "run_macro_file", "args": {"file": "res://Packages/User/Delete Subword Backward.sublime-macro"} }
[
{
"args":
{
"by": "subwords",
"extend": true,