QuiltiX Plugins 0.0.1
Custom Plugins for QuiltiX
|
glTF serializer for MaterialX More...
Public Member Functions | |
None | __init__ (self, editor, root) |
Initialize the plugin. | |
handle_file_loaded (self, data) | |
custom_on_view_menu_about_to_show (self) | |
Custom about to show event for the view menu. | |
None | on_gltf_viewer_toggled (self, checked) |
Toggle the glTF viewer dock widget. | |
None | setup_gltf_viewer_doc (self) |
Set up the glTF viewer dock widget. | |
None | show_text_box (self, text, title="") |
Core utilities. | |
None | import_gltf_triggered (self) |
Import a glTF file into the current graph. | |
dict | setup_default_export_options (self, path, bakeFileName, bakeResolution=1024, embed_geometry=False) |
Set up the default export options for gltf output. | |
create_baked_path (self, path) | |
Create a baked path name from an original path. | |
None | export_gltf_triggered (self, writeToTemp=False) |
Export the current graph to a glTF file in binary format (glb) | |
str | convert_graph_to_gltf (self, options) |
Convert the current graph to a glTF document string. | |
show_gltf_text_triggered (self) | |
Show the current graph as glTF text popup. | |
Public Attributes | |
editor = editor | |
root = root | |
import_gltf_triggered | |
show_gltf_text_triggered | |
bake_textures_option = QAction("Always Bake Textures", editor) | |
act_gltf_viewer = QAction("glTF Viewer", editor) | |
Add viewer toggle. | |
on_gltf_viewer_toggled | |
custom_on_view_menu_about_to_show | |
handle_file_loaded | |
str | current_mx_file = "" |
int | temp_file_counter = 1 |
web_view = QWebEngineView() | |
str | viewer_options = '?hideSave=true' |
str | viewer_address = 'https://kwokcb.github.io/MaterialXLab/documents/gltfViewer_simple.html' |
page = glTFEnginePage(self.web_view) | |
web_dock_widget = glTFWidget(self.editor) | |
glTF serializer for MaterialX
Definition at line 162 of file materialxgltf/plugin.py.
None plugin.QuiltiX_glTF_serializer.__init__ | ( | self, | |
editor, | |||
root ) |
Initialize the plugin.
Adds in:
editor | The QuiltiX editor |
root | The root path of QuitiX |
Definition at line 167 of file materialxgltf/plugin.py.
str plugin.QuiltiX_glTF_serializer.convert_graph_to_gltf | ( | self, | |
options ) |
Convert the current graph to a glTF document string.
Will perform:
options | (dict): Dictionary of options for the conversion |
Definition at line 525 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.create_baked_path | ( | self, | |
path ) |
Create a baked path name from an original path.
path | (str): The original path |
Definition at line 446 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.custom_on_view_menu_about_to_show | ( | self | ) |
Custom about to show event for the view menu.
Updates the glTF viewer toggle.
Definition at line 247 of file materialxgltf/plugin.py.
None plugin.QuiltiX_glTF_serializer.export_gltf_triggered | ( | self, | |
writeToTemp = False ) |
Export the current graph to a glTF file in binary format (glb)
writeToTemp | (bool): Whether to write to a temporary file |
Definition at line 459 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.handle_file_loaded | ( | self, | |
data ) |
Definition at line 242 of file materialxgltf/plugin.py.
None plugin.QuiltiX_glTF_serializer.import_gltf_triggered | ( | self | ) |
Import a glTF file into the current graph.
Definition at line 342 of file materialxgltf/plugin.py.
None plugin.QuiltiX_glTF_serializer.on_gltf_viewer_toggled | ( | self, | |
checked ) |
Toggle the glTF viewer dock widget.
Definition at line 254 of file materialxgltf/plugin.py.
dict plugin.QuiltiX_glTF_serializer.setup_default_export_options | ( | self, | |
path, | |||
bakeFileName, | |||
bakeResolution = 1024, | |||
embed_geometry = False ) |
Set up the default export options for gltf output.
path | (str): path to the gltf file |
bakeFileName | (str): path to the baked file |
bakeResolution | (int): resolution of the baked textures. Default is 1024. |
embed_geometry | (bool): whether to embed the geometry in the gltf file. Default is False. |
Definition at line 398 of file materialxgltf/plugin.py.
None plugin.QuiltiX_glTF_serializer.setup_gltf_viewer_doc | ( | self | ) |
Set up the glTF viewer dock widget.
Definition at line 260 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.show_gltf_text_triggered | ( | self | ) |
Show the current graph as glTF text popup.
Definition at line 588 of file materialxgltf/plugin.py.
None plugin.QuiltiX_glTF_serializer.show_text_box | ( | self, | |
text, | |||
title = "" ) |
Core utilities.
Show a text box with the given text.
text | The text to show |
title | The title of the text box. Default is empty string. |
Definition at line 322 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.act_gltf_viewer = QAction("glTF Viewer", editor) |
Add viewer toggle.
Definition at line 228 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.bake_textures_option = QAction("Always Bake Textures", editor) |
Definition at line 212 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.current_mx_file = "" |
Definition at line 239 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.custom_on_view_menu_about_to_show |
Definition at line 235 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.editor = editor |
Definition at line 177 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.handle_file_loaded |
Definition at line 238 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.import_gltf_triggered |
Definition at line 189 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.on_gltf_viewer_toggled |
Definition at line 230 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.page = glTFEnginePage(self.web_view) |
Definition at line 289 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.root = root |
Definition at line 178 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.show_gltf_text_triggered |
Definition at line 204 of file materialxgltf/plugin.py.
int plugin.QuiltiX_glTF_serializer.temp_file_counter = 1 |
Definition at line 240 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.viewer_address = 'https://kwokcb.github.io/MaterialXLab/documents/gltfViewer_simple.html' |
Definition at line 282 of file materialxgltf/plugin.py.
str plugin.QuiltiX_glTF_serializer.viewer_options = '?hideSave=true' |
Definition at line 280 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.web_dock_widget = glTFWidget(self.editor) |
Definition at line 318 of file materialxgltf/plugin.py.
plugin.QuiltiX_glTF_serializer.web_view = QWebEngineView() |
Definition at line 279 of file materialxgltf/plugin.py.