PDA

View Full Version : gw.text not working


stuh505
03-10-2006, 01:17 AM
Hi there. I'm using max 8 sp1

using bobo's code:


unRegisterRedrawViewsCallback showObjectNames

fn showObjectNames=

(

gw.setTransform(Matrix3 1)

for o in $ where not o.isHidden do

(

gw.text o.pos (o as string) color:yellow

)

gw.enlargeUpdateRect #whole

gw.updateScreen()

)

registerRedrawViewsCallback showObjectNames

showObjectNames()


The text shows up when I evaluate, but the redrawing is highly sporadic

When I move around in the viewport the text disappears

Every now and then part of it will come back. For example, if I minimize max, select an object, etc, part of it might come back for a little bit and then go away again.

If I delete the objects then it says "no map function for undefined"

Even more confusing to me is why this code does absolutely nothing:


gw.text [0,0,0] "what?" color:red

gw.enlargeUpdateRect #whole

gw.updateScreen()

And what is the difference between the gw.text, gw.hText, and gw.wText?

Bobo
03-10-2006, 03:52 AM
Hi there. I'm using max 8 sp1

using bobo's code:



I would guess you are using a Direct3D driver. It does this usually.
SZB, OpenGL and Maxtreme do not. (This text drawng capability is really a Heidi thing, and Direct3D is, well, Microsoft crap).
If you want text, switch your drivers.

Of course, I might be wrong and the cause could be somewhere else, but I would be very surprised...

Aearon
03-10-2006, 06:09 AM
i also had the problem that text get's drawn behind object's (with any driver)

not so with polylines! has anyone seen this maybe?

stuh505
03-10-2006, 05:29 PM
Ah, the driver, yeah that was it. Thanks Bobo

CGTalk Moderation
03-10-2006, 05:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.