AnimCupboard: ID Management Pie #127

Merged
Demeter Dzadik merged 11 commits from Mets/blender-studio-pipeline:AnimCupboard-relationship-viewer into main 2023-07-19 14:43:14 +02:00
Member

This PR adds a pie menu in the outliner, bound to the Y key (because Y not?), with a bunch of handy dandy operators for basically any member of the team, to troubleshoot datablock relationships and overrides:

image

List Datablock Users:
So you can actually see why your datablock is refusing to get purged; It's being used by something, and this operator will tell you what it is.
image
If the user is a linked ID, its library will also be displayed. With the arrow button, you can keep digging.

List Datablock Dependencies:
Same as above but in the opposite direction. Possibly less useful, but an obvious counter-part, it would be weird to have one but not the other.

Better Purge
Before executing Blender's built-in recursive purge, this operator will remove fake users from all collections and linked IDs. The result of this purge should be more in line with what one would expect from purging in the first place.

Relink Overridden Asset:
image
This harsh troubleshooting-with-an-axe operator will delete an overridden asset, run Better Purge, then re-link and re-override the asset.
Only Armature objects will be made into Editable Overrides. Anything in the scene that was previously referencing any part of this asset, should get remapped to this new copy, even if the object names have changed. Within Armatures of the asset, the assigned Action should be preserved, as well as any added constraints.
Overridden values that weren't keyed will not be preserved, although implementing that may be possible.

Remap Users
image
This is a much more usable version of Blender's built-in Remap Users operator:

  • You can search for your desired ID by typing in its name, rather than finding it in an unsorted enum drop-down that may or may not go off your screen.
  • You can (and must) specify the library from which an ID is linked, in case you want to remap to a linked ID. You have to know what library the ID is from, else you won't find it.

Resync Override Hierarchy
This is just the built-in Resync Enforce button, just easier to access.

This PR adds a pie menu in the outliner, bound to the Y key (because Y not?), with a bunch of handy dandy operators for basically any member of the team, to troubleshoot datablock relationships and overrides: ![image](/attachments/59dbb034-2c56-4fcc-9893-7c158c51a952) **List Datablock Users**: So you can actually see why your datablock is refusing to get purged; It's being used by something, and this operator will tell you what it is. ![image](/attachments/a0871971-13f2-457b-bc20-69b69bbb7ddd) If the user is a linked ID, its library will also be displayed. With the arrow button, you can keep digging. **List Datablock Dependencies**: Same as above but in the opposite direction. Possibly less useful, but an obvious counter-part, it would be weird to have one but not the other. **Better Purge** Before executing Blender's built-in recursive purge, this operator will remove fake users from all collections and linked IDs. The result of this purge should be more in line with what one would expect from purging in the first place. **Relink Overridden Asset**: ![image](/attachments/298b571a-f77c-48b8-8f67-33a908d97cfb) This harsh troubleshooting-with-an-axe operator will delete an overridden asset, run Better Purge, then re-link and re-override the asset. Only Armature objects will be made into Editable Overrides. Anything in the scene that was previously referencing any part of this asset, should get remapped to this new copy, even if the object names have changed. Within Armatures of the asset, the assigned Action should be preserved, as well as any added constraints. Overridden values that weren't keyed will not be preserved, although implementing that may be possible. **Remap Users** ![image](/attachments/1de0b7c4-7701-4c8b-9fcc-ff8a954e4ce5) This is a much more usable version of Blender's built-in Remap Users operator: - You can search for your desired ID by typing in its name, rather than finding it in an unsorted enum drop-down that may or may not go off your screen. - You can (and must) specify the library from which an ID is linked, in case you want to remap to a linked ID. You have to know what library the ID is from, else you won't find it. **Resync Override Hierarchy** This is just the built-in Resync Enforce button, just easier to access.
Demeter Dzadik added 6 commits 2023-07-17 18:59:03 +02:00
Demeter Dzadik added 1 commit 2023-07-17 19:09:09 +02:00
Demeter Dzadik added 1 commit 2023-07-18 13:03:47 +02:00
Also work around issue 110239
Demeter Dzadik added 1 commit 2023-07-18 15:49:48 +02:00
Demeter Dzadik added 1 commit 2023-07-18 17:01:01 +02:00
Nick Alberelli reviewed 2023-07-18 18:15:20 +02:00
@ -0,0 +289,4 @@
)
def execute(self, context):
for area in context.screen.areas:
Member

This loop is looking for a VIEW_3D but the report says it is checking if an outliner is present. Assuming the outliner is what you are looking for wouldn't it be more explicit to do...

for area in context.screen.areas:
    if area.type == 'OUTLINER':
        break
else:
    self.report(
        {'ERROR'}, "Error: This operation requires an Outliner to be present."
    )
    return {'CANCELLED'}
This loop is looking for a `VIEW_3D` but the report says it is checking if an outliner is present. Assuming the outliner is what you are looking for wouldn't it be more explicit to do... ```python for area in context.screen.areas: if area.type == 'OUTLINER': break else: self.report( {'ERROR'}, "Error: This operation requires an Outliner to be present." ) return {'CANCELLED'} ```
Demeter Dzadik added 1 commit 2023-07-19 14:41:07 +02:00
Demeter Dzadik merged commit 531f544655 into main 2023-07-19 14:43:14 +02:00
Demeter Dzadik deleted branch AnimCupboard-relationship-viewer 2023-07-19 14:43:31 +02:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 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: studio/blender-studio-tools#127
No description provided.