sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Pick material under cursor

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 3 Posters 199 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.
    • fuzzybroF Offline
      fuzzybro
      last edited by

      Hi all,

      Is there a way to emulate material picker behavior?
      I.e. is there a way to pick material from a scene via API?
      Or at least invoke material picker via API?

      Thanks

      Bro

      [OctaneRender for SketchUp Overview and Demo Version(http://sketchucation.com/click.php?url)]

      Latest updates, tutorials and artwork
      facebook.com/octane4sketchup

      1 Reply Last reply Reply Quote 0
      • tt_suT Offline
        tt_su
        last edited by

        You'd use the PickHelper class to pick an entity from the X, Y screen coordinate. Then get the material from the picked entity.

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          FYI, at the console:

          ts = Sketchup.active_model.tools %(#004000)[#<Sketchup::Tools:0x999fd98>] ts.active_tool_name %(#004000)[PaintMatchTool] ts.active_tool_id %(#004000)[21255]

          On the PC using the tool id does not seem to work (whilst it does for other native tools):
          Sketchup.send_action( 21255 )

          .. nor does a action string:
          Sketchup.send_action "selectPaintMatchTool:"

          ?

          I'm not here much anymore.

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

          Advertisement