Skip to content

Instantly share code, notes, and snippets.

View rBrenick's full-sized avatar

rBrenick

View GitHub Profile
@rBrenick
rBrenick / maya_progress_bar.py
Last active August 20, 2022 10:57
progress bar convenience class for Maya
__author__ = "[email protected]"
__created__ = "2022-08-11"
from maya import cmds
class ProgressBar(object):
"""
Convenience class for showing a progress bar in Maya
@rBrenick
rBrenick / searchable_combo_box.py
Last active September 4, 2022 16:53
Quick function to make a QComboBox into a searchable list
__author__ = "[email protected]"
__created__ = "2022-09-03"
"""
This is mostly a recreation of this stack overflow answer: https://stackoverflow.com/a/65408354
With some changes to make it callable after initialization.
"""
from PySide2 import QtCore, QtWidgets
@rBrenick
rBrenick / split_subtitle_file_into_multiline.py
Last active September 12, 2024 23:32
Take an .srt file and split the text line if the character count goes above a certain threshold.
import sys
import argparse
"""
Example usecase:
python split_srt_lines.py SUBTITLE_FILE_PATH.srt -o OUTPUT_FILE_PATH.srt --max_line_length=42 --comma_split_percent=75
if you don't specify an output path, it will replace the file content of the input file