mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
Fixes various reported issues with the ShapeEd update
- Updates addSequence for the TSShapeConstructor so it can properly understand if it's handed an assetId or not, and if it is, stores that as the source data for use later - Has the added benefit of ensuring no erroneous double-ups of data causing accidental overwrites when saving the shapeConstructor because it thinks the data 'changed' - Fixed saving of new added sequences in shape constructor to properly trip whitespace - Adds ability to manually trigger a ShapeAsset to load the shape data - Adjusted the logic for getting a shape/animation asset's constructor when adding a new sequence to avoid false reporting of no constructor existing(by manually loading it) - Fixed formatting on ShapeEd Anim window to properly scale - Added onWake calls for the ShapeEd select and properties windows to better prep them position/extents-wise so they should behave more consistently - Fixed issue of Not closing material editor if it was opened via the Edit Selected Material button in the ShapeEd - Fixed issue of highlighting of material not going away when ShapeEditor is closed
This commit is contained in:
parent
7a0ae4c7af
commit
e02981c848
9 changed files with 91 additions and 50 deletions
|
|
@ -6,6 +6,21 @@ function shapeEdAddSequenceGui::show(%seqSourceData)
|
|||
shapeEdAddSequenceWindow-->startFrame.setText("0");
|
||||
shapeEdAddSequenceWindow-->endFrame.setText("-1");
|
||||
|
||||
shapeEdAddSequenceWindow.constructor = "";
|
||||
|
||||
if(AssetDatabase.isDeclaredAsset(%seqSourceData))
|
||||
{
|
||||
%shapeDef = AssetDatabase.acquireAsset(%seqSourceData);
|
||||
%shapeDef.load();
|
||||
|
||||
shapeEdAddSequenceWindow.constructor = findShapeConstructorByAssetId( %seqSourceData );
|
||||
AssetDatabase.releaseAsset(%seqSourceData);
|
||||
}
|
||||
else if(isFile(%seqSourceData))
|
||||
{
|
||||
shapeEdAddSequenceWindow.constructor = findShapeConstructorByFilename( %seqSourceData );
|
||||
}
|
||||
|
||||
Canvas.pushDialog(shapeEdAddSequenceGui);
|
||||
}
|
||||
|
||||
|
|
@ -13,29 +28,16 @@ function shapeEdAddSequenceWindow::onWake(%this)
|
|||
{
|
||||
%sourceSeq = %this-->sourceSeq.getText();
|
||||
|
||||
if(AssetDatabase.isDeclaredAsset(%sourceSeq))
|
||||
{
|
||||
%sourceShapeConstructor = findShapeConstructorByAssetId( %sourceSeq );
|
||||
}
|
||||
else if(isFile(%sourceSeq))
|
||||
{
|
||||
%sourceShapeConstructor = findShapeConstructorByFilename( %sourceSeq );
|
||||
}
|
||||
else
|
||||
{
|
||||
toolsMessageBoxOK("Error!", "Source animation data appears to not be valid. Please close the window and select a different source.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!isObject(%sourceShapeConstructor))
|
||||
if(!isObject(%this.constructor))
|
||||
{
|
||||
toolsMessageBoxOK("Error!", "Unable to find shape constructor for source animation data. Please close the window and select a different source, or make sure the constructor is valid.");
|
||||
return;
|
||||
}
|
||||
|
||||
for(%i=0; %i < %sourceShapeConstructor.getSequenceCount(); %i++)
|
||||
for(%i=0; %i < %this.constructor.getSequenceCount(); %i++)
|
||||
{
|
||||
%name = %sourceShapeConstructor.getSequenceName( %i );
|
||||
%name = %this.constructor.getSequenceName( %i );
|
||||
|
||||
// Ignore __backup__ sequences (only used by editor)
|
||||
if ( !startswith( %name, "__backup__" ) )
|
||||
|
|
@ -51,6 +53,8 @@ function onShapeEditorDoAddNewSequence()
|
|||
%seqSource = shapeEdAddSequenceWindow-->sourceSeq.getText() TAB shapeEdAddSequenceWindow-->fromSeqName.getText();
|
||||
%startFrame = shapeEdAddSequenceWindow-->startFrame.getText();
|
||||
%endFrame = shapeEdAddSequenceWindow-->endFrame.getText();
|
||||
|
||||
%seqSource = trim(%seqSource);
|
||||
|
||||
ShapeEditor.doAddSequence(%seqName, %seqSource, %startFrame, %endFrame);
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "top";
|
||||
Position = "1" SPC getWord($pref::Video::mode, 1) - EditorGuiStatusBar.extent.y - 53;
|
||||
Extent = getWord($pref::Video::mode, 1) - ShapeEdPropWindow.Extent.x SPC 53;
|
||||
Extent = 1561 SPC 53;
|
||||
MinExtent = "475 53";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -36,7 +36,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "top";
|
||||
Position = "5 10";
|
||||
Extent = "809 53";
|
||||
Extent = "1552 52";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -51,7 +51,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "top";
|
||||
Position = "0 3";
|
||||
Extent = "809 38";
|
||||
Extent = "1557 38";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -62,7 +62,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
Profile = "ToolsGuiTextProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
position = "740 19";
|
||||
position = "1440 19";
|
||||
Extent = "35 16";
|
||||
text = "Frame:";
|
||||
};
|
||||
|
|
@ -70,7 +70,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
Profile = "ToolsGuiTextProfile";
|
||||
position = "778 19";
|
||||
position = "1490 19";
|
||||
Extent = "26 18";
|
||||
Variable = "$ShapeEdCurrentFrame";
|
||||
};
|
||||
|
|
@ -112,7 +112,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
Position = "35 4";
|
||||
Extent = "736 20";
|
||||
Extent = "1480 20";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -131,7 +131,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
Profile = "ToolsGuiTextEditProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
Position = "778 0";
|
||||
Position = "1524 0";
|
||||
Extent = "28 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -161,7 +161,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "top";
|
||||
position = "194 17";
|
||||
position = "568 17";
|
||||
extent = "420 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -426,7 +426,7 @@ $guiContent = new GuiWindowCtrl(ShapeEdAnimWindow) {
|
|||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
position = "765 0";
|
||||
position = "1500 0";
|
||||
Extent = "8 13";
|
||||
MinExtent = "1 1";
|
||||
bitmapAsset = "ToolsModule:seq_bar_out_n_image";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue