Conversation
| var res = LogicalTreeHelperEx.FindParent<Grid>(_focusElement); | ||
| var result = VisualTreeHelper.HitTest(res, pos); | ||
| if (result?.VisualHit == _focusElement) | ||
| if (res != null) |
There was a problem hiding this comment.
Why was this code changed?
There was a problem hiding this comment.
I was getting an exception here because HitTest returned null, possibly after forcing the app into foreground and then clicking with the mouse inside the kitbash editor, I can try to reproduce it if it's important
| var result = VisualTreeHelper.HitTest(res, pos); | ||
| if (result?.VisualHit == _focusElement) | ||
| hit = true; | ||
| if (res != null) |
There was a problem hiding this comment.
Why was this code changed?
There was a problem hiding this comment.
same issue with HitTest res returning null
| public bool IsCaPackFile { get; set; } = false; | ||
| public string SystemFilePath { get; set; } | ||
| public long OriginalLoadByteSize { get; set; } = -1; | ||
| public HashSet<string> SourcePackFilePaths { get; set; } = []; |
There was a problem hiding this comment.
it's used to check what vanilla packs have been loaded under All Game Packs so we don't load the pack again
used here to not load the file:
https://github.com/donkeyProgramming/TheAssetEditor/pull/296/changes#diff-5158bbd0c689476defa80574f424639c7e6c6e61754c4e25c2928d6b820144d3R42
and populated in PackFileContainerLoader:
https://github.com/donkeyProgramming/TheAssetEditor/pull/296/changes#diff-4116d24b5429d60d45a7fda7ef12a82b0687210830058bdb444e193ceb1a946fR157
| _inputFileReference = fileToLoad; | ||
| _kitbashSceneCreator.CreateFromPackFile(fileToLoad); | ||
| _focusSelectableObjectComponent.FocusScene(); | ||
| var shouldFocusScene = string.Equals(Path.GetExtension(fileToLoad.Name), ".variantmeshdefinition", StringComparison.InvariantCultureIgnoreCase) == false; |
There was a problem hiding this comment.
Why should the scene not be focused?
There was a problem hiding this comment.
wsmodels and rigid models are loaded into Editable Model, but vmds are loaded under Reference Meshes, this causes FocusScene to fail if we try to call it (var nodes = mainNode.GetMeshNodes(0) inside FocusScene will fail)
Adds a way to communicate with another process using named pipes. We can tell Asset Editor to open wsmodel, variantmeshdefinition and rigid_model_v2 files, in a new or existing tab.
see asseteditor-ipc.md
video