Merge pull request #2189 from Areloch/AnimationAssetImprovements

Bugfixes and improvements for the animation component and related assets
This commit is contained in:
Areloch 2018-02-13 14:54:38 -06:00 committed by GitHub
commit 7af3de2517
6 changed files with 130 additions and 15 deletions

View file

@ -346,10 +346,11 @@ function ActionAddSequence::doit( %this )
%assetDef = AssetDatabase.acquireAsset(%this.seqName);
%moduleName = getWord(getToken(%this.seqName, ":", 0),0);
%idx = ShapeEdSequenceList.rowCount();
//TODO, properly ignore <rootpose> and ambient entries for our idx values, but only if they're there!
%idx = ShapeEdSequenceList.rowCount() - 2;
%matSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@Asset="@%moduleName@":"@%this.seqName.assetName@"\";";
eval(%matSet);
%animSet = "ShapeEditorPlugin.selectedAssetDef.animationSequence"@%idx@"=\"@Asset="@%moduleName@":"@%assetDef.assetName@"\";";
eval(%animSet);
%assetPath = AssetDatabase.getAssetFilePath(ShapeEditorPlugin.selectedAssetId);
@ -357,6 +358,9 @@ function ActionAddSequence::doit( %this )
AssetDatabase.refreshAsset(ShapeEditorPlugin.selectedAssetId);
//force a refresh
ShapeEdPropWindow.update_onShapeSelectionChanged();
return true;
}
return false;