This commit is contained in:
Azaezel 2016-06-09 13:23:37 -05:00
parent 5122360552
commit b4dfb9ad08
2 changed files with 32 additions and 18 deletions

View file

@ -2211,10 +2211,17 @@ function ShapeEdSequences::onAddTrigger( %this )
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();
if ((%frame < 0) || (%frame > %this-->endFrame.getText() - %this-->startFrame.getText()))
{
MessageBoxOK( "Error", "Trigger out of range of the selected animation." );
}
else
{
%state = ShapeEdTriggerList.rowCount() % 30; %state = ShapeEdTriggerList.rowCount() % 30;
ShapeEditor.doAddTrigger( %seqName, %frame, %state ); ShapeEditor.doAddTrigger( %seqName, %frame, %state );
} }
}
} }
function ShapeEdTriggerList::onDeleteSelection( %this ) function ShapeEdTriggerList::onDeleteSelection( %this )

View file

@ -2211,10 +2211,17 @@ function ShapeEdSequences::onAddTrigger( %this )
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();
if ((%frame < 0) || (%frame > %this-->endFrame.getText() - %this-->startFrame.getText()))
{
MessageBoxOK( "Error", "Trigger out of range of the selected animation." );
}
else
{
%state = ShapeEdTriggerList.rowCount() % 30; %state = ShapeEdTriggerList.rowCount() % 30;
ShapeEditor.doAddTrigger( %seqName, %frame, %state ); ShapeEditor.doAddTrigger( %seqName, %frame, %state );
} }
}
} }
function ShapeEdTriggerList::onDeleteSelection( %this ) function ShapeEdTriggerList::onDeleteSelection( %this )