This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--"Angle Threshold spinner" -- angle beetven face normal and Z-axis | |
--"Max Height" -- select only faces which center position is > Max Height | |
try(DestroyDialog ::bgaRoll)catch() | |
rollout bgaRoll "selectObjTops" | |
( | |
local poGFN = polyop.getFaceNormal, poGFC = polyop.getFaceCenter | |
spinner spn_ang "Angle Threshold:" range:[0,360,5] pos:[5,5] | |
spinner spn_heig "Max Height: " range:[0,360,0] pos:[4,25] | |
button btn "Select T O P S!" width:150 pos:[5,45] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn closeIcon s e = s.dispose() | |
fn balloonClicked s e = shelllaunch @"c:\windows\" "" | |
a = dotnetobject "notifyicon" | |
a.visible = true | |
a.icon = (dotnetclass "system.drawing.systemIcons").information | |
dotnet.addEventHandler a "BalloonTipClosed" closeIcon | |
dotnet.addEventHandler a "BalloonTipClicked" balloonClicked | |
a.showballoontip 1000 "test" "test2" (dotnetclass "tooltipicon").info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*************************************************************************************************** | |
Copyright (C) 2013 - 2017 Gavyn Thompson | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CA = attributes MyData | |
( | |
parameters main | |
( | |
theNames type:#stringTab tabSizeVariable:true | |
nodes type:#nodeTab tabSizeVariable:true | |
) | |
) | |
--// variant #1 > add to rootNode to store with file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn get_all_nodes nodes:#() = | |
( | |
allnodes = #() | |
for n in nodes do | |
( | |
append allnodes n | |
join allnodes (get_all_nodes nodes:(n.children)) | |
) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn loadMat locationToLoad = ( | |
--Load material library. | |
loadMaterialLibrary locationToLoad | |
theStr = filenamefrompath (getMatLibFileName()) | |
theStr = trimRight theStr ".mat" | |
$.material = currentMaterialLibrary[theStr] | |
deleteItem currentMaterialLibrary 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn saveMat locationToSave = ( | |
--Add current objects material to max's temp library. | |
append currentMaterialLibrary $.material | |
--Save that library to a location | |
saveMaterialLibrary locationToSave | |
--Clear that temp library | |
deleteItem currentMaterialLibrary 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
formattedPrint 2 format:"3.3d" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Option 1 | |
fn GetVectorsAngle v1 v2 = | |
( | |
theAngle = acos(dot (normalize v1) (normalize v2)) | |
) | |
vA = obj2.pos - obj1.pos -- vector between two objects | |
vA = obj3.pos - obj1.pos -- vector between two objects | |
GetVectorsAngle vA vB | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************************** | |
NAME/ em_LMAddons | |
AUTHORS/ Mhamed Elmezoued | |
VERSION/ 1.0 | |
DESCRIPTION/ | |
Add-ons for the layer manager. | |
- Delete unused layer(s) : allows, as its name suggests deleting unused (or empty) layers |
NewerOlder