mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 08:34:40 +00:00
Merge pull request #1536 from Areloch/ForestEdDirtyFix
Fixes dirty status behavior of Forest Editor
This commit is contained in:
commit
2af8bf25d5
4 changed files with 21 additions and 1 deletions
|
|
@ -105,6 +105,11 @@ ConsoleDocClass( ForestBrushTool,
|
||||||
"@internal"
|
"@internal"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
IMPLEMENT_CALLBACK(ForestBrushTool, onAction, void, (U32 mode, Point3F point), (mode, point),
|
||||||
|
"Called when the editor performs a brush action\n"
|
||||||
|
"@param mode the Int/Enum value of the mode of the action\n"
|
||||||
|
"@param point the position the action was performed at\n");
|
||||||
|
|
||||||
FRangeValidator fBrushRange(0.0f, 150.0f);
|
FRangeValidator fBrushRange(0.0f, 150.0f);
|
||||||
void ForestBrushTool::initPersistFields()
|
void ForestBrushTool::initPersistFields()
|
||||||
{
|
{
|
||||||
|
|
@ -338,6 +343,8 @@ void ForestBrushTool::_action( const Point3F &point )
|
||||||
_paint( point );
|
_paint( point );
|
||||||
else if ( mMode == Erase || mMode == EraseSelected )
|
else if ( mMode == Erase || mMode == EraseSelected )
|
||||||
_erase( point );
|
_erase( point );
|
||||||
|
|
||||||
|
onAction_callback(mMode, point);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline F32 mCircleArea( F32 radius )
|
inline F32 mCircleArea( F32 radius )
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,8 @@ protected:
|
||||||
|
|
||||||
/// The creation action we're actively filling.
|
/// The creation action we're actively filling.
|
||||||
ForestUndoAction *mCurrAction;
|
ForestUndoAction *mCurrAction;
|
||||||
|
|
||||||
|
DECLARE_CALLBACK(void, onAction, (U32 mode, Point3F point));
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef ForestBrushTool::BrushMode ForestBrushMode;
|
typedef ForestBrushTool::BrushMode ForestBrushMode;
|
||||||
|
|
|
||||||
|
|
@ -309,6 +309,8 @@ function ForestEditorPlugin::onEditMenuSelect( %this, %editMenu )
|
||||||
function ForestEditorPlugin::handleDelete( %this )
|
function ForestEditorPlugin::handleDelete( %this )
|
||||||
{
|
{
|
||||||
ForestTools->SelectionTool.deleteSelection();
|
ForestTools->SelectionTool.deleteSelection();
|
||||||
|
|
||||||
|
ForestEditorPlugin.dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ForestEditorPlugin::handleDeselect( %this )
|
function ForestEditorPlugin::handleDeselect( %this )
|
||||||
|
|
@ -319,6 +321,8 @@ function ForestEditorPlugin::handleDeselect( %this )
|
||||||
function ForestEditorPlugin::handleCut( %this )
|
function ForestEditorPlugin::handleCut( %this )
|
||||||
{
|
{
|
||||||
ForestTools->SelectionTool.cutSelection();
|
ForestTools->SelectionTool.cutSelection();
|
||||||
|
|
||||||
|
ForestEditorPlugin.dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function ForestEditorPlugin::handleCopy( %this )
|
function ForestEditorPlugin::handleCopy( %this )
|
||||||
|
|
@ -329,4 +333,6 @@ function ForestEditorPlugin::handleCopy( %this )
|
||||||
function ForestEditorPlugin::handlePaste( %this )
|
function ForestEditorPlugin::handlePaste( %this )
|
||||||
{
|
{
|
||||||
ForestTools->SelectionTool.pasteSelection();
|
ForestTools->SelectionTool.pasteSelection();
|
||||||
|
|
||||||
|
ForestEditorPlugin.dirty = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,3 +59,8 @@ function ForestSelectionTool::onDeactivated( %this )
|
||||||
{
|
{
|
||||||
%this.clearSelection();
|
%this.clearSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ForestBrushTool::onAction(%this, %actionMode, %point)
|
||||||
|
{
|
||||||
|
ForestEditorPlugin.dirty = true;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue