Hey guys,
I know that this question is often asked, I did some research. I know the thing with “deselect F and hit X”, but it does’t work for me…
A friend of mine and I are working on the prop creation for a videogame, and I forgot to turn off the automatic keyframe insertion when I appended the objects… Now we’ve got about 300 actions in total instead of 15-20 from before^^
I can’t reappend all that because I already deleted the old file :spin::o
How can you delete an action permanently in Blender 2.5, it doesn’t work for me, maybe I’m just doing it wrong, have you any thoughts?
No problem.
You can make it work in other ways also…
### remove only on selected objects ####
for ob in bpy.context.selected_objects:
ob.animation_data_clear()
### remove on objects named Cuba Cubo etc. ####
for ob in bpy.context.scene.objects:
if ob.name.startswith('Cub'):
ob.animation_data_clear()
Hmmmm doesn’t work…
By python console you mean the one that gets opened by “Shift + F4”?
When I paste the code and press enter nothing happens. I save the file and reopen it, nothing has changed…
Luke
Could you share a link to the file, because that simple code usually works… and so manually deleting the animation data. Maybe try it in some other blend to see if it is a file specific problem.
I’m sorry, I can’t put the original Blend. file online, it’s top secret x)
But I have tried it with a normal Blend. , and it isn’t working either…
Here it is:
i think this is only one part - it is necessary to save the file
and to re-open it again to get rid of unused “actions”.
But actions will only be NOT saved, if there are no users of
these actions and the actions are not set “F” (= to be always saved, regardless they are used by any other objects …)
for a in bpy.data.actions:
a.user_clear()
then save the file - use a new name if you still need the actions -
and reload it, then the actions in the nla-editor are gone …
Yeah, the “fake user” concept is throughout Blender. That’s what the little “F” is for. It means that the “use count” of the object will always be artificially kept one-larger than it otherwise would be; i.e. it will never become zero, so the data-block in question will always be saved.
This is very handy, of course, because if you “save frequently, of course,” and you just happened to be in the middle of moving actions around and Blender just happened to do what Blender sometimes does and it happened to do so at exactly the wrong moment (as it also sometimes does…) you would be a very unhappy camper. “Fake user” eliminates this.
After all, it’s much easier to get rid of something you don’t want to keep, than to face losing what you didn’t want to lose.
Well I’m happy you solved your problem. I didn’t know Blender default for actions is to make a fake user, it is not the default for any other property that I know… I mean it’s great to keep everything in memory but shouldn’t they go away on reload?
Say I bake some pysics, then delete the objects, save the file, and I get an empty 5 mb blend…