[Closed] Professor X…ref
I completely recreated the XRef Scenes Dialog with the exception of two things which I could use some insight into if someone knows cough bobo cough.
- I can’t figure out how to change the “overlay” value.
- I can’t figure out how to gray out items in the list who are not active or red out items which are missing.
I’m currently considering this version .8 beta so use at your own peril. But I think it’s all peachy so I wouldn’t worry all that much about it breaking something.
What is it? It’s XRef Scenes with Control Gizmos for easier positioning. (Label Gizmo, Tile Gizmo, and Bounding Box Gizmo) The Tile gizmo is rectangle on the ‘ground plane’ as oposed to a full 3D box. Both on is redundant and I’ll probably tweak it so that it’s slaved a bit better (turn on the other turns off or something).
It also gives me a foundation to build other XRef Scenes tools off of without having to use a second dialog window. So it should be everything from XRef scenes (except for the two things noted above) + new features. The next feature I’m going to add is a transparent method of editing an XRef Scene File from the current scene without having to open it and save it in another instance of max.
Note this only works with Max 2008+ or with the AVG pack.
Stress testing would be greatly appreciated. Thanks!
New question:
Is there a way to get an XRef Scene’s transform matrix? I know it’s got to have one because you can move it around.
My guess would be they’re using a DotNet “Forms.Listview” which supports per line coloring… the standard MultiListBox does not. Great example in the help.
I don’t know how you are moving anything, until you bind it to something… in which case the transform of the xref scene will be the same as the object it’s bound to. Else it’s transform is the world transform…
Good luck
Well here is a simple example though:
You XRef in a scene (which contains a cube).
You parent the XrefScene to a dummy.
You move the dummy off to the side 30 feet and rotate it 45 degrees.
The XRefScene follows.
You delete the Dummy.
You now have an XRefScene which has a transform of 30 feet and rotation of 45 degrees on it, but no way of reading that value.
You can find the realitive transform on the children of the root node of the Xref…
I Xref’d two scenes with four objects. One I moved and rotated, then deleted the binding object. In the Listener I got this…
a=xrefs.getXRefFile 1
XRefScene:"Cool_Sphere.max"
b=xrefs.getXRefFile 2
XRefScene:"Cool_Sphere.max"
for i=1 to 4 do format "%
" a.tree.children[i].transform
(matrix3 [0.67559,0.737277,0] [-0.737277,0.67559,0] [0,0,1] [35.021,403.552,120])
(matrix3 [0.67559,0.737277,0] [0,0,1] [0.737277,-0.67559,0] [123.494,322.481,120])
(matrix3 [0.67559,0.737277,0] [0,0,1] [0.737277,-0.67559,0] [340.874,122.008,120])
(matrix3 [0.67559,0.737277,0] [-0.737277,0.67559,0] [0,0,1] [387.573,614.769,0])
for i=1 to 4 do format "%
" b.tree.children[i].transform
(matrix3 [1,0,0] [0,1,0] [0,0,1] [0,120,120])
(matrix3 [1,0,0] [0,0,1] [0,-1,0] [0,0,120])
(matrix3 [1,0,0] [0,0,1] [0,-1,0] [-0.94466,-295.707,120])
(matrix3 [1,0,0] [0,1,0] [0,0,1] [393.906,2.76749,0])
The rotation you can compute, because it always starts out as the real world… the move… I don’t have any ideas on how get that difference back, other than loading a second xref of the same scene and comparing the children…