Skip to content

feat: link identical object copies as instances - #11516

Open
BenJule wants to merge 1 commit into
bambulab:masterfrom
BenJule:feature/link-identical-copies-as-instances
Open

feat: link identical object copies as instances#11516
BenJule wants to merge 1 commit into
bambulab:masterfrom
BenJule:feature/link-identical-copies-as-instances

Conversation

@BenJule

@BenJule BenJule commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a context-menu action that converts selected identical object copies into linked instances of a single object.

This provides the inverse workflow of Set as individual objects and is useful when independent copies created through cloning or copy-based bed filling should share the same object geometry and settings again.

Changes

  • Add Link selected copies as instances to the multiple-object context menu.
  • Keep the selected object with the lowest model index as the master object.
  • Copy the instance transformation of every other selected object to the master.
  • Remove the converted source objects in descending index order.
  • Rebuild the instance hierarchy in the object list.
  • Preserve plate assignments and printable states.
  • Refresh the 3D scene, assembly view, PartPlate data, slicing state, and sidebar controls.
  • Store the complete conversion as a single undo operation.

Compatibility checks

The action is only available when all selected entries are complete object nodes and can be converted without losing object-specific information.

Each selected object must:

  • contain exactly one instance
  • use the same number and order of volumes
  • share the same underlying mesh allocations
  • use identical object and volume configurations
  • use identical volume types, materials, and transformations
  • use identical layer ranges and layer-height profiles
  • use identical support, seam, fuzzy-skin, MMU, and exterior facet annotations
  • use compatible assembly metadata

The action is disabled for:

  • SLA objects
  • cut objects and cut connectors
  • editable text or SVG volumes
  • objects with individual brim points
  • objects with SLA support points or drain holes
  • separately imported meshes that merely have similar geometry

Mesh pointer equality is intentional. It identifies actual Bambu Studio object copies and prevents unrelated imported objects from being linked accidentally.

Transformation preservation

The conversion preserves each source instance's:

  • position
  • rotation
  • scaling
  • mirroring
  • printable state
  • plate placement

The operation does not call ensure_on_bed(), preventing the converted instances from being shifted vertically.

Validation

  • git diff --check
  • targeted compilation of:
    • GUI_ObjectList.cpp.o
    • GUI_Factories.cpp.o
  • repeated Ninja build returned no work to do
  • no compilation errors were reported

A full application build and interactive UI test have not been performed.

@Haidiye00 Haidiye00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi, please record the GIF effect after the changes, thanks

@BenJule

BenJule commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Here you go:

demo

@Haidiye00
Haidiye00 requested a review from lanewei120 August 28, 2026 03:54

@Haidiye00 Haidiye00 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hello, we are very sorry, but bambuStudio is currently designed to not support multiple instances. Multiple instances of objects may cause new problems.

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