Skip to content

Fix import when object exists but is not in view layer#583

Open
combwizard wants to merge 1 commit into
JoseConseco:masterfrom
combwizard:fix-import-view-layer
Open

Fix import when object exists but is not in view layer#583
combwizard wants to merge 1 commit into
JoseConseco:masterfrom
combwizard:fix-import-view-layer

Conversation

@combwizard

Copy link
Copy Markdown

Repro: export mesh via GoB, delete from scene (datablock remains), GoZ back, Manual Import.

Error: select_set fails, object not in View Layer.

make_mesh() only linked new objects to a collection. Updates to existing datablocks skipped re-linking.

Adds _ensure_object_in_view_layer() to link orphan/excluded objects into Scene Collection before select_set.

make_mesh() only linked new objects to a collection. Re-importing
by name updated orphan or excluded objects without re-linking them,
so select_set() crashed.
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.

1 participant