1f780a5caa3592778808ca5b1cbd03ea1ec2d53a
When setting these materials, then removing the modifier, usercount would be decreased, resulting in possible dataloss on reload Affected were: - all Grease Pencil modifiers material influence materials - `LineartModifier` `target_material` - `OutlineModifier` `outline_material` These were all using `IDWALK_CB_USER` which ends up decrementing usercount in `modifier_free_data_id_us_cb` when the modifier is removed So to resolve, decrement/increment material usercount in `rna_GreasePencilModifier_material_set` appropriately NOTE: previously, it was also doing `id_lib_extern` on the object?! (should be on the material, no?) NOTE: still not 100% sure where we actually use refcounting (esp. in modifiers) and where we dont, another alternative is to just drop it and use IDWALK_CB_NOP` (instead of `IDWALK_CB_USER`) for these materials. Pull Request: https://projects.blender.org/blender/blender/pulls/135729
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
