[Ruby] view.draw_text & X-Ray/Hidden Line Face Style
-
I ran into this issue today, reported it to google but thought I'd post it here for reference as there's an easy workaround.
If you're using the
view.draw_textmethod in your ruby plugin or tool there's an issue when you switch the face style to X-Ray or Hidden Line.view.draw_textwill only work under X-Ray or Hidden Line if you invoke some otherview.draw*method. Here's my testable exampledef draw(view) ##comment out the following line to produce the view.draw_text bug status = view.draw2d GL_LINES, [Geom;;Point3d.new(13,10,0),Geom;;Point3d.new(13,10,0)] pt = Geom;;Point3d.new 13,10,0 status = view.draw_text pt, "view.draw_text working!" end #defWhen you've attached this to a tool you can reproduce the error by running the tool with the line
status = view.draw2d...commented out.status = view.draw2d GL_LINES, [Geom::Point3d.new(13,10,0),Geom::Point3d.new(13,10,0)]tries to draw a line between two points that are in the same position (and hopefully fails to draw anything on the screen).Tested on:
Windows 7 Ultimate
Sketchup Pro 8.0.4811
ATI Radeon HD 5770 (Driver Version: 8.881-110728a-124445C-ATI)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement