Mailing List
Home
Forum Home
Softimage
Carrara
trueSpace
Dir3d-l
Maya - a powerful 3D animation and visual effects software
Macromedia Flash Development
Subjects
Cameras
scaleDown command
black out solved
Aircraft Tutorial
Mathematical XYZ ?
Its done This vs That
Its done first week
recommendations for screen video captures?
3DExplorer "Oddity "
New Director
ProTeam renewals
Fuel 's new websites (X post)
Blue peter create a make toy
targeting groups question
XPost: Shockwave 3D game ( sort of )
RES: RES: RES: Fish Modeling
Emitting particles from object intersection
Fuel 's new websites (X post)
Texturing
Big Break Contest Videos
New Plugins
Models and Texture on my updated site
Error Installing Patch tS6 6
Plasma?
Looking for Inspiration
Weird EMail Q
It 's done first week ?
Cherry not cranberry
New game
Camera Animation Problem
Particle plugins?
 
XSI Python error log

XSI Python error log

2004-04-23       - By Jerry Gamache

 Back
Reply:     1     2     3     4     5  

The errors are annoying but do not prevent Python scripting from working.

The only feature not accessible will be the XSI-specific constant names and
here is a script that generates them all (to save Rick some work). Some non-xsi
constants might sneak in, but can be edited out afterwards.

#
# This script browses all files generated by gen_py for constants
# and generates a file named XSI.py in the correct location for
# importing. You only need to run this script once.
#
# The gen_py files are generated on the fly by starting
# XSI then switching to the Python scripting langage so
# make sure to have that XSI running when running this script.
#
# When done, you will be able to do the following:
#
#  import XSIConst
#  Application.LogMessage(str(XSIConst.siAxesFilter.siXY))
#  #INFO : "3"
#
# To get an idea of all names generated, just open
# X:\Python23\Lib\XSIConst.py in an editor
#
import sys, os, re
pythonPath = os.path.dirname(sys.executable)
genPyPath = pythonPath + "\\Lib\\site-packages\\win32com\\gen_py"
constantFile = open(pythonPath + "\\Lib\\XSIConst.py", "w")
# Browse all CLSID under gen_py:
for clsidDir in os.listdir(genPyPath):
   # Browse all py files there:
   clsidPath = genPyPath + "\\" + clsidDir
   if not os.path.isdir(clsidPath):
       continue
   for pyFile in os.listdir(clsidPath):
       if pyFile[-3:] == ".py":
           pyFilePath = clsidPath + "\\" + pyFile
           foundConstant = 0
           currentClass = None
           for line in file(pyFilePath):
               if not foundConstant:
                   if "class constants:" in line:
                       foundConstant = 1
                       continue
               else:
                   if "=" in line:
                       className = line.split(" ")[-1]
                       if className != currentClass:
                           constantFile.write("\n")
                           constantFile.write("class " + className[:-1] + ":\n
")
                           currentClass = className
                       constantFile.write(line)
                   else:
                       foundConstant = 0
constantFile.close()
#
# End script.
#

-- --Original Message-- --
From: Christian Rittener [mailto:chrr@(protected)]
Sent: Friday, April 23, 2004 2:15 PM
To: Jerry Gamache
Subject: XSI Python error log


See attachment. I didn't realize you were with Softimage :-)
I was about to contact support if I didn't get a solution via
the mailing list...

Christian

---
Unsubscribe? Mail Majordomo@(protected) with the following text in body:
unsubscribe xsi