mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +00:00
Fixed issue of mis-transforming child objects so rotation would be weird when rotating subscenes
Fixed issue of action buttons breaking with subscenes when going between child-object manip modes and not
This commit is contained in:
parent
e2d0cc1981
commit
9ff2a56466
2 changed files with 45 additions and 36 deletions
|
|
@ -1,33 +1,28 @@
|
|||
function SubScene::onSelected(%this)
|
||||
{
|
||||
echo("SELECTED SUBSCENE");
|
||||
EWToolsPaletteWindow.clearButtons();
|
||||
|
||||
//Adds a button to the pallete stack
|
||||
EWToolsPaletteWindow.addButton("Select", "ToolsModule:arrow_n_image", "EWorldEditorNoneModeBtn::onClick();", "", "Select Arrow", "1");
|
||||
EWToolsPaletteWindow.addButton("Move", "ToolsModule:translate_n_image", "SubSceneMoveModeBtn::onClick();", "", "Move Selection", "2");
|
||||
EWToolsPaletteWindow.addButton("Rotate", "ToolsModule:rotate_n_image", "SubSceneRotateModeBtn::onClick();", "", "Rotate Selection", "3");
|
||||
EWToolsPaletteWindow.addButton("Scale", "ToolsModule:Scale_n_image", "EWorldEditorScaleModeBtn::onClick();", "", "Scale Selection", "4");
|
||||
|
||||
%moveButton = EWToolsPaletteWindow.findButton("Move");
|
||||
%rotateButton = EWToolsPaletteWindow.findButton("Rotate");
|
||||
|
||||
%moveButton.originalCommand = %moveButton.command;
|
||||
%moveButton.command = "SubSceneMoveModeBtn::onClick();";
|
||||
|
||||
%rotateButton.originalCommand = %rotateButton.command;
|
||||
%rotateButton.command = "SubSceneRotateModeBtn::onClick();";
|
||||
|
||||
EWToolsPaletteWindow.addButton("SubSceneMove", "ToolsModule:translate_n_image", "SubSceneChildMoveModeBtn::onClick();", "", "Move SubScene + Children", "1");
|
||||
EWToolsPaletteWindow.addButton("SubSceneRotate", "ToolsModule:rotate_n_image", "SubSceneChildRotateModeBtn::onClick();", "", "Rotate SubScene + Children", "2");
|
||||
EWToolsPaletteWindow.addButton("SubSceneMove", "ToolsModule:translate_n_image", "SubSceneChildMoveModeBtn::onClick();", "", "Move SubScene + Children", "5");
|
||||
EWToolsPaletteWindow.addButton("SubSceneRotate", "ToolsModule:rotate_n_image", "SubSceneChildRotateModeBtn::onClick();", "", "Rotate SubScene + Children", "6");
|
||||
|
||||
EWToolsPaletteWindow.refresh();
|
||||
}
|
||||
|
||||
function SubScene::onUnselected(%this)
|
||||
{
|
||||
echo("UN-SELECTED SUBSCENE");
|
||||
EWToolsPaletteWindow.removeButton("SubSceneMove");
|
||||
EWToolsPaletteWindow.removeButton("SubSceneRotate");
|
||||
|
||||
%moveButton = EWToolsPaletteWindow.findButton("Move");
|
||||
%rotateButton = EWToolsPaletteWindow.findButton("Rotate");
|
||||
|
||||
%moveButton.command = %moveButton.originalCommand;
|
||||
%rotateButton.command = %rotateButton.originalCommand;
|
||||
EWToolsPaletteWindow.clearButtons();
|
||||
|
||||
//Adds a button to the pallete stack
|
||||
EWToolsPaletteWindow.addButton("Select", "ToolsModule:arrow_n_image", "EWorldEditorNoneModeBtn::onClick();", "", "Select Arrow", "1");
|
||||
EWToolsPaletteWindow.addButton("Move", "ToolsModule:translate_n_image", "EWorldEditorMoveModeBtn::onClick();", "", "Move Selection", "2");
|
||||
EWToolsPaletteWindow.addButton("Rotate", "ToolsModule:rotate_n_image", "EWorldEditorRotateModeBtn::onClick();", "", "Rotate Selection", "3");
|
||||
EWToolsPaletteWindow.addButton("Scale", "ToolsModule:Scale_n_image", "EWorldEditorScaleModeBtn::onClick();", "", "Scale Selection", "4");
|
||||
|
||||
$SubScene::transformChildren = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue