Add support for Blender 5.0#332
Merged
Exairnous merged 1 commit intoHubs-Foundation:masterfrom Jan 20, 2026
Merged
Conversation
What: Components are now accessed via `getattr` instead of via dictionary key when copying components from one object to another and property_unset is used to remove components instead of deleting them directly. Why: Blender 5.0 no longer allows access to `bpy.props` properties (which is what the components technically are) via dictionary key or directly deleting them. Notes: It's unclear which cases of dictionary key access are affected by the changes in Blender 5.0, e.g. properties within a `PropertyGroup` seem to act the same as previously (accessible via dictionary key after they have been set at least once). The replacements for dictionary key access and deleting properties work in previous versions of Blender, so support for previous versions remains the same. References: * https://developer.blender.org/docs/release_notes/5.0/python_api/#removal-of-unsupported-access-to-runtime-defined-properties-storage-data * https://projects.blender.org/blender/blender/commit/469f54f484 * https://projects.blender.org/blender/blender/issues/141042
Member
Author
|
Download link for zip for testing: https://github.com/Hubs-Foundation/hubs-blender-exporter/actions/runs/19470730376/artifacts/4602924519 |
Member
|
I think we should also add 5.0 to the CI test versions. |
Member
Author
|
@hrithikwins @GottfriedHofmann @Spiderguy-F Can you review this, and test it on your systems, please? There is a download link for the zip in my comment above. |
GottfriedHofmann
approved these changes
Jan 15, 2026
Contributor
GottfriedHofmann
left a comment
There was a problem hiding this comment.
I have tested the PR in Blender 5.0 on Linux and it works like a charm, no errors triggered when copying or removing a component.
Member
Author
|
@GottfriedHofmann Excellent! Thanks. Merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Prevents Python errors when copying components from one object to another, and when removing components in Blender 5.0.
Why?
To allow components to be copied or removed successfully in Blender 5.0, the same as in previous versions.
Examples
N/A (this prevents Python errors, so the only thing changed should be that no errors pop up in Blender 5.0 when copying or deleting components).
How to test
Documentation of functionality
No changes to functionality/behaviour.
Limitations
Only tested in Linux, but otherwise there are no known limitations.
UPDATE: this doesn't address the issues with the Loop Animation component that were found after this PR was opened.
Alternatives considered
None.
Open questions
Does this work in Windows/Mac?
Additional details or related context
See the commit message for technical details.
Thanks to @hrithikwins for finding the issues this PR addresses!
References: