Skip to content

Add mesh name assignment to prim if available in inner_instance_list#173

Open
KanikaBreed wants to merge 1 commit into
OpenSim-NGC:developfrom
KanikaBreed:fix-mesh-upload
Open

Add mesh name assignment to prim if available in inner_instance_list#173
KanikaBreed wants to merge 1 commit into
OpenSim-NGC:developfrom
KanikaBreed:fix-mesh-upload

Conversation

@KanikaBreed

Copy link
Copy Markdown

This brings Avastar mesh uploads closer to Second Life behavior by allowing individual mesh parts to retain their intended names instead of always being assigned generated off of the root mesh name.

This brings Avastar mesh uploads closer to Second Life behavior by allowing individual mesh parts to retain their intended names instead of always being assigned generated off of the root mesh name.

@mdickson mdickson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the mesh upload CAPS handling to better match Second Life behavior by allowing individual mesh parts (instances) to set the resulting SceneObjectPart name from the per-instance "mesh_name" field when present, instead of always deriving names from the root asset name.

Changes:

  • Assign prim.Name from inner_instance_list["mesh_name"] when available and non-empty.
  • Preserve the existing fallback naming scheme (assetName for root, assetName#<i> for children) when no per-part name is provided.

Comment on lines +953 to 958
if (inner_instance_list.ContainsKey("mesh_name") && !string.IsNullOrEmpty(inner_instance_list["mesh_name"].AsString()))
prim.Name = inner_instance_list["mesh_name"].AsString();
else if (grp == null)
prim.Name = assetName;
else
prim.Name = assetName + "#" + i.ToString();
@mdickson mdickson changed the base branch from master to develop June 10, 2026 09:50
@mdickson

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

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.

3 participants