|
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
|