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?
 
Interactive Python debugging in XSI:

Interactive Python debugging in XSI:

2005-04-08       - By Jerry Gamache

 Back
Reply:     1     2     3     4     5  

Try this in XSI:

for i in range (0,12):
  if i == 3:
    import pywin.debugger
    pywin.debugger.brk()
  Application.LogMessage(i)
 
After outputting a few values, a debugger should pop-up. It has all the
traditionnal debugger windows:

Interactive shell:
  In the shell, try changing the value of "i" before hitting F10 to step and see
your new value being LogMessaged.

You can also control and experiment with XSI from the shell, just try:

[Dbg]>>> oSphere = Application.CreatePrim("Sphere","MeshSurface")
[Dbg]>>> oSphere.radius = 2
[Dbg]>>>

Variable browser:
  you can explore all local and global variables.

Watch window:
  enter any expression and see it update as you step.

Enjoy!
Jerry.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>Interactive Python debugging in XSI:</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Try this in XSI:</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">for i in range (0,12):</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"
>if i == 3:</FONT>

<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">import pywin.debugger</FONT></B>

<BR><B>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New">pywin.debugger.brk()</FONT></B>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Courier New"
>Application.LogMessage(i)</FONT>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

<BR><FONT SIZE=2 FACE="Arial">After outputting a few values, a debugger should
pop-up. It has all the traditionnal debugger windows:</FONT>
</P>

<P><U><FONT SIZE=2 FACE="Arial">Interactive shell:</FONT></U>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">In the
shell, try changing the value of &quot;i&quot; before hitting F10 to step and
see your new value being LogMessaged. </FONT></P>

<P><FONT SIZE=2 FACE="Arial">You can also control and experiment with XSI from
the shell, just try:</FONT>
</P>

<P><FONT SIZE=2 FACE="Courier New">[Dbg]&gt;&gt;&gt; oSphere = Application
.CreatePrim(&quot;Sphere&quot;,&quot;MeshSurface&quot;)</FONT>

<BR><FONT SIZE=2 FACE="Courier New">[Dbg]&gt;&gt;&gt; oSphere.radius = 2</FONT>

<BR><FONT SIZE=2 FACE="Courier New">[Dbg]&gt;&gt;&gt; </FONT>
</P>

<P><U><FONT SIZE=2 FACE="Arial">Variable browser:</FONT></U>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">you
can explore all local and global variables.</FONT>
</P>

<P><U><FONT SIZE=2 FACE="Arial">Watch window:</FONT></U>

<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=2 FACE="Arial">enter
any expression and see it update as you step.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Enjoy!</FONT>

<BR><FONT SIZE=2 FACE="Arial">Jerry.</FONT>
</P>

</BODY>
</HTML>