STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
357
IN-GAME
2,221
ONLINE
Founded
8 November, 2013
All Discussions > Bug Reports > Topic Details
Devo 12 Jun, 2022 @ 9:39am
Deleting armatures in viewport doesn't remove it completely
Hello,
I'm not sure if it's a bug or itended behavior, but deleting an armature in the viewport does only remove it of the scene, but not of the project anymore.

I've been using BST 3.1 all the time and never had problems in combination with thirdparty addons, but with BST 3.2.2 I can get errors with thirdparty addons cause the armatures still exist, but are not in the view layer.

I just want to make sure if that behavior intended. I'm not asking for a change, unless it's a bug. I've updated our addon so it checks if armatues are also in the scene, so it is compatible with BST 3.2.2.

As you can see after deleting an armature the number of armatues doesn't match the ones in the scenes in 3.2.2:

BST 3.2.2
https://i.imgur.com/ueBQEsj.png

BST 3.1
https://i.imgur.com/eVpYAPc.png
< >
Showing 1-8 of 8 comments
Artfunkel 13 Jun, 2022 @ 11:05am 
This is normal. Deleting an object from the scene doesn't immediately remove it from Blender.

However, objects without users are not saved to the .blend file. You should find that the armature is gone after you reopen the file.

If this is not the case, then it still has a user, or has a fake user.
Devo 13 Jun, 2022 @ 1:34pm 
Define "normal", was it a bug before? As said 3.1 did behave differently under the same conditions. The condition is deleting it from the viewport.
The 3.2 version only deletes it of the project if it's been selected in the Scene Collection instead of viewport.
Artfunkel 14 Jun, 2022 @ 3:41am 
Normal means that it's intended behaviour in the core Blender application. This has nothing to do with the Blender Source Tools, which doesn't handle deletion of objects or set fake users (except on import, for Actions).
Devo 14 Jun, 2022 @ 4:44pm 
That’s weird, cause there defo is a different in behavior in the different BST versions. I went through a few commints, but couldn’t anything that would have caused it, but something defo changed it.
Artfunkel 16 Jun, 2022 @ 2:10am 
Are you using two different versions of Blender?
Devo 16 Jun, 2022 @ 4:21am 
I'm not. I just tried every commit and the behavior changed on Mar 20, 2022 in this commit: https://github.com/Artfunkel/BlenderSourceTools/commit/b1c6144e4a621d2975ebec2f91acc78bd97ec187
Artfunkel 16 Jun, 2022 @ 11:18am 
It's the new PointerProperty which changes behaviour. It adds a user to each object in the scene export list and thus causes Blender to not delete them from the Blend file when they are removed from the scene/view layer. (I was evidently wrong when I said that deleted objects remain in the Blend file until it is closed.)

Immediately after the object is removed the scene's export list is updated, the PointerProperty is removed, and the user count is decremented. But by this point Blender has already decided not to delete the object fully.

The extra user is annoying, but I'm not in a rush to change this. Even if I did change it, you still cannot assume that deleting an object from the scene will remove it from the Blend file: the object could have additional users for many reasons, e.g. from modifiers, other scenes, or a fake user. You should keep the changes you made to your script.
Last edited by Artfunkel; 16 Jun, 2022 @ 11:19am
Devo 16 Jun, 2022 @ 5:36pm 
I'm glad to know now why this is happening. I will defo keep the changes to the script, even if you would change it. This showed that many people don't tend to update their addons, so I can imagine that many would also stay on BST 3.2.2 even after an update.
Thanks for your time!
< >
Showing 1-8 of 8 comments
Per page: 1530 50

All Discussions > Bug Reports > Topic Details