Getting the texture support created by CreateProjection


Here’s the question: How do you get the texture support created by CreateProjection?

You’re supposed to be able to get the support name from an output argument, but that doesn’t work.

from sipyutils import si		# win32com.client.Dispatch('XSI.Application')
from sipyutils import log		# LogMessage
from sipyutils import C			# win32com.client.constants

si = si()

x = si.CreateProjection("sphere", C.siTxtSpherical, "", "SupportName", "Texture_Projection", "", "", "")

log( x.Value("SupportName") == None )

log( x.Count );
log( x(0) == "" );
log( x(1) );

So instead, I get the PropertyName and from CreateProjection and work my way over to the texture support, via the TextureOp.

import win32com.client

from sipyutils import si		# win32com.client.Dispatch('XSI.Application')
from sipyutils import log		# LogMessage
from sipyutils import C			# win32com.client.constants

si = si()

def dispFix( badDispatch ):
    import win32com.client.dynamic
    # Re-Wraps a bad dispatch into a working one:
    return win32com.client.dynamic.Dispatch(badDispatch)

o = si.Selection(0)

x = si.CreateProjection(o, C.siTxtSpherical, "", "Texture_Support", "Texture_Projection", "", "", "")
#CreateProjection( [InputObjs], [Type], [UVDefaultType], [SupportName], [PropertyName], [Parenting], [Fitting], [Camera] );

y = win32com.client.Dispatch( "XSI.Collection" )
y.Items = "%s.polymsh.cls.*.%s" % (o.FullName, x.Value("PropertyName") )

log( y.Items )

txtprop = si.Dictionary.GetObject( y(0).FullName )
op = txtprop.NestedObjects( "TextureOp" )

# re-dispatch it to avoid "object has no attribute 'InputPorts'" error
op = dispFix(op)

txtsupp = op.InputPorts(2).Target2.Parent3DObject

log( si.ClassName(txtsupp) )
si.SelectObj( txtsupp )

The SDK Explorer is good for finding these kinds of port connections:
texture_support_sdk_explorer

PS: Here’s a JScript version.

x = CreateProjection("cylinder", siTxtPlanarXY, siTxtDefaultSpherical, "Texture_Support", "Texture_Projection", null, siRelDefault, null);

var y = new ActiveXObject( "XSI.Collection" );
y.Items = "cylinder.polymsh.cls.*." + x.Value("PropertyName")

txtprop = Dictionary.GetObject( y(0).FullName );
op = txtprop.NestedObjects( "TextureOp" );

txtsupp = op.InputPorts(2).Target2.Parent3DObject

LogMessage( ClassName(txtsupp) );
SelectObj( txtsupp )

Getting the selected FxTree nodes


You can use the undocumented selectednodes attribute, which was added in Softimage 2014.

views = Application.Desktop.ActiveLayout.Views
v = views.Find("Fx Tree") or views.Find("View Manager").Views.Find("Fx Tree")
if v:
    print v.GetAttributeValue("selectednodes")  # None

The FxTree view also has a targetcontent attribute, which is documented.

* hat tips to csaez (code) and luceric (attribute)

Friday Flashback #154


What was happening on the XSI list 13 years ago?

In the past few weeks, I’ve compiled annual summaries for five different lists, so here’s one more, this time for Jan 2001 on the XSI mailing list.

I pulled a listing of the Jan 2001 posts out of the wayback machine, and stuffed them into a word cloud. There were a lot of names I recognized; many of them still posting on the list. Do you see yours? 🙂
xsi-list-jan-2013

There were almost a thousand posts. Here’s the top topics of discussion:

  • Hmmm – Back at work NO LICENSES!!!!! 44
  • import export? 19
  • lic problems 16
  • Is it just me…? 16
  • Walk cycle in the animation mixer 14
  • Scripting book 14
  • refresh problem …. 13
  • Home Studio 12
  • XSI 1.5 available for download 11
  • FW: making walls? 10
  • bump map problem 9
  • Camera preset .. 9
  • symmetry – modelling 9
  • No Subject 8
  • colored shadows? how? 8
  • Doing character stuff… 8
  • Disappearing Particles. 7
  • Chortle 7
  • import export? 7
  • WISHLIST for 2.0 7
  • key 7
  • Pentium4 6
  • colored shadows!!! Works great! 6
  • Bump Map 6
  • BONNE ANNEES 6
  • XSI SDK again!! 6
  • shapes and adding deformers AFTER en 6
  • SOFTIMAGE should buy Rhino: NURBs Bo 6
  • desperately seeking FUR 6
  • shrinking at joint 6
  • TRIMS and others 6
  • LAST ONE::: Hmmm – Back at work NO LICENSES!!!! 6

XSI 1.5 inspired a lot of discussion, there were many small threads about that update:

  • XSI 1.5 available for download
  • Measuring length of a curve in 1.5?
  • installing 1.5
  • [1.5 does it really exist?] Dahhhhh
  • 1.5 Anyone? YES ITS COMMING :-))
  • 1.5
  • 1.5 CRASHES
  • 1.5 Anyone?
  • XSI 1.5 available for download
  • XSI 1.5 is here at last!!
  • 1.5 CRASHES
  • 1.5 Anyone?
  • Fix in 1.5?
  • installing 1.5
  • Status : 1.5 ???
  • [Fix in 1.5?]
  • #28 on page 146 of 1.5 Tutorial Book! –
  • 1.5 Anyone? YES ITS COMMING :-))
  • #28 on page 146 of 1.5 Tutorial Book!
  • Status : 1.5 ???
  • Fix in 1.5?
  • 1.5 does it really exist?

Top posters

  • Kim Aldis (124)
  • André Adam (42)
  • Stefan Andersson (37)
  • Meg Ward (30)
  • Arvid Björn (28)
  • Pierre Duranleau (21)
  • Chet Kenisell (19)
  • Thomas Groppi (17)
  • Thierry Baret (15)
  • Chris Marshall (15)

Missing ICE nodes in the preset manager


I’ve noticed this a handful of times, where a node like Get Data isn’t found in the preset manager. Clicking the Update button always fixes it for me.
get_data_missing
The last time this happened, instead of clicking Update, I started Process Monitor and did a few more searches in the preset manager. In my case, Softimage searching only the compounds, not the presets in %XSI_HOME%\Data\DSPresets\ICENodes. That’s why nodes like Get Data weren’t found.

Clicking Update forced Softimage to search both the compounds and presets.

Context matters: Using weightmaps with point clouds


A weightmap is per-point, but it’s per-point on the emitting geometry, not the point cloud. So you can’t just do a plain “get weights” if you want to use the weightmap to control particle values like Velocity or Speed.
weightmap_context_mismatch

Instead, you use get a location, like the particle emit location, and then get the weightmap value at that location. Then you’ll have a particle per-point context to work with.
weightmap_at_location
When you get the weight at a location, you get an interpolated weight value.

Installing PyQtForSoftimage


I read somewhere that installing PyQtForSoftimage could be difficult, so I gave it a try. I didn’t have any problems.

For my test, I installed PyQtForSoftimage in Softimage 2014 SP2, using Python 2.7.3 and pywin32 218.

Here’s a recipe that will work with Softimage 2014 and earlier. But if you’re using Softimage 2014, you can skip the part about using the system Python. Instead, use PYTHONPATH to point to folder where PyQt4 is installed (hat tip: Tim C).

On-sentence-summary
You need to switch from the Python installed with Softimage to the system Python (and pywin32), install PyQT, and then install the PyQtForSoftimage addon.

General Recipe

  1. Download and install Python 2.7.x (Note that Softimage ships with Python v2.7.3).
  2. Download and install pywin32 (Softimage ships with pywin32 217).
  3. In the Softimage Scripting preferences, clear the Use Python Installed with Softimage check box. Then restart Softimage.
    PythonInstalledWithSoftimage

    Or edit your prefs file (%XSI_USERHOME%\Data\Preferences\default.xsipref) and add this line: scripting.sipython = False

  4. Check that Python is working in Softimage. In the script editor, run a Python snippet like this: Application.LogMessage( “Hello World” )
  5. Download and install PyQt.
  6. Download (right-click and then click Save As) and install the PyQtForSoftimage addon.
  7. Check that everything is working. Open the Plug-in Manager, find PyQtForSoftimage, and run some of the examples.
    PyQt_Example

    I found that the ExampleDialog and ExampleSignalSlot examples did pop up dialogs, but the Log Text button didn’t log anything to the history log.

Softimage 2014 Recipe

  1. Download and install PyQt.
  2. Set the PYTHONPATH environment variable to point to the location of PyQt4. You could do this in setenv.bat, or in the System environment variables.
  3. Download (right-click and then click Save As) and install the PyQtForSoftimage addon.
  4. Check that everything is working. Open the Plug-in Manager, find PyQtForSoftimage, and run some of the examples.

2013 hot topics on si-community


Two “top 11” lists (because 10th and 11th place were so close, I went with 11).
Only posts that started in 2013 are included.
Actually, looking at the two lists, it seems there was really only one main “hot topic”.

Top 11 most replies

  1. What if Softimage died? (510)
  2. Spoiler Alert: NO SPOILERS ANYMORE (295)
  3. Some news from Siggraph (247)
  4. Softimage2014? (231)
  5. Another 3dsmax sneak peak (205)
  6. New Mental Ray shaders development (167)
  7. Softimage 2014 (156)
  8. offical features for softimage 2014 & we have a NEW logo (133)
  9. Maya LT (114)
  10. Announcing Redshift – Biased GPU Renderer (113)
  11. Who is thinking of stopping there Autodesk subscriptions (112)

Top 11 most viewed

  1. What if Softimage died? (18605)
  2. Softimage2014? (17311)
  3. Some news from Siggraph (13321)
  4. Spoiler Alert: NO SPOILERS ANYMORE (13015)
  5. Resourcedump (11903)
  6. Daylight Bedroom (11318)
  7. New Mental Ray shaders development (11019)
  8. Softimage 2014 (9918)
  9. Another 3dsmax sneak peak (9730)
  10. GONE FISHIN (9480)
  11. Announcing Redshift – Biased GPU Renderer (9313)

Softimage mailing list – Year in Review


2013_xsilist_wordcloud

12060 posts
1388 discussions
460 different posters

Top Ten discussion threads
Number of posts in bold.

  1. Softimage 2014 190
  2. Octane render 177
  3. Announcing Redshift – Biased GPU Renderer 154
  4. Why did I pay support?? Why did I buy a suite ? I want my money back! 118
  5. softimage.tv – Hello World! 78
  6. Future of Naiad 72
  7. Unofficial Softimage user voice 69
  8. Softimage 2015 User Survey 67
  9. Difference between a force and a velocity ? 63
  10. SI 2014 sneak peek 62

Top Ten posters
Number of posts in bold.

The top 10 posters accounted for 23% of all posts; the top 25 for 40%.

  1. Alan Fregtman 396
  2. Matt Lind 382
  3. Raffaele Fragapane 380
  4. Eric Thivierge 341
  5. olivier jeannel 308
  6. Steven Caron 297
  7. Stephen Blair 277
  8. Sebastien Sterling 223
  9. Luc-Eric Rousseau 189
  10. Ponthieux, Joseph G. 185

Century club

  1. Alan Fregtman 396
  2. Matt Lind 382
  3. Raffaele Fragapane 380
  4. Eric Thivierge 341
  5. olivier jeannel 308
  6. Steven Caron 297
  7. Stephen Blair 277
  8. Sebastien Sterling 223
  9. Luc-Eric Rousseau 189
  10. Ponthieux, Joseph G. (LARC-E1A)[LITES] 185
  11. Chris Chia 161
  12. Paul Griswold 158
  13. Mirko Jankovic 157
  14. Sergio Mucino 156
  15. Szabolcs Matefy 153
  16. Christopher 152
  17. Stefan Kubicek 147
  18. Rob Chapman 136
  19. adrian wyer 133
  20. Alok Gandhi 126
  21. Sandy Sutherland 125
  22. Leonard Koch 124
  23. Grahame Fuller 123
  24. Dan Yargici 122
  25. Emilio Hernandez 120
  26. Eugen Sares 116
  27. Andy Moorer 115
  28. Morten Bartholdy 107
  29. Angus Davidson 105
  30. Peter B 103

Top 5 most active days

  • 26 March, 149 posts, “Softimage 2014”
  • 28 February, 121, “SI 2014 sneak peek”
  • 20 December, 103, “positivity” and “rumor, Soft dead within the next year”
  • 13 February, 102, “Difference between a force and a velocity ?”
  • 17 July, 101, “I can’t believe there is no tutorial for Softimage on Autodesk webiste”