add rom volume select
This commit is contained in:
parent
3c87c8f7d9
commit
0a9bee8d60
@ -177,10 +177,15 @@ function NDM_BoxSelect::onSelectObject(%this, %client, %obj, %pos, %normal)
|
||||
|
||||
%client.ndSelectionBox = ND_SelectionBox(%shapeName);
|
||||
|
||||
if(%client.ndMultiSelect)
|
||||
if(%client.ndMultiSelect) {
|
||||
if(%obj.getDatablock().isLogicRom) {
|
||||
%box = ndGetBoxFromRom(%obj);
|
||||
} else {
|
||||
%box = ndGetPlateBoxFromRayCast(%pos, %normal);
|
||||
else
|
||||
}
|
||||
} else {
|
||||
%box = %obj.getWorldBox();
|
||||
}
|
||||
%client.ndInitialMultiSelect = %client.ndMultiSelect;
|
||||
|
||||
%p1 = getWords(%box, 0, 2);
|
||||
@ -191,6 +196,16 @@ function NDM_BoxSelect::onSelectObject(%this, %client, %obj, %pos, %normal)
|
||||
%client.ndUpdateBottomPrint();
|
||||
}
|
||||
|
||||
function ndGetBoxFromRom(%b) {
|
||||
%db = %b.getDatablock();
|
||||
%box = %b.getWorldBox();
|
||||
%bl = getWords(%box, 0, 2);
|
||||
%bh = getWords(%box, 3, 5);
|
||||
%bl = vectorAdd(%bl, "0 0 " SPC (%db.brickSizeZ * 0.2));
|
||||
%bh = vectorAdd(%bh, "0 0 " SPC (%db.logicRomZ * 0.2));
|
||||
return %bl SPC %bh;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Generic inputs
|
||||
|
Loading…
x
Reference in New Issue
Block a user