Blender Kitsu: Improve Init New Shot Workflow #302
@ -59,9 +59,11 @@ class KITSU_property_group_sequence(bpy.types.PropertyGroup):
|
||||
except AttributeError:
|
||||
return None
|
||||
|
||||
# Shot.
|
||||
shot_id: bpy.props.StringProperty(name="Shot ID") # type: ignore
|
||||
shot_name: bpy.props.StringProperty(name="Shot", default="") # type: ignore
|
||||
manual_shot_name: bpy.props.StringProperty(
|
||||
name="Shot",
|
||||
description="Enter a new Shot name to submit to Kitsu Server",
|
||||
default="",
|
||||
) # type: ignore
|
||||
|
||||
###########
|
||||
# Shot
|
||||
|
@ -135,12 +135,12 @@ def shot_exists_by_name(
|
||||
if clear_cache:
|
||||
Cache.clear_all()
|
||||
|
||||
shot = project.get_shot_by_name(sequence, strip.kitsu.shot_name)
|
||||
shot = project.get_shot_by_name(sequence, strip.kitsu.manual_shot_name)
|
||||
if not shot:
|
||||
logger.info(
|
||||
"Strip: %s Shot %s does not exist on server",
|
||||
strip.name,
|
||||
strip.kitsu.shot_name,
|
||||
strip.kitsu.manual_shot_name,
|
||||
)
|
||||
return None
|
||||
|
||||
|
@ -168,7 +168,7 @@ class KITSU_OT_sqe_push_new_shot(bpy.types.Operator):
|
||||
prefs.session_auth(context)
|
||||
and cache.project_active_get()
|
||||
and strip.kitsu.sequence_name
|
||||
and strip.kitsu.shot_name
|
||||
and strip.kitsu.manual_shot_name
|
||||
)
|
||||
|
||||
return bool(prefs.session_auth(context) and cache.project_active_get())
|
||||
@ -239,6 +239,8 @@ class KITSU_OT_sqe_push_new_shot(bpy.types.Operator):
|
||||
failed.append(strip)
|
||||
continue
|
||||
|
||||
strip.kitsu.shot_name = strip.kitsu.manual_shot_name
|
||||
|
||||
# Push update to sequence.
|
||||
opsdata.push_sequence_color(context, seq)
|
||||
|
||||
@ -293,7 +295,7 @@ class KITSU_OT_sqe_push_new_shot(bpy.types.Operator):
|
||||
for s in selected_sequences
|
||||
if s.kitsu.initialized
|
||||
and not s.kitsu.linked
|
||||
and s.kitsu.shot_name
|
||||
and s.kitsu.manual_shot_name
|
||||
and s.kitsu.sequence_name
|
||||
]
|
||||
|
||||
|
@ -333,6 +333,9 @@ class KITSU_PT_sqe_shot_tools(bpy.types.Panel):
|
||||
# Shot.
|
||||
split = col.split(factor=split_factor, align=True)
|
||||
split.label(text="Shot")
|
||||
if not strip.kitsu.shot_id:
|
||||
split.prop(strip.kitsu, "manual_shot_name", text="")
|
||||
else:
|
||||
split.prop(strip.kitsu, "shot_name", text="")
|
||||
|
||||
# Description.
|
||||
|
Loading…
Reference in New Issue
Block a user