Blender Kitsu: Use new Kitsu Context UI in Multi Edit / Metadata #280

Merged
Nick Alberelli merged 11 commits from TinyNick/blender-studio-pipeline:fix/blender-kitsu-multi-edit into main 2024-04-08 17:51:04 +02:00
4 changed files with 24 additions and 20 deletions
Showing only changes of commit 342c8f97e4 - Show all commits

Binary file not shown.

Binary file not shown.

View File

@ -13,7 +13,7 @@ blender-kitsu is a Blender Add-on to interact with Kitsu from within Blender. It
- [Metadata](#metadata) - [Metadata](#metadata)
- [Push](#push) - [Push](#push)
- [Pull](#pull) - [Pull](#pull)
- [Multi Edit](#multi-edit) - [Multi Edit Metadata](#multi-edit-metadata)
- [Import Media](#import-media) - [Import Media](#import-media)
- [General Sequence Editor Tools](#general-sequence-editor-tools) - [General Sequence Editor Tools](#general-sequence-editor-tools)
- [Context](#context) - [Context](#context)
@ -185,13 +185,25 @@ As a result a bigger edit with nice sequence_colors can look pretty cool:
![image info](/media/addons/blender_kitsu/sqe_sequence_colors.jpg) ![image info](/media/addons/blender_kitsu/sqe_sequence_colors.jpg)
##### Multi Edit ##### Multi Edit Metadata
The `Multi Edit` panel only appears when you select multiple metadata strips that are all `initialized` but not `linked` yet. <br/> The `Multi Edit Metadata` panel only appears when you select multiple metadata strips that are all `initialized` but not `linked` yet. <br/>
![image info](/media/addons/blender_kitsu/sqe_multi_edit.jpg) ![image info](/media/addons/blender_kitsu/sqe_multi_edit.jpg)
It is meant to be way to quickly setup lots of shots if they don't exist on Kitsu yet. You specify the sequence all shots should belong to and adjust the `Shot Counter Start` value. In the preview property you can see how all shots will be named when you execute the `Multi Edit Strip` operator. <br/> It is meant to be way to quickly setup lots of shots if they don't exist on Kitsu yet. You specify the sequence all shots should belong to and adjust the `Shot Counter Start` value. In the preview property you can see how all shots will be named when you execute the `Multi Edit Strip` operator. <br/>
###### Advanced Settings
If you enable the `Advanced` mode (via the screwdriver/wrench icon) next to the counter value, you have access to advance settings to customize the operator even more.
![image info](/media/addons/blender_kitsu/sqe_multi_edit_advanced.jpg)
You can adjust the number of counter digits, the increment size and also the `Pattern` it will use to generate the shot name. <br/>
>**Pattern**: supports 3 wildcards. `<Sequence>`, `<Counter>`, `<Project>`, `Episode` that can be used multiple times in any order. <br/>
**Custom Sequence Variable**: specify a custom string that should be used in the `<Sequence>` wildcard instead of the sequence name. <br/>
**Custom Project Variable**: specify a custom string that should be used in the `<Project>` wildcard instead of the project name. <br/>
##### Import Media ##### Import Media
A collection of operators to Import media based on the Shot associated with the selected metadata strip(s). <br/> A collection of operators to Import media based on the Shot associated with the selected metadata strip(s). <br/>
@ -208,16 +220,6 @@ With a metadata strip selected `Import Image Sequence` Operator will find an ima
Use this operator to import image sequences that have been approved via the [Render Review Add-On](/addons/render_review) Image Sequences can be loaded as either `EXR` or `JPG` sequences. Use this operator to import image sequences that have been approved via the [Render Review Add-On](/addons/render_review) Image Sequences can be loaded as either `EXR` or `JPG` sequences.
###### Advanced Settings
If you check the `Advanced` checkbox next to the counter value, you have access to advance settings to customize the operator even more.
![image info](/media/addons/blender_kitsu/sqe_multi_edit_advanced.jpg)
You can adjust the number of counter digits, the increment size and also the `Pattern` it will use to generate the shot name. <br/>
>**Pattern**: supports 3 wildcards. `<Sequence>`, `<Counter>`, `<Project>` that can be used multiple times in any order. <br/>
**Custom Sequence Variable**: specify a custom string that should be used in the `<Sequence>` wildcard instead of the sequence name. <br/>
**Custom Project Variable**: specify a custom string that should be used in the `<Project>` wildcard instead of the project name. <br/>
##### General Sequence Editor Tools ##### General Sequence Editor Tools
In the general tab you can find some tools that don't directly relate to Kitsu but are useful for editing. In the general tab you can find some tools that don't directly relate to Kitsu but are useful for editing.

View File

@ -355,6 +355,8 @@ class KITSU_PT_sqe_shot_tools(bpy.types.Panel):
@classmethod @classmethod
def poll_multi_edit(cls, context: bpy.types.Context) -> bool: def poll_multi_edit(cls, context: bpy.types.Context) -> bool:
if not prefs.session_auth(context):
return False
sel_shots = context.selected_sequences sel_shots = context.selected_sequences
nr_of_shots = len(sel_shots) nr_of_shots = len(sel_shots)
unvalid = [s for s in sel_shots if s.kitsu.linked or not s.kitsu.initialized] unvalid = [s for s in sel_shots if s.kitsu.linked or not s.kitsu.initialized]
@ -374,7 +376,7 @@ class KITSU_PT_sqe_shot_tools(bpy.types.Panel):
# Create box. # Create box.
layout = self.layout layout = self.layout
box = layout.box() box = layout.box()
box.label(text="Multi Edit", icon="PROPERTIES") box.label(text="Multi Edit Metadata", icon="PROPERTIES")
# Sequence # Sequence
col = box.column() col = box.column()
@ -422,8 +424,8 @@ class KITSU_PT_sqe_shot_tools(bpy.types.Panel):
row = box.row(align=True) row = box.row(align=True)
row.operator( row.operator(
KITSU_OT_sqe_multi_edit_strip.bl_idname, KITSU_OT_sqe_multi_edit_strip.bl_idname,
text=f"Edit {noun}", text=f"Set Metadata for {noun}",
icon="TRIA_RIGHT", icon="ALIGN_LEFT",
) )
@classmethod @classmethod