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:"?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement