• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Extend view.write_image?

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 3 Posters 143 Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    maricanis
    last edited by 26 Apr 2012, 09:36

    Hi,

    In my plugin script I put various text and draw objects on the screen with
    view.draw_text and view.draw2d

    When I export current view to 2D image with either File->Export->2D Graphic, or in script with view.write_image, text and rectangles from the screen aren't included in output images (only model entities are visible).

    Is there some way to export to an image all objects visible on current screen?

    Thanks in advance,
    Marija

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 26 Apr 2012, 09:59

      No.
      The view method graphics are temporary and intended for transient use by tools.
      Once you invoke another API method they are gone...

      The only way you can 'capture' these in an image is to use an external 'screenshot' tool...

      They are not 'objects' like entities.
      You could use a @group with real geometry and text etc inside it, this will export in any image.
      When you tool is done use @group.erase! in your 'exiting' methods to ensure it's tidied up...

      TIG

      1 Reply Last reply Reply Quote 0
      • M Offline
        maricanis
        last edited by 26 Apr 2012, 10:28

        Thanks TIG,

        As you mentioned these aren't real objects. They need to be on the screen on constant position even when user changes a view, and user chen toggle thme on/off from gui.

        Idea is I import some data into model in form of false color textures for faces, and these additional things are false color legend and some comments.

        So for export I definitely need them - since image with false colors without legend doesn't have much sense.

        If no other solution found (beside using external screenshot programs), I'll have to use your group idea, and modify my approach to false-color legend preview.

        Thanks again,
        Marija

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 27 Apr 2012, 21:27

          @unknownuser said:

          (referring to Windows ALT+PrintScreen manual workaround.)
          ..., but I needed some to write a code to save and image from my plugin.

          You may on Windows only, use Win32OLE.so and the SendKeys() function.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          1 / 1
          • First post
            1/4
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement