Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Softimage® / XSI SDK / Python N00b How can I get All Passes
  RSS 2.0 ATOM  

Python N00b How can I get All Passes
Rate this thread
 
62444
 
Permlink of this thread  
avatar
  • Skwisgaar
  • Posted: 01 December 2011 01:43 PM
  • Total Posts: 2
  • Joined: 01 December 2011 01:33 PM

Hi..  Python N00b here.. Trying to get a list of all the passes in a scene.  I can get the current pass (thanks to a post on this site) but the syntax to get all the passes is eluding me.  My goal is of course to use said list of passes in a script.  I have looked at Scene.Passes, Scene.PassContainer in the SDK, but not quite sure how to translate from VB to python.  Any help, most appreciated.  I suspect I’ve just failed to grasp a basic tenant. 

Cheers and Thanks.

Barry



Replies: 0
avatar

The following “prints” the names of all the passes

oPasses Application.ActiveProject.ActiveScene.Passes
for i in oPasses:
    print(
i.Name)

If you’re using a version earlier than SI2011 the last line should read

Application.LogMessage(i.Name)


(but don’t forget the preceding indentation, as that’s crucial to Python)



The “other” Softimage community: si-community.com

Replies: 0
avatar
  • Skwisgaar
  • Posted: 02 December 2011 03:41 AM

Perfect.  Thank you so much..



Replies: 0