2026-03-16
This commit is contained in:
@@ -3,7 +3,7 @@ schema_version = "1.0.0"
|
||||
id = "rainclouds_bulk_scene_tools"
|
||||
name = "Raincloud's Bulk Scene Tools"
|
||||
tagline = "Bulk utilities for optimizing scene data"
|
||||
version = "0.16.0"
|
||||
version = "0.17.0"
|
||||
type = "add-on"
|
||||
|
||||
maintainer = "RaincloudTheDragon <raincloudthedragon@gmail.com>"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# v0.17.0 2026-03-13
|
||||
- Remove Action FU: new operator in Animation Data section—clears fake users from all actions so only used animations are kept
|
||||
|
||||
# v0.16.0 2026-01-15
|
||||
- Delete Single Keyframe Actions: Blender 5.0 compatible (action layers/strips/channelbags); skip actions from linked libraries
|
||||
- Find Material Users: removed (issue #14; use Atomic or DBU)
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
import bpy
|
||||
|
||||
|
||||
class RemoveActionFakeUsers(bpy.types.Operator):
|
||||
"""Remove fake users from all actions so only used animations are kept on save"""
|
||||
bl_idname = "bst.remove_action_fake_users"
|
||||
bl_label = "Remove Action FU"
|
||||
bl_description = "Remove fake users from all actions so only used animations are kept"
|
||||
bl_options = {'REGISTER', 'UNDO'}
|
||||
|
||||
def execute(self, context):
|
||||
actions = bpy.data.actions
|
||||
cleared_count = 0
|
||||
|
||||
for action in actions:
|
||||
if getattr(action, "library", None) is not None:
|
||||
continue
|
||||
if action.use_fake_user:
|
||||
action.use_fake_user = False
|
||||
cleared_count += 1
|
||||
print(f"Removed fake user from action '{action.name}'")
|
||||
|
||||
self.report({'INFO'}, f"Removed fake users from {cleared_count} actions")
|
||||
return {'FINISHED'}
|
||||
@@ -6,6 +6,7 @@ from ..ops.spawn_scene_structure import SpawnSceneStructure
|
||||
from ..ops.delete_single_keyframe_actions import DeleteSingleKeyframeActions
|
||||
from ..ops.remove_unused_material_slots import RemoveUnusedMaterialSlots
|
||||
from ..ops.convert_relations_to_constraint import ConvertRelationsToConstraint
|
||||
from ..ops.remove_action_fake_users import RemoveActionFakeUsers
|
||||
from ..ops.white_world import WhiteWorld
|
||||
from ..utils import compat
|
||||
|
||||
@@ -56,6 +57,8 @@ class RBST_SceneGen_PT_BulkSceneGeneral(bpy.types.Panel):
|
||||
box = layout.box()
|
||||
box.label(text="Animation Data")
|
||||
row = box.row(align=True)
|
||||
row.operator("bst.remove_action_fake_users", text="Remove Action FU", icon='FAKE_USER_OFF')
|
||||
row = box.row(align=True)
|
||||
row.operator("bst.delete_single_keyframe_actions", text="Delete Single Keyframe Actions", icon='ANIM_DATA')
|
||||
row = box.row(align=True)
|
||||
row.operator("bst.convert_relations_to_constraint", text="Convert Relations to Constraint", icon_value=405)
|
||||
@@ -71,6 +74,7 @@ classes = (
|
||||
DeleteSingleKeyframeActions,
|
||||
RemoveUnusedMaterialSlots,
|
||||
ConvertRelationsToConstraint,
|
||||
RemoveActionFakeUsers,
|
||||
)
|
||||
|
||||
# Registration
|
||||
|
||||
Reference in New Issue
Block a user