ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
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" :) ?
macroScript SelectNodesByMaterial
category:"Jahman"
tooltip:"SME select nodes by material"(
fn GetSMESelection nodes:false =
(
local index = sme.activeView
local viewNode = sme.GetView index
local SME_Selection = #()if index > 0 do(
local tv = trackViewNodes[#sme][index]for n = 1 to tv.numSubs do(
local ref = tv[n].reference
local _node = viewNode.GetNodeByRef ref
if _node != undefined and _node.selected do append SME_Selection (if nodes then #( ref, _node )else ref )))
SME_Selection
)
on execute doif SME.IsOpen()do(
local nodes = #()for m in GetSMESelection()do join nodes (refs.dependentNodes m)
select nodes
))
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...
Comments
Works like a charm thank you
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 :)
Made my day. Thanks a ton :)
.
I'd recommend to post them so
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 :)
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