Skip to content

Ipc - #296

Merged
donkeyProgramming merged 4 commits into
donkeyProgramming:masterfrom
Shazbot:ipc
Mar 14, 2026
Merged

Ipc#296
donkeyProgramming merged 4 commits into
donkeyProgramming:masterfrom
Shazbot:ipc

Conversation

@Shazbot

@Shazbot Shazbot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

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

var res = LogicalTreeHelperEx.FindParent<Grid>(_focusElement);
var result = VisualTreeHelper.HitTest(res, pos);
if (result?.VisualHit == _focusElement)
if (res != null)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this code changed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this code changed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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; } = [];

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this used anywhere?

@Shazbot Shazbot Mar 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_inputFileReference = fileToLoad;
_kitbashSceneCreator.CreateFromPackFile(fileToLoad);
_focusSelectableObjectComponent.FocusScene();
var shouldFocusScene = string.Equals(Path.GetExtension(fileToLoad.Name), ".variantmeshdefinition", StringComparison.InvariantCultureIgnoreCase) == false;

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should the scene not be focused?

@Shazbot Shazbot Mar 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@donkeyProgramming
donkeyProgramming merged commit c8dac37 into donkeyProgramming:master Mar 14, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants