Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing property defaults will unintentionally change people's .blend files #248

Open
StjerneIdioten opened this issue Jan 11, 2025 · 0 comments
Labels
blender-quirk Anything that relates to the Blender API being quirky feature request A request for adding in a new feature

Comments

@StjerneIdioten
Copy link
Owner

In Blender a PropertyGroup is not saved to the .blend file until someone actually sets it to a value. Until then it will just present with the default value in the UI as well as if you access it by dot-notation through the python API.

This means that if a property has it's default value updated in the add-on, the corresponding property will also "change" for everyone who was satisfied with the default and didn't change the value. This will of course lead to unwanted "changes" to people's .blend files if the add-on changes defaults. So it would be ideal with some sort of mechanism to either always make sure that all properties are saved to the .blend file or be aware of this quirk and update the .blend file as appropriate when opening an older file with a newer add-on.

Sources:

@StjerneIdioten StjerneIdioten added feature request A request for adding in a new feature blender-quirk Anything that relates to the Blender API being quirky labels Jan 11, 2025
StjerneIdioten added a commit that referenced this issue Jan 11, 2025
Return Cast and Receive Shadows to the old default value until #248 is fixed to not mess with peoples projects
NMC-TBone added a commit to NMC-TBone/I3D-Blender-Addon that referenced this issue Mar 9, 2025
Ensures that i3d_attributes properties retain their original default values
when updating the add-on. This prevents unexpected changes to properties
that were previously unset in .blend files.

This also includes this reverted change: 6d640bb

fix: StjerneIdioten#248
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blender-quirk Anything that relates to the Blender API being quirky feature request A request for adding in a new feature
Projects
None yet
Development

No branches or pull requests

1 participant