mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
corrects https://github.com/GarageGames/Torque3D/issues/1273 with suggested resolution
This commit is contained in:
parent
5122360552
commit
b4dfb9ad08
2 changed files with 32 additions and 18 deletions
|
|
@ -2206,15 +2206,22 @@ function ShapeEdTriggerList::updateItem( %this, %oldFrame, %oldState, %frame, %s
|
||||||
|
|
||||||
function ShapeEdSequences::onAddTrigger( %this )
|
function ShapeEdSequences::onAddTrigger( %this )
|
||||||
{
|
{
|
||||||
// Can only add triggers if a sequence is selected
|
// Can only add triggers if a sequence is selected
|
||||||
%seqName = ShapeEdSequenceList.getSelectedName();
|
%seqName = ShapeEdSequenceList.getSelectedName();
|
||||||
if ( %seqName !$= "" )
|
if ( %seqName !$= "" )
|
||||||
{
|
{
|
||||||
// Add a new trigger at the current frame
|
// Add a new trigger at the current frame
|
||||||
%frame = mRound( ShapeEdSeqSlider.getValue() );
|
%frame = mRound( ShapeEdSeqSlider.getValue() ) - %this-->startFrame.getText();
|
||||||
%state = ShapeEdTriggerList.rowCount() % 30;
|
if ((%frame < 0) || (%frame > %this-->endFrame.getText() - %this-->startFrame.getText()))
|
||||||
ShapeEditor.doAddTrigger( %seqName, %frame, %state );
|
{
|
||||||
}
|
MessageBoxOK( "Error", "Trigger out of range of the selected animation." );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%state = ShapeEdTriggerList.rowCount() % 30;
|
||||||
|
ShapeEditor.doAddTrigger( %seqName, %frame, %state );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ShapeEdTriggerList::onDeleteSelection( %this )
|
function ShapeEdTriggerList::onDeleteSelection( %this )
|
||||||
|
|
|
||||||
|
|
@ -2206,15 +2206,22 @@ function ShapeEdTriggerList::updateItem( %this, %oldFrame, %oldState, %frame, %s
|
||||||
|
|
||||||
function ShapeEdSequences::onAddTrigger( %this )
|
function ShapeEdSequences::onAddTrigger( %this )
|
||||||
{
|
{
|
||||||
// Can only add triggers if a sequence is selected
|
// Can only add triggers if a sequence is selected
|
||||||
%seqName = ShapeEdSequenceList.getSelectedName();
|
%seqName = ShapeEdSequenceList.getSelectedName();
|
||||||
if ( %seqName !$= "" )
|
if ( %seqName !$= "" )
|
||||||
{
|
{
|
||||||
// Add a new trigger at the current frame
|
// Add a new trigger at the current frame
|
||||||
%frame = mRound( ShapeEdSeqSlider.getValue() );
|
%frame = mRound( ShapeEdSeqSlider.getValue() ) - %this-->startFrame.getText();
|
||||||
%state = ShapeEdTriggerList.rowCount() % 30;
|
if ((%frame < 0) || (%frame > %this-->endFrame.getText() - %this-->startFrame.getText()))
|
||||||
ShapeEditor.doAddTrigger( %seqName, %frame, %state );
|
{
|
||||||
}
|
MessageBoxOK( "Error", "Trigger out of range of the selected animation." );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
%state = ShapeEdTriggerList.rowCount() % 30;
|
||||||
|
ShapeEditor.doAddTrigger( %seqName, %frame, %state );
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function ShapeEdTriggerList::onDeleteSelection( %this )
|
function ShapeEdTriggerList::onDeleteSelection( %this )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue