sketchucation logo sketchucation
    • Login
    πŸ›£οΈ Road Profile Builder | Generate roads, curbs and pavements easily Download

    MAXWELL plugin Authors?

    scheduled pinned locked moved Developers' Forum
    23 Posts 5 Posters 1.1k Views 5 Watching
    loading-more-posts
    • oldest-to-newest
    • newest-to-oldest
    • most-votes
    reply
    • reply-as-topic
    guest-login-reply
    deleted-message
    • thomthomT Offline
      thomthom
      last edited by

      Adam - any chance you could post the source for these Ruby Extensions - as simple examples of interacting with the SketchUp COM interface?

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      one-reply-to-this-post last-reply-time reply quote 0
      • JD HillJ Offline
        JD Hill
        last edited by

        @adamb said:

        JD, I think you've got to bite the bullet and use the COM interface to get the ISkpMaterial, then extract a ISkpTexture on which you can call WriteToFile().

        On a related note, anyone else experience that TextureWriter is stupidly slow for large images? ie a model has a 2000x1000 bmp texture and Texturewriter can take minutes to write it out.

        Ugh. I'd rather not do that. And yes, my recollection is that WriteToFile seemed to be quite slow. But I don't use it; if WriteAllTextures fails, I fall back to using WriteTextureFileFromHandle. Can't say that I specifically compared the performance of that with WriteToFile though.

        @thomthom said:

        I thought COM was a Windows thing...

        Not really, COM is just the definition of a set of contracts which are designed to allow unrelated components to connect to and obtain services from one another; roughly speaking, is_a? and respond_to? for C++.

        And thanks for the idea of using a Definition; that's perfect.

        Developer - Bella Render

        one-reply-to-this-post last-reply-time reply quote 0
        • thomthomT Offline
          thomthom
          last edited by

          @jd hill said:

          And thanks for the idea of using a Definition; that's perfect.

          Mind you - if you don't use abort_operation you'll end up making lots of temp definitions cluttering up the In Model definition list.

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          one-reply-to-this-post last-reply-time reply quote 0
          • 1
          • 2
          • 2 / 2
          • first-post
            last-post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement