Skip to content

Instantly share code, notes, and snippets.

Alan Fregtman darkvertex

Block or report user

Report or block darkvertex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
darkvertex /
Created Apr 21, 2013
purge unused deformers
from time import clock
xsi = Application
def purgeUnusedDeformers(inColl):
c = clock()
for o in inColl:
if o.Envelopes.Count > 0:
env = o.Envelopes(0)
d = env.Deformers
darkvertex /
Last active Dec 16, 2015
gator for multiple objects
xsi = Application
selected = xsi.Selection
sourceMesh = xsi.PickObject("Pick source (enveloped) mesh", "Pick source (enveloped) mesh")("PickedElement")
if sourceMesh:
freezeMe = []
for targetMesh in selected:
if targetMesh.Envelopes.Count > 0:
darkvertex /
Created Mar 26, 2013
Evenly distributed points on a Softimage curve
si = Application
def frange(x, y, jump):
Like range() but with float values.
while x < y:
yield x
x += jump
darkvertex /
Created Feb 27, 2013
XSI Example: Random Component or Object Selections
from win32com.client import constants as c
import random
xsi = Application
XSIDialog = XSIFactory.CreateObject("XSIDial.XSIDialog")
def get_random_percentage(iterable, percentage):
amount = int( float(len(iterable)) * (percentage/100.0) )
return random.sample(iterable, amount)
darkvertex /
Created Mar 17, 2014
XSI-to-Maya cometSaveWeights export (snippet)
Alan Fregtman's SaveCometWeights for XSI --
(snippet edition -- v1.1)
1. Select one or more enveloped meshes and run this from the script editor.
2. You will have the weights saved as "WEIGHTS__objectname.txt" in Comet's SaveWeights format
under the active XSI project directory.
3. In Maya, use Michael Comet's SaveWeights tool (melscript) to import the weights file.
You can’t perform that action at this time.