Пример #1
0
    def draw(cls, context, layout:bpy.types.UILayout, data, effect, richstrip):
        blurlayer = cls.getEffectStrip(richstrip, effect, "blur")
        mask_modifier = blurlayer.modifiers.get(cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask"))

        box = layout.box()
        box.label(text="Blur", icon="MATFLUID")
        xylock.drawWithExportBox(box, richstrip, blurlayer, "size_x", "strongX", blurlayer, cls.genbinderName(effect, "size_y", True), "strongY", cls.getBoolProperty(effect, "union_size_lock"), "value")

        layout.separator()

        mask_through = cls.getBoolProperty(effect, "mask_through")
        cropbox.draw(layout, blurlayer, mask_through)

        layout.separator()

        maskbox.draw(layout, effect, data, mask_modifier, mask_through=mask_through)
Пример #2
0
 def draw_filter(unused_self, context: bpy.types.Context,
                 layout: bpy.types.UILayout) -> None:
     """Draw the filter part of the ui list"""
     del unused_self
     user_settings = context.window_manager.tresorio_user_settings_props
     layout.separator()
     # layout.prop(user_settings,
     #             'decompress_results',
     #             text=TRADUCTOR['field']['decompress_results'][CONFIG_LANG])
     row = layout.row()
     if user_settings.decompress_results is False:
         row.enabled = False
     row.prop(
         user_settings,
         'open_image_on_download',
         text=TRADUCTOR['field']['open_image_on_download'][CONFIG_LANG])
Пример #3
0
def draw_connection_panel(layout: bpy.types.UILayout,
                          context: bpy.types.Context
                          ) -> None:
    """Draws the panel to connect to Tresorio"""
    user_props = context.window_manager.tresorio_user_props
    report_props = bpy.context.window_manager.tresorio_report_props

    case = layout.row().split(factor=0.5)
    case.label(text=TRADUCTOR['field']['connection'][CONFIG_LANG])
    align_case = case.column().row().split(factor=0.8)
    align_case.column().prop(user_props, 'langs')
    align_case.column().operator('tresorio.advanced_settings_navigation_in',
                                 icon_value=til.icon('TRESORIO_SETTINGS'),
                                 text='')

    box = layout.box()
    box.label(text=TRADUCTOR['field']['mail'][CONFIG_LANG] + ':')
    box.prop(user_props, 'email', text='')
    box.label(text=TRADUCTOR['field']['password'][CONFIG_LANG] + ':')

    row = box.row().split(factor=0.9)
    if user_props.show_password:
        row.prop(user_props, 'clear_password', text='')
    else:
        row.prop(user_props, 'hidden_password', text='')
    row.prop(user_props, 'show_password',
             icon_only=True, icon='HIDE_OFF')

    row = layout.row().split(factor=0.5)
    row.column().prop(user_props, 'remember_email',
                      text=TRADUCTOR['field']['remember_email'][CONFIG_LANG])
    col = row.column()
    if not report_props.login_in:
        col.operator('tresorio.login', icon_value=til.icon('TRESORIO_LOGIN'),
                     text=TRADUCTOR['field']['login'][CONFIG_LANG])
    else:
        col.label(text=TRADUCTOR['notif']['login_in'][CONFIG_LANG])

    layout.separator(factor=2.0)

    layout.operator('tresorio.redirect_forgot_password',
                    text=TRADUCTOR['field']['forgot_password'][CONFIG_LANG],
                    icon_value=til.icon('TRESORIO_KEY'))
    layout.operator('tresorio.redirect_register',
                    text=TRADUCTOR['field']['create_account'][CONFIG_LANG],
                    icon_value=til.icon('TRESORIO_PROFILE'))
Пример #4
0
    def draw(cls, context, layout:bpy.types.UILayout, data, effect, richstrip):
        glowlayer = cls.getEffectStrip(richstrip, effect, "glow")

        box = layout.box()
        box.label(text="Glow", icon="LIGHT")
        exportbox.draw(box, richstrip, "threshold", glowlayer, "threshold", text="Threshold")
        exportbox.draw(box, richstrip, "clamp", glowlayer, "clamp", text="Clamp")
        exportbox.draw(box, richstrip, "boost_factor", glowlayer, "boost_factor", text="Boost Factor")
        box.prop(glowlayer, "use_only_boost", toggle=0)
        
        layout.separator()

        box = layout.box()
        box.label(text="Blur", icon="MATFLUID")
        exportbox.draw(box, richstrip, "blur", glowlayer, "blur_radius", text="Blur Radius")
        exportbox.draw(box, richstrip, "quality", glowlayer, "quality", text="Quality")

        layout.separator()

        maskbox.draw(layout, effect, data, glowlayer.modifiers.get(cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask")), cls.getBoolProperty(effect, "mask_through"))
Пример #5
0
def draw_connection_settings_ui(layout: bpy.types.UILayout):
    mixer_prefs = get_mixer_prefs()

    row = layout.row()
    split = row.split(factor=0.233, align=False)
    split.label(text="Host:")
    sub_row = split.row()
    sub_row.prop(mixer_prefs, "host", text="")
    sub_row.prop(mixer_prefs, "port")

    layout.separator()
    row = layout.row()
    split = row.split(factor=0.233, align=False)
    split.label(text="Session Log:")
    sub_row = split.row()
    icon = icons.icons_col["General_Explorer_32"]
    user_data_path = os.environ.get("MIXER_DATA_DIR", get_data_directory())
    #   from pathlib import Path
    #   user_data_path = Path(user_data_path).parent
    sub_row.operator("mixer.open_explorer",
                     text="Open Log Folder",
                     icon_value=icon.icon_id).path = str(user_data_path)
Пример #6
0
    def draw(cls, context, layout:bpy.types.UILayout, data, effect, richstrip):
        blurlayer = cls.getEffectStrip(richstrip, effect, "blur")
        blacklayer = cls.getEffectStrip(richstrip, effect, "black")
        copylayer = cls.getEffectStrip(richstrip, effect, "copy")

        box = layout.box()
        box.label(text="Shadow", icon="MATERIAL")
        cb = blacklayer.modifiers.get(cls.genRegularStripName(data.RichStripID, effect.EffectId, "cb"))
        split = box.split(factor=0.2)
        split.column().label(text="Color")
        split.column().prop(cb.color_balance, "gain", text="")
        exportbox.draw(box, richstrip, "offset", blacklayer, cls.genbinderName(effect, "offset", True), "Offset")
        exportbox.draw(box, richstrip, "angle", blacklayer, cls.genbinderName(effect, "angle", True), "Direction")
        xylock.drawWithExportBox(box, richstrip, blacklayer, "scale_start_x", "scaleX", blacklayer, "scale_start_y", "scaleY", blacklayer, "use_uniform_scale", union_label="Scale")
        exportbox.draw(box, richstrip, "opacity", blurlayer, "blend_alpha", "Shadow opacity")
        box.prop(copylayer, "mute", toggle=1, text="Only Shadow", icon='GHOST_ENABLED')

        layout.separator()

        box = layout.box()
        box.label(text="Blur", icon="MATFLUID")
        xylock.drawWithExportBox(box, richstrip, blurlayer, "size_x", "strongX", blurlayer, cls.genbinderName(effect, "size_y", True), "strongY", cls.getBoolProperty(effect, "union_size_lock"), "value", union_label="Strong")
Пример #7
0
    def draw(cls, context, layout: bpy.types.UILayout, data, effect,
             richstrip):
        adjustlayer = cls.getEffectStrip(richstrip, effect, "adjust")
        modifier = adjustlayer.modifiers.get(
            cls.genRegularStripName(data.RichStripID, effect.EffectId, "bc"))
        mask_through = cls.getBoolProperty(effect, "mask_through")

        box = layout.box()
        box.label(text="Blend", icon="OVERLAY")
        exportbox.draw(box, richstrip, "bright", modifier, "bright", "Bright")
        exportbox.draw(box, richstrip, "contrast", modifier, "contrast",
                       "Contrast")
        exportbox.draw(box, richstrip, "alpha", adjustlayer, "blend_alpha",
                       "Opacity")

        layout.separator()

        cropbox.draw(layout, adjustlayer, mask_through)

        layout.separator()

        maskbox.draw(layout, effect, data, modifier, mask_through=mask_through)
Пример #8
0
def powersave_draw(self, column: bpy.types.UILayout):
    prefs = utils.common.prefs()
    filepaths = bpy.context.preferences.filepaths

    box = column.box().column()
    if hasattr(bpy.types, 'HOPS_OT_powersave'):
        box.operator('hops.powersave', text='PowerSave (hops)')
    else:
        box.operator('powersave.powersave')
    box.prop(prefs, 'powersave_name', text='')

    column.separator()

    box = column.box().column()
    flow = box.grid_flow(align=True)
    flow.operator('powersave.load_previous', text='', icon='REW')
    flow.operator('powersave.load_next', text='', icon='FF')
    box.operator('powersave.open_project_folder')

    column.separator()

    box = column.box().column()
    box.prop(prefs, 'use_autosave')
    col = box.column()
    col.enabled = prefs.use_autosave
    col.prop(prefs, 'autosave_interval')
    row = col.row(align=True)
    row.prop(prefs, 'autosave_format', text='')
    if prefs.autosave_format == 'CUSTOM':
        op = row.operator('preferences.addon_show',
                          icon='PREFERENCES',
                          text='')
        op.module = utils.common.module()

    column.separator()

    box = column.box().column()
    icon = 'CHECKBOX_HLT' if bpy.data.use_autopack else 'CHECKBOX_DEHLT'
    box.operator('file.autopack_toggle', text='Toggle Autopack', icon=icon)
    box.operator('powersave.purge_orphans', text='Purge Orphans')

    column.separator()
    box = column.box().column()
    box.prop(filepaths, 'use_auto_save_temporary_files')
    col = box.column()
    col.enabled = filepaths.use_auto_save_temporary_files
    col.prop(filepaths, 'auto_save_time')
    box.prop(filepaths, 'save_version')
Пример #9
0
    def draw(cls, context, layout: bpy.types.UILayout, data, effect,
             richstrip):
        smtranf = cls.getEffectStrip(richstrip, effect, "sm")
        lgtranf = cls.getEffectStrip(richstrip, effect, "lg")
        mask_modifier = lgtranf.modifiers.get(
            cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask"))

        box = layout.box()
        box.label(text="Pixelize", icon="TEXTURE")
        xylock.drawWithExportBox(box,
                                 richstrip,
                                 smtranf,
                                 cls.genbinderName(effect, "strongX", True),
                                 "strongX",
                                 smtranf,
                                 cls.genbinderName(effect, "strongY", True),
                                 "strongY",
                                 smtranf,
                                 "use_uniform_scale",
                                 union_label="Strong")
        xylock.drawWithExportBox(box,
                                 richstrip,
                                 lgtranf,
                                 cls.genbinderName(effect, "fixX", True),
                                 "fixX",
                                 lgtranf,
                                 cls.genbinderName(effect, "fixY", True),
                                 "fixY",
                                 cls.getBoolProperty(effect, "fixScale"),
                                 "value",
                                 union_label="Fix Scale")

        layout.separator()

        maskbox.draw(layout, effect, data, mask_modifier,
                     cls.getBoolProperty(effect, "mask_though"))
Пример #10
0
    def draw(cls, context, layout: bpy.types.UILayout, data, effect,
             richstrip):
        smtranf = cls.getEffectStrip(richstrip, effect, "sm")
        mdtranf = cls.getEffectStrip(richstrip, effect, "md")
        lgtranf = cls.getEffectStrip(richstrip, effect, "lg")

        box = layout.box()
        box.label(text="Blur", icon="MATFLUID")
        xylock.drawWithExportBox(box,
                                 richstrip,
                                 smtranf,
                                 cls.genbinderName(effect, "strongX", True),
                                 "strongX",
                                 smtranf,
                                 cls.genbinderName(effect, "strongY", True),
                                 "strongY",
                                 smtranf,
                                 "use_uniform_scale",
                                 union_label="Blur Strong")
        exportbox.draw(box,
                       richstrip,
                       "mulstrong",
                       mdtranf,
                       cls.genbinderName(effect, "mulstrong", True),
                       text="Multiply Strong")
        xylock.drawWithExportBox(box,
                                 richstrip,
                                 lgtranf,
                                 "scale_start_x",
                                 "fixX",
                                 lgtranf,
                                 "scale_start_y",
                                 "fixY",
                                 lgtranf,
                                 "use_uniform_scale",
                                 union_label="Fix Scale")

        layout.separator()

        box = layout.box()
        box.label(text="Color", icon="COLOR")
        exportbox.draw(box,
                       richstrip,
                       "opacity",
                       lgtranf,
                       "blend_alpha",
                       text="Opacity")
        exportbox.draw(box,
                       richstrip,
                       "saturation",
                       lgtranf,
                       "color_saturation",
                       text="Saturation")

        layout.separator()

        maskbox.draw(layout,
                     effect,
                     data,
                     lgtranf.modifiers.get(
                         cls.genRegularStripName(data.RichStripID,
                                                 effect.EffectId, "mask")),
                     mask_through=cls.getBoolProperty(effect, "mask_through"))
Пример #11
0
    def draw(cls, context, layout: bpy.types.UILayout, data, effect,
             richstrip):
        copylayer = cls.getEffectStrip(richstrip, effect, "copy")
        mask_modifier = copylayer.modifiers.get(
            cls.genRegularStripName(data.RichStripID, effect.EffectId, "mask"))
        mask_through = cls.getBoolProperty(effect, "mask_through")

        box = layout.box()
        box.row().label(text="Translate", icon="ORIENTATION_LOCAL")
        xylock.drawWithExportBox_NoLock(box, richstrip, copylayer.transform,
                                        "offset_x", "pos_x",
                                        copylayer.transform, "offset_y",
                                        "pos_y")

        layout.separator()

        box = layout.box()
        box.label(text="Scale", icon="FIXED_SIZE")
        xylock.drawWithExportBox_NoLock(box, richstrip, copylayer.transform,
                                        "scale_x", "scalex",
                                        copylayer.transform, "scale_y",
                                        "scaley")

        layout.separator()

        box = layout.box()
        box.label(text="Rotation", icon="DRIVER_ROTATIONAL_DIFFERENCE")
        exportbox.draw(box,
                       richstrip,
                       "rotation",
                       copylayer.transform,
                       "rotation",
                       text="Rotation")

        layout.separator()

        box = layout.box()
        box.label(text="Mirror", icon="MOD_MIRROR")
        row = box.row(align=True)
        row.prop(copylayer,
                 "use_flip_x",
                 toggle=1,
                 text="Flip X",
                 icon="ARROW_LEFTRIGHT")
        row.prop(copylayer,
                 "use_flip_y",
                 toggle=1,
                 text="Flip Y",
                 icon="EMPTY_SINGLE_ARROW")

        layout.separator()

        box = layout.box()
        box.row().label(text="Blend", icon="OVERLAY")
        # box.row().prop(copylayer, "blend_alpha")
        exportbox.draw(box,
                       richstrip,
                       "alpha",
                       copylayer,
                       "blend_alpha",
                       text="Opacity")
        box.row().prop(mask_through, "value", text="Through")

        layout.separator()

        cropbox.draw(layout, copylayer, mask_through)

        layout.separator()

        maskbox.draw(layout, effect, data, mask_modifier, mask_through)
Пример #12
0
    def draw(cls, context, layout: bpy.types.UILayout, data, effect,
             richstrip):
        movielayer = cls.getMovieStrip(richstrip)
        audiolayer = cls.getAudioStrip(richstrip)
        adjustlayer = cls.getEffectStrip(richstrip, effect, "adjust")

        box = layout.box()
        box.row().label(text="Translate", icon="ORIENTATION_LOCAL")
        xylock.drawWithExportBox_NoLock(
            box, richstrip, movielayer,
            cls.genbinderName(effect, "pos_x", True), "pos_x", movielayer,
            cls.genbinderName(effect, "pos_y", True), "pos_y")

        layout.separator()

        box = layout.box()
        box.label(text="Scale", icon="FIXED_SIZE")
        box.prop(cls.getEnumProperty(effect, "transform_type"),
                 "value",
                 text="Resize")
        xylock.drawWithExportBox(box,
                                 richstrip,
                                 movielayer,
                                 cls.genbinderName(effect, "scale_x", True),
                                 "scalex",
                                 movielayer,
                                 cls.genbinderName(effect, "scale_y", True),
                                 "scaley",
                                 cls.getBoolProperty(effect,
                                                     "union_scale_lock"),
                                 "value",
                                 union_label="Scale")

        layout.separator()

        box = layout.box()
        box.label(text="Rotation", icon="DRIVER_ROTATIONAL_DIFFERENCE")
        exportbox.draw(box,
                       richstrip,
                       "rotation",
                       movielayer,
                       cls.genbinderName(effect, "rotation", True),
                       text="Rotation")

        layout.separator()

        box = layout.box()
        box.label(text="Mirror", icon="MOD_MIRROR")
        row = box.row(align=True)
        row.prop(movielayer,
                 "use_flip_x",
                 toggle=1,
                 text="Flip X",
                 icon="ARROW_LEFTRIGHT")
        row.prop(movielayer,
                 "use_flip_y",
                 toggle=1,
                 text="Flip Y",
                 icon="EMPTY_SINGLE_ARROW")

        # box = layout.box()
        # box.row().label(text="Time (Only movie)")
        # box.prop(movielayer, "use_reverse_frames", toggle=1)

        if audiolayer is not None:
            layout.separator()
            box = layout.box()
            box.row().label(text="Audio")
            row = box.row(align=True)
            row.prop(audiolayer, "volume")
            row.prop(audiolayer, "mute", text="", toggle=0, icon="MUTE_IPO_ON")

        return