public async System.Threading.Tasks.Task SetObjectToEdit(ResourceEditorContext context) { await EngineNS.Thread.AsyncDummyClass.DummyFunc(); var info = context.ResInfo as EditorCommon.ResourceInfos.SkeletonResourceInfo; if (mCurrentResourceInfo == null || mCurrentResourceInfo.ResourceName != info.ResourceName) { mCurrentResourceInfo = info; SetBinding(TitleProperty, new Binding("ResourceName") { Source = context.ResInfo, Converter = new EditorCommon.Converter.RNameConverter_PureName() }); IconBrush = context.ResInfo.ResourceTypeBrush; mSkeletonTreeViewOperation = new SkeletonTreeViewOperation(); mSkeleton = EngineNS.CEngine.Instance.SkeletonAssetManager.GetSkeleton(EngineNS.CEngine.Instance.RenderContext, mCurrentResourceInfo.ResourceName); mSkeletonTreeViewOperation.Skeleton = mSkeleton; mSkeletonTreeViewOperation.SkeletonTreeView = TreeView_Skeleton; CreateSkeletonTreeView(); await CachingPreviewMeshOfSkeleton(); await mPreviewSceneControl.Initialize(mSceneName); ProGrid_PreviewScene.Instance = mPreviewSceneControl; await PreviewMeshChanged(); CEngine.Instance.TickManager.AddTickInfo(this); } }
protected override async System.Threading.Tasks.Task <ResourceInfo> CreateResourceInfoFromResourceOverride(RName resourceName) { await EngineNS.Thread.AsyncDummyClass.DummyFunc(); var retValue = new SkeletonResourceInfo(); retValue.ResourceName = resourceName; retValue.ResourceType = EngineNS.Editor.Editor_RNameTypeAttribute.Skeleton; return(retValue); }