ScriptSpot

Forum topic · General Scripting

GW Text on top

By JokerMartini · 2011-11-18

Description

I'm trying to display the gw text above everything else in viewport. As of right now it displays and everything right but it is hidden by the objects.

Does it have to be converted to screen space or something?

unRegisterRedrawViewsCallback showObjectNames
fn showObjectNames=
(
gw.setTransform(Matrix3 1)
for o in objects where not o.isHidden do
(
gw.text o.pos (o.name as string) color:yellow
)
gw.enlargeUpdateRect #whole
gw.updateScreen()
)
registerRedrawViewsCallback showObjectNames
showObjectNames()

Comments (4)

displays on top??

JokerMartini · 2011-11-28

--bug (needs to apply to only selected objects and elements
--gw.wtext [100,100,0] "----------------------------------" color:green

try(destroyDialog ::rlIDTools)catch()
rollout rlIDTools "ID Tools"
(
checkbutton btnInfo "Info" pos:[88,123] width:69 height:22

on btnInfo changed state do
(
fn showObjectNames=
(
gw.setTransform(Matrix3 1)
for o in objects where not o.isHidden do
(
gw.text o.pos (o.gbufferchannel as string) color:yellow
)
--//Displays on top???
gw.wtext [100,100,0] "----------------------------------" color:green

gw.enlargeUpdateRect #whole
gw.updateScreen()
forceCompleteRedraw()
)
registerRedrawViewsCallback showObjectNames

if state then
(
showObjectNames()

)else(

unRegisterRedrawViewsCallback showObjectNames
forceCompleteRedraw()
)
)
)
createDialog rlIDTools 241 234 style:#(#style_SysMenu, #style_ToolWindow) --bgColor:(color 58 58 58)

I don't get what is different to make it display on top?

Not for me

JokerMartini · 2011-11-18

It still does not seem to work for me. I have somehow come across something that does fix it but does not really count as a solution because I'm not sure why it makes it work.

Try this.
When i check the xView options it fixes it to display the text ontop.....?

http://www.scriptspot.com/files/fix.jpg

Attachments

xView bug?...

Anubis · 2011-11-19

xView is new in Max 2010 and I can't test that in my 2009.

?...

Anubis · 2011-11-18

hmm, its works fine here
test

Attachments