Caprier
07-17-2009, 11:47 PM
I'm testing a simple script and a couple of things are causing problems.
1st problem:
fn DisplayData =
(
gw.setTransform(matrix3 1)
for o in selection do
(
gw.text o.pos o.name color:yellow
print o.name
)
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
DisplayData()
The names are printed in the listener as expected but in the viewport the objects are redrawn on top of them, so I need to be in wireframe mode to see them (and I can see the wireframes are drawn on top of the names).
2nd problem:
unregisterRedrawViewsCallback DisplayData
fn DisplayData =
(
gw.setTransform(matrix3 1)
for o in selection do
(
gw.text o.pos o.name color:yellow
print o.name
)
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
registerRedrawViewsCallback DisplayData
Now I'm using a callback to call the same funtion. When I move in the viewport, again the names appear in the listener, so the callback works fine. But the names do not show in the viewport, not even in wireframe mode.
Any help is much appreciated, as I have absolutely no idea what to do.
Using max 9, if that's relevant. Thanks.
1st problem:
fn DisplayData =
(
gw.setTransform(matrix3 1)
for o in selection do
(
gw.text o.pos o.name color:yellow
print o.name
)
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
DisplayData()
The names are printed in the listener as expected but in the viewport the objects are redrawn on top of them, so I need to be in wireframe mode to see them (and I can see the wireframes are drawn on top of the names).
2nd problem:
unregisterRedrawViewsCallback DisplayData
fn DisplayData =
(
gw.setTransform(matrix3 1)
for o in selection do
(
gw.text o.pos o.name color:yellow
print o.name
)
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
registerRedrawViewsCallback DisplayData
Now I'm using a callback to call the same funtion. When I move in the viewport, again the names appear in the listener, so the callback works fine. But the names do not show in the viewport, not even in wireframe mode.
Any help is much appreciated, as I have absolutely no idea what to do.
Using max 9, if that's relevant. Thanks.
