• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

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.
  • F Offline
    fuzzybro
    last edited by 29 May 2014, 21:27

    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
    • T Offline
      tt_su
      last edited by 2 Jun 2014, 14:05

      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
      • D Offline
        Dan Rathbun
        last edited by 4 Jun 2014, 02:44

        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
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement