World-level custom properties linked from external file are broken after saving #115040

Open
opened 2023-11-17 11:30:12 +01:00 by Vanessa Dannenberg · 21 comments

System Information

Operating system: Debian "Bookworm" 12.2 [Linux-6.1.0-13-amd64-x86_64-with-glibc2.36 64 Bits, X11 UI]

Graphics card: R9 280X [TAHITI (, LLVM 15.0.6, DRM 2.50, 6.1.0-13-amd64) AMD 4.5 (Core Profile) Mesa 22.3.6]

Blender Version

Broken: version: 4.0.0, branch: blender-v4.0-release, commit date: 2023-11-13 17:26, hash: 878f71061b8e
Worked: 3.6.1 and all prior versions[*]

Short description of error

World-level custom properties that are linked-in from another Blender file will break/un-link if you edit the file that's using them and then save that file. But you won't see this effect until you quit from Blender and re-launch, or if you load some other file and then re-load the one you were working on.

Exact steps for others to reproduce the error

outdated files and set of steps deleted
see remarks at #115040 (comment) for updated files and steps

Under 3.6.1 and prior[*], these linked, world-level properties work just fine -- I can save, edit, re-load, quit, etc. over and over without anything breaking.


[*] regarding older Blender versions, there is an exception: the files attached here are actually too new to use with versions prior to 3.5 , as they use the boolean property type, which causes older versions to crash. That said, I've been using linked, world-level properties in my project for a few versions prior, going back to v3.1 or so, maybe a bit earlier (but using integers where I now use booleans, of course).

**System Information** Operating system: Debian "Bookworm" 12.2 [Linux-6.1.0-13-amd64-x86_64-with-glibc2.36 64 Bits, X11 UI] Graphics card: R9 280X [TAHITI (, LLVM 15.0.6, DRM 2.50, 6.1.0-13-amd64) AMD 4.5 (Core Profile) Mesa 22.3.6] **Blender Version** Broken: version: 4.0.0, branch: blender-v4.0-release, commit date: 2023-11-13 17:26, hash: `878f71061b8e` Worked: 3.6.1 and all prior versions<sup>[*]</sup> **Short description of error** World-level custom properties that are linked-in from another Blender file will break/un-link if you edit the file that's using them and then save that file. But you won't see this effect until you quit from Blender and re-launch, or if you load some other file and then re-load the one you were working on. **Exact steps for others to reproduce the error** > outdated files and set of steps deleted > see remarks at https://projects.blender.org/blender/blender/issues/115040#issuecomment-1066639 for updated files and steps Under 3.6.1 and prior<sup>[*]</sup>, these linked, world-level properties work just fine -- I can save, edit, re-load, quit, etc. over and over without anything breaking. ----- [*] regarding older Blender versions, there is an exception: the files attached here are actually too new to use with versions prior to 3.5 , as they use the boolean property type, which causes older versions to crash. That said, I've been using linked, world-level properties in my project for a few versions prior, going back to v3.1 or so, maybe a bit earlier (but using integers where I now use booleans, of course).
Vanessa Dannenberg added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-11-17 11:30:13 +01:00
Iliya Katushenock added the
Interest
Overrides
label 2023-11-17 11:53:30 +01:00

Thank you for submitting the bug report, @VanessaE.

To better assist and forward this issue to the developers, I tried to simplify the files.
Attached are the simplified files saved in version 3.6.5

I'm not really sure if I understand the steps.
Could you check if the problem is also reproducible in these attached files?

Thank you for submitting the bug report, @VanessaE. To better assist and forward this issue to the developers, I tried to simplify the files. Attached are the simplified files saved in version 3.6.5 I'm not really sure if I understand the steps. Could you check if the problem is also reproducible in these attached files?
Germano Cavalcante added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-11-17 21:02:18 +01:00

You may have "simplified" your files too much, as I cannot reproduce the issue using them.

I noticed in the "linked here" file that the world linked into it from the "defined here" file only has the "L" flag next to its name in the variable definition, whereas in mine (that is, the brick generator), it has "LF" next to it wherever it appears. I assume L means "Linked", and "F" means "Fake user"?

Also, your "linked here" file does not have a world defined within it, whereas mine does.

You may have "simplified" your files too much, as I cannot reproduce the issue using them. I noticed in the "linked here" file that the world linked into it from the "defined here" file only has the "L" flag next to its name in the variable definition, whereas in mine (that is, the brick generator), it has "LF" next to it wherever it appears. I assume L means "Linked", and "F" means "Fake user"? Also, your "linked here" file does not have a world defined within it, whereas mine does.

I feel that the scenario and steps described are too time consuming for us to track down, we require the bug reporter to narrow down the problem.

Normally .blend files can be simplified by removing most objects and disabling settings, until the problem reveals itself more clearly.

Since you understand the issue better, could you check if this would be possible?

I feel that the scenario and steps described are too time consuming for us to track down, we require the bug reporter to narrow down the problem. Normally .blend files can be simplified by removing most objects and disabling settings, until the problem reveals itself more clearly. Since you understand the issue better, could you check if this would be possible?

Er, the whole set of steps takes only a couple of minutes to complete. I don't see how there's anything complex here?

But okay, in the name of avoiding excess developer workload, I have generated some new, simpler files:

"settingstest", saved from 3.6, was derived from my printable bricks[*] Global Settings file, and contains the world from the original along with all of its custom properties (I saw no reason to delete them since there's no reason to even look at them 😛), and the "cut/difference" cube and its requisite material.

"bricktest", saved from 3.6, was derived from that project's[*] Brick generator file, and contains two objects: the cube linked from the "settingstest" file, and a cylinder that used to be one of the brick's boolean objects. This cylinder uses two SimpleDeform modfiers which rely on one of the "settingstest" file's world-level properties (brick_tube_outer_diameter_adj).

Steps to reproduce the issue:

  1. Download "bricktest" and "settingstest" to the same directory.
  2. Launch Blender 4.0 and open the "bricktest" file. You will notice that it opens with the modifiers list and driver editor visible, showing that everything is kosher so far.
  3. Select one or both objects, then un-select them.
  4. Save (preferably to a new file) and quit.
  5. Re-launch Blender 4 and reload the file you just saved. The world properties being used are now broken.

The third file included here, "bricktest-broken", should be identical to "bricktest", or it started out that way. It is the result of the above steps -- that is, I saved it from 4.0 after doing absolutely nothing to it apart from selecting objects and then un-selecting them. Something broke its usage of the "settingstest" file's world, just like in the original report.


[*] in case they're still useful, the original files from the bricks project can be found here: https://www.printables.com/model/348098-perfect-parametric-bricks-and-more

Er, the whole set of steps takes only a couple of minutes to complete. I don't see how there's anything complex here? But okay, in the name of avoiding excess developer workload, I have generated some new, simpler files: "settingstest", saved from 3.6, was derived from my printable bricks<sup>[*]</sup> Global Settings file, and contains the world from the original along with all of its custom properties (I saw no reason to delete them since there's no reason to even look at them 😛), and the "cut/difference" cube and its requisite material. "bricktest", saved from 3.6, was derived from that project's<sup>[*]</sup> Brick generator file, and contains two objects: the cube linked from the "settingstest" file, and a cylinder that used to be one of the brick's boolean objects. This cylinder uses two SimpleDeform modfiers which rely on one of the "settingstest" file's world-level properties (`brick_tube_outer_diameter_adj`). Steps to reproduce the issue: 1. Download "bricktest" and "settingstest" to the same directory. 2. Launch Blender 4.0 and open the "bricktest" file. You will notice that it opens with the modifiers list and driver editor visible, showing that everything is kosher so far. 3. Select one or both objects, then un-select them. 4. Save (preferably to a new file) and quit. 5. Re-launch Blender 4 and reload the file you just saved. The world properties being used are now broken. The third file included here, "bricktest-broken", should be identical to "bricktest", or it started out that way. It is the result of the above steps -- that is, I saved it from 4.0 after doing absolutely nothing to it apart from selecting objects and then un-selecting them. Something broke its usage of the "settingstest" file's world, just like in the original report. ----- [*] in case they're still useful, the original files from the bricks project can be found here: https://www.printables.com/model/348098-perfect-parametric-bricks-and-more

Thanks for simplifying. I can confirm now.

I noticed that the linked World has 0 Users when opening the file, which is clearly incorrect.

I apologize for any inconvenience caused due to the challenges in reproducing the issue.

I will escalate to the Core team for further investigation.

@mont29 ^

Thanks for simplifying. I can confirm now. I noticed that the linked World has 0 Users when opening the file, which is clearly incorrect. I apologize for any inconvenience caused due to the challenges in reproducing the issue. I will escalate to the `Core` team for further investigation. @mont29 ^

No worries, I have a bad habit of being a little verbose when I make a bug report. Too much brain dump 😁

No worries, I have a bad habit of being a little verbose when I make a bug report. Too much brain dump 😁
Bastien Montagne added the
Interest
Animation & Rigging
label 2023-11-18 20:38:18 +01:00

As listed in the release notes main page (and explained more in depth in the Core page ), linked data is now more strictly cleaned-up on file save.

Since driver targets are not strong usages of an ID (they do not refcount it), the reference to the world from the linked file is not stored when saved in blender 4.0.

The best way to work around this for now is to reference that linked world in an ID custom property.

As whether Driver targets should be strong ID references, this is more a (design) topic for the Animation & Rigging module. CC @nathanvegdahl , @dr.sybren

As listed in [the release notes main page](https://wiki.blender.org/wiki/Reference/Release_Notes/4.0#Compatibility) (and explained [more in depth in the Core page](https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Core#Breaking_Changes) ), linked data is now more strictly cleaned-up on file save. Since driver targets _are not_ strong usages of an ID (they do not refcount it), the reference to the world from the linked file is not stored when saved in blender 4.0. The best way to work around this for now is to reference that linked world in an [ID custom property](https://wiki.blender.org/wiki/Reference/Release_Notes/4.0/Core#Data-Blocks). As whether Driver targets should be strong ID references, this is more a (design) topic for the [Animation & Rigging module](https://projects.blender.org/blender/blender/projects/1). CC @nathanvegdahl , @dr.sybren

Since driver targets are not strong usages of an ID (they do not refcount it), the reference to the world from the linked file is not stored when saved in blender 4.0.

In which case, Blender should have silently applied your suggested workaround. I mean, I'm not the first person to ever use drivers in this manner (otherwise the option would not exist). The background stuff needs to stay they hell out of the user's way.

As whether Driver targets should be strong ID references, this is more a (design) topic for the Animation & Rigging module. CC nathanvegdahl , dr.sybren

I could see it being okay if we were talking about breaking something that requires the user to poke around in the Python console to implement, but not when it's something done straight through the UI in such a straightforward manner as to imply that it'll persist.

There's no question here, they should be "strong". No if's, and's, or but's.

The best way to work around this for now is to reference that linked world in an ID custom property.

Okay, but since since your link points out that there's no UI for it in previous versions, and I don't know much Python (let alone the Blender API), adding this type of reference would have to be done using 4.0. That in turn means there will be no clean path back to 3.6 if your workaround proves inadequate.

For now I'm simply going to avoid 4.0, and I'll inform others to do the same.

<rant>
Sorry if the following comes-off as a bit coarse -- my project has taken a lot of work to get where it is. Like Blender it's free, but unlike Blender, my project is strictly non-commercial, so I can't even count on being paid for the time I'd have to spend kludging it just to make 4.0 happy (not that I seek such compensation, mind you!). Besides, the last thing I need is to be sued by a certain Danish toy company. 😛

Expecting a project maintainer to dig through release notes, technical documentation, or issue reports to find out their project it going to silently break is bad UX, hands down.

Mine isn't just a one-references-one sort of project, there are a total of 11 .blend files, 10 of which reference objects, materials, and properties in the settings file, and some those files reference objects with their own properties which are found in their neighboring files.

The whole point of all of this cross-referencing is that this project is for 3d-printable parts, so changing one setting in the settings file, such as a diameter adjustment for a standardized hole or the thickness of a brick's bottom edges, has to carry-over to all models throughout the project (well, the next time they're loaded anyway), including the various models that are themselves derived from models linked from other files (for example, one of the models in one file is a gear box, which references the parametric brick from the brick generator, because its bottom geometry is that of a standard 4x2 plate).

My project is minuscule compared to professional projects out there, but it's still big enough that it would take at least a few hours to adjust the project files, including time to verify that things don't break in some other way... and then I don't know how many months it'll be after that before I or someone else spots something I missed. Frankly, I am not convinced that I'll be able to do it right.

I already had to restore from 3.6-compatible backups once when this bug showed itself (yes, it is a bug), and those backups were just a couple of days old, so it cost me a few hours to re-make some recent models. I don't want a repeat of that, let alone on a project-wide scale or with something complex.

This is going to cost people a lot of work hours, even though the workaround itself is trivial.
</rant>

> Since driver targets are not strong usages of an ID (they do not refcount it), the reference to the world from the linked file is not stored when saved in blender 4.0. In which case, Blender should have silently applied your suggested workaround. I mean, I'm not the first person to ever use drivers in this manner (otherwise the option would not exist). The background stuff needs to stay they hell out of the user's way. > As whether Driver targets should be strong ID references, this is more a (design) topic for the Animation & Rigging module. CC nathanvegdahl , dr.sybren I could see it being okay if we were talking about breaking something that requires the user to poke around in the Python console to implement, but not when it's something done straight through the UI in such a straightforward manner as to imply that it'll persist. There's no question here, they should be "strong". No if's, and's, or but's. > The best way to work around this for now is to reference that linked world in an ID custom property. Okay, but since since your link points out that there's no UI for it in previous versions, and I don't know much Python (let alone the Blender API), adding this type of reference would have to be done using 4.0. That in turn means there will be no clean path back to 3.6 if your workaround proves inadequate. For now I'm simply going to avoid 4.0, and I'll inform others to do the same. `<rant>` Sorry if the following comes-off as a bit coarse -- my project has taken a lot of work to get where it is. Like Blender it's free, but unlike Blender, my project is strictly non-commercial, so I can't even count on being paid for the time I'd have to spend kludging it just to make 4.0 happy (not that I seek such compensation, mind you!). Besides, the last thing I need is to be sued by a certain Danish toy company. 😛 Expecting a project maintainer to dig through release notes, technical documentation, or issue reports to find out their project it going to *silently break* is bad UX, hands down. Mine isn't just a one-references-one sort of project, there are a total of 11 .blend files, 10 of which reference objects, materials, and properties in the settings file, and some those files reference objects with their own properties which are found in their neighboring files. The whole point of all of this cross-referencing is that this project is for 3d-printable parts, so changing one setting in the settings file, such as a diameter adjustment for a standardized hole or the thickness of a brick's bottom edges, has to carry-over to all models throughout the project (well, the next time they're loaded anyway), including the various models that are themselves derived from models linked from other files (for example, one of the models in one file is a gear box, which references the parametric brick from the brick generator, because its bottom geometry is that of a standard 4x2 plate). My project is minuscule compared to professional projects out there, but it's still big enough that it would take at least a few hours to adjust the project files, including time to verify that things don't break in some other way... and then I don't know how many months it'll be after that before I or someone else spots something I missed. Frankly, I am not convinced that I'll be able to do it right. I already had to restore from 3.6-compatible backups once when this bug showed itself (yes, it is a bug), and *those* backups were just a couple of days old, so it cost me a few hours to re-make some recent models. I don't want a repeat of that, let alone on a project-wide scale or with something complex. This is going to cost people a lot of work hours, even though the workaround itself is trivial. `</rant>`

Hi @VanessaE

We're very sorry this change causes you some work. In the process of making blender better it's sadly inevitable we sometimes break stuff for some people. We try to minimize the damage always, but sometimes hard choices have to be made. These kind of changes are always communicated in the release notes.

<rant>

In my humble opinion stating that reading the release notes takes too much time borders on being disrespectful to all the developers who have put much much much more time into creating the new version of blender. A lot of them who do it just as unpaid as you do your own project.

</rant>

There's something to be said for creating versioning code to generate such a (hidden) ID referencing all weakly linked datablocks, maybe that could be discussed for v4.1. But as it stands such code does not exist and there are currently no plans for it. Though plans can always be made of course ;-)

If you feel it is better to stay on 3.6 for now to see wait if better workaround emerge that's a valid strategy of course. Luckily 3.6 is an LTS release so it will stay supported for the coming 1.5 year.

btw Compliments from my kids, who really love your MineTest work and have filled countless houses with your furniture :-D

Hi @VanessaE We're very sorry this change causes you some work. In the process of making blender better it's sadly inevitable we sometimes break stuff for some people. We try to minimize the damage always, but sometimes hard choices have to be made. These kind of changes are always communicated in the release notes. `<rant>` In my humble opinion stating that reading the release notes takes too much time borders on being disrespectful to all the developers who have put much much much more time into creating the new version of blender. A lot of them who do it just as unpaid as you do your own project. `</rant>` There's something to be said for creating versioning code to generate such a (hidden) ID referencing all weakly linked datablocks, maybe that could be discussed for v4.1. But as it stands such code does not exist and there are currently no plans for it. Though plans can always be made of course ;-) If you feel it is better to stay on 3.6 for now to see wait if better workaround emerge that's a valid strategy of course. Luckily 3.6 is an LTS release so it will stay supported for the coming 1.5 year. btw Compliments from my kids, who really love your MineTest work and have filled countless houses with your furniture :-D

hard choices have to be made

RAM is cheap. Disk space is stupid cheap. Bandwidth is inexpensive.

No one's saying to waste them, but It is not okay to break a feature just to save a few percent on one of them, and in terms of quantity, all of them are practically infinite these days. My time, and yours, are not.

In my humble opinion stating that reading the release notes takes too much time

I never said it would take too much time to read those notes. My point is that it should not be necessary to look for technical notes at all -- this is a matter of awareness, understanding, and retention.

I didn't know that those notes even existed before Bastien mentioned them, and in fact, I did take the time to read the fancy-schmancy 4.0 release page, and to poke around a bit in the program, explicitly looking for things that I'd need to adapt to, or which might break my workflow, or which would be nice to have, before I tried working on one of my project files with it. You know, the very same thing that practically everyone else is likely to do.

Few will expect this breakage, and even fewer will understand where the fault is and how to work around it, because the workaround itself is buried in technical notes and depends on a UI feature that didn't exist before 4.0 came out.

To put it another way, if I buy a car and later find out that the radio will only work if I start the engine, with the only workaround being to reroute the radio's accessory/power-on wire, should I have been expected to look for tidbits like that in the owner's manual or service manual before taking delivery? No, because running the engine is not the norm for using the radio, and no one anywhere would expect to need tools and wire just to listen to a few tunes. "409" is only supposed to have engine noise in the song itself, not from the car it's playing in. 😛

There's something to be said for creating versioning code to generate such a (hidden) ID referencing all weakly linked datablocks

From the aforementioned technical notes:

"When an unused (as in, having zero users) linked data-block needs to be kept in a blendfile, users are expected to reference them through a Custom Property (e.g. from a Scene, Collection or Object data-block)."

As Germano said before, in this instance the number of users is being set to 0 when before it was set to 1 -- I can see this right now in the project file I have open at the moment in 3.6. Having no number displayed for number of users is, as far as I am aware, equivalent to displaying a 1.

If you feel it is better to stay on 3.6 for now to see wait if better workaround emerge that's a valid strategy of course. Luckily 3.6 is an LTS release so it will stay supported for the coming 1.5 year.

I hope something happens before then. The reason I'm such a grouch about this is that my project depends on many custom properties that have only very subtle effects. I'm talking about adjustments that are on the order of 0.05 mm. A really good FDM printer can realize a difference that small, with tangible effects on the fit of the part (to say nothing of how good resin/SLA can be), but on-screen, a difference that tiny is practically invisible.

That in turn means it'll be nigh on impossible for me to see if the proposed workaround is in fact working in all facets of my project. The only reason I even caught it is because the standard settings put the Blender logo on a brick's studs, and that logo had disappeared. Off the top of my head, that's the only feature I can think that is so blatantly obvious when enabled, all other settings have only subtle effects when the brick is at its defaults. If the logo weren't supposed to have been present, I would never have known about the glitch until it was too late to recover.


Bottom line:

This change violates the Principle of Least Astonishment and should be reverted.

> hard choices have to be made RAM is cheap. Disk space is stupid cheap. Bandwidth is inexpensive. No one's saying to waste them, but It is not okay to break a feature just to save a few percent on one of them, and in terms of quantity, all of them are practically infinite these days. My time, and yours, are not. >In my humble opinion stating that reading the release notes takes too much time I never said it would take too much time to read those notes. My point is that it should not be necessary to look for technical notes at all -- this is a matter of awareness, understanding, and retention. I didn't know that those notes even existed before Bastien mentioned them, and in fact, I did take the time to read the fancy-schmancy 4.0 release page, and to poke around a bit in the program, explicitly looking for things that I'd need to adapt to, or which might break my workflow, or which would be nice to have, before I tried working on one of my project files with it. You know, the very same thing that practically everyone else is likely to do. Few will expect this breakage, and even fewer will understand where the fault is and how to work around it, because the workaround itself is buried in technical notes and depends on a UI feature that didn't exist before 4.0 came out. To put it another way, if I buy a car and later find out that the radio will only work if I start the engine, with the only workaround being to reroute the radio's accessory/power-on wire, should I have been expected to look for tidbits like that in the owner's manual or service manual before taking delivery? No, because running the engine is not the norm for using the radio, and no one anywhere would expect to need tools and wire just to listen to a few tunes. "409" is only supposed to have engine noise in the song itself, not from the car it's playing in. 😛 > There's something to be said for creating versioning code to generate such a (hidden) ID referencing all weakly linked datablocks From the aforementioned technical notes: "When an unused (as in, having zero users) linked data-block needs to be kept in a blendfile, users are expected to reference them through a Custom Property (e.g. from a Scene, Collection or Object data-block)." As Germano said before, in this instance the number of users is being set to 0 when before it was set to 1 -- I can see this right now in the project file I have open at the moment in 3.6. Having no number displayed for number of users is, as far as I am aware, equivalent to displaying a 1. > If you feel it is better to stay on 3.6 for now to see wait if better workaround emerge that's a valid strategy of course. Luckily 3.6 is an LTS release so it will stay supported for the coming 1.5 year. I hope something happens before then. The reason I'm such a grouch about this is that my project depends on many custom properties that have only very subtle effects. I'm talking about adjustments that are on the order of 0.05 mm. A really good FDM printer can realize a difference that small, with tangible effects on the fit of the part (to say nothing of how good resin/SLA can be), but on-screen, a difference that tiny is practically invisible. That in turn means it'll be nigh on impossible for me to see if the proposed workaround is in fact working in all facets of my project. The only reason I even caught it is because the standard settings put the Blender logo on a brick's studs, and that logo had disappeared. Off the top of my head, that's the only feature I can think that is so blatantly obvious when enabled, all other settings have only subtle effects when the brick is at its defaults. If the logo weren't supposed to have been present, I would never have known about the glitch until it was too late to recover. ----- Bottom line: This change violates the [Principle of Least Astonishment](https://en.wikipedia.org/wiki/Principle_of_least_astonishment) and should be reverted.

btw Compliments from my kids, who really love your MineTest work and have filled countless houses with your furniture :-D

Thanks! I'm glad they enjoy my stuff. 😃

> btw Compliments from my kids, who really love your MineTest work and have filled countless houses with your furniture :-D Thanks! I'm glad they enjoy my stuff. 😃

Having no number displayed for number of users is, as far as I am aware, equivalent to displaying a 1.

Which I don't think is always true. The only reason the world object stuck around in 3.0 was because it inherited the 'fake user' property from the base file. This is exactly the problem that was fixed (as far as I understand). As a linked object is not editable it makes no sense to make use its fake user setting as that was meant for the base file. Because this worked in the 'wrong' way endless amounts of cruft tended to gather in large production files. And ram/disk may be cheap, it's not free. Also it could make files sluggish and unwieldy.

should be reverted.

Which is probably not going to happen, because of the reasons stated above. It is was a bug in previous blender releases, which unfortunately some people came to depend upon. A truly valid solution for this problem would be to turn driver usage into a strong reference. Which is for the animation and rigging module to decide (hence they are tagged in this case), as they have the overview of possible downsides of doing that.

In the meantime: As far as I understand you have all your linked settings in custom properties on the world object? Because in that case it's not that much work to fix your files. You don't need to reference all individual properties in your files, just adding a global property to the world in your current file referencing the linked world object is enough to create a strong reference. That's creating 1 custom property in each file after opening them in 4.0 for the first time. It's not ideal, but for 11 (or so) files (like you described) also not the end of the world I guess.

> Having no number displayed for number of users is, as far as I am aware, equivalent to displaying a 1. Which I don't think is always true. The only reason the world object stuck around in 3.0 was because it inherited the 'fake user' property from the base file. This is exactly the problem that was fixed (as far as I understand). As a linked object is not editable it makes no sense to make use its fake user setting as that was meant for the base file. Because this worked in the 'wrong' way endless amounts of cruft tended to gather in large production files. And ram/disk may be cheap, it's not *free*. Also it could make files sluggish and unwieldy. > should be reverted. Which is probably not going to happen, because of the reasons stated above. It is was a bug in previous blender releases, which unfortunately some people came to depend upon. A truly valid solution for this problem would be to turn driver usage into a strong reference. Which is for the animation and rigging module to decide (hence they are tagged in this case), as they have the overview of possible downsides of doing that. In the meantime: As far as I understand you have all your linked settings in custom properties on the world object? Because in that case it's not *that* much work to fix your files. You don't need to reference all individual properties in your files, just adding a global property to the world in your current file referencing the linked world object is enough to create a strong reference. That's creating 1 custom property in each file after opening them in 4.0 for the first time. It's not ideal, but for 11 (or so) files (like you described) also not the end of the world I guess.

In the meantime: As far as I understand you have all your linked settings in custom properties on the world object

No, it goes beyond that -- like I said, this isn't one-references-one, or even just many-references-one, not since some months now. Some of the files that reference the settings file also reference their counterparts as well. As the project has grown, I've begun to forget just what links to what, mainly because I simply didn't have to think about that in the past -- if I need something in one file and it isn't already available there, I'll link it in from whatever file has the "root" version of the model.

> In the meantime: As far as I understand you have all your linked settings in custom properties on the world object No, it goes beyond that -- like I said, this isn't one-references-one, or even just many-references-one, not since some months now. Some of the files that reference the settings file also reference their counterparts as well. As the project has grown, I've begun to forget just what links to what, mainly because I simply didn't have to think about that in the past -- if I need something in one file and it isn't already available there, I'll link it in from whatever file has the "root" version of the model.

I'm no python wizard, but maybe this script helps:

import bpy


world = bpy.data.worlds[0].id_data

for obj in bpy.data.objects:
    if obj.library != None:
        propname = "protect-" + obj.name
        world[propname] = obj

It goes through the complete file , checks if an object is linked and if it is creates a property on the first world referencing it.
Which if I understand it correctly should keep it in the file at all times.

I'm no python wizard, but maybe this script helps: ``` import bpy world = bpy.data.worlds[0].id_data for obj in bpy.data.objects: if obj.library != None: propname = "protect-" + obj.name world[propname] = obj ``` It goes through the complete file , checks if an object is linked and if it is creates a property on the first world referencing it. Which if I understand it correctly should keep it in the file at all times.

I appreciate the effort, Martijn. I'll play with a bit soon (sorry, been avoiding Blender stuff altogether for a bit)

I feel I must point out that you proved one of my earlier points by posting that snippet -- if the proper conversion can be coded in so few lines, and Blender runs Python basically natively, why not add that to Blender officially, having it run if a loaded file predates 4.0? :)

Though unless I'm misreading it, wouldn't this create huge numbers of properties if there are a lot of objects that don't tie back to some library? We want to maintain the world-to-world link, so I'm not entirely sure I understand how that code would do that job.

I appreciate the effort, Martijn. I'll play with a bit soon (sorry, been avoiding Blender stuff altogether for a bit) I feel I must point out that you proved one of my earlier points by posting that snippet -- if the proper conversion can be coded in so few lines, and Blender runs Python basically natively, why not add that to Blender officially, having it run if a loaded file predates 4.0? :) Though unless I'm misreading it, wouldn't this create huge numbers of properties if there are a lot of objects that don't tie back to some library? We want to maintain the world-to-world link, so I'm not entirely sure I understand how that code would do that job.

I feel I must point out that you proved one of my earlier points by posting that snippet -- if the proper conversion can be coded in so few lines, and Blender runs Python basically natively, why not add that to Blender officially, having it run if a loaded file predates 4.0? :)

Because that would completely negate the reason of this change. This change was created because of complaints from people working on big movie projects that their production files got full of cruft from once linked stuff that was never cleaned (because the 'fake user' property being inherited from the library). This code makes sure nothing coming from a library will get cleaned/purged so doing that by default would for most people do the opposite of what they want. The actual solution for your problem would be if blender considered driver usage a strong usage. But to get that changed you'd need to lobby the animation module . This script is just a workaround to create strong references for anything linked from a library.

wouldn't this create huge numbers of properties if there are a lot of objects that don't tie back to some library?

Unless I made a mistake, it should be the other way around. It should create properties for all objects that do tie back to some library.
It's not that bad, a property on the world is just a bit of text.

We want to maintain the world-to-world link, so I'm not entirely sure I understand how that code would do that job.

By referencing the object from a world property, we make sure it's user count is at least 1, so it won't get trashed on save.

>I feel I must point out that you proved one of my earlier points by posting that snippet -- if the proper conversion can be coded in so few lines, and Blender runs Python basically natively, why not add that to Blender officially, having it run if a loaded file predates 4.0? :) Because that would completely negate the reason of this change. This change was created because of complaints from people working on big movie projects that their production files got full of cruft from once linked stuff that was never cleaned (because the 'fake user' property being inherited from the library). This code makes sure nothing coming from a library will get cleaned/purged so doing that by default would for most people do the opposite of what they want. The actual solution for your problem would be if blender considered driver usage a *strong* usage. But to get that changed you'd need to lobby the animation module . This script is just a workaround to create strong references for *anything* linked from a library. >wouldn't this create huge numbers of properties if there are a lot of objects that don't tie back to some library? Unless I made a mistake, it should be the other way around. It should create properties for all objects that *do* tie back to some library. It's not that bad, a property on the world is just a bit of text. > We want to maintain the world-to-world link, so I'm not entirely sure I understand how that code would do that job. By referencing the object from a world property, we make sure it's user count is at least 1, so it won't get trashed on save.

But to get that changed you'd need to lobby the animation module

To put it bluntly, I shouldn't have to lobby *anyone*. This is a regression that will break a lot of projects, no matter how people want to spin it. To clean up all that cruft should have required an explicit action by the user, with a warning of what will happen.

That said, if what you say is true about "people working on big movie projects", then I doubt they'll listen to a nobody like me. Us low-end folks are always the first to be hand-waved away.

> But to get that changed you'd need to lobby the animation module To put it bluntly, I shouldn't have to lobby \*anyone\*. This is a regression that will break a lot of projects, no matter how people want to spin it. To clean up all that cruft should have required an explicit action by the user, with a warning of what will happen. That said, if what you say is true about "people working on big movie projects", then I doubt they'll listen to a nobody like me. Us low-end folks are always the first to be hand-waved away.

To put it bluntly, I shouldn't have to lobby anyone.

To put it bluntly: yes you do. Blender is an open source project, meaning a collective effort. The developers try to keep everyone happy. But they can only fix problems they are aware of. They have to know if something is important enough to spend time on. They can only know that if someone takes it upon them to make them aware.

Us low-end folks are always the first to be hand-waved away.

Well, that's not really fair I think. I think the chances of you being heard here in a blender context is a gazillion times bigger than with most other big 3d apps.

You have a valid point, but the case is just that blender has a limited amount of available developer time and no helpdesk for filling the role of intermediary between the developers and the users. So the latter task falls on the users themselves.

> To put it bluntly, I shouldn't have to lobby *anyone*. To put it bluntly: yes you do. Blender is an open source project, meaning a collective effort. The developers try to keep everyone happy. But they can only fix problems they are aware of. They have to know if something is important enough to spend time on. They can only know that if someone takes it upon them to make them aware. > Us low-end folks are always the first to be hand-waved away. Well, that's not really fair I think. I think the chances of you being heard here in a blender context is a gazillion times bigger than with most other big 3d apps. You have a valid point, but the case is just that blender has a limited amount of available developer time and *no* helpdesk for filling the role of intermediary between the developers and the users. So the latter task falls on the users themselves.

But they can only fix problems they are aware of.

Which is, of course, why I filed this issue in the first place. To me that's not "lobbying", as you put it. It's just reporting.

You have a valid point, but the case is just that blender has a limited amount of available developer time

Thank you, but I think you miss some irony here: the developers found time to introduce this change. If there's time to break something, there's time to *not* break it also. 😛

> But they can only fix problems they are aware of. Which is, of course, why I filed this issue in the first place. To me that's not "lobbying", as you put it. It's just reporting. > You have a valid point, but the case is just that blender has a limited amount of available developer time Thank you, but I think you miss some irony here: the developers found time to introduce this change. If there's time to break something, there's time to \*not* break it also. 😛

Which is, of course, why I filed this issue in the first place. To me that's not "lobbying", as you put it. It's just reporting.

Yes, and that's step 1. The animation module was notified by the triage team (by adding the animation and rigging tag). You can wait if they react. But that will take time. And might need lobbying if they don't. Hence my temporary workaround script. (did you already try if it solves your problem for now? )

Thank you, but I think you miss some irony here: the developers found time to introduce this change. If there's time to break something, there's time to not break it also.

That's of course entirely not how this works. The change was introduced because someone had a problem and that problem was fixed. A side effect of that fix is that a new problem was introduced. I wish it were true that changing anything in blender magically created the time to fix any problems resulting from that change. But sadly the laws of physics disagree. :-(

> Which is, of course, why I filed this issue in the first place. To me that's not "lobbying", as you put it. It's just reporting. Yes, and that's step 1. The animation module was notified by the triage team (by adding the animation and rigging tag). You can wait if they react. But that will take time. And *might* need lobbying if they don't. Hence my temporary workaround script. (did you already try if it solves your problem for now? ) > Thank you, but I think you miss some irony here: the developers found time to introduce this change. If there's time to break something, there's time to *not* break it also. That's of course entirely not how this works. The change was introduced because someone had a problem and that problem was fixed. A side effect of that fix is that a new problem was introduced. I wish it were true that changing anything in blender magically created the time to fix any problems resulting from that change. But sadly the laws of physics disagree. :-(

That's of course entirely not how this works.

And I know that all too well. I'm not new to coding or to open source, not by a long shot.

I wish it were true that changing anything in blender magically created the time to fix any problems resulting from that change.

My point was they found time to make that change to begin with. I simply cannot accept that they didn't see this kind of breakage being likely before pushing this cleanup change to release.

If I reference one file inside another, that reference should persist until I deliberately break that reference. ANY kind of link the user had to intentionally create should be strong, including drivers and properties.

But we're going around in circles here, and meanwhile the animation folks have yet to comment (or I didn't see it), so I'm just gonna step away from this before I say something I'll regret.

> That's of course entirely not how this works. And I know that all too well. I'm not new to coding or to open source, not by a long shot. > I wish it were true that changing anything in blender magically created the time to fix any problems resulting from that change. My point was they found time to make that change to begin with. I simply cannot accept that they didn't see this kind of breakage being likely before pushing this cleanup change to release. If I reference one file inside another, that reference should persist until I deliberately break that reference. ANY kind of link the user had to intentionally create should be strong, including drivers and properties. But we're going around in circles here, and meanwhile the animation folks have yet to comment (or I didn't see it), so I'm just gonna step away from this before I say something I'll regret.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#115040
No description provided.