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 / Problems with "displayinfo"
  RSS 2.0 ATOM  

Problems with "displayinfo"
Rate this thread
 
30147
 
Permlink of this thread  
avatar
  • Location: Maastricht, NL
  • Total Posts: 347
  • Joined: 18 February 2008 01:47 PM

I have been trying to write a “self-installed custom operator” in Python to “feed” a custom property set with the necessary data to display the number of “triangles”. “quads” & “ngons” on-screen using “DisplayInfo_"-Parameters…
Two problems arose however… The first version, that only worked when the Selected Object was selected using an “object"-filter and returned 0, 0, 0 when not, didn’t seem to update properly, although the “AlwaysEvaluate” on my operator was set to “True”. This however could be overcome by manually updating using the little triangle next to the name of the property set, whereby the first click collapses the set and the second click opens it with updated values… So far, so good, although my first question is: Is it normal, that the DisplayInfo doesn’t update, am I missing something and is there another way around it, in light of my second problem…
The second problem arose, when I adapted my “scripted operator” to not only consider the object, when selected with an “object"-filter, but also when selected with one of the component-filters ("Vertex", “Edge”, “Polygon"). As a “mere” script run from the scripting editor ("ScriptEd" actually! :cool2: ), changing the output to the “history pane”, this script again functioned beautifully.. However, after once again creating a “custom operator”, changing the output to direct it to the custom parameters, weird things started to happen. As mentioned before, the DisplayInfo failed to update automatically, but even the manual update described above (collapsing and revealing the parameter set) didn’t work, for every time I changed to a component-filter and tried to update the DisplayInfo in the aforementioned manner, XSI crashed on me…
What could I be doing wrong? Probably something quite obvious, but I’m lost…



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

Replies: 0
avatar

Some careful rereading of the SDK-docs made me realize, the first problem arises due to the so-called ‘[I]"lazy-evaluation" pull model of XSI[/I]’. Which leaves the second and probably biggest problem (crashing XSI) still unsolved and raises the new question, is it possible to auto-update DisplayInfo-Parameters, although they do not necessarily get “pulled”, i.e. how can I force an “auto-pull”?



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

Replies: 0
avatar

To be honest, I didn’t really understood what is your problem. It may be clearer with some practical examples like code snippets.

Anyway, I’ve attached to this post a scene (XSI7.0) with a DisplayInfo that shows the polygon count of the cone object. For sake of simplicity, I didn’t used a self-installed operator, but a simple script operator applied to the DisplayInfo parameter. And it seems to work fine, just extrude some polygons and see by yourself.

Cheers.



Attachment Attachment
Replies: 0
avatar

Thanks for your reply and your code snippet…
Eventually I found a way around my crashing displayinfo, though I do not really know why yet. I solved it using a custom command that updated the info after a key was pressed. And after solving it to my own satisfaction, I forgot all about this thread… :whistling:
Anyway, if anyone’s interested: my solution (in Python) attached



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

Attachment Attachment
Replies: 0