Professional Documents
Culture Documents
@file
@brief This file loads the animated title dialog (i.e Blender animation
automation)
@author Noah Figg <eggmunkee@hotmail.com>
@author Jonathan Thomas <jonathan@openshot.org>
@section LICENSE
OpenShot Video Editor is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
You should have received a copy of the GNU General Public License
along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
"""
import os
import uuid
class AnimatedTitle(QDialog):
""" Animated Title Dialog """
# Path to ui file
ui_path = os.path.join(info.PATH, 'windows', 'ui', 'animated-title.ui')
metrics.track_metric_screen("animated-title-screen")
app = get_app()
_ = app._tr
# Add render controls
self.btnRender = QPushButton(_('Render'))
self.btnCancel = QPushButton(_('Cancel'))
self.buttonBox.addButton(self.btnRender, QDialogButtonBox.AcceptRole)
self.buttonBox.addButton(self.btnCancel, QDialogButtonBox.RejectRole)
# Init variables
self.unique_folder_name = str(uuid.uuid1())
self.output_dir = os.path.join(info.USER_PATH, "blender")
self.selected_template = ""
self.is_rendering = False
self.my_blender = None
def accept(self):
""" Start rendering animation, but don't close window """
# Render
self.blenderView.Render()
def reject(self):
# Stop threads
self.blenderView.Cancel()
self.blenderView.end_processing()
QApplication.restoreOverrideCursor()
super().reject()
def clear_effect_controls(self):
""" Clear all child widgets used for settings """
self.statusContainer.hide()