Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 do
- (
- if not SME.IsOpen() do SME.Open()
- local nodes = #()
- for m in GetSMESelection() do join nodes (refs.dependentNodes m)
- select nodes
- )
- )
- macroScript SmePickMaterialFromSelection
- category:"Jahman"
- tooltip:"SME get material from selection"
- (
- if not SME.IsOpen() do SME.Open()
- (SME.GetMainframe()).setfocus()
- if SME.GetNumViews() == 0 do SME.CreateView "View1"
- actionMan.executeAction 369891408 "55581" -- Get from Selected
- )
Advertisement
Add Comment
Please, Sign In to add comment