Created
July 13, 2016 15:32
-
-
Save pennyworth12345/0bae68500491d2fc79ceb34c53390fec to your computer and use it in GitHub Desktop.
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
//For use in Eden Editor UI to copy mapSize to clipboard, only needs to be executed once to save the function to variable | |
getMapSize = { | |
params ["_object"]; | |
_bbr = boundingBoxReal _object; | |
_p1 = _bbr select 0; | |
_p2 = _bbr select 1; | |
_maxWidth = abs ((_p2 select 0) - (_p1 select 0)); | |
_maxLength = abs ((_p2 select 1) - (_p1 select 1)); | |
_mapSize = _maxWidth max _maxLength; | |
_mapSize = (round (_mapSize * 100)) / 100; | |
copyToClipboard format ["mapSize = %1;", _mapSize]; | |
}; | |
//Run the following line to copy the mapSize for the selected object to clipboard | |
(get3DENSelected "object" select 0) call getMapSize |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment