Move Anim_Setup
module into Blender_Kitsu
#5
@ -272,6 +272,10 @@ class KITSU_addon_preferences(bpy.types.AddonPreferences):
|
||||
name="Show Advanced Settings",
|
||||
description="Show advanced settings that should already have good defaults",
|
||||
)
|
||||
shot_builder_show_advanced : bpy.props.BoolProperty( # type: ignore
|
||||
name="Show Advanced Settings",
|
||||
description="Show advanced settings that should already have good defaults",
|
||||
)
|
||||
|
||||
shot_pattern: bpy.props.StringProperty( # type: ignore
|
||||
name="Shot Pattern",
|
||||
@ -332,6 +336,12 @@ class KITSU_addon_preferences(bpy.types.AddonPreferences):
|
||||
update=init_editoral_export_directory,
|
||||
|
||||
)
|
||||
|
||||
shot_builder_frame_offset: bpy.props.IntProperty( # type: ignore
|
||||
name="Start Frame Offset",
|
||||
description="All Shots built by 'Shot_builder' should begin at this frame",
|
||||
default=101,
|
||||
)
|
||||
session: Session = Session()
|
||||
|
||||
tasks: bpy.props.CollectionProperty(type=KITSU_task)
|
||||
@ -411,6 +421,17 @@ class KITSU_addon_preferences(bpy.types.AddonPreferences):
|
||||
emboss=False,
|
||||
)
|
||||
|
||||
# Shot_Builder settings.
|
||||
box = layout.box()
|
||||
box.label(text="Shot Builder", icon="MOD_BUILD")
|
||||
box.row().prop(self, "edit_export_dir")
|
||||
box.row().prop(self, "edit_export_file_pattern")
|
||||
box.row().prop(self, "shot_builder_show_advanced")
|
||||
if self.shot_builder_show_advanced:
|
||||
start_frame_row = box.row()
|
||||
start_frame_row.label(text="Start Frame Offset")
|
||||
start_frame_row.prop(self, "shot_builder_frame_offset", text="")
|
||||
|
||||
# Misc settings.
|
||||
box = layout.box()
|
||||
box.label(text="Miscellaneous", icon="MODIFIER")
|
||||
|
@ -178,9 +178,9 @@ class SHOTBUILDER_OT_NewShotFile(bpy.types.Operator):
|
||||
obj.animation_data.action = action
|
||||
|
||||
# Set Shot Frame Range
|
||||
start_frame_offset = 101 #TODO EXPOSE INT IN ADDON PREFERENCES
|
||||
context.scene.frame_start = start_frame_offset
|
||||
context.scene.frame_end = shot.nb_frames + start_frame_offset
|
||||
context.scene.frame_start = addon_prefs.shot_builder_frame_offset
|
||||
context.scene.frame_end = shot.nb_frames + addon_prefs.shot_builder_frame_offset
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
def draw(self, context: bpy.types.Context) -> None:
|
||||
|
Loading…
Reference in New Issue
Block a user