Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🚨 Skimp | 25% Off until March 30 Buy Now
Pick material under cursor
-
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
-
You'd use the PickHelper class to pick an entity from the X, Y screen coordinate. Then get the material from the picked entity.
-
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:"?
Advertisement