Move Anim_Setup
module into Blender_Kitsu
#5
@ -334,6 +334,12 @@ class KITSU_addon_preferences(bpy.types.AddonPreferences):
|
||||
default="ANI-",
|
||||
)
|
||||
|
||||
user_exec_code: bpy.props.StringProperty(# type: ignore
|
||||
name="Post Execution Command",
|
||||
description="Run this command after shot_builder is complete, but before the file is saved.",
|
||||
default="",
|
||||
)
|
||||
|
||||
session: Session = Session()
|
||||
|
||||
tasks: bpy.props.CollectionProperty(type=KITSU_task)
|
||||
@ -425,6 +431,7 @@ class KITSU_addon_preferences(bpy.types.AddonPreferences):
|
||||
start_frame_row.prop(self, "shot_builder_frame_offset", text="")
|
||||
box.row().prop(self, "shot_builder_armature_prefix")
|
||||
box.row().prop(self, "shot_builder_action_prefix")
|
||||
box.row().prop(self, "user_exec_code")
|
||||
|
||||
# Misc settings.
|
||||
box = layout.box()
|
||||
|
@ -229,6 +229,9 @@ class SHOTBUILDER_OT_NewShotFile(bpy.types.Operator):
|
||||
context.scene.frame_start = addon_prefs.shot_builder_frame_offset
|
||||
context.scene.frame_end = frame_length + addon_prefs.shot_builder_frame_offset
|
||||
|
||||
# Run User Script
|
||||
exec(addon_prefs.user_exec_code)
|
||||
|
||||
self._file_path = shot_builder.build_context.shot.file_path
|
||||
self._built_shot = True
|
||||
return {'RUNNING_MODAL'}
|
||||
|
Loading…
Reference in New Issue
Block a user