Skip to content

Ipc#296

Open
Shazbot wants to merge 3 commits intodonkeyProgramming:masterfrom
Shazbot:ipc
Open

Ipc#296
Shazbot wants to merge 3 commits intodonkeyProgramming:masterfrom
Shazbot:ipc

Conversation

@Shazbot
Copy link
Contributor

@Shazbot Shazbot commented Feb 24, 2026

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
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
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
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
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
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?

Copy link
Contributor Author

@Shazbot Shazbot Mar 7, 2026

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
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?

Copy link
Contributor Author

@Shazbot Shazbot Mar 7, 2026

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)

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