Compare commits

...

3 Commits

Author SHA1 Message Date
Jack 708ed2dd40 Set version from 2.0.0 to 2.0.0-beta 2024-09-22 22:13:08 -04:00
Jack 946e0b6005 Delete some comments 2024-09-22 22:03:46 -04:00
Jack 9b0821c32e Fix for Maya hanging on boot 2024-09-22 21:46:01 -04:00
1 changed files with 4 additions and 8 deletions

View File

@ -15,9 +15,6 @@ from PySide6.QtWidgets import QMainWindow, QFileDialog
from PySide6.QtCore import QCoreApplication, QSettings
import shiboken6
# Global variable to store the scriptJob ID
playblast_job_id = None
original_playblast = cmds.playblast
tinyblast_instance = None
def get_plugin_directory():
@ -27,7 +24,7 @@ def get_plugin_directory():
return os.path.dirname(plugin_path)
def custom_button_action(*args):
cmds.playblast()
tinyblast_instance.custom_playblast()
class Tinyblast(ompx.MPxCommand):
def __init__(self):
@ -78,7 +75,7 @@ class Tinyblast(ompx.MPxCommand):
def doIt(selfself, args):
print("Tinyblasting...")
cmds.playblast()
tinyblast_instance.tinyblast()
@staticmethod
def cmdCreator():
@ -90,7 +87,7 @@ class Tinyblast(ompx.MPxCommand):
kwargs['quality'] = 100
kwargs['widthHeight'] = self.resolution
result = original_playblast(*args, **kwargs)
result = cmds.playblast(*args, **kwargs)
if result and self.save:
self.blastIt(result)
@ -469,11 +466,10 @@ def initializePlugin(mobject):
global tinyblast_instance
tinyblast_instance = Tinyblast()
try:
mplugin = ompx.MFnPlugin(mobject, "Jack Christensen", "2.0.0", "Any")
mplugin = ompx.MFnPlugin(mobject, "Jack Christensen", "2.0.0-beta", "Any")
mplugin.registerCommand("tinyblast", Tinyblast.cmdCreator)
mplugin.registerCommand("openTinyblastOptions", cmdCreator)
om.MGlobal.displayInfo("Tinyblast plugin loaded.")
cmds.playblast = tinyblast_instance.custom_playblast
except Exception as e:
om.MGlobal.displayError(f"Failed to initialize plugin: {str(e)}")
raise