Fix error when renaming affixes for objects referenced in read-only file.#154
Fix error when renaming affixes for objects referenced in read-only file.#154jack-yao91 wants to merge 3 commits intomainfrom
Conversation
Fix error when renaming affixes for objects referenced in read-only file.
|
Looks like we need a condition to check the blender version so we can maintain 3.6 compatibility. |
|
ID.rename was introduced in Blender 4.3 so compatibility would need to be maintained for 3.6 to 4.2 |
|
Brief report of my findings. I attempted to fix the I haven't fully tested it but my understanding of the behaviour is as follows.
A couple of potential solutions, both quite extreme:
I've got some other obligations to catch up on for the moment. Can come back to this in a couple of days. If anyone has any better ideas let me know and I'll take a crack. |
|
Oh... I might've made a mistake. I've created another pull request (here: #157) to attempt to patch the issue. I didn't realise that pull requests don't quite work that way... Either way, the sum of the changesets provided should fix the affix extension for users running I'll be running 4.2 LTS for the next 6-12 months so if you guys can't figure out a better approach maybe I'll come up with something in that timeframe. |
|
merged #157. I think you can commit directly to the affixes-read-only-fix branch instead of creating a PR? |
Originally opened by @SalamiArmi #153
Scenario:
There are two blender files, big_library.blend and small_asset.blend. big_library.blend has a bunch of heavyweight resources which small_asset.blend can reference. Meshes, materials, whatever. When exporting small_asset.blend with the 'affix' extension enabled, the script will attempt to directly modify the name of the object, which is read-only.
This originally worked in Blender 3.6 (LTS) but was broken when testing Blender 4.4.2. I imagine the API has changed between then and now.