Blender Kitsu: Rename Edit Render to Edit Export #249
@ -129,7 +129,7 @@ class KITSU_OT_edit_render_publish(bpy.types.Operator):
|
|||||||
if self.use_frame_start:
|
if self.use_frame_start:
|
||||||
edit_entity.set_frame_start(self.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"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
@ -158,11 +158,11 @@ class KITSU_OT_edit_render_set_version(bpy.types.Operator):
|
|||||||
if not version:
|
if not version:
|
||||||
return {"CANCELLED"}
|
return {"CANCELLED"}
|
||||||
|
|
||||||
if kitsu_props.get('edit_render_version') == version:
|
if kitsu_props.get('edit_export_version') == version:
|
||||||
return {"CANCELLED"}
|
return {"CANCELLED"}
|
||||||
|
|
||||||
# Update global scene cache version prop.
|
# 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)
|
logger.info("Set edit render version to %s", version)
|
||||||
|
|
||||||
# Redraw ui.
|
# Redraw ui.
|
||||||
@ -189,7 +189,7 @@ class KITSU_OT_edit_render_increment_version(bpy.types.Operator):
|
|||||||
version = opsdata.add_edit_render_version_increment(context)
|
version = opsdata.add_edit_render_version_increment(context)
|
||||||
|
|
||||||
# Update cache_version prop.
|
# Update cache_version prop.
|
||||||
context.scene.kitsu.edit_render_version = version
|
context.scene.kitsu.edit_export_version = version
|
||||||
|
|
||||||
# Report.
|
# Report.
|
||||||
self.report({"INFO"}, f"Add edit_render version {version}")
|
self.report({"INFO"}, f"Add edit_render version {version}")
|
||||||
|
@ -57,12 +57,12 @@ def init_edit_render_file_model(
|
|||||||
|
|
||||||
if not EDIT_RENDER_FILE_MODEL.versions:
|
if not EDIT_RENDER_FILE_MODEL.versions:
|
||||||
EDIT_RENDER_FILE_MODEL.append_item("v001")
|
EDIT_RENDER_FILE_MODEL.append_item("v001")
|
||||||
# Update edit_render_version prop.
|
# Update edit_export_version prop.
|
||||||
kitsu_props.edit_render_Version = "v001"
|
kitsu_props.edit_export_version = "v001"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Update edit_render_version prop.
|
# Update edit_export_version prop.
|
||||||
kitsu_props.edit_render_version = EDIT_RENDER_FILE_MODEL.versions[0]
|
kitsu_props.edit_export_version = EDIT_RENDER_FILE_MODEL.versions[0]
|
||||||
|
|
||||||
_edit_render_file_model_init = True
|
_edit_render_file_model_init = True
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class KITSU_PT_edit_render_publish(bpy.types.Panel):
|
|||||||
row = layout.row(align=True)
|
row = layout.row(align=True)
|
||||||
row.operator(
|
row.operator(
|
||||||
KITSU_OT_edit_render_set_version.bl_idname,
|
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",
|
icon="DOWNARROW_HLT",
|
||||||
)
|
)
|
||||||
# Edit Render increment version op.
|
# Edit Render increment version op.
|
||||||
|
@ -498,7 +498,7 @@ class KITSU_property_group_scene(bpy.types.PropertyGroup):
|
|||||||
search_options={'SORT'},
|
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
|
edit_render_file: bpy.props.StringProperty( # type: ignore
|
||||||
name="Edit Render Filepath",
|
name="Edit Render Filepath",
|
||||||
|
@ -172,7 +172,7 @@ def get_edit_render_file(self: Any) -> str:
|
|||||||
addon_prefs = prefs.addon_prefs_get(bpy.context)
|
addon_prefs = prefs.addon_prefs_get(bpy.context)
|
||||||
if not bool(addon_prefs.edit_render_dir):
|
if not bool(addon_prefs.edit_render_dir):
|
||||||
return ""
|
return ""
|
||||||
version = self.edit_render_version
|
version = self.edit_export_version
|
||||||
file_pattern = addon_prefs.edit_render_file_pattern
|
file_pattern = addon_prefs.edit_render_file_pattern
|
||||||
file_name = file_pattern.replace('v###', version)
|
file_name = file_pattern.replace('v###', version)
|
||||||
return Path(addon_prefs.edit_render_dir).joinpath(file_name).as_posix()
|
return Path(addon_prefs.edit_render_dir).joinpath(file_name).as_posix()
|
||||||
|
Loading…
Reference in New Issue
Block a user