Blender Kitsu: Rename Edit Render to Edit Export #249

Merged
Nick Alberelli merged 11 commits from TinyNick/blender-studio-pipeline:fix/rename-edit-render-to-edit-export into main 2024-02-26 18:17:54 +01:00
5 changed files with 11 additions and 11 deletions
Showing only changes of commit 26210d1448 - Show all commits

View File

@ -129,7 +129,7 @@ class KITSU_OT_edit_render_publish(bpy.types.Operator):
if self.use_frame_start:
edit_entity.set_frame_start(self.frame_start)
self.report({"INFO"}, f"Submitted new comment 'Revision {kitsu_props.edit_render_version}'")
self.report({"INFO"}, f"Submitted new comment 'Revision {kitsu_props.edit_export_version}'")
return {"FINISHED"}
@ -158,11 +158,11 @@ class KITSU_OT_edit_render_set_version(bpy.types.Operator):
if not version:
return {"CANCELLED"}
if kitsu_props.get('edit_render_version') == version:
if kitsu_props.get('edit_export_version') == version:
return {"CANCELLED"}
# Update global scene cache version prop.
kitsu_props.edit_render_version = version
kitsu_props.edit_export_version = version
logger.info("Set edit render version to %s", version)
# Redraw ui.
@ -189,7 +189,7 @@ class KITSU_OT_edit_render_increment_version(bpy.types.Operator):
version = opsdata.add_edit_render_version_increment(context)
# Update cache_version prop.
context.scene.kitsu.edit_render_version = version
context.scene.kitsu.edit_export_version = version
# Report.
self.report({"INFO"}, f"Add edit_render version {version}")

View File

@ -57,12 +57,12 @@ def init_edit_render_file_model(
if not EDIT_RENDER_FILE_MODEL.versions:
EDIT_RENDER_FILE_MODEL.append_item("v001")
# Update edit_render_version prop.
kitsu_props.edit_render_Version = "v001"
# Update edit_export_version prop.
kitsu_props.edit_export_version = "v001"
else:
# Update edit_render_version prop.
kitsu_props.edit_render_version = EDIT_RENDER_FILE_MODEL.versions[0]
# Update edit_export_version prop.
kitsu_props.edit_export_version = EDIT_RENDER_FILE_MODEL.versions[0]
_edit_render_file_model_init = True

View File

@ -41,7 +41,7 @@ class KITSU_PT_edit_render_publish(bpy.types.Panel):
row = layout.row(align=True)
row.operator(
KITSU_OT_edit_render_set_version.bl_idname,
text=context.scene.kitsu.edit_render_version,
text=context.scene.kitsu.edit_export_version,
icon="DOWNARROW_HLT",
)
# Edit Render increment version op.

View File

@ -498,7 +498,7 @@ class KITSU_property_group_scene(bpy.types.PropertyGroup):
search_options={'SORT'},
)
edit_render_version: bpy.props.StringProperty(name="Version", default="v001")
edit_export_version: bpy.props.StringProperty(name="Version", default="v001")
edit_render_file: bpy.props.StringProperty( # type: ignore
name="Edit Render Filepath",

View File

@ -172,7 +172,7 @@ def get_edit_render_file(self: Any) -> str:
addon_prefs = prefs.addon_prefs_get(bpy.context)
if not bool(addon_prefs.edit_render_dir):
return ""
version = self.edit_render_version
version = self.edit_export_version
file_pattern = addon_prefs.edit_render_file_pattern
file_name = file_pattern.replace('v###', version)
return Path(addon_prefs.edit_render_dir).joinpath(file_name).as_posix()