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
darkvertex / basicExport.py
Created Mar 17, 2014
XSI-to-Maya cometSaveWeights export (snippet)
View basicExport.py
"""
Alan Fregtman's SaveCometWeights for XSI -- http://darkvertex.com/
(snippet edition -- v1.1)
** USAGE:
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.
@darkvertex
darkvertex / purgeUnused.py
Created Apr 21, 2013
purge unused deformers
View purgeUnused.py
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
darkvertex / gatormulti.py
Last active Dec 16, 2015
gator for multiple objects
View gatormulti.py
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:
xsi.RemoveFlexEnv(targetMesh)
@darkvertex
darkvertex / evenCurves.py
Created Mar 26, 2013
Evenly distributed points on a Softimage curve
View evenCurves.py
si = Application
def frange(x, y, jump):
'''
Like range() but with float values.
'''
while x < y:
yield x
x += jump
@darkvertex
darkvertex / randomXSISelectionsExample.py
Created Feb 27, 2013
XSI Example: Random Component or Object Selections
View randomXSISelectionsExample.py
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)
You can’t perform that action at this time.