The subject must work with Slate editor via shortcut.
Could anybody help please?
Forum topic · Scripts Wanted
From\To selected objects - Get\Assign material
By 1rv · 2023-01-31
Forum topic · Scripts Wanted
By 1rv · 2023-01-31
The subject must work with Slate editor via shortcut.
Could anybody help please?
Comments (22)
Comment policy
No, setting up shortcuts to "Assign Mat to Selection (SME)" and "pick mat from object" (ME) do nothing on my end at least.
The only thing that works for me is "Get material" form K-studio but it doesn't work with SME's main window
Keyboard Shortcut Override Toggle
try yourself- pick pick
from my experience pick pick material via shortcut with\without toggle override does nothing. "assign material" kinda works, but second shortcut (to turn keyboard toggle ON) needed to which is dumb
.
from my experience pick pick material via shortcut with\without toggle override does nothing
SME window must be in focus/active (being open isn't enough) in order for any action to work via shortcut.
Shortcuts are binded to a certain context and if the window isnt active they of course wont work...
Try to assign some shortcut to "pick material from selection" (say Alt+U) and see *yourself* - it does nothing in SME. No matter where's the focus SME main window\sample slots\viewport keyboard toggle on\off
.
I have 'Get from Selected' & 'Assign material to selection' in SME. Both working.
But there's no 'pick material from selection', basic material editor has 'Pick material from Object'. Guess you're talking about this one? Yes, can confirm that it doesn't work, niether by shortcut nor by calling actionMan.executeAction 2 "1101" directly
I'm pretty sure there're tons of script similar to this one already written and posted here on scriptspot. I'd choose one which works for both sme and basic mtledit
upd
and of course, when the workaround is found the correct solution comes
Well "Get from Selected" is something in the right direction - thank you. Though the demand to stay focused on SME is not so user friendly, I need something working from the viewport.
Forgive my ignorance, but what am I supposed to do with the code in "upd" part?
>>I'm pretty sure there're tons of script similar to this one already written and posted here on scriptspot. I'd choose one which works for both sme and basic mtledit
I haven't found one, hence I posted here.
.
well, here's a quick 'pick mtl from scene for basic&sme'. not tested
Amazing, thanks a ton Jahman :) works so far so good
Is the eyedropper click inevitable? Can't the material be sent straight to SME?
.
Is the eyedropper click inevitable? Can't the material be sent straight to SME?
That's even simpler. The only difference with the original sme action that this one doesn't require sme to be focused. And keep in mind that it gets all materials from selected nodes
Works like a charm thank you so much Jahman, will definitely use it a hundred times per day.
Now may I kindly ask you to make "Select by active (SME) material" :) ?
.
should work
Made my day. Thanks a ton :)
.
I'd recommend to post them so it won't get buried in Wanted sub-forum,
Best
:D
Those who want something special should invest some of their time to google things up as I'm too lazy to test these scripts, upload 'em, make a description etc...
One tiny and hopefully :) final request: when user hits a dedicated shortcut, could the script open SME if its closed?
.
can't edit my prev posts, unfortunately
replace it with this:
I get:-- Syntax error: at ),
When SME is closed I get an error:
-- Syntax error: at ), expected
-- In line: )
After my lame edit the mcr looks like:
macroScript SmePickMaterialFromSelection
category:"Jahman"
tooltip:"SME get material from selection"
on execute do
(
if not SME.IsOpen() do SME.Open()
local nodes = #()
for m in GetSMESelection() do join nodes (refs.dependentNodes m)
select nodes
)
What to fix?
P.S. Still works fine if SME is open
.
link
Perfect mushas gracias :)
Perfect muchas gracias :)
Must be native command
.
isn't SME already have actions to get materials from selection and to assign mtls to selection?