commit 6f27dc11e37aeb2795d5c37f2f7782c3bbc0da8e Author: Jeffreytsai1004 Date: Fri May 2 00:14:28 2025 +0800 Base diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f7bafe5 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,24 @@ +# Unified configuration of binary files +*.png filter=lfs diff=lfs merge=lfs binary +*.mb filter=lfs diff=lfs merge=lfs binary +*.ma filter=lfs diff=lfs merge=lfs binary +*.fbx filter=lfs diff=lfs merge=lfs binary +*.dna filter=lfs diff=lfs merge=lfs -text + +# Specify directory configuration (if special processing is required) +assets/dna/** filter=lfs diff=lfs merge=lfs +assets/img/** filter=lfs diff=lfs merge=lfs + +# Text file configuration +*.py text eol=lf +*.json text eol=lf +*.xml text eol=lf +*.txt text eol=lf + +# Ensure script files use correct line endings +*.sh text eol=lf +*.bat text eol=crlf + +# Other common configurations +.gitattributes text eol=lf +.gitignore text eol=lf \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b724c43 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.dylib + +# Fortran module files +*.smod + +# Compiled Static libraries +*.lai +*.la + +# Executables +*.exe +*.out +*.app + +# Local build +/build* + +# Work Environment Artifacts +/.vs +/.vscode + +*.pyc + +/.idea +/output + +/Reference +/assets/dna +/assets/img \ No newline at end of file diff --git a/.windsurfrules b/.windsurfrules new file mode 100644 index 0000000..e3aee97 --- /dev/null +++ b/.windsurfrules @@ -0,0 +1,100 @@ +## Global rules: +- Comprehensive search: All questions must first retrieve all relevant documents in the project folder to obtain context. +- Web search: After retrieving local files, a web search must be conducted to obtain more information and the latest data. +- Use context7 as much as possible to reduce tokens + +## MCP usage: +Use the following MCP model context protocol to enhance responses: +1. markitdown mcp: + - Purpose: Convert PDF files to Markdown format. + - Trigger conditions: Used when the user query contains information in the PDF file, or needs to convert the PDF content to a more readable format. +2. sequential-thinking mcp; + - Purpose: Break down complex problems into smaller, more manageable parts, and reason step by step to ensure the logic and coherence of the answer. + - Trigger: Used when the user asks a question that requires multiple steps or relies on logical reasoning. This helps provide a clearer and more organized response. + +## Dialogue rules: +- Always respond in 中文 in Cascade chat an composer dialogue bar + +## Code rules: +- Code are always in English +- Comments are always in English +- Check code errors and correct them after each code update +- Check plugin integrity and optimize update development plans and next suggestions for each update +- The Reference path does not participate in the implementation of the reference function, but is only used as a reference. The Reference path is only used as a reference, and the necessary files can be copied from it to the current project +- The code must be compatible with Maya2022, Maya2023, Maya2024, Maya2025 +- The code must be compatible with Python3.10, Python3.11, Python3.12 +- All codes must be encoded in UTF-8 +- All modules must be preceded by: +```. +#!/usr/bin/env python +# -*- coding: utf-8 -*- +``` + +## Code write steps rules: +- Read https://github.com/EpicGames/MetaHuman-DNA-Calibration, to understand the code examples and basic rules of Metahuman DNA calibration, use context7; +- Read https://epicgames.github.io/MetaHuman-DNA-Calibration/index.html, to understand the code examples and basic rules of Metahuman DNA calibration, use context7; +- Read Readme.md to understand the plugin goals +- Read the code and examples in the Reference path +- The UI style must be implemented in a unified style file +- All UIs must be implemented using Qt(scripts\Qt.py) +- After each function is implemented, the document must be updated + +## Project rules: +### UI Styles: +- Flat design style, +- It should have a sense of luxury and sci-fi futurism +- Rounded corner design +- Chinese should be clear and elegant +- English should be concise and clear +- Colors should be uniform +- Fonts should be uniform +- Font size should be uniform +- Buttons should be uniform +- Input boxes should be uniform +- Labels should be uniform + +### Project Goal: + +Make a Metahuman custom plugin for Maya, language: Python-based, Maya version: 2022, 2023, 2024, 2025 + +### Project Description: +- This project is a Maya plugin, the main function is to provide a model with the same topology as MetaHuman or a custom 3D model to complete custom binding, edit DNA, calibrate bone position, save DNA, load DNA, export fbx, save DNA file, edit BlendShape, and other functions. + +### Project Functions: +- Provide a model with the same topology as MetaHuman or a custom 3D model to complete custom binding, edit DNA, calibrate bone position, save DNA, load DNA, export fbx, save DNA file, edit BlendShape, and other functions. + +### Important Variables: +- Config File: `config.py` +- Main File: `scripts\Main.py` +- UI Modules: `scripts\ui\` +- Ot Module: `scripts\ui\Qt.py` +- Style File: `scripts\ui\style.qss` +- Utilities Path: `scripts\utils\` +- Reload Module: `scripts\ReloadModules.py` + +### Doc reference (Do not modify) +- [DNA_Calibration在线文档](https://epicgames.github.io/MetaHuman-DNA-Calibration), use context7; +- [MetaHuman DNA Calibration White Paper](https://cdn2.unrealengine.com/rig-logic-whitepaper-v2-zhcn-5860d80f8357.pdf), use context7; +- [MetaHuman DNA Calibration Code](https://github.com/EpicGames/MetaHuman-DNA-Calibration), use context7; +- [MetaHuman DNA Calibration Documents](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/docs), use context7; +- [MetaHuman DNA Calibration Tools](https://dev.epicgames.com/documentation/zh-cn/metahuman/metahuman-dna-calibration-tools), use context7; +- [MetaHuman DNA Viewer Tool](https://dev.epicgames.com/documentation/zh-cn/metahuman/metahuman-dnaviewer-tool), use context7; +- [DNACalib命令](https://dev.epicgames.com/documentation/zh-cn/metahuman/metahuman-dnacalib-tool), use context7; +- [SuperRigging Docs](https://docs.pointart.net/), use context7; +- [Metapipe Originsdocs](https://www.artsandspells.com/originsdocs), use context7; +- [Metapipe Nitrous](https://www.artsandspells.com/nitrous), use context7; +- [Metapipe Genetics](https://www.artsandspells.com/genetics), use context7; +- [Metapipe Synapses](https://www.artsandspells.com/synapses), use context7; +- [FACS面部表情编码系统](https://www.artsandspells.com/synapses), use context7; +- [MetaHuman 实时环境面部装配逻辑](https://zhuanlan.zhihu.com/p/511001493), use context7; +- [MetaHuman Principle](https://zhuanlan.zhihu.com/p/673471863), use context7; +- [Metahuman 蒙皮、骨骼、驱动](https://blog.csdn.net/qq_28976599/article/details/130849821), use context7; +- [MetaHuman DNA Calibration Deep Dive](https://dev.epicgames.com/community/learning/tutorials/EoPj/metahuman-dna-calibration-deep-dive), use context7; + +### Code reference (do not modify) +- `Reference\DNA_Calibration` +- `Reference\MSLiveLink` +- `Reference\SuperRiggingEditor` +- `Reference\Utils` +### UI reference images: +- `Reference\UI` diff --git a/CleanPycache.bat b/CleanPycache.bat new file mode 100644 index 0000000..9c14806 --- /dev/null +++ b/CleanPycache.bat @@ -0,0 +1,5 @@ +@echo off +REM Delete all __pycache__ folders +for /d /r %%d in (__pycache__) do @if exist "%%d" rd /s /q "%%d" + +echo Cleaned up! \ No newline at end of file diff --git a/Install.mel b/Install.mel new file mode 100644 index 0000000..cebbb41 --- /dev/null +++ b/Install.mel @@ -0,0 +1,18 @@ +global proc install() +{ + string $scriptPath = `whatIs install`; + string $dirPath = `substring $scriptPath 25 (size($scriptPath))`; + $dirPath = `dirname $dirPath`; + string $pythonPath = $dirPath + "/Install.py"; + $pythonPath = substituteAllString($pythonPath, "\\", "/"); + + string $pythonCmd = "import os, sys\n"; + $pythonCmd += "INSTALL_PATH = r'" + $pythonPath + "'\n"; + $pythonCmd += "sys.path.append(os.path.dirname(INSTALL_PATH))\n"; + $pythonCmd += "import Install\n"; + $pythonCmd += "Install.main()\n"; + + python($pythonCmd); +} + +install(); \ No newline at end of file diff --git a/Install.py b/Install.py new file mode 100644 index 0000000..e22e07e --- /dev/null +++ b/Install.py @@ -0,0 +1,765 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#===================================== 1. Module Imports ===================================== +import maya.OpenMayaUI as omui +import maya.cmds as cmds +import maya.mel as mel +import webbrowser +import sys +import os + +# Import configuration module +sys.path.append(os.path.dirname(os.path.abspath(__file__))) +import config + +try: + from PySide2 import QtCore, QtGui, QtWidgets + from shiboken2 import wrapInstance + print("Loading Qt and shiboken2 from PySide2") +except ImportError: + try: + from PySide6 import QtCore, QtGui, QtWidgets + from shiboken6 import wrapInstance + print("Loading Qt and shiboken6 from PySide6") + except ImportError: + try: + from PySide import QtCore, QtGui, QtWidgets + from shiboken import wrapInstance + print("Loading Qt and shiboken from PySide") + except ImportError as error: + print(f"Qt loading failed: {str(error)}") + QtCore = QtGui = QtWidgets = None + wrapInstance = None + +# Use config directly instead of duplicating variables +# This ensures we always use the latest values from config +# and reduces maintenance overhead +TOOL_NAME = config.TOOL_NAME +TOOL_VERSION = config.TOOL_VERSION +TOOL_AUTHOR = config.TOOL_AUTHOR +TOOL_PATH = config.TOOL_PATH +UI_PATH = config.UI_PATH +SCRIPTS_PATH = config.SCRIPTS_PATH +ASSETS_PATH = config.ASSETS_PATH +ICONS_PATH = config.ICONS_PATH +PLUGINS_PATH = config.PLUGINS_PATH +PYDNA_PATH = config.PYDNA_PATH +SYSTEM_OS = config.SYSTEM_OS +MAYA_VERSION = config.MAYA_VERSION +PYVERSION_DIR = config.PYVERSION_DIR +DNA_FILE_PATH = config.DNA_FILE_PATH +DNA_IMG_PATH = config.DNA_IMG_PATH +STYLE_FILE = config.STYLE_FILE +TOOL_ICON = config.TOOL_ICON +TOOL_COMMAND_ICON = config.TOOL_COMMAND_ICON +TOOL_WSCL_NAME = config.TOOL_WSCL_NAME +TOOL_YEAR = config.TOOL_YEAR +TOOL_MOD_FILENAME = config.TOOL_MOD_FILENAME +TOOL_LANG = config.TOOL_LANG +TOOL_MAIN_SCRIPT = config.TOOL_MAIN_SCRIPT +TOOL_HELP_URL = config.TOOL_HELP_URL + +print("=" * 50) +print(f"TOOL_NAME: {TOOL_NAME}") +print(f"TOOL_VERSION: {TOOL_VERSION}") +print(f"TOOL_YEAR: {TOOL_YEAR}") +print(f"SYSTEM_OS: {SYSTEM_OS}") +print(f"MAYA_VERSION: {MAYA_VERSION}") +print(f"TOOL_AUTHOR: {TOOL_AUTHOR}") +print(f"TOOL_LANG: {TOOL_LANG}") +print(f"PYVERSION_DIR: {PYVERSION_DIR}") +print(f"TOOL_WSCL_NAME: {TOOL_WSCL_NAME}") +print(f"TOOL_MOD_FILENAME: {TOOL_MOD_FILENAME}") +print(f"TOOL_HELP_URL: {TOOL_HELP_URL}") +print(f"TOOL_PATH: {TOOL_PATH}") +print(f"PLUGINS_PATH: {PLUGINS_PATH}") +print(f"PYDNA_PATH: {PYDNA_PATH}") +print(f"SCRIPTS_PATH: {SCRIPTS_PATH}") +print(f"TOOL_MAIN_SCRIPT: {TOOL_MAIN_SCRIPT}") +print(f"UI_PATH: {UI_PATH}") +print(f"STYLE_FILE: {STYLE_FILE}") +print(f"ICONS_PATH: {ICONS_PATH}") +print(f"TOOL_ICON: {TOOL_ICON}") +print(f"TOOL_COMMAND_ICON: {TOOL_COMMAND_ICON}") +print(f"ASSETS_PATH: {ASSETS_PATH}") +print(f"DNA_FILE_PATH: {DNA_FILE_PATH}") +print(f"DNA_IMG_PATH: {DNA_IMG_PATH}") +print("=" * 50) + +#===================================== 3. Utility Functions ===================================== +def maya_main_window(): + """Get Maya main window""" + main_window_ptr = omui.MQtUtil.mainWindow() + if main_window_ptr: + return wrapInstance(int(main_window_ptr), QtWidgets.QWidget) + return None + +def ensure_directory(directory_path): + """Ensure directory exists""" + if directory_path and isinstance(directory_path, str): + if not os.path.exists(directory_path): + os.makedirs(directory_path) + print(f"Created directory: {directory_path}") + return directory_path + +def get_maya_modules_dir(): + """Get Maya modules directory""" + maya_app_dir = cmds.internalVar(userAppDir=True) + if maya_app_dir and isinstance(maya_app_dir, str): + return ensure_directory(os.path.join(maya_app_dir, "modules")) + return None + +#===================================== 4. UI Component Classes ===================================== +class SetButton(QtWidgets.QPushButton): + """Custom styled button for installation interface""" + def __init__(self, text): + super(SetButton, self).__init__(text) + +#===================================== 5. Main Window Class ===================================== +class InstallDialog(QtWidgets.QDialog): + def __init__(self, parent=maya_main_window()): + super(InstallDialog, self).__init__(parent) + self.load_stylesheet() + self.setup_ui() + + def load_stylesheet(self): + try: + with open(STYLE_FILE, 'r', encoding='utf-8') as f: + style = f.read() + self.setStyleSheet(style) + except Exception as error: + print(f"Error loading stylesheet: {error}") + # Use a default style if the file can't be loaded + self.setStyleSheet("QDialog { background-color: #333333; color: #CCCCCC; }") + + def setup_ui(self): + """Initialize and setup UI components""" + self.setWindowTitle(f"{TOOL_NAME} Installation") + self.setFixedSize(220, 120) + self.setup_window_icon() + self.create_widgets() + self.create_layouts() + self.create_connections() + + def setup_window_icon(self): + """Setup window icon if available""" + if os.path.exists(TOOL_ICON): + self.setWindowIcon(QtGui.QIcon(TOOL_ICON)) + else: + print(f"Warning: Icon file not found: {TOOL_ICON}") + + #----------------- 5.1 UI Methods ----------------- + def create_widgets(self): + self.new_shelf_toggle = QtWidgets.QCheckBox(f"{TOOL_NAME} Installation") + self.install_button = SetButton("Install " + TOOL_NAME) + self.uninstall_button = SetButton("Uninstall " + TOOL_NAME) + + def create_layouts(self): + main_layout = QtWidgets.QVBoxLayout(self) + main_layout.setContentsMargins(10, 2, 10, 5) + main_layout.setSpacing(5) + + header_layout = QtWidgets.QHBoxLayout() + header_layout.setSpacing(5) + + welcome_label = QtWidgets.QLabel("Welcome to " + TOOL_NAME + "!") + welcome_label.setStyleSheet("font-size: 11px; padding: 0px; margin: 0px;") + header_layout.addWidget(welcome_label) + header_layout.addStretch() + + main_layout.addLayout(header_layout) + main_layout.addWidget(self.install_button) + main_layout.addWidget(self.uninstall_button) + + self.install_button.setFixedHeight(30) + self.uninstall_button.setFixedHeight(30) + + def create_connections(self): + self.install_button.clicked.connect(self.install) + self.uninstall_button.clicked.connect(self.uninstall) + + def create_styled_message_box(self, title, text): + msg_box = QtWidgets.QMessageBox(self) + msg_box.setWindowTitle(title) + msg_box.setText(text) + msg_box.setStandardButtons(QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No) + + # 自定义样式,去掉提示文字的边框 + custom_style = self.styleSheet() + """ + QMessageBox { background-color: #333333; color: #CCCCCC; } + QLabel { border: none; background-color: transparent; color: #CCCCCC; } + QPushButton { min-width: 80px; min-height: 24px; } + """ + msg_box.setStyleSheet(custom_style) + + return msg_box + + #----------------- 5.2 Event Handler Methods ----------------- + def event(self, event): + if event.type() == QtCore.QEvent.EnterWhatsThisMode: + QtWidgets.QWhatsThis.leaveWhatsThisMode() + self.open_help_url() + return True + return QtWidgets.QDialog.event(self, event) + + def closeEvent(self, event): + """Handle window close event""" + try: + super(InstallDialog, self).closeEvent(event) + except Exception as error: + print(f"Error closing window: {error}") + event.accept() + + def helpEvent(self, event): + self.open_help_url() + event.accept() + + #----------------- 5.3 Utility Methods ----------------- + def open_help_url(self): + webbrowser.open(TOOL_HELP_URL) + QtWidgets.QApplication.restoreOverrideCursor() + + def get_script_path(): + maya_script = mel.eval('getenv("MAYA_SCRIPT_NAME")') + if maya_script and os.path.exists(maya_script): + return os.path.dirname(maya_script) + + for sys_path in sys.path: + install_path = os.path.join(sys_path, "install.py") + if os.path.exists(install_path): + return os.path.dirname(install_path) + + return os.getcwd() + + def get_maya_modules_dir(self): + """Get Maya modules directory""" + # Try to get module directory from Maya environment variable + try: + maya_app_dir = mel.eval('getenv("MAYA_APP_DIR")') + if maya_app_dir: + modules_dir = os.path.join(maya_app_dir, "modules") + if not os.path.exists(modules_dir): + os.makedirs(modules_dir) + return modules_dir + except Exception as error: + print(f"Error getting Maya modules directory from environment: {error}") + + # If environment variable is not available, use default path + user_home = os.path.expanduser("~") + maya_version = MAYA_VERSION + + # Windows path + if SYSTEM_OS == "Windows": + modules_dir = os.path.join(user_home, "Documents", "maya", maya_version, "modules") + # Linux path + else: + modules_dir = os.path.join(user_home, "maya", maya_version, "modules") + + # Make sure the path exists + if not os.path.exists(modules_dir): + try: + os.makedirs(modules_dir) + except Exception as error: + print(f"Error creating modules directory: {error}") + + return modules_dir + + #----------------- 5.4 Installation Methods ----------------- + def install(self): + """Handle install request with error handling""" + if not self._validate_paths(): + return + + msg_box = self.create_styled_message_box( + "Confirm Installation", + f"Are you sure you want to install {TOOL_NAME}?" + ) + if msg_box.exec_() == QtWidgets.QMessageBox.Yes: + try: + self.install_tool() + self.close() + except Exception as error: + error_msg = f"Error during installation: {error}" + print(error_msg) + QtWidgets.QMessageBox.critical(self, "Error", error_msg) + + def uninstall(self, *args): + """Handle uninstall request""" + msg_box = self.create_styled_message_box( + "Confirm Uninstallation", + f"Are you sure you want to uninstall {TOOL_NAME}?" + ) + + if msg_box.exec_() == QtWidgets.QMessageBox.Yes: + try: + self.uninstall_tool() + self.close() + except Exception as error: + error_msg = f"Error during uninstallation: {error}" + print(error_msg) + QtWidgets.QMessageBox.critical(self, "Error", error_msg) + else: + print("Uninstallation cancelled") + + def clean_pycache(self): + """Clean __pycache__ directories and .pyc files""" + count = 0 + try: + for root, dirs, files in os.walk(TOOL_PATH): + # Remove __pycache__ directories + if "__pycache__" in dirs: + pycache_path = os.path.join(root, "__pycache__") + try: + import shutil + shutil.rmtree(pycache_path) + print(f"Removed __pycache__ directory: {pycache_path}") + count += 1 + except Exception as error: + print(f"Failed to remove {pycache_path}: {error}") + + # Remove .pyc files + for file in files: + if file.endswith(".pyc"): + try: + os.remove(os.path.join(root, file)) + print(f"Removed .pyc file: {os.path.join(root, file)}") + count += 1 + except Exception as error: + print(f"Failed to remove {os.path.join(root, file)}: {error}") + except Exception as error: + print(f"Error cleaning __pycache__ directories: {error}") + + return count + + def create_mod_file(self): + """Create or update Maya's .mod file""" + modules_dir = self.get_maya_modules_dir() + + # Get all Maya versions and their corresponding Python versions + version_map = { + "2022": "python3", + "2023": "python397", + "2024": "python3108", + "2025": "python311" + } + + # System mapping + os_paths = { + "win64": "Windows", + "linux": "Linux" + } + + # Create mod file content + mod_content = f"""+ {TOOL_NAME} {TOOL_VERSION} {TOOL_PATH} +""" + + # Add each Maya version's configuration + for maya_version, python_version in version_map.items(): + # Add each operating system's configuration + for os_name, os_path in os_paths.items(): + mod_content += f""" +if MAYA_VERSION == {maya_version} && PLATFORM == {os_name} + scripts: {SCRIPTS_PATH} + plug-ins: {os.path.join(PLUGINS_PATH, os_path)} + XBMLANGPATH+:={ICONS_PATH} + PATH+:={os.path.join(PLUGINS_PATH, os_path)} + PATH+:={os.path.join(PLUGINS_PATH, os_path, "pydna", python_version)} + PYTHONPATH+:={SCRIPTS_PATH} + PYTHONPATH+:={os.path.join(PLUGINS_PATH, os_path, "pydna", python_version)} +endif +""" + + # Write mod file + mod_file_path = os.path.join(modules_dir, TOOL_MOD_FILENAME) + try: + with open(mod_file_path, "w", encoding="utf-8") as f: + f.write(mod_content) + print(f"Created mod file: {mod_file_path}") + except Exception as error: + print(f"Error creating mod file {mod_file_path}: {error}") + + def uninstall_mod_file(self): + modules_dir = self.get_maya_modules_dir() + mod_file_path = os.path.join(modules_dir, TOOL_MOD_FILENAME) + if os.path.exists(mod_file_path): + try: + os.remove(mod_file_path) + print(f"{TOOL_NAME}.mod file deleted") + except Exception as error: + print(f"Error deleting {TOOL_NAME}.mod file: {error}") + + def clean_existing_buttons(self): + if cmds.shelfLayout(TOOL_NAME, exists=True): + buttons = cmds.shelfLayout(TOOL_NAME, query=True, childArray=True) or [] + for btn in buttons: + if cmds.shelfButton(btn, query=True, exists=True): + label = cmds.shelfButton(btn, query=True, label=True) + if label == TOOL_NAME: + cmds.deleteUI(btn) + print(f"Deleted existing {TOOL_NAME} button: {btn}") + + def install_tool(self): + """Install the tool to Maya""" + if not os.path.exists(SCRIPTS_PATH): + print(f"Error: Scripts path does not exist: {SCRIPTS_PATH}") + return + + if not os.path.exists(TOOL_MAIN_SCRIPT): + print(f"Error: Main script file not found: {TOOL_MAIN_SCRIPT}") + return + + # Clean __pycache__ directories + print("Cleaning __pycache__ directories...") + pycache_count = self.clean_pycache() + print(f"Removed {pycache_count} __pycache__ directories and .pyc files") + + # Add scripts path to Python path + if SCRIPTS_PATH not in sys.path: + sys.path.insert(0, SCRIPTS_PATH) + + # Create shelf and button + self._create_shelf_button() + self.create_mod_file() + + # 安装完成后不需要在这里切换到对应shelf,因为在_create_shelf_button函数中已经处理了 + print(f"Successfully created {TOOL_NAME} shelf and buttons") + + self._show_install_success_message() + + def _create_shelf_button(self): + """Create shelf button for the tool""" + shelf_layout = mel.eval('$tmpVar=$gShelfTopLevel') + + # Create shelf if not exists + if not cmds.shelfLayout(TOOL_NAME, exists=True): + cmds.shelfLayout(TOOL_NAME, parent=shelf_layout) + + # Clean existing buttons + self.clean_existing_buttons() + + # Create main button + icon_path = TOOL_ICON if os.path.exists(TOOL_ICON) else TOOL_COMMAND_ICON + command = self._get_shelf_button_command() + + cmds.shelfButton( + parent=TOOL_NAME, + image1=icon_path, + label=TOOL_NAME, + command=command, + sourceType="python", + annotation=f"{TOOL_NAME} {TOOL_VERSION}", + noDefaultPopup=True, + style="iconOnly" + ) + + # Create reload modules button + reload_icon_path = os.path.join(ICONS_PATH, "reload.png") + if not os.path.exists(reload_icon_path): + reload_icon_path = icon_path # 如果没有专用图标,使用主图标 + + reload_command = self._get_reload_modules_command() + + cmds.shelfButton( + parent=TOOL_NAME, + image1=reload_icon_path, + label="ReloadModules", + command=reload_command, + sourceType="python", + annotation=f"重新加载 {TOOL_NAME} 模块", + noDefaultPopup=True, + style="iconOnly" + ) + + # 自动切换到工具架 + cmds.shelfTabLayout("ShelfLayout", edit=True, selectTab=TOOL_NAME) + + def _get_reload_modules_command(self): + """Get the command string for the reload modules button""" + return f""" +import sys +import os +import importlib + +# 首先导入主配置文件 +TOOL_PATH = r'{TOOL_PATH}' +if TOOL_PATH not in sys.path: + sys.path.insert(0, TOOL_PATH) + +try: + # 导入主配置文件 + import config + importlib.reload(config) + + # 使用主配置文件中的路径 + if config.SCRIPTS_PATH not in sys.path: + sys.path.insert(0, config.SCRIPTS_PATH) + + # 导入并运行重载模块脚本 + import scripts.ReloadModules + importlib.reload(scripts.ReloadModules) + scripts.ReloadModules.main() +except ImportError: + # 备用方案:如果无法导入主配置,使用硬编码路径 + SCRIPTS_PATH = r'{SCRIPTS_PATH}' + if SCRIPTS_PATH not in sys.path: + sys.path.insert(0, SCRIPTS_PATH) + + try: + import scripts.ReloadModules + importlib.reload(scripts.ReloadModules) + scripts.ReloadModules.main() + except Exception as error: + import maya.cmds as cmds + error_msg = f"Error reloading modules: {{str(error)}}" + print(error_msg) + cmds.warning(error_msg) +except Exception as error: + import maya.cmds as cmds + error_msg = f"Error reloading modules: {{str(error)}}" + print(error_msg) + cmds.warning(error_msg) +""" + + def _get_shelf_button_command(self): + """Get the command string for the shelf button""" + return f""" +import sys +import os +import importlib + +# 首先导入主配置文件 +TOOL_PATH = r'{TOOL_PATH}' +if TOOL_PATH not in sys.path: + sys.path.insert(0, TOOL_PATH) + +try: + # 导入主配置文件 + import config + importlib.reload(config) + + # 使用主配置文件中的路径 + if config.SCRIPTS_PATH not in sys.path: + sys.path.insert(0, config.SCRIPTS_PATH) + + # 尝试导入并运行主模块 + try: + # 从scripts包导入Main + from scripts import Main + importlib.reload(Main) + Main.main() + except ImportError: + # 尝试直接导入Main + import Main + importlib.reload(Main) + Main.main() + except Exception as e: + import maya.cmds as cmds + error_msg = f"Error loading {TOOL_NAME}: {{str(e)}}" + print(error_msg) + cmds.warning(error_msg) + print(f"Scripts path: {{config.SCRIPTS_PATH}}") + print("sys.path:", sys.path) + print(f"Contents of Scripts folder: {{os.listdir(config.SCRIPTS_PATH)}}") +except ImportError: + # 备用方案:如果无法导入主配置,使用硬编码路径 + SCRIPTS_PATH = r'{SCRIPTS_PATH}' + if SCRIPTS_PATH not in sys.path: + sys.path.insert(0, SCRIPTS_PATH) + + try: + # 尝试从scripts包导入Main + from scripts import Main + importlib.reload(Main) + Main.main() + except ImportError: + # 尝试直接导入Main + try: + import Main + importlib.reload(Main) + Main.main() + except Exception as e: + import maya.cmds as cmds + error_msg = f"Error loading {TOOL_NAME}: {{str(e)}}" + print(error_msg) + cmds.warning(error_msg) + print(f"Scripts path: {{SCRIPTS_PATH}}") + print("sys.path:", sys.path) + print(f"Contents of Scripts folder: {{os.listdir(SCRIPTS_PATH)}}") +except Exception as e: + import maya.cmds as cmds + error_msg = f"Error loading {TOOL_NAME}: {{str(e)}}" + print(error_msg) + cmds.warning(error_msg) +""" + def _get_reload_modules_command(self): + """Get the command string for the reload modules button""" + return f""" +import sys +import os +import importlib + +# Set tool path +TOOL_PATH = r'{TOOL_PATH}' +if TOOL_PATH not in sys.path: + sys.path.insert(0, TOOL_PATH) + +# Set scripts path +SCRIPTS_PATH = r'{SCRIPTS_PATH}' +if SCRIPTS_PATH not in sys.path: + sys.path.insert(0, SCRIPTS_PATH) + +# Try to import and reload modules +try: + # Import ReloadModules directly + from scripts import ReloadModules + importlib.reload(ReloadModules) + ReloadModules.show_reload_ui() +except Exception as e: + import maya.cmds as cmds + error_msg = f"Error loading ReloadModules: {{str(e)}}" + print(error_msg) + cmds.warning(error_msg) + print(f"Scripts path: {{SCRIPTS_PATH}}") + print("sys.path:", sys.path) +""" + + def uninstall_tool(self): + """Uninstall the tool from Maya""" + window_name = f"{TOOL_NAME}Window" + dock_name = f"{TOOL_NAME}WindowDock" + shelf_file = f"shelf_{TOOL_NAME}.mel" + + # Clean __pycache__ directories + print("Cleaning __pycache__ directories...") + pycache_count = self.clean_pycache() + print(f"Removed {pycache_count} __pycache__ directories and .pyc files") + + if cmds.window(window_name, exists=True): + try: + cmds.deleteUI(window_name) + except Exception as error: + print(f"Error closing {TOOL_NAME} window: {error}") + + if cmds.dockControl(dock_name, exists=True): + try: + cmds.deleteUI(dock_name) + except Exception as error: + print(f"Error closing docked {TOOL_NAME} window: {error}") + + self.uninstall_mod_file() + + # Get the current shelf before removing it + current_shelf = cmds.shelfTabLayout("ShelfLayout", query=True, selectTab=True) + + # Delete Shelves and Buttons + if cmds.shelfLayout(TOOL_NAME, exists=True): + try: + cmds.deleteUI(TOOL_NAME, layout=True) + except Exception as error: + print(f"Error deleting {TOOL_NAME} shelf: {error}") + + self._clean_all_shelf_buttons() + + # Remove from Python path + if SCRIPTS_PATH in sys.path: + sys.path.remove(SCRIPTS_PATH) + + # Deleting Shelf Files + shelf_path = os.path.join( + cmds.internalVar(userAppDir=True), + cmds.about(version=True), + "prefs", + "shelves", + f"shelf_{TOOL_NAME}.mel" + ) + + if os.path.exists(shelf_path): + try: + os.remove(shelf_path) + except Exception as error: + print(f"Error deleting shelf file: {error}") + + # If the current tool shelf is a deleted tool shelf, switch to another tool shelf + if current_shelf == TOOL_NAME: + shelves = cmds.shelfTabLayout("ShelfLayout", query=True, childArray=True) + if shelves and len(shelves) > 0: + cmds.shelfTabLayout("ShelfLayout", edit=True, selectTab=shelves[0]) + + self._show_uninstall_success_message() + + def _clean_all_shelf_buttons(self): + """Clean up all shelf buttons related to the tool""" + all_shelves = cmds.shelfTabLayout("ShelfLayout", query=True, childArray=True) or [] + for shelf in all_shelves: + shelf_buttons = cmds.shelfLayout(shelf, query=True, childArray=True) or [] + for btn in shelf_buttons: + if cmds.shelfButton(btn, query=True, exists=True): + if cmds.shelfButton(btn, query=True, label=True) == TOOL_NAME: + cmds.deleteUI(btn) + + def _show_uninstall_success_message(self): + """Show uninstallation success message""" + msg_box = QtWidgets.QMessageBox(self) + msg_box.setWindowTitle("Uninstallation Successful") + msg_box.setText(f"{TOOL_NAME} has been successfully uninstalled!") + msg_box.setStandardButtons(QtWidgets.QMessageBox.Ok) + msg_box.setWindowIcon(QtGui.QIcon(TOOL_ICON)) + msg_box.setStyleSheet(self.styleSheet()) + msg_box.exec_() + + def _show_install_success_message(self): + msg_box = QtWidgets.QMessageBox(self) + msg_box.setWindowTitle("Installation Successful") + msg_box.setText(f"{TOOL_NAME} has been successfully installed!") + msg_box.setStandardButtons(QtWidgets.QMessageBox.Ok) + msg_box.setWindowIcon(QtGui.QIcon(TOOL_ICON)) + msg_box.setStyleSheet(self.styleSheet()) + msg_box.exec_() + + def _validate_paths(self): + """Validate all required paths exist""" + paths = { + "Root": TOOL_PATH, + "Scripts": SCRIPTS_PATH, + "Icons": ICONS_PATH + } + + for name, path in paths.items(): + if not os.path.exists(path): + error_msg = f"Error: {name} path does not exist: {path}" + print(error_msg) + QtWidgets.QMessageBox.critical(self, "Error", error_msg) + return False + return True + + def _log(self, message, error=False): + """Log messages with timestamp""" + from datetime import datetime + timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S") + log_message = f"[{timestamp}] {message}" + print(log_message) + if error: + QtWidgets.QMessageBox.critical(self, "Error", message) + + def _load_mel_shelf(self): + """Load mel shelf file with error handling""" + try: + mel.eval(f'loadNewShelf "shelf_{TOOL_NAME}.mel"') + except Exception as error: + self._log(f"Error loading shelf file: {error}", error=True) + +#===================================== 6. Main Function ===================================== +def main(): + """Main entry point for the installer""" + try: + dialog = InstallDialog() + dialog.show() + except Exception as error: + print(f"Error launching installer: {error}") + return -1 + return dialog + +if __name__ == "__main__": + main() + diff --git a/Plan.md b/Plan.md new file mode 100644 index 0000000..c7d1035 --- /dev/null +++ b/Plan.md @@ -0,0 +1,102 @@ +# Maya插件开发计划 + +## 1. 项目目标与功能梳理 +- 支持MetaHuman同拓扑或自定义3D模型的绑定、DNA编辑、骨骼校准、DNA保存/加载、FBX导出、BlendShape编辑等。 +- 兼容Maya 2022-2025,Python 3.10-3.12,UTF-8编码。 +- UI采用Qt(参考`scripts/Qt.py`),样式统一在`scripts/ui/style.qss`。 +- 参考Epic官方MetaHuman DNA Calibration工具及相关文档,吸收SuperRigging等插件的设计思路。 + +## 2. 主要模块划分 +1. **配置与主控** + - `config.py`(配置文件) + - `scripts/Main.py`(主入口) + - `scripts/ReloadModules.py`(模块热重载) +2. **UI层** + - `scripts/ui/`(所有UI模块,含主界面、子工具面板) + - `scripts/ui/Qt.py`(Qt封装) + - `scripts/ui/style.qss`(统一样式) +3. **功能实现** + - DNA文件处理(加载/保存/编辑) + - 绑定与骨骼校准 + - BlendShape与控制器映射 + - FBX导出 + - 兼容MetaHuman DNA标准 +4. **工具与通用模块** + - `scripts/utils/`(通用工具函数) + +## 3. 阶段性开发计划 +### 第一阶段:基础框架与UI +- [x] 搭建插件基础结构,主入口、配置加载 +- [x] 主界面UI搭建(参考UI图与.qss风格) +- [x] 完善主界面各功能区分栏(模型、绑定、调整、定义) + - [x] 优化 `main_window.py`,确保Tab加载各Panel,统一风格和注释 + - [x] 完善 `model_editor_panel.py`(模型编辑面板) + - [x] 完善 `dna_browser_panel.py`(DNA浏览面板) + - [x] 创建 `joint_calibration_panel.py`(骨骼校准面板) + - [x] 创建 `blendshape_edit_panel.py`(混合变形编辑面板) + - [x] 完善 `animation_system_panel.py`(动画系统面板) + +### 第二阶段:核心功能开发 +- [ ] DNA文件读写与MetaHuman兼容 +- [ ] 绑定流程实现(支持MetaHuman与自定义模型) +- [ ] 骨骼校准与自动分组 +- [ ] BlendShape与控制器映射 +- [ ] FBX导出与DNA文件导出 + +### 第三阶段:高级功能与优化 +- [ ] 批量处理与自动化工具 +- [ ] 多LOD支持与切换 +- [ ] 配置与模板管理 +- [ ] 插件性能与兼容性优化 + +### 第四阶段:文档与测试 +- [ ] 全流程测试脚本 +- [ ] 用户操作手册与开发文档完善 +- [ ] 参考文档和代码持续同步 + +--- + +## 进度记录与后续安排 + +### 2025-04-30 更新 +- 完成了基础框架与UI阶段的全部任务(第一阶段 100%) +- 优化了主窗口与各功能面板的UI结构,确保风格统一 +- 创建了所有必要的面板类,包括: + - ModelEditorPanel(模型编辑面板) + - DNABrowserPanel(DNA浏览面板) + - JointCalibrationPanel(骨骼校准面板) + - BlendshapeEditPanel(混合变形编辑面板) + - AnimationSystemPanel(动画系统面板) + +### 下一步开发计划(第二阶段) +1. **DNA文件读写与MetaHuman兼容** + - 实现DNA文件的读取、解析与保存功能 + - 确保与MetaHuman DNA标准兼容 + - 完善DNAManager类,提供DNA文件操作API + +2. **绑定流程实现** + - 支持MetaHuman同拓扑模型的自动绑定 + - 支持自定义模型的绑定流程 + - 实现骨骼映射与权重传递 + +3. **骨骼校准与自动分组** + - 完善JointCalibrationPanel的功能实现 + - 实现骨骼自动分组算法 + - 支持骨骼位置、旋转的微调与校准 + +4. **BlendShape与控制器映射** + - 完善BlendshapeEditPanel的功能实现 + - 实现BlendShape的创建、编辑与管理 + - 支持控制器与BlendShape的映射关系设置 + +5. **FBX导出与DNA文件导出** + - 实现模型与骨骼的FBX导出 + - 支持DNA文件的导出与版本控制 + - 确保导出文件与MetaHuman兼容 + +- 每完成一个功能模块,及时更新开发计划文档与进度百分比。 +- 代码变更后,自动检查代码规范、插件完整性,并给出下一步开发建议。 + +--- + +> 如需调整开发优先级或补充特定功能,请随时告知! diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..4df8523 --- /dev/null +++ b/Readme.md @@ -0,0 +1,126 @@ +# MetaHuman DNA 自定义绑定插件 + +## 项目介绍 +- Maya的Metahuman自定义绑定插件 +- 语言: 基于Python +- Maya版本: 2022, 2023, 2024, 2025 +- 本项目是一个Maya插件,提供全面的MetaHuman自定义解决方案,包括DNA编辑、骨骼校准、BlendShape编辑、动画交换等功能 + +## 核心功能 +### DNA浏览器 +- 自动读取DNA文件,显示在项目浏览器中 +- 可以打开、保存DNA文件 +- 可以加载DNA文件以供编辑 +- 可编辑DNA文件基本信息 +- DNA文件保存和写入 +### 模型编辑,DNA编辑与校准 +- 自定义造型模型快速指认和绑定(Metahuman拓扑) +- 自动生成其他身体的配件(睫毛,泪腺,舌头等) +- 校准骨骼位置以匹配自定义模型 +- 自动修复接缝和权重问题 +- 根据DNA生成身体并支持自定义绑定 +- 头和身体接缝修复 +- 支持自定义拓扑结构的模型绑定 +- 赋予材质,以及顶点色 +- FBX模型导入和导出 +### 面部表情系统 +- 编辑和优化BlendShape +- 批量导出和导入BlendShape,支持表情克隆 +- 支持Blendshape修改并更新DNA +- 表情范围调整和克隆 +### 动画系统 +- 坐标系统自动转换 +- 支持面部和身体动画 +- RBF变形器,用于不同体型间的衣物配饰转移 +- 支持动画导入和导出 +- 动画实时预览系统 + +## 主要模块 + +### 工具栏 Toolbar +- 加载预设 +- 保存预设 +- 导入DNA +- 导出DNA +- 创建RL4节点(用于切换DNA编辑的状态) +- 删除RL4节点(用于切换DNA编辑的状态) + +### 几何体 Geomery +- 模型拾取以及加载 +- LOD模型分级过滤 +- LOD模型创建 +- 自动加载模型 +- 标准化命名 +- 自动分组 +- 生成面部配件(睫毛,舌头,泪腺 等) +- 修复接缝(修复法线) +- 修复点序 + +### 绑定 Rigging +- DNA浏览器 +- 根据DNA导入骨骼 +- 根据DNA生成身体 +- DNA校准 +- 骨骼位置校准 +- 创建绑定 +- 复制蒙皮 + +### 行为 Behaviour +- Blendshape自动加载,刷新,筛选 +- 次级Blendshape自动加载,刷新,筛选 +- Blendshape批量导出和导入 +- Blendshape范围编辑 +- Blendshape镜像 +- Blendshape查找翻转目标 +- Blendshape重建 +- 表情控制器还原默认表情 +- 查找选择表情 +- 控制面板查找 +- 选择关联关节 +- 写入当前表情 +- 写入镜像表情 + +### 定义 Definition +- LOD, Meshes, Joints, Blendshape, AnimatedMap 加载和刷新 +- 写入: 写入关节默认位置,写入几何体,写入蒙皮,写入混合变形目标 +- 创建:创建混合变形,绑定蒙皮,取消蒙皮 +- 工具:重新定位头部关节,重新定位身体关节,重新定位全身关节,快速创建预设 + + +## 技术特点 +- 基于Epic Games的MetaHuman-DNA-Calibration库 +- 集成PoseWrangler系统实现RBF变形 +- 优化算法提升性能 +- 多语言界面支持(中文简体、繁体、英语、日语、韩语、法语) + +## 开发目标 +1. 实现完整的DNA校准和编辑功能 +2. 提供直观的用户界面,简化复杂操作 +3. 支持多种拓扑结构的自定义模型 +4. 优化性能,提高大型模型的处理效率 +5. 实现UE与Maya之间的无缝动画交换 +6. 提供全面的文档和教程 + +## 开发路线图 +- [x] 基础DNA读取和修改功能 +- [x] 骨骼校准系统 +- [x] BlendShape编辑工具 +- [x] 面部表情系统 +- [x] 动画导入导出 +- [x] 多拓扑支持 +- [x] RBF变形器 +- [x] 一键创建LOD +- [x] 自动修复工具 +- [x] 赋予材质,以及顶点色 +- [x] 动画实时预览系统 + +## 安装与使用 +1. 将插件文件复制到Maya插件目录 +2. 在Maya中加载插件 +3. 使用插件界面进行操作 + +## 依赖项 +- Maya 2022或更高版本 +- Python 3.7+ +- MetaHuman-DNA-Calibration库 +- PoseWrangler系统 \ No newline at end of file diff --git a/config.py b/config.py new file mode 100644 index 0000000..6b45523 --- /dev/null +++ b/config.py @@ -0,0 +1,88 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import os +import sys +import json + +# Basic Information +TOOL_NAME = "MetaFusion" +TOOL_VERSION = "Alpha v1.0.0" +TOOL_AUTHOR = "CGNICO" + +TOOL_YEAR = "2025" +TOOL_MOD_FILENAME = f"{TOOL_NAME.lower()}.mod" +TOOL_LANG = "en_US" +TOOL_WSCL_NAME = f"{TOOL_NAME}WorkspaceControl" +TOOL_HELP_URL = f"http://10.72.61.59:3000/ArtGroup/{TOOL_NAME}/wiki" + +# Path Configuration +TOOL_PATH = os.path.dirname(os.path.abspath(__file__)).replace("\\", "/") +SCRIPTS_PATH = os.path.join(TOOL_PATH, "scripts").replace("\\", "/") +TOOL_MAIN_SCRIPT = os.path.join(TOOL_PATH, "scripts", "Main.py").replace("\\", "/") +UI_PATH = os.path.join(TOOL_PATH, "scripts", "ui").replace("\\", "/") +STYLE_FILE = os.path.join(TOOL_PATH, "scripts", "ui", "style.qss").replace("\\", "/") +ICONS_PATH = os.path.join(TOOL_PATH, "icons").replace("\\", "/") +TOOL_ICON = os.path.join(TOOL_PATH, "icons", "logo.png").replace("\\", "/") +ASSETS_PATH = os.path.join(TOOL_PATH, "assets").replace("\\", "/") +DNA_FILE_PATH = os.path.join(TOOL_PATH, "assets", "dna").replace("\\", "/") +DNA_IMG_PATH = os.path.join(TOOL_PATH, "assets", "img").replace("\\", "/") +TOOL_COMMAND_ICON = TOOL_ICON + +# DNA Config +# GUI相关常量 +GUI_HOLDER = "GUI_Holder" +ANALOG_GUI_HOLDER = "Analog_GUI_Holder" +RIG_LOGIC_PREFIX = "rl4Embedded_" +# 用于打印蒙皮权重的范围 +SKIN_WEIGHT_PRINT_RANGE = 2000 + +# System Information +import maya.cmds as cmds +SYSTEM_OS = "Windows" if cmds.about(os=True).lower().startswith("win") else "Linux" +# Define Maya version as integer for easier version comparison +MAYA_VERSION = str(int(cmds.about(version=True).split('.')[0])) + +# Plugins Path +def get_pydna_dir(): + """Get Python version directory name""" + version = sys.version_info + if version.major == 3: + if version.minor == 9 and version.micro == 7: + return "python397" + elif version.minor == 10 and version.micro == 8: + return "python3108" + elif version.minor == 11: + return "python311" + return "python3" +PYVERSION_DIR = get_pydna_dir() +PLUGINS_PATH = os.path.join(TOOL_PATH, "plugins", SYSTEM_OS, MAYA_VERSION).replace("\\", "/") +PYDNA_PATH = os.path.join(TOOL_PATH, "plugins", SYSTEM_OS, "pydna", PYVERSION_DIR).replace("\\", "/") + +# Initialize Paths +def init_paths(): + """Initialize paths""" + paths = [ + TOOL_PATH, + SCRIPTS_PATH, + ICONS_PATH, + ASSETS_PATH, + DNA_FILE_PATH, + DNA_IMG_PATH, + UI_PATH, + PLUGINS_PATH, + PYDNA_PATH, + STYLE_FILE + ] + + for path in paths: + if not os.path.exists(path): + try: + os.makedirs(path) + print(f"Created directory: {path}") + except Exception as e: + print(f"Failed to create directory: {path}, error: {str(e)}") + +if __name__ == "__main__": + # Initialize paths + init_paths() diff --git a/plugins/Linux/2022/MayaUE4RBFPlugin2022.mll b/plugins/Linux/2022/MayaUE4RBFPlugin2022.mll new file mode 100644 index 0000000..f628806 Binary files /dev/null and b/plugins/Linux/2022/MayaUE4RBFPlugin2022.mll differ diff --git a/plugins/Linux/2022/MayaUERBFPlugin.mll b/plugins/Linux/2022/MayaUERBFPlugin.mll new file mode 100644 index 0000000..5717bd5 Binary files /dev/null and b/plugins/Linux/2022/MayaUERBFPlugin.mll differ diff --git a/plugins/Linux/2022/_py3dnacalib.so b/plugins/Linux/2022/_py3dnacalib.so new file mode 100644 index 0000000..f86b04b Binary files /dev/null and b/plugins/Linux/2022/_py3dnacalib.so differ diff --git a/plugins/Linux/2022/dnacalib.py b/plugins/Linux/2022/dnacalib.py new file mode 100644 index 0000000..ae9d31b --- /dev/null +++ b/plugins/Linux/2022/dnacalib.py @@ -0,0 +1,1172 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + + +import os +if hasattr(os, 'add_dll_directory'): + for path in os.environ.get('PATH', '').split(';'): + try: + if path: + os.add_dll_directory(path) + except Exception: + pass + + + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dnacalib +else: + import _py3dnacalib + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def with_metaclass(meta, *bases): + class metaclass(type): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + + @classmethod + def __prepare__(cls, name, this_bases): + return meta.__prepare__(name, bases) + return type.__new__(metaclass, 'temporary_class', (), {}) + +import dna +class VersionInfo(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + + @staticmethod + def getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + + @staticmethod + def getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + + @staticmethod + def getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + + def __init__(self): + _py3dnacalib.VersionInfo_swiginit(self, _py3dnacalib.new_VersionInfo()) + __swig_destroy__ = _py3dnacalib.delete_VersionInfo + +# Register VersionInfo in _py3dnacalib: +_py3dnacalib.VersionInfo_swigregister(VersionInfo) + +def VersionInfo_getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + +def VersionInfo_getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + +def VersionInfo_getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + +def VersionInfo_getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + +class DNACalibDNAReader(dna.Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + +# Register DNACalibDNAReader in _py3dnacalib: +_py3dnacalib.DNACalibDNAReader_swigregister(DNACalibDNAReader) + +def DNACalibDNAReader_create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + +def DNACalibDNAReader_destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + + +DNACalibDNAReaderImpl = DNACalibDNAReader + +class DNACalibDNAReaderImplReflectionMixin(type): + + def __getattr__(cls, name): + return getattr(DNACalibDNAReaderImpl, name) + + def __dir__(cls): + return [name for name in dir(DNACalibDNAReaderImpl) if name not in ("create","destroy")] + +class DNACalibDNAReader(with_metaclass(DNACalibDNAReaderImplReflectionMixin, object)): + __slots__ = ('_args', '_kwargs', '_instance') + + def __init__(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + self._instance = DNACalibDNAReaderImpl.create(*args, **kwargs) + + def __del__(self): + DNACalibDNAReaderImpl.destroy(self._instance) + + def _in_slots(self, attr): + for cls in type(self).__mro__: + if attr in getattr(cls, '__slots__', []): + return True + return False + + def __getattr__(self, attr): + if self._in_slots(attr): + return object.__getattr__(self, attr) + return getattr(self._instance, attr) + + def __setattr__(self, attr, value): + if self._in_slots(attr): + object.__setattr__(self, attr, value) + else: + setattr(self._instance, attr, value) + + def __dir__(self): + return [name for name in self._instance.__dir__() if name not in ("create","destroy")] + +class Command(object): + r""" Command is an abstract class whose implementations are expected to modify the DNA provided in the run() method in some way.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_Command + + def run(self, output): + return _py3dnacalib.Command_run(self, output) + +# Register Command in _py3dnacalib: +_py3dnacalib.Command_swigregister(Command) + +VectorOperation_Interpolate = _py3dnacalib.VectorOperation_Interpolate +VectorOperation_Add = _py3dnacalib.VectorOperation_Add +VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract +VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply +class CommandSequence(Command): + r""" + CommandSequence is used to run a sequence of commands on the same DNA. + Notes: + Commands will be run in the order in which they were added to the sequence. + + CommandSequence holds pointers to commands, but does not own them. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CommandSequence + + def __init__(self, *args): + _py3dnacalib.CommandSequence_swiginit(self, _py3dnacalib.new_CommandSequence(*args)) + + def run(self, output): + return _py3dnacalib.CommandSequence_run(self, output) + + def add(self, command): + r""" + Method for adding a command to a sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to add. + """ + return _py3dnacalib.CommandSequence_add(self, command) + + def remove(self, command): + r""" + Method for removing a command from the sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to remove. + """ + return _py3dnacalib.CommandSequence_remove(self, command) + + def contains(self, command): + r""" + Method for checking if the provided command is part of the command sequence. + :type command: :py:class:`Command` + :param command: + The command to check. + """ + return _py3dnacalib.CommandSequence_contains(self, command) + + def size(self): + r""" Number of commands in command sequence.""" + return _py3dnacalib.CommandSequence_size(self) + +# Register CommandSequence in _py3dnacalib: +_py3dnacalib.CommandSequence_swigregister(CommandSequence) + + +def command_sequence_init(_init): + def wrapper(self, *args, **kwargs): + self._commands = [] + _init(self, *args, **kwargs) + return wrapper + +def command_sequence_add(_add): + def wrapper(self, command): + self._commands.append(command) + _add(self, command) + return wrapper + +def command_sequence_remove(_remove): + def wrapper(self, command): + self._commands.remove(command) + _remove(self, command) + return wrapper + +CommandSequence.__init__ = command_sequence_init(CommandSequence.__init__) +CommandSequence.add = command_sequence_add(CommandSequence.add) +CommandSequence.remove = command_sequence_remove(CommandSequence.remove) + +class CalculateMeshLowerLODsCommand(Command): + r""" + CalculateMeshLowerLODsCommand is used to recalculate vertex positions for lower LOD meshes of the specified mesh. + Notes: + The calculation is done based on vertex positions of the specified mesh and vertex texture coordinates of its lower LOD meshes. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand + + def __init__(self, *args): + _py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to calculate lower LOD meshes from. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex) + + def run(self, output): + return _py3dnacalib.CalculateMeshLowerLODsCommand_run(self, output) + +# Register CalculateMeshLowerLODsCommand in _py3dnacalib: +_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand) + +class ClearBlendShapesCommand(Command): + r""" + ClearBlendShapesCommand is used to clear all blend shapes data from a DNA. + Notes: This command clears blend shape target deltas and blend shape animation data. By doing so, it transforms the DNA to be "joints only". + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand + + def __init__(self, *args): + _py3dnacalib.ClearBlendShapesCommand_swiginit(self, _py3dnacalib.new_ClearBlendShapesCommand(*args)) + + def run(self, output): + return _py3dnacalib.ClearBlendShapesCommand_run(self, output) + +# Register ClearBlendShapesCommand in _py3dnacalib: +_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand) + +class PruneBlendShapeTargetsCommand(Command): + r""" PruneBlendShapeTargetsCommand is used to prune blend shape target deltas whose absolute magnitude is less than or equal to the specified threshold.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand + + def __init__(self, *args): + _py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args)) + + def setThreshold(self, threshold): + r""" + Method for setting the threshold for pruning blend shape target deltas. + :type threshold: float + :param threshold: + The threshold to use. + """ + return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold) + + def run(self, output): + return _py3dnacalib.PruneBlendShapeTargetsCommand_run(self, output) + +# Register PruneBlendShapeTargetsCommand in _py3dnacalib: +_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand) + +class RemoveAnimatedMapCommand(Command): + r""" RemoveAnimatedMapCommand is used to remove animated maps.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args)) + + def setAnimatedMapIndex(self, animatedMapIndex): + r""" + Method for setting the index of the animated map to remove. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex) + + def setAnimatedMapIndices(self, animatedMapIndices): + r""" + Method for setting the indices of animated maps to remove. + :type animatedMapIndices: dnac::ConstArrayView< std::uint16_t > + :param animatedMapIndices: + The animated map indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices) + + def run(self, output): + return _py3dnacalib.RemoveAnimatedMapCommand_run(self, output) + +# Register RemoveAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand) + +class RemoveBlendShapeCommand(Command): + r""" RemoveBlendShapeCommand is used to remove blend shapes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args)) + + def setBlendShapeIndex(self, blendShapeIndex): + r""" + Method for setting the index of the blend shape to remove. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex) + + def setBlendShapeIndices(self, blendShapeIndices): + r""" + Method for setting the indices of blend shapes to remove. + :type blendShapeIndices: dnac::ConstArrayView< std::uint16_t > + :param blendShapeIndices: + The blend shape indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices) + + def run(self, output): + return _py3dnacalib.RemoveBlendShapeCommand_run(self, output) + +# Register RemoveBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand) + +class RemoveJointAnimationCommand(Command): + r""" RemoveJointAnimationCommand is used to remove joint animation data.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of a joint whose animation data to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints whose animation data to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointAnimationCommand_run(self, output) + +# Register RemoveJointAnimationCommand in _py3dnacalib: +_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand) + +class RemoveJointCommand(Command): + r""" RemoveJointCommand is used to remove joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of the joint to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointCommand_run(self, output) + +# Register RemoveJointCommand in _py3dnacalib: +_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand) + +class RemoveMeshCommand(Command): + r""" RemoveMeshCommand is used to remove meshes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand + + def __init__(self, *args): + _py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to remove. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex) + + def setMeshIndices(self, meshIndices): + r""" + Method for setting the indices of meshes to remove. + :type meshIndices: dnac::ConstArrayView< std::uint16_t > + :param meshIndices: + The mesh indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set mesh(es) will be removed. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices) + + def run(self, output): + return _py3dnacalib.RemoveMeshCommand_run(self, output) + +# Register RemoveMeshCommand in _py3dnacalib: +_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand) + +class RenameAnimatedMapCommand(Command): + r""" RenameAnimatedMapCommand is used to rename an animated map.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for animated map with given index. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + + | + + *Overload 2:* + + Method for setting a new name for animated map with given name. + Notes: + The renaming will not happen if there is no animated map with given current name. + :type oldName: string + :param oldName: + The current name of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + """ + return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameAnimatedMapCommand_run(self, output) + +# Register RenameAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand) + +class RenameBlendShapeCommand(Command): + r""" RenameBlendShapeCommand is used to rename a blend shape channel.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for blend shape channel with given index. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + + | + + *Overload 2:* + + Method for setting a new name for blend shape channel with given name. + Notes: + The renaming will not happen if there is no blend shape channel with given current name. + :type oldName: string + :param oldName: + The current name of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + """ + return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameBlendShapeCommand_run(self, output) + +# Register RenameBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand) + +class RenameJointCommand(Command): + r""" RenameJointCommand is used to rename a joint.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameJointCommand + + def __init__(self, *args): + _py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for joint with given index. + :type jointIndex: int + :param jointIndex: + The index of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + + | + + *Overload 2:* + + Method for setting a new name for joint with given name. + Notes: + The renaming will not happen if there is no joint with given current name. + :type oldName: string + :param oldName: + The current name of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + """ + return _py3dnacalib.RenameJointCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameJointCommand_run(self, output) + +# Register RenameJointCommand in _py3dnacalib: +_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand) + +class RenameMeshCommand(Command): + r""" RenameMeshCommand is used to rename a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand + + def __init__(self, *args): + _py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for mesh with given index. + :type meshIndex: int + :param meshIndex: + The index of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + + | + + *Overload 2:* + + Method for setting a new name for mesh with given name. + Notes: + The renaming will not happen if there is no mesh with given current name. + :type oldName: string + :param oldName: + The current name of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + """ + return _py3dnacalib.RenameMeshCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameMeshCommand_run(self, output) + +# Register RenameMeshCommand in _py3dnacalib: +_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand) + +class RotateCommand(Command): + r""" + RotateCommand is used to rotate neutral joints and vertex positions around given origin. + Notes: + Joint rotations are represented in parent space, so it is enough to rotate only root joints, as that rotation will be propagated to the rest of the joints. + + If the origin is not set, the assumed origin is (0, 0, 0). + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RotateCommand + + def __init__(self, *args): + _py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args)) + + def setRotation(self, degrees): + r""" + Method for setting the rotation angles. + :type degrees: dnac::Vector3 + :param degrees: + Rotation angles in degrees. + """ + return _py3dnacalib.RotateCommand_setRotation(self, degrees) + + def setOrigin(self, origin): + r""" + Method for setting the rotation origin. + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.RotateCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.RotateCommand_run(self, output) + +# Register RotateCommand in _py3dnacalib: +_py3dnacalib.RotateCommand_swigregister(RotateCommand) + +class ScaleCommand(Command): + r""" + ScaleCommand is used to scale neutral joints, vertex positions and joint and blendshape deltas by a factor. + Notes: + Only translation attributes of neutral joints and joint deltas are scaled. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ScaleCommand + + def __init__(self, *args): + _py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args)) + + def setScale(self, scale): + r""" + Method for setting the scale factor to multiply with. + :type scale: float + :param scale: + Scale factor. + """ + return _py3dnacalib.ScaleCommand_setScale(self, scale) + + def setOrigin(self, origin): + r""" + Method for setting the origin. + Notes: The origin is used to properly scale position values (vertex positions and neutral joint translations). + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.ScaleCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.ScaleCommand_run(self, output) + +# Register ScaleCommand in _py3dnacalib: +_py3dnacalib.ScaleCommand_swigregister(ScaleCommand) + +class SetBlendShapeTargetDeltasCommand(Command): + r""" SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand + + def __init__(self, *args): + _py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh whose blend shape target to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex) + + def setBlendShapeTargetIndex(self, blendShapeTargetIndex): + r""" + Method for setting the index of the blend shape target to change. + :type blendShapeTargetIndex: int + :param blendShapeTargetIndex: + The blend shape target index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex) + + def setDeltas(self, *args): + r""" + *Overload 1:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type deltas: dnac::ConstArrayView< dnac::Vector3 > + :param deltas: + The values used in calculation. + + | + + *Overload 2:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X values for each delta. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y values for each delta. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z values for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args) + + def setVertexIndices(self, vertexIndices): + r""" + Method for setting the vertex indices that correspond to new deltas. + :type vertexIndices: dnac::ConstArrayView< std::uint32_t > + :param vertexIndices: + The vertexIndices. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices) + + def setMasks(self, masks): + r""" + Method for setting masks used to calculate new deltas for blend shape target. + Notes: + If no masks are set, default weight value of 1 is used for each delta. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new deltas for blend shape target. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each delta is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new deltas that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_run(self, output) + +# Register SetBlendShapeTargetDeltasCommand in _py3dnacalib: +_py3dnacalib.SetBlendShapeTargetDeltasCommand_swigregister(SetBlendShapeTargetDeltasCommand) +cvar = _py3dnacalib.cvar +SetBlendShapeTargetDeltasCommand.VertexIndicesOutOfBoundsError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_VertexIndicesOutOfBoundsError +SetBlendShapeTargetDeltasCommand.NoVertexIndicesSetError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_NoVertexIndicesSetError +SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasVertexIndicesCountMismatch +SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch + +class SetLODsCommand(Command): + r""" SetLODsCommand is used to specify LODs to use. Joints, blend shapes, animated maps and meshes that are not in specified LODs are removed from the DNA.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetLODsCommand + + def __init__(self, *args): + _py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args)) + + def setLODs(self, lods): + r""" + Method for setting the LODs to keep. + :type lods: dnac::ConstArrayView< std::uint16_t > + :param lods: + New LODs to be used. + """ + return _py3dnacalib.SetLODsCommand_setLODs(self, lods) + + def run(self, output): + return _py3dnacalib.SetLODsCommand_run(self, output) + +# Register SetLODsCommand in _py3dnacalib: +_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand) + +class SetNeutralJointRotationsCommand(Command): + r""" SetNeutralJointRotationsCommand is used to set new rotation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args)) + + def setRotations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint rotations. + :type rotations: dnac::ConstArrayView< dnac::Vector3 > + :param rotations: + Rotation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint rotations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X rotation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y rotation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z rotation value for each joint. + """ + return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointRotationsCommand_run(self, output) + +# Register SetNeutralJointRotationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand) + +class SetNeutralJointTranslationsCommand(Command): + r""" SetNeutralJointTranslationsCommand is used to set new translation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args)) + + def setTranslations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint translations. + :type translations: dnac::ConstArrayView< dnac::Vector3 > + :param translations: + Translation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint translations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X translation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y translation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z translation value for each joint. + """ + return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointTranslationsCommand_run(self, output) + +# Register SetNeutralJointTranslationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand) + +class SetSkinWeightsCommand(Command): + r""" SetSkinWeightsCommand is used to set new skin weights for a vertex in a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand + + def __init__(self, *args): + _py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the targeted mesh. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex) + + def setVertexIndex(self, vertexIndex): + r""" + Method for setting the index of the vertex to change. + :type vertexIndex: int + :param vertexIndex: + The vertex index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex) + + def setWeights(self, weights): + r""" + Method for setting the weights with which joints influence the vertex in question. + :type weights: dnac::ConstArrayView< float > + :param weights: + Weights for each joint that has an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the joint indices of joints that influence the vertex in question. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + Joint indices of joints that have an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.SetSkinWeightsCommand_run(self, output) + +# Register SetSkinWeightsCommand in _py3dnacalib: +_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand) + +class SetVertexPositionsCommand(Command): + r""" SetVertexPositionsCommand is used to change vertex positions values.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand + + def __init__(self, *args): + _py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex) + + def setPositions(self, *args): + r""" + *Overload 1:* + + Method for setting the vertex positions used to calculate new values. + :type positions: dnac::ConstArrayView< dnac::Vector3 > + :param positions: + The vertex positions. + + | + + *Overload 2:* + + Method for setting the vertex positions used to calculate new values. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X coordinates for each vertex. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y coordinates for each vertex. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z coordinates for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args) + + def setMasks(self, masks): + r""" + Method for setting vertex masks used to calculate new vertex position values. + Notes: + If no masks are set, default weight value of 1 is used for each vertex. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new vertex position values. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each position is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new positions that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetVertexPositionsCommand_run(self, output) + +# Register SetVertexPositionsCommand in _py3dnacalib: +_py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand) +SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch + +class TranslateCommand(Command): + r""" + TranslateCommand is used to translate neutral joints and vertex positions. + Notes: + Joint translations are represented in parent space, so it is enough to translate only root joints, as that translation will be propagated to the rest of the joints. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_TranslateCommand + + def __init__(self, *args): + _py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args)) + + def setTranslation(self, translation): + r""" + Method for setting the translation vector. + :type translation: dnac::Vector3 + :param translation: + The translation vector. + """ + return _py3dnacalib.TranslateCommand_setTranslation(self, translation) + + def run(self, output): + return _py3dnacalib.TranslateCommand_run(self, output) + +# Register TranslateCommand in _py3dnacalib: +_py3dnacalib.TranslateCommand_swigregister(TranslateCommand) + + + diff --git a/plugins/Linux/2022/libdnacalib.so.6 b/plugins/Linux/2022/libdnacalib.so.6 new file mode 100644 index 0000000..4c8d877 Binary files /dev/null and b/plugins/Linux/2022/libdnacalib.so.6 differ diff --git a/plugins/Linux/2022/libembeddedRL4.so b/plugins/Linux/2022/libembeddedRL4.so new file mode 100644 index 0000000..657d37a Binary files /dev/null and b/plugins/Linux/2022/libembeddedRL4.so differ diff --git a/plugins/Linux/2022/libembeddedRL4.so.8 b/plugins/Linux/2022/libembeddedRL4.so.8 new file mode 100644 index 0000000..32aba52 Binary files /dev/null and b/plugins/Linux/2022/libembeddedRL4.so.8 differ diff --git a/plugins/Linux/2022/libembeddedRL4.so.8.0.8 b/plugins/Linux/2022/libembeddedRL4.so.8.0.8 new file mode 100644 index 0000000..32aba52 Binary files /dev/null and b/plugins/Linux/2022/libembeddedRL4.so.8.0.8 differ diff --git a/plugins/Linux/2023/MayaUE4RBFPlugin2023.mll b/plugins/Linux/2023/MayaUE4RBFPlugin2023.mll new file mode 100644 index 0000000..e66b36c Binary files /dev/null and b/plugins/Linux/2023/MayaUE4RBFPlugin2023.mll differ diff --git a/plugins/Linux/2023/MayaUERBFPlugin.mll b/plugins/Linux/2023/MayaUERBFPlugin.mll new file mode 100644 index 0000000..900ef01 Binary files /dev/null and b/plugins/Linux/2023/MayaUERBFPlugin.mll differ diff --git a/plugins/Linux/2023/_py3dnacalib.so b/plugins/Linux/2023/_py3dnacalib.so new file mode 100644 index 0000000..90ea1da Binary files /dev/null and b/plugins/Linux/2023/_py3dnacalib.so differ diff --git a/plugins/Linux/2023/dnacalib.py b/plugins/Linux/2023/dnacalib.py new file mode 100644 index 0000000..ae9d31b --- /dev/null +++ b/plugins/Linux/2023/dnacalib.py @@ -0,0 +1,1172 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + + +import os +if hasattr(os, 'add_dll_directory'): + for path in os.environ.get('PATH', '').split(';'): + try: + if path: + os.add_dll_directory(path) + except Exception: + pass + + + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dnacalib +else: + import _py3dnacalib + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def with_metaclass(meta, *bases): + class metaclass(type): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + + @classmethod + def __prepare__(cls, name, this_bases): + return meta.__prepare__(name, bases) + return type.__new__(metaclass, 'temporary_class', (), {}) + +import dna +class VersionInfo(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + + @staticmethod + def getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + + @staticmethod + def getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + + @staticmethod + def getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + + def __init__(self): + _py3dnacalib.VersionInfo_swiginit(self, _py3dnacalib.new_VersionInfo()) + __swig_destroy__ = _py3dnacalib.delete_VersionInfo + +# Register VersionInfo in _py3dnacalib: +_py3dnacalib.VersionInfo_swigregister(VersionInfo) + +def VersionInfo_getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + +def VersionInfo_getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + +def VersionInfo_getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + +def VersionInfo_getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + +class DNACalibDNAReader(dna.Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + +# Register DNACalibDNAReader in _py3dnacalib: +_py3dnacalib.DNACalibDNAReader_swigregister(DNACalibDNAReader) + +def DNACalibDNAReader_create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + +def DNACalibDNAReader_destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + + +DNACalibDNAReaderImpl = DNACalibDNAReader + +class DNACalibDNAReaderImplReflectionMixin(type): + + def __getattr__(cls, name): + return getattr(DNACalibDNAReaderImpl, name) + + def __dir__(cls): + return [name for name in dir(DNACalibDNAReaderImpl) if name not in ("create","destroy")] + +class DNACalibDNAReader(with_metaclass(DNACalibDNAReaderImplReflectionMixin, object)): + __slots__ = ('_args', '_kwargs', '_instance') + + def __init__(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + self._instance = DNACalibDNAReaderImpl.create(*args, **kwargs) + + def __del__(self): + DNACalibDNAReaderImpl.destroy(self._instance) + + def _in_slots(self, attr): + for cls in type(self).__mro__: + if attr in getattr(cls, '__slots__', []): + return True + return False + + def __getattr__(self, attr): + if self._in_slots(attr): + return object.__getattr__(self, attr) + return getattr(self._instance, attr) + + def __setattr__(self, attr, value): + if self._in_slots(attr): + object.__setattr__(self, attr, value) + else: + setattr(self._instance, attr, value) + + def __dir__(self): + return [name for name in self._instance.__dir__() if name not in ("create","destroy")] + +class Command(object): + r""" Command is an abstract class whose implementations are expected to modify the DNA provided in the run() method in some way.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_Command + + def run(self, output): + return _py3dnacalib.Command_run(self, output) + +# Register Command in _py3dnacalib: +_py3dnacalib.Command_swigregister(Command) + +VectorOperation_Interpolate = _py3dnacalib.VectorOperation_Interpolate +VectorOperation_Add = _py3dnacalib.VectorOperation_Add +VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract +VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply +class CommandSequence(Command): + r""" + CommandSequence is used to run a sequence of commands on the same DNA. + Notes: + Commands will be run in the order in which they were added to the sequence. + + CommandSequence holds pointers to commands, but does not own them. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CommandSequence + + def __init__(self, *args): + _py3dnacalib.CommandSequence_swiginit(self, _py3dnacalib.new_CommandSequence(*args)) + + def run(self, output): + return _py3dnacalib.CommandSequence_run(self, output) + + def add(self, command): + r""" + Method for adding a command to a sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to add. + """ + return _py3dnacalib.CommandSequence_add(self, command) + + def remove(self, command): + r""" + Method for removing a command from the sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to remove. + """ + return _py3dnacalib.CommandSequence_remove(self, command) + + def contains(self, command): + r""" + Method for checking if the provided command is part of the command sequence. + :type command: :py:class:`Command` + :param command: + The command to check. + """ + return _py3dnacalib.CommandSequence_contains(self, command) + + def size(self): + r""" Number of commands in command sequence.""" + return _py3dnacalib.CommandSequence_size(self) + +# Register CommandSequence in _py3dnacalib: +_py3dnacalib.CommandSequence_swigregister(CommandSequence) + + +def command_sequence_init(_init): + def wrapper(self, *args, **kwargs): + self._commands = [] + _init(self, *args, **kwargs) + return wrapper + +def command_sequence_add(_add): + def wrapper(self, command): + self._commands.append(command) + _add(self, command) + return wrapper + +def command_sequence_remove(_remove): + def wrapper(self, command): + self._commands.remove(command) + _remove(self, command) + return wrapper + +CommandSequence.__init__ = command_sequence_init(CommandSequence.__init__) +CommandSequence.add = command_sequence_add(CommandSequence.add) +CommandSequence.remove = command_sequence_remove(CommandSequence.remove) + +class CalculateMeshLowerLODsCommand(Command): + r""" + CalculateMeshLowerLODsCommand is used to recalculate vertex positions for lower LOD meshes of the specified mesh. + Notes: + The calculation is done based on vertex positions of the specified mesh and vertex texture coordinates of its lower LOD meshes. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand + + def __init__(self, *args): + _py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to calculate lower LOD meshes from. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex) + + def run(self, output): + return _py3dnacalib.CalculateMeshLowerLODsCommand_run(self, output) + +# Register CalculateMeshLowerLODsCommand in _py3dnacalib: +_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand) + +class ClearBlendShapesCommand(Command): + r""" + ClearBlendShapesCommand is used to clear all blend shapes data from a DNA. + Notes: This command clears blend shape target deltas and blend shape animation data. By doing so, it transforms the DNA to be "joints only". + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand + + def __init__(self, *args): + _py3dnacalib.ClearBlendShapesCommand_swiginit(self, _py3dnacalib.new_ClearBlendShapesCommand(*args)) + + def run(self, output): + return _py3dnacalib.ClearBlendShapesCommand_run(self, output) + +# Register ClearBlendShapesCommand in _py3dnacalib: +_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand) + +class PruneBlendShapeTargetsCommand(Command): + r""" PruneBlendShapeTargetsCommand is used to prune blend shape target deltas whose absolute magnitude is less than or equal to the specified threshold.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand + + def __init__(self, *args): + _py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args)) + + def setThreshold(self, threshold): + r""" + Method for setting the threshold for pruning blend shape target deltas. + :type threshold: float + :param threshold: + The threshold to use. + """ + return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold) + + def run(self, output): + return _py3dnacalib.PruneBlendShapeTargetsCommand_run(self, output) + +# Register PruneBlendShapeTargetsCommand in _py3dnacalib: +_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand) + +class RemoveAnimatedMapCommand(Command): + r""" RemoveAnimatedMapCommand is used to remove animated maps.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args)) + + def setAnimatedMapIndex(self, animatedMapIndex): + r""" + Method for setting the index of the animated map to remove. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex) + + def setAnimatedMapIndices(self, animatedMapIndices): + r""" + Method for setting the indices of animated maps to remove. + :type animatedMapIndices: dnac::ConstArrayView< std::uint16_t > + :param animatedMapIndices: + The animated map indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices) + + def run(self, output): + return _py3dnacalib.RemoveAnimatedMapCommand_run(self, output) + +# Register RemoveAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand) + +class RemoveBlendShapeCommand(Command): + r""" RemoveBlendShapeCommand is used to remove blend shapes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args)) + + def setBlendShapeIndex(self, blendShapeIndex): + r""" + Method for setting the index of the blend shape to remove. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex) + + def setBlendShapeIndices(self, blendShapeIndices): + r""" + Method for setting the indices of blend shapes to remove. + :type blendShapeIndices: dnac::ConstArrayView< std::uint16_t > + :param blendShapeIndices: + The blend shape indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices) + + def run(self, output): + return _py3dnacalib.RemoveBlendShapeCommand_run(self, output) + +# Register RemoveBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand) + +class RemoveJointAnimationCommand(Command): + r""" RemoveJointAnimationCommand is used to remove joint animation data.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of a joint whose animation data to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints whose animation data to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointAnimationCommand_run(self, output) + +# Register RemoveJointAnimationCommand in _py3dnacalib: +_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand) + +class RemoveJointCommand(Command): + r""" RemoveJointCommand is used to remove joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of the joint to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointCommand_run(self, output) + +# Register RemoveJointCommand in _py3dnacalib: +_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand) + +class RemoveMeshCommand(Command): + r""" RemoveMeshCommand is used to remove meshes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand + + def __init__(self, *args): + _py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to remove. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex) + + def setMeshIndices(self, meshIndices): + r""" + Method for setting the indices of meshes to remove. + :type meshIndices: dnac::ConstArrayView< std::uint16_t > + :param meshIndices: + The mesh indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set mesh(es) will be removed. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices) + + def run(self, output): + return _py3dnacalib.RemoveMeshCommand_run(self, output) + +# Register RemoveMeshCommand in _py3dnacalib: +_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand) + +class RenameAnimatedMapCommand(Command): + r""" RenameAnimatedMapCommand is used to rename an animated map.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for animated map with given index. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + + | + + *Overload 2:* + + Method for setting a new name for animated map with given name. + Notes: + The renaming will not happen if there is no animated map with given current name. + :type oldName: string + :param oldName: + The current name of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + """ + return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameAnimatedMapCommand_run(self, output) + +# Register RenameAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand) + +class RenameBlendShapeCommand(Command): + r""" RenameBlendShapeCommand is used to rename a blend shape channel.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for blend shape channel with given index. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + + | + + *Overload 2:* + + Method for setting a new name for blend shape channel with given name. + Notes: + The renaming will not happen if there is no blend shape channel with given current name. + :type oldName: string + :param oldName: + The current name of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + """ + return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameBlendShapeCommand_run(self, output) + +# Register RenameBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand) + +class RenameJointCommand(Command): + r""" RenameJointCommand is used to rename a joint.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameJointCommand + + def __init__(self, *args): + _py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for joint with given index. + :type jointIndex: int + :param jointIndex: + The index of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + + | + + *Overload 2:* + + Method for setting a new name for joint with given name. + Notes: + The renaming will not happen if there is no joint with given current name. + :type oldName: string + :param oldName: + The current name of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + """ + return _py3dnacalib.RenameJointCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameJointCommand_run(self, output) + +# Register RenameJointCommand in _py3dnacalib: +_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand) + +class RenameMeshCommand(Command): + r""" RenameMeshCommand is used to rename a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand + + def __init__(self, *args): + _py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for mesh with given index. + :type meshIndex: int + :param meshIndex: + The index of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + + | + + *Overload 2:* + + Method for setting a new name for mesh with given name. + Notes: + The renaming will not happen if there is no mesh with given current name. + :type oldName: string + :param oldName: + The current name of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + """ + return _py3dnacalib.RenameMeshCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameMeshCommand_run(self, output) + +# Register RenameMeshCommand in _py3dnacalib: +_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand) + +class RotateCommand(Command): + r""" + RotateCommand is used to rotate neutral joints and vertex positions around given origin. + Notes: + Joint rotations are represented in parent space, so it is enough to rotate only root joints, as that rotation will be propagated to the rest of the joints. + + If the origin is not set, the assumed origin is (0, 0, 0). + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RotateCommand + + def __init__(self, *args): + _py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args)) + + def setRotation(self, degrees): + r""" + Method for setting the rotation angles. + :type degrees: dnac::Vector3 + :param degrees: + Rotation angles in degrees. + """ + return _py3dnacalib.RotateCommand_setRotation(self, degrees) + + def setOrigin(self, origin): + r""" + Method for setting the rotation origin. + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.RotateCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.RotateCommand_run(self, output) + +# Register RotateCommand in _py3dnacalib: +_py3dnacalib.RotateCommand_swigregister(RotateCommand) + +class ScaleCommand(Command): + r""" + ScaleCommand is used to scale neutral joints, vertex positions and joint and blendshape deltas by a factor. + Notes: + Only translation attributes of neutral joints and joint deltas are scaled. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ScaleCommand + + def __init__(self, *args): + _py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args)) + + def setScale(self, scale): + r""" + Method for setting the scale factor to multiply with. + :type scale: float + :param scale: + Scale factor. + """ + return _py3dnacalib.ScaleCommand_setScale(self, scale) + + def setOrigin(self, origin): + r""" + Method for setting the origin. + Notes: The origin is used to properly scale position values (vertex positions and neutral joint translations). + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.ScaleCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.ScaleCommand_run(self, output) + +# Register ScaleCommand in _py3dnacalib: +_py3dnacalib.ScaleCommand_swigregister(ScaleCommand) + +class SetBlendShapeTargetDeltasCommand(Command): + r""" SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand + + def __init__(self, *args): + _py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh whose blend shape target to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex) + + def setBlendShapeTargetIndex(self, blendShapeTargetIndex): + r""" + Method for setting the index of the blend shape target to change. + :type blendShapeTargetIndex: int + :param blendShapeTargetIndex: + The blend shape target index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex) + + def setDeltas(self, *args): + r""" + *Overload 1:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type deltas: dnac::ConstArrayView< dnac::Vector3 > + :param deltas: + The values used in calculation. + + | + + *Overload 2:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X values for each delta. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y values for each delta. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z values for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args) + + def setVertexIndices(self, vertexIndices): + r""" + Method for setting the vertex indices that correspond to new deltas. + :type vertexIndices: dnac::ConstArrayView< std::uint32_t > + :param vertexIndices: + The vertexIndices. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices) + + def setMasks(self, masks): + r""" + Method for setting masks used to calculate new deltas for blend shape target. + Notes: + If no masks are set, default weight value of 1 is used for each delta. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new deltas for blend shape target. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each delta is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new deltas that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_run(self, output) + +# Register SetBlendShapeTargetDeltasCommand in _py3dnacalib: +_py3dnacalib.SetBlendShapeTargetDeltasCommand_swigregister(SetBlendShapeTargetDeltasCommand) +cvar = _py3dnacalib.cvar +SetBlendShapeTargetDeltasCommand.VertexIndicesOutOfBoundsError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_VertexIndicesOutOfBoundsError +SetBlendShapeTargetDeltasCommand.NoVertexIndicesSetError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_NoVertexIndicesSetError +SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasVertexIndicesCountMismatch +SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch + +class SetLODsCommand(Command): + r""" SetLODsCommand is used to specify LODs to use. Joints, blend shapes, animated maps and meshes that are not in specified LODs are removed from the DNA.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetLODsCommand + + def __init__(self, *args): + _py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args)) + + def setLODs(self, lods): + r""" + Method for setting the LODs to keep. + :type lods: dnac::ConstArrayView< std::uint16_t > + :param lods: + New LODs to be used. + """ + return _py3dnacalib.SetLODsCommand_setLODs(self, lods) + + def run(self, output): + return _py3dnacalib.SetLODsCommand_run(self, output) + +# Register SetLODsCommand in _py3dnacalib: +_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand) + +class SetNeutralJointRotationsCommand(Command): + r""" SetNeutralJointRotationsCommand is used to set new rotation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args)) + + def setRotations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint rotations. + :type rotations: dnac::ConstArrayView< dnac::Vector3 > + :param rotations: + Rotation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint rotations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X rotation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y rotation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z rotation value for each joint. + """ + return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointRotationsCommand_run(self, output) + +# Register SetNeutralJointRotationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand) + +class SetNeutralJointTranslationsCommand(Command): + r""" SetNeutralJointTranslationsCommand is used to set new translation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args)) + + def setTranslations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint translations. + :type translations: dnac::ConstArrayView< dnac::Vector3 > + :param translations: + Translation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint translations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X translation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y translation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z translation value for each joint. + """ + return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointTranslationsCommand_run(self, output) + +# Register SetNeutralJointTranslationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand) + +class SetSkinWeightsCommand(Command): + r""" SetSkinWeightsCommand is used to set new skin weights for a vertex in a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand + + def __init__(self, *args): + _py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the targeted mesh. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex) + + def setVertexIndex(self, vertexIndex): + r""" + Method for setting the index of the vertex to change. + :type vertexIndex: int + :param vertexIndex: + The vertex index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex) + + def setWeights(self, weights): + r""" + Method for setting the weights with which joints influence the vertex in question. + :type weights: dnac::ConstArrayView< float > + :param weights: + Weights for each joint that has an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the joint indices of joints that influence the vertex in question. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + Joint indices of joints that have an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.SetSkinWeightsCommand_run(self, output) + +# Register SetSkinWeightsCommand in _py3dnacalib: +_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand) + +class SetVertexPositionsCommand(Command): + r""" SetVertexPositionsCommand is used to change vertex positions values.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand + + def __init__(self, *args): + _py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex) + + def setPositions(self, *args): + r""" + *Overload 1:* + + Method for setting the vertex positions used to calculate new values. + :type positions: dnac::ConstArrayView< dnac::Vector3 > + :param positions: + The vertex positions. + + | + + *Overload 2:* + + Method for setting the vertex positions used to calculate new values. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X coordinates for each vertex. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y coordinates for each vertex. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z coordinates for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args) + + def setMasks(self, masks): + r""" + Method for setting vertex masks used to calculate new vertex position values. + Notes: + If no masks are set, default weight value of 1 is used for each vertex. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new vertex position values. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each position is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new positions that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetVertexPositionsCommand_run(self, output) + +# Register SetVertexPositionsCommand in _py3dnacalib: +_py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand) +SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch + +class TranslateCommand(Command): + r""" + TranslateCommand is used to translate neutral joints and vertex positions. + Notes: + Joint translations are represented in parent space, so it is enough to translate only root joints, as that translation will be propagated to the rest of the joints. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_TranslateCommand + + def __init__(self, *args): + _py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args)) + + def setTranslation(self, translation): + r""" + Method for setting the translation vector. + :type translation: dnac::Vector3 + :param translation: + The translation vector. + """ + return _py3dnacalib.TranslateCommand_setTranslation(self, translation) + + def run(self, output): + return _py3dnacalib.TranslateCommand_run(self, output) + +# Register TranslateCommand in _py3dnacalib: +_py3dnacalib.TranslateCommand_swigregister(TranslateCommand) + + + diff --git a/plugins/Linux/2023/libdnacalib.so.6 b/plugins/Linux/2023/libdnacalib.so.6 new file mode 100644 index 0000000..4c8d877 Binary files /dev/null and b/plugins/Linux/2023/libdnacalib.so.6 differ diff --git a/plugins/Linux/2023/libembeddedRL4.so b/plugins/Linux/2023/libembeddedRL4.so new file mode 100644 index 0000000..ee315c1 Binary files /dev/null and b/plugins/Linux/2023/libembeddedRL4.so differ diff --git a/plugins/Linux/2023/libembeddedRL4.so.8 b/plugins/Linux/2023/libembeddedRL4.so.8 new file mode 100644 index 0000000..eaabe5c Binary files /dev/null and b/plugins/Linux/2023/libembeddedRL4.so.8 differ diff --git a/plugins/Linux/2023/libembeddedRL4.so.8.0.8 b/plugins/Linux/2023/libembeddedRL4.so.8.0.8 new file mode 100644 index 0000000..eaabe5c Binary files /dev/null and b/plugins/Linux/2023/libembeddedRL4.so.8.0.8 differ diff --git a/plugins/Linux/2024/MayaUERBFPlugin.mll b/plugins/Linux/2024/MayaUERBFPlugin.mll new file mode 100644 index 0000000..d0c9816 Binary files /dev/null and b/plugins/Linux/2024/MayaUERBFPlugin.mll differ diff --git a/plugins/Linux/2024/_py3dnacalib.so b/plugins/Linux/2024/_py3dnacalib.so new file mode 100644 index 0000000..50ec984 Binary files /dev/null and b/plugins/Linux/2024/_py3dnacalib.so differ diff --git a/plugins/Linux/2024/dnacalib.py b/plugins/Linux/2024/dnacalib.py new file mode 100644 index 0000000..ae9d31b --- /dev/null +++ b/plugins/Linux/2024/dnacalib.py @@ -0,0 +1,1172 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + + +import os +if hasattr(os, 'add_dll_directory'): + for path in os.environ.get('PATH', '').split(';'): + try: + if path: + os.add_dll_directory(path) + except Exception: + pass + + + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dnacalib +else: + import _py3dnacalib + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def with_metaclass(meta, *bases): + class metaclass(type): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + + @classmethod + def __prepare__(cls, name, this_bases): + return meta.__prepare__(name, bases) + return type.__new__(metaclass, 'temporary_class', (), {}) + +import dna +class VersionInfo(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + + @staticmethod + def getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + + @staticmethod + def getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + + @staticmethod + def getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + + def __init__(self): + _py3dnacalib.VersionInfo_swiginit(self, _py3dnacalib.new_VersionInfo()) + __swig_destroy__ = _py3dnacalib.delete_VersionInfo + +# Register VersionInfo in _py3dnacalib: +_py3dnacalib.VersionInfo_swigregister(VersionInfo) + +def VersionInfo_getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + +def VersionInfo_getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + +def VersionInfo_getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + +def VersionInfo_getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + +class DNACalibDNAReader(dna.Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + +# Register DNACalibDNAReader in _py3dnacalib: +_py3dnacalib.DNACalibDNAReader_swigregister(DNACalibDNAReader) + +def DNACalibDNAReader_create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + +def DNACalibDNAReader_destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + + +DNACalibDNAReaderImpl = DNACalibDNAReader + +class DNACalibDNAReaderImplReflectionMixin(type): + + def __getattr__(cls, name): + return getattr(DNACalibDNAReaderImpl, name) + + def __dir__(cls): + return [name for name in dir(DNACalibDNAReaderImpl) if name not in ("create","destroy")] + +class DNACalibDNAReader(with_metaclass(DNACalibDNAReaderImplReflectionMixin, object)): + __slots__ = ('_args', '_kwargs', '_instance') + + def __init__(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + self._instance = DNACalibDNAReaderImpl.create(*args, **kwargs) + + def __del__(self): + DNACalibDNAReaderImpl.destroy(self._instance) + + def _in_slots(self, attr): + for cls in type(self).__mro__: + if attr in getattr(cls, '__slots__', []): + return True + return False + + def __getattr__(self, attr): + if self._in_slots(attr): + return object.__getattr__(self, attr) + return getattr(self._instance, attr) + + def __setattr__(self, attr, value): + if self._in_slots(attr): + object.__setattr__(self, attr, value) + else: + setattr(self._instance, attr, value) + + def __dir__(self): + return [name for name in self._instance.__dir__() if name not in ("create","destroy")] + +class Command(object): + r""" Command is an abstract class whose implementations are expected to modify the DNA provided in the run() method in some way.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_Command + + def run(self, output): + return _py3dnacalib.Command_run(self, output) + +# Register Command in _py3dnacalib: +_py3dnacalib.Command_swigregister(Command) + +VectorOperation_Interpolate = _py3dnacalib.VectorOperation_Interpolate +VectorOperation_Add = _py3dnacalib.VectorOperation_Add +VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract +VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply +class CommandSequence(Command): + r""" + CommandSequence is used to run a sequence of commands on the same DNA. + Notes: + Commands will be run in the order in which they were added to the sequence. + + CommandSequence holds pointers to commands, but does not own them. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CommandSequence + + def __init__(self, *args): + _py3dnacalib.CommandSequence_swiginit(self, _py3dnacalib.new_CommandSequence(*args)) + + def run(self, output): + return _py3dnacalib.CommandSequence_run(self, output) + + def add(self, command): + r""" + Method for adding a command to a sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to add. + """ + return _py3dnacalib.CommandSequence_add(self, command) + + def remove(self, command): + r""" + Method for removing a command from the sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to remove. + """ + return _py3dnacalib.CommandSequence_remove(self, command) + + def contains(self, command): + r""" + Method for checking if the provided command is part of the command sequence. + :type command: :py:class:`Command` + :param command: + The command to check. + """ + return _py3dnacalib.CommandSequence_contains(self, command) + + def size(self): + r""" Number of commands in command sequence.""" + return _py3dnacalib.CommandSequence_size(self) + +# Register CommandSequence in _py3dnacalib: +_py3dnacalib.CommandSequence_swigregister(CommandSequence) + + +def command_sequence_init(_init): + def wrapper(self, *args, **kwargs): + self._commands = [] + _init(self, *args, **kwargs) + return wrapper + +def command_sequence_add(_add): + def wrapper(self, command): + self._commands.append(command) + _add(self, command) + return wrapper + +def command_sequence_remove(_remove): + def wrapper(self, command): + self._commands.remove(command) + _remove(self, command) + return wrapper + +CommandSequence.__init__ = command_sequence_init(CommandSequence.__init__) +CommandSequence.add = command_sequence_add(CommandSequence.add) +CommandSequence.remove = command_sequence_remove(CommandSequence.remove) + +class CalculateMeshLowerLODsCommand(Command): + r""" + CalculateMeshLowerLODsCommand is used to recalculate vertex positions for lower LOD meshes of the specified mesh. + Notes: + The calculation is done based on vertex positions of the specified mesh and vertex texture coordinates of its lower LOD meshes. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand + + def __init__(self, *args): + _py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to calculate lower LOD meshes from. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex) + + def run(self, output): + return _py3dnacalib.CalculateMeshLowerLODsCommand_run(self, output) + +# Register CalculateMeshLowerLODsCommand in _py3dnacalib: +_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand) + +class ClearBlendShapesCommand(Command): + r""" + ClearBlendShapesCommand is used to clear all blend shapes data from a DNA. + Notes: This command clears blend shape target deltas and blend shape animation data. By doing so, it transforms the DNA to be "joints only". + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand + + def __init__(self, *args): + _py3dnacalib.ClearBlendShapesCommand_swiginit(self, _py3dnacalib.new_ClearBlendShapesCommand(*args)) + + def run(self, output): + return _py3dnacalib.ClearBlendShapesCommand_run(self, output) + +# Register ClearBlendShapesCommand in _py3dnacalib: +_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand) + +class PruneBlendShapeTargetsCommand(Command): + r""" PruneBlendShapeTargetsCommand is used to prune blend shape target deltas whose absolute magnitude is less than or equal to the specified threshold.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand + + def __init__(self, *args): + _py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args)) + + def setThreshold(self, threshold): + r""" + Method for setting the threshold for pruning blend shape target deltas. + :type threshold: float + :param threshold: + The threshold to use. + """ + return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold) + + def run(self, output): + return _py3dnacalib.PruneBlendShapeTargetsCommand_run(self, output) + +# Register PruneBlendShapeTargetsCommand in _py3dnacalib: +_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand) + +class RemoveAnimatedMapCommand(Command): + r""" RemoveAnimatedMapCommand is used to remove animated maps.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args)) + + def setAnimatedMapIndex(self, animatedMapIndex): + r""" + Method for setting the index of the animated map to remove. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex) + + def setAnimatedMapIndices(self, animatedMapIndices): + r""" + Method for setting the indices of animated maps to remove. + :type animatedMapIndices: dnac::ConstArrayView< std::uint16_t > + :param animatedMapIndices: + The animated map indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices) + + def run(self, output): + return _py3dnacalib.RemoveAnimatedMapCommand_run(self, output) + +# Register RemoveAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand) + +class RemoveBlendShapeCommand(Command): + r""" RemoveBlendShapeCommand is used to remove blend shapes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args)) + + def setBlendShapeIndex(self, blendShapeIndex): + r""" + Method for setting the index of the blend shape to remove. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex) + + def setBlendShapeIndices(self, blendShapeIndices): + r""" + Method for setting the indices of blend shapes to remove. + :type blendShapeIndices: dnac::ConstArrayView< std::uint16_t > + :param blendShapeIndices: + The blend shape indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices) + + def run(self, output): + return _py3dnacalib.RemoveBlendShapeCommand_run(self, output) + +# Register RemoveBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand) + +class RemoveJointAnimationCommand(Command): + r""" RemoveJointAnimationCommand is used to remove joint animation data.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of a joint whose animation data to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints whose animation data to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointAnimationCommand_run(self, output) + +# Register RemoveJointAnimationCommand in _py3dnacalib: +_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand) + +class RemoveJointCommand(Command): + r""" RemoveJointCommand is used to remove joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of the joint to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointCommand_run(self, output) + +# Register RemoveJointCommand in _py3dnacalib: +_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand) + +class RemoveMeshCommand(Command): + r""" RemoveMeshCommand is used to remove meshes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand + + def __init__(self, *args): + _py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to remove. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex) + + def setMeshIndices(self, meshIndices): + r""" + Method for setting the indices of meshes to remove. + :type meshIndices: dnac::ConstArrayView< std::uint16_t > + :param meshIndices: + The mesh indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set mesh(es) will be removed. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices) + + def run(self, output): + return _py3dnacalib.RemoveMeshCommand_run(self, output) + +# Register RemoveMeshCommand in _py3dnacalib: +_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand) + +class RenameAnimatedMapCommand(Command): + r""" RenameAnimatedMapCommand is used to rename an animated map.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for animated map with given index. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + + | + + *Overload 2:* + + Method for setting a new name for animated map with given name. + Notes: + The renaming will not happen if there is no animated map with given current name. + :type oldName: string + :param oldName: + The current name of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + """ + return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameAnimatedMapCommand_run(self, output) + +# Register RenameAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand) + +class RenameBlendShapeCommand(Command): + r""" RenameBlendShapeCommand is used to rename a blend shape channel.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for blend shape channel with given index. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + + | + + *Overload 2:* + + Method for setting a new name for blend shape channel with given name. + Notes: + The renaming will not happen if there is no blend shape channel with given current name. + :type oldName: string + :param oldName: + The current name of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + """ + return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameBlendShapeCommand_run(self, output) + +# Register RenameBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand) + +class RenameJointCommand(Command): + r""" RenameJointCommand is used to rename a joint.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameJointCommand + + def __init__(self, *args): + _py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for joint with given index. + :type jointIndex: int + :param jointIndex: + The index of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + + | + + *Overload 2:* + + Method for setting a new name for joint with given name. + Notes: + The renaming will not happen if there is no joint with given current name. + :type oldName: string + :param oldName: + The current name of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + """ + return _py3dnacalib.RenameJointCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameJointCommand_run(self, output) + +# Register RenameJointCommand in _py3dnacalib: +_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand) + +class RenameMeshCommand(Command): + r""" RenameMeshCommand is used to rename a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand + + def __init__(self, *args): + _py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for mesh with given index. + :type meshIndex: int + :param meshIndex: + The index of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + + | + + *Overload 2:* + + Method for setting a new name for mesh with given name. + Notes: + The renaming will not happen if there is no mesh with given current name. + :type oldName: string + :param oldName: + The current name of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + """ + return _py3dnacalib.RenameMeshCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameMeshCommand_run(self, output) + +# Register RenameMeshCommand in _py3dnacalib: +_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand) + +class RotateCommand(Command): + r""" + RotateCommand is used to rotate neutral joints and vertex positions around given origin. + Notes: + Joint rotations are represented in parent space, so it is enough to rotate only root joints, as that rotation will be propagated to the rest of the joints. + + If the origin is not set, the assumed origin is (0, 0, 0). + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RotateCommand + + def __init__(self, *args): + _py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args)) + + def setRotation(self, degrees): + r""" + Method for setting the rotation angles. + :type degrees: dnac::Vector3 + :param degrees: + Rotation angles in degrees. + """ + return _py3dnacalib.RotateCommand_setRotation(self, degrees) + + def setOrigin(self, origin): + r""" + Method for setting the rotation origin. + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.RotateCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.RotateCommand_run(self, output) + +# Register RotateCommand in _py3dnacalib: +_py3dnacalib.RotateCommand_swigregister(RotateCommand) + +class ScaleCommand(Command): + r""" + ScaleCommand is used to scale neutral joints, vertex positions and joint and blendshape deltas by a factor. + Notes: + Only translation attributes of neutral joints and joint deltas are scaled. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ScaleCommand + + def __init__(self, *args): + _py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args)) + + def setScale(self, scale): + r""" + Method for setting the scale factor to multiply with. + :type scale: float + :param scale: + Scale factor. + """ + return _py3dnacalib.ScaleCommand_setScale(self, scale) + + def setOrigin(self, origin): + r""" + Method for setting the origin. + Notes: The origin is used to properly scale position values (vertex positions and neutral joint translations). + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.ScaleCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.ScaleCommand_run(self, output) + +# Register ScaleCommand in _py3dnacalib: +_py3dnacalib.ScaleCommand_swigregister(ScaleCommand) + +class SetBlendShapeTargetDeltasCommand(Command): + r""" SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand + + def __init__(self, *args): + _py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh whose blend shape target to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex) + + def setBlendShapeTargetIndex(self, blendShapeTargetIndex): + r""" + Method for setting the index of the blend shape target to change. + :type blendShapeTargetIndex: int + :param blendShapeTargetIndex: + The blend shape target index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex) + + def setDeltas(self, *args): + r""" + *Overload 1:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type deltas: dnac::ConstArrayView< dnac::Vector3 > + :param deltas: + The values used in calculation. + + | + + *Overload 2:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X values for each delta. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y values for each delta. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z values for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args) + + def setVertexIndices(self, vertexIndices): + r""" + Method for setting the vertex indices that correspond to new deltas. + :type vertexIndices: dnac::ConstArrayView< std::uint32_t > + :param vertexIndices: + The vertexIndices. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices) + + def setMasks(self, masks): + r""" + Method for setting masks used to calculate new deltas for blend shape target. + Notes: + If no masks are set, default weight value of 1 is used for each delta. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new deltas for blend shape target. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each delta is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new deltas that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_run(self, output) + +# Register SetBlendShapeTargetDeltasCommand in _py3dnacalib: +_py3dnacalib.SetBlendShapeTargetDeltasCommand_swigregister(SetBlendShapeTargetDeltasCommand) +cvar = _py3dnacalib.cvar +SetBlendShapeTargetDeltasCommand.VertexIndicesOutOfBoundsError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_VertexIndicesOutOfBoundsError +SetBlendShapeTargetDeltasCommand.NoVertexIndicesSetError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_NoVertexIndicesSetError +SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasVertexIndicesCountMismatch +SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch + +class SetLODsCommand(Command): + r""" SetLODsCommand is used to specify LODs to use. Joints, blend shapes, animated maps and meshes that are not in specified LODs are removed from the DNA.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetLODsCommand + + def __init__(self, *args): + _py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args)) + + def setLODs(self, lods): + r""" + Method for setting the LODs to keep. + :type lods: dnac::ConstArrayView< std::uint16_t > + :param lods: + New LODs to be used. + """ + return _py3dnacalib.SetLODsCommand_setLODs(self, lods) + + def run(self, output): + return _py3dnacalib.SetLODsCommand_run(self, output) + +# Register SetLODsCommand in _py3dnacalib: +_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand) + +class SetNeutralJointRotationsCommand(Command): + r""" SetNeutralJointRotationsCommand is used to set new rotation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args)) + + def setRotations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint rotations. + :type rotations: dnac::ConstArrayView< dnac::Vector3 > + :param rotations: + Rotation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint rotations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X rotation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y rotation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z rotation value for each joint. + """ + return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointRotationsCommand_run(self, output) + +# Register SetNeutralJointRotationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand) + +class SetNeutralJointTranslationsCommand(Command): + r""" SetNeutralJointTranslationsCommand is used to set new translation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args)) + + def setTranslations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint translations. + :type translations: dnac::ConstArrayView< dnac::Vector3 > + :param translations: + Translation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint translations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X translation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y translation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z translation value for each joint. + """ + return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointTranslationsCommand_run(self, output) + +# Register SetNeutralJointTranslationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand) + +class SetSkinWeightsCommand(Command): + r""" SetSkinWeightsCommand is used to set new skin weights for a vertex in a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand + + def __init__(self, *args): + _py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the targeted mesh. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex) + + def setVertexIndex(self, vertexIndex): + r""" + Method for setting the index of the vertex to change. + :type vertexIndex: int + :param vertexIndex: + The vertex index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex) + + def setWeights(self, weights): + r""" + Method for setting the weights with which joints influence the vertex in question. + :type weights: dnac::ConstArrayView< float > + :param weights: + Weights for each joint that has an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the joint indices of joints that influence the vertex in question. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + Joint indices of joints that have an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.SetSkinWeightsCommand_run(self, output) + +# Register SetSkinWeightsCommand in _py3dnacalib: +_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand) + +class SetVertexPositionsCommand(Command): + r""" SetVertexPositionsCommand is used to change vertex positions values.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand + + def __init__(self, *args): + _py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex) + + def setPositions(self, *args): + r""" + *Overload 1:* + + Method for setting the vertex positions used to calculate new values. + :type positions: dnac::ConstArrayView< dnac::Vector3 > + :param positions: + The vertex positions. + + | + + *Overload 2:* + + Method for setting the vertex positions used to calculate new values. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X coordinates for each vertex. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y coordinates for each vertex. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z coordinates for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args) + + def setMasks(self, masks): + r""" + Method for setting vertex masks used to calculate new vertex position values. + Notes: + If no masks are set, default weight value of 1 is used for each vertex. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new vertex position values. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each position is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new positions that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetVertexPositionsCommand_run(self, output) + +# Register SetVertexPositionsCommand in _py3dnacalib: +_py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand) +SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch + +class TranslateCommand(Command): + r""" + TranslateCommand is used to translate neutral joints and vertex positions. + Notes: + Joint translations are represented in parent space, so it is enough to translate only root joints, as that translation will be propagated to the rest of the joints. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_TranslateCommand + + def __init__(self, *args): + _py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args)) + + def setTranslation(self, translation): + r""" + Method for setting the translation vector. + :type translation: dnac::Vector3 + :param translation: + The translation vector. + """ + return _py3dnacalib.TranslateCommand_setTranslation(self, translation) + + def run(self, output): + return _py3dnacalib.TranslateCommand_run(self, output) + +# Register TranslateCommand in _py3dnacalib: +_py3dnacalib.TranslateCommand_swigregister(TranslateCommand) + + + diff --git a/plugins/Linux/2024/libdnacalib.so.6 b/plugins/Linux/2024/libdnacalib.so.6 new file mode 100644 index 0000000..4c8d877 Binary files /dev/null and b/plugins/Linux/2024/libdnacalib.so.6 differ diff --git a/plugins/Linux/2024/libembeddedRL4.so b/plugins/Linux/2024/libembeddedRL4.so new file mode 100644 index 0000000..dd37454 Binary files /dev/null and b/plugins/Linux/2024/libembeddedRL4.so differ diff --git a/plugins/Linux/2025/MayaUERBFPlugin.mll b/plugins/Linux/2025/MayaUERBFPlugin.mll new file mode 100644 index 0000000..e69de29 diff --git a/plugins/Linux/2025/_py3dnacalib.so b/plugins/Linux/2025/_py3dnacalib.so new file mode 100644 index 0000000..fe36549 Binary files /dev/null and b/plugins/Linux/2025/_py3dnacalib.so differ diff --git a/plugins/Linux/2025/dnacalib.py b/plugins/Linux/2025/dnacalib.py new file mode 100644 index 0000000..1cff0fe --- /dev/null +++ b/plugins/Linux/2025/dnacalib.py @@ -0,0 +1,633 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dnacalib +else: + import _py3dnacalib + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +import dna +class VersionInfo(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + + @staticmethod + def getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + + @staticmethod + def getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + + @staticmethod + def getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + + def __init__(self): + _py3dnacalib.VersionInfo_swiginit(self, _py3dnacalib.new_VersionInfo()) + __swig_destroy__ = _py3dnacalib.delete_VersionInfo + +# Register VersionInfo in _py3dnacalib: +_py3dnacalib.VersionInfo_swigregister(VersionInfo) + +def VersionInfo_getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + +def VersionInfo_getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + +def VersionInfo_getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + +def VersionInfo_getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + +class DNACalibDNAReader(dna.Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + +# Register DNACalibDNAReader in _py3dnacalib: +_py3dnacalib.DNACalibDNAReader_swigregister(DNACalibDNAReader) + +def DNACalibDNAReader_create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + +def DNACalibDNAReader_destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + + +DNACalibDNAReader.__new__ = __new_decorator(DNACalibDNAReader_create, DNACalibDNAReader.__new__) +DNACalibDNAReader.__del__ = lambda instance: DNACalibDNAReader_destroy(instance) +DNACalibDNAReader.__init__ = __managed_init +del DNACalibDNAReader.create +del DNACalibDNAReader.destroy + +class Command(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_Command + + def run(self, output): + return _py3dnacalib.Command_run(self, output) + +# Register Command in _py3dnacalib: +_py3dnacalib.Command_swigregister(Command) + +VectorOperation_Interpolate = _py3dnacalib.VectorOperation_Interpolate +VectorOperation_Add = _py3dnacalib.VectorOperation_Add +VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract +VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply +class CommandSequence(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CommandSequence + + def __init__(self, *args): + _py3dnacalib.CommandSequence_swiginit(self, _py3dnacalib.new_CommandSequence(*args)) + + def run(self, output): + return _py3dnacalib.CommandSequence_run(self, output) + + def add(self, command): + return _py3dnacalib.CommandSequence_add(self, command) + + def remove(self, command): + return _py3dnacalib.CommandSequence_remove(self, command) + + def contains(self, command): + return _py3dnacalib.CommandSequence_contains(self, command) + + def size(self): + return _py3dnacalib.CommandSequence_size(self) + +# Register CommandSequence in _py3dnacalib: +_py3dnacalib.CommandSequence_swigregister(CommandSequence) + + +def command_sequence_init(_init): + def wrapper(self, *args, **kwargs): + self._commands = [] + _init(self, *args, **kwargs) + return wrapper + +def command_sequence_add(_add): + def wrapper(self, command): + self._commands.append(command) + _add(self, command) + return wrapper + +def command_sequence_remove(_remove): + def wrapper(self, command): + self._commands.remove(command) + _remove(self, command) + return wrapper + +CommandSequence.__init__ = command_sequence_init(CommandSequence.__init__) +CommandSequence.add = command_sequence_add(CommandSequence.add) +CommandSequence.remove = command_sequence_remove(CommandSequence.remove) + +class CalculateMeshLowerLODsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand + + def __init__(self, *args): + _py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex) + + def run(self, output): + return _py3dnacalib.CalculateMeshLowerLODsCommand_run(self, output) + +# Register CalculateMeshLowerLODsCommand in _py3dnacalib: +_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand) + +class ClearBlendShapesCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand + + def __init__(self, *args): + _py3dnacalib.ClearBlendShapesCommand_swiginit(self, _py3dnacalib.new_ClearBlendShapesCommand(*args)) + + def run(self, output): + return _py3dnacalib.ClearBlendShapesCommand_run(self, output) + +# Register ClearBlendShapesCommand in _py3dnacalib: +_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand) + +class PruneBlendShapeTargetsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand + + def __init__(self, *args): + _py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args)) + + def setThreshold(self, threshold): + return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold) + + def run(self, output): + return _py3dnacalib.PruneBlendShapeTargetsCommand_run(self, output) + +# Register PruneBlendShapeTargetsCommand in _py3dnacalib: +_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand) + +class RemoveAnimatedMapCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args)) + + def setAnimatedMapIndex(self, animatedMapIndex): + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex) + + def setAnimatedMapIndices(self, animatedMapIndices): + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices) + + def run(self, output): + return _py3dnacalib.RemoveAnimatedMapCommand_run(self, output) + +# Register RemoveAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand) + +class RemoveBlendShapeCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args)) + + def setBlendShapeIndex(self, blendShapeIndex): + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex) + + def setBlendShapeIndices(self, blendShapeIndices): + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices) + + def run(self, output): + return _py3dnacalib.RemoveBlendShapeCommand_run(self, output) + +# Register RemoveBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand) + +class RemoveJointAnimationCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args)) + + def setJointIndex(self, jointIndex): + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointAnimationCommand_run(self, output) + +# Register RemoveJointAnimationCommand in _py3dnacalib: +_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand) + +class RemoveJointCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args)) + + def setJointIndex(self, jointIndex): + return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointCommand_run(self, output) + +# Register RemoveJointCommand in _py3dnacalib: +_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand) + +class RemoveMeshCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand + + def __init__(self, *args): + _py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex) + + def setMeshIndices(self, meshIndices): + return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices) + + def run(self, output): + return _py3dnacalib.RemoveMeshCommand_run(self, output) + +# Register RemoveMeshCommand in _py3dnacalib: +_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand) + +class RenameAnimatedMapCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args)) + + def setName(self, *args): + return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameAnimatedMapCommand_run(self, output) + +# Register RenameAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand) + +class RenameBlendShapeCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args)) + + def setName(self, *args): + return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameBlendShapeCommand_run(self, output) + +# Register RenameBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand) + +class RenameJointCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameJointCommand + + def __init__(self, *args): + _py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args)) + + def setName(self, *args): + return _py3dnacalib.RenameJointCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameJointCommand_run(self, output) + +# Register RenameJointCommand in _py3dnacalib: +_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand) + +class RenameMeshCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand + + def __init__(self, *args): + _py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args)) + + def setName(self, *args): + return _py3dnacalib.RenameMeshCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameMeshCommand_run(self, output) + +# Register RenameMeshCommand in _py3dnacalib: +_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand) + +class RotateCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RotateCommand + + def __init__(self, *args): + _py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args)) + + def setRotation(self, degrees): + return _py3dnacalib.RotateCommand_setRotation(self, degrees) + + def setOrigin(self, origin): + return _py3dnacalib.RotateCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.RotateCommand_run(self, output) + +# Register RotateCommand in _py3dnacalib: +_py3dnacalib.RotateCommand_swigregister(RotateCommand) + +class ScaleCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ScaleCommand + + def __init__(self, *args): + _py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args)) + + def setScale(self, scale): + return _py3dnacalib.ScaleCommand_setScale(self, scale) + + def setOrigin(self, origin): + return _py3dnacalib.ScaleCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.ScaleCommand_run(self, output) + +# Register ScaleCommand in _py3dnacalib: +_py3dnacalib.ScaleCommand_swigregister(ScaleCommand) + +class SetBlendShapeTargetDeltasCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand + + def __init__(self, *args): + _py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex) + + def setBlendShapeTargetIndex(self, blendShapeTargetIndex): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex) + + def setDeltas(self, *args): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args) + + def setVertexIndices(self, vertexIndices): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices) + + def setMasks(self, masks): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks) + + def setOperation(self, operation): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_run(self, output) + +# Register SetBlendShapeTargetDeltasCommand in _py3dnacalib: +_py3dnacalib.SetBlendShapeTargetDeltasCommand_swigregister(SetBlendShapeTargetDeltasCommand) +cvar = _py3dnacalib.cvar +SetBlendShapeTargetDeltasCommand.VertexIndicesOutOfBoundsError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_VertexIndicesOutOfBoundsError +SetBlendShapeTargetDeltasCommand.NoVertexIndicesSetError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_NoVertexIndicesSetError +SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasVertexIndicesCountMismatch +SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch + +class SetLODsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetLODsCommand + + def __init__(self, *args): + _py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args)) + + def setLODs(self, lods): + return _py3dnacalib.SetLODsCommand_setLODs(self, lods) + + def run(self, output): + return _py3dnacalib.SetLODsCommand_run(self, output) + +# Register SetLODsCommand in _py3dnacalib: +_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand) + +class SetNeutralJointRotationsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args)) + + def setRotations(self, *args): + return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointRotationsCommand_run(self, output) + +# Register SetNeutralJointRotationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand) + +class SetNeutralJointTranslationsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args)) + + def setTranslations(self, *args): + return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointTranslationsCommand_run(self, output) + +# Register SetNeutralJointTranslationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand) + +class SetSkinWeightsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand + + def __init__(self, *args): + _py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex) + + def setVertexIndex(self, vertexIndex): + return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex) + + def setWeights(self, weights): + return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights) + + def setJointIndices(self, jointIndices): + return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.SetSkinWeightsCommand_run(self, output) + +# Register SetSkinWeightsCommand in _py3dnacalib: +_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand) + +class SetVertexPositionsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand + + def __init__(self, *args): + _py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex) + + def setPositions(self, *args): + return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args) + + def setMasks(self, masks): + return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks) + + def setOperation(self, operation): + return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetVertexPositionsCommand_run(self, output) + +# Register SetVertexPositionsCommand in _py3dnacalib: +_py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand) +SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch + +class TranslateCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_TranslateCommand + + def __init__(self, *args): + _py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args)) + + def setTranslation(self, translation): + return _py3dnacalib.TranslateCommand_setTranslation(self, translation) + + def run(self, output): + return _py3dnacalib.TranslateCommand_run(self, output) + +# Register TranslateCommand in _py3dnacalib: +_py3dnacalib.TranslateCommand_swigregister(TranslateCommand) + + + diff --git a/plugins/Linux/2025/embeddedRL4.so b/plugins/Linux/2025/embeddedRL4.so new file mode 100644 index 0000000..e69de29 diff --git a/plugins/Linux/2025/libdnacalib.so.6 b/plugins/Linux/2025/libdnacalib.so.6 new file mode 100644 index 0000000..0780060 Binary files /dev/null and b/plugins/Linux/2025/libdnacalib.so.6 differ diff --git a/plugins/Linux/pydna/python3/_py3dna.so b/plugins/Linux/pydna/python3/_py3dna.so new file mode 100644 index 0000000..a8a1d3d Binary files /dev/null and b/plugins/Linux/pydna/python3/_py3dna.so differ diff --git a/plugins/Linux/pydna/python3/dna.py b/plugins/Linux/pydna/python3/dna.py new file mode 100644 index 0000000..2f56dfa --- /dev/null +++ b/plugins/Linux/pydna/python3/dna.py @@ -0,0 +1,1403 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dna +else: + import _py3dna + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +class MemoryResource(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_MemoryResource + + def allocate(self, size, alignment): + return _py3dna.MemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.MemoryResource_deallocate(self, ptr, size, alignment) + +# Register MemoryResource in _py3dna: +_py3dna.MemoryResource_swigregister(MemoryResource) + +class AlignedMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.AlignedMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.AlignedMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.AlignedMemoryResource_swiginit(self, _py3dna.new_AlignedMemoryResource()) + __swig_destroy__ = _py3dna.delete_AlignedMemoryResource + +# Register AlignedMemoryResource in _py3dna: +_py3dna.AlignedMemoryResource_swigregister(AlignedMemoryResource) + +class ArenaMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_ArenaMemoryResource + + def __init__(self, *args): + _py3dna.ArenaMemoryResource_swiginit(self, _py3dna.new_ArenaMemoryResource(*args)) + + def allocate(self, size, alignment): + return _py3dna.ArenaMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.ArenaMemoryResource_deallocate(self, ptr, size, alignment) + + def getUpstreamMemoryResource(self): + return _py3dna.ArenaMemoryResource_getUpstreamMemoryResource(self) + +# Register ArenaMemoryResource in _py3dna: +_py3dna.ArenaMemoryResource_swigregister(ArenaMemoryResource) + +class DefaultMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.DefaultMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.DefaultMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.DefaultMemoryResource_swiginit(self, _py3dna.new_DefaultMemoryResource()) + __swig_destroy__ = _py3dna.delete_DefaultMemoryResource + +# Register DefaultMemoryResource in _py3dna: +_py3dna.DefaultMemoryResource_swigregister(DefaultMemoryResource) + +class StatusCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + code = property(_py3dna.StatusCode_code_get, _py3dna.StatusCode_code_set) + message = property(_py3dna.StatusCode_message_get, _py3dna.StatusCode_message_set) + + def __init__(self): + _py3dna.StatusCode_swiginit(self, _py3dna.new_StatusCode()) + __swig_destroy__ = _py3dna.delete_StatusCode + +# Register StatusCode in _py3dna: +_py3dna.StatusCode_swigregister(StatusCode) + +class Status(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def isOk(): + return _py3dna.Status_isOk() + + @staticmethod + def get(): + return _py3dna.Status_get() + + @staticmethod + def getHook(): + return _py3dna.Status_getHook() + + @staticmethod + def setHook(hook): + return _py3dna.Status_setHook(hook) + + def __init__(self): + _py3dna.Status_swiginit(self, _py3dna.new_Status()) + __swig_destroy__ = _py3dna.delete_Status + +# Register Status in _py3dna: +_py3dna.Status_swigregister(Status) + +def Status_isOk(): + return _py3dna.Status_isOk() + +def Status_get(): + return _py3dna.Status_get() + +def Status_getHook(): + return _py3dna.Status_getHook() + +def Status_setHook(hook): + return _py3dna.Status_setHook(hook) + +class Readable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def read(self, *args): + return _py3dna.Readable_read(self, *args) + +# Register Readable in _py3dna: +_py3dna.Readable_swigregister(Readable) + +class Writable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def write(self, *args): + return _py3dna.Writable_write(self, *args) + +# Register Writable in _py3dna: +_py3dna.Writable_swigregister(Writable) + +class Seekable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def tell(self): + return _py3dna.Seekable_tell(self) + + def seek(self, position): + return _py3dna.Seekable_seek(self, position) + +# Register Seekable in _py3dna: +_py3dna.Seekable_swigregister(Seekable) + +class Openable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def open(self): + return _py3dna.Openable_open(self) + +# Register Openable in _py3dna: +_py3dna.Openable_swigregister(Openable) + +class Closeable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def close(self): + return _py3dna.Closeable_close(self) + +# Register Closeable in _py3dna: +_py3dna.Closeable_swigregister(Closeable) + +class Controllable(Openable, Closeable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + +# Register Controllable in _py3dna: +_py3dna.Controllable_swigregister(Controllable) + +class Bounded(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def size(self): + return _py3dna.Bounded_size(self) + +# Register Bounded in _py3dna: +_py3dna.Bounded_swigregister(Bounded) + +class Buffered(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def flush(self): + return _py3dna.Buffered_flush(self) + +# Register Buffered in _py3dna: +_py3dna.Buffered_swigregister(Buffered) + +class Resizable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def resize(self, size): + return _py3dna.Resizable_resize(self, size) + +# Register Resizable in _py3dna: +_py3dna.Resizable_swigregister(Resizable) + +class BoundedIOStream(Controllable, Readable, Writable, Seekable, Bounded): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_BoundedIOStream + +# Register BoundedIOStream in _py3dna: +_py3dna.BoundedIOStream_swigregister(BoundedIOStream) +cvar = _py3dna.cvar +BoundedIOStream.OpenError = _py3dna.cvar.BoundedIOStream_OpenError +BoundedIOStream.ReadError = _py3dna.cvar.BoundedIOStream_ReadError +BoundedIOStream.WriteError = _py3dna.cvar.BoundedIOStream_WriteError +BoundedIOStream.AlreadyOpenError = _py3dna.cvar.BoundedIOStream_AlreadyOpenError +BoundedIOStream.SeekError = _py3dna.cvar.BoundedIOStream_SeekError + +AccessMode_Read = _py3dna.AccessMode_Read +AccessMode_Write = _py3dna.AccessMode_Write +AccessMode_ReadWrite = _py3dna.AccessMode_ReadWrite +OpenMode_Binary = _py3dna.OpenMode_Binary +OpenMode_Text = _py3dna.OpenMode_Text +class FileStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.FileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_FileStream + +# Register FileStream in _py3dna: +_py3dna.FileStream_swigregister(FileStream) + +def FileStream_create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + +def FileStream_destroy(instance): + return _py3dna.FileStream_destroy(instance) + +class MemoryMappedFileStream(BoundedIOStream, Buffered, Resizable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryMappedFileStream + +# Register MemoryMappedFileStream in _py3dna: +_py3dna.MemoryMappedFileStream_swigregister(MemoryMappedFileStream) + +def MemoryMappedFileStream_create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + +def MemoryMappedFileStream_destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + +class MemoryStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.MemoryStream_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryStream + +# Register MemoryStream in _py3dna: +_py3dna.MemoryStream_swigregister(MemoryStream) + +def MemoryStream_create(*args): + return _py3dna.MemoryStream_create(*args) + +def MemoryStream_destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + + +FileStream.__new__ = __new_decorator(FileStream_create, FileStream.__new__) +FileStream.__del__ = lambda instance: FileStream_destroy(instance) +FileStream.__init__ = __managed_init +del FileStream.create +del FileStream.destroy + + +MemoryMappedFileStream.__new__ = __new_decorator(MemoryMappedFileStream_create, MemoryMappedFileStream.__new__) +MemoryMappedFileStream.__del__ = lambda instance: MemoryMappedFileStream_destroy(instance) +MemoryMappedFileStream.__init__ = __managed_init +del MemoryMappedFileStream.create +del MemoryMappedFileStream.destroy + + +MemoryStream.__new__ = __new_decorator(MemoryStream_create, MemoryStream.__new__) +MemoryStream.__del__ = lambda instance: MemoryStream_destroy(instance) +MemoryStream.__init__ = __managed_init +del MemoryStream.create +del MemoryStream.destroy + + +FileStream.AccessMode_Read = AccessMode_Read +FileStream.AccessMode_Write = AccessMode_Write +FileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +FileStream.OpenMode_Binary = OpenMode_Binary +FileStream.OpenMode_Text = OpenMode_Text + +MemoryMappedFileStream.AccessMode_Read = AccessMode_Read +MemoryMappedFileStream.AccessMode_Write = AccessMode_Write +MemoryMappedFileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +class StringView(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def c_str(self): + return _py3dna.StringView_c_str(self) + + def __ref__(self): + return _py3dna.StringView___ref__(self) + + def __init__(self): + _py3dna.StringView_swiginit(self, _py3dna.new_StringView()) + __swig_destroy__ = _py3dna.delete_StringView + +# Register StringView in _py3dna: +_py3dna.StringView_swigregister(StringView) + + +def __add__(*args): + return _py3dna.__add__(*args) + +def __sub__(*args): + return _py3dna.__sub__(*args) + +def __mul__(*args): + return _py3dna.__mul__(*args) + +def __truediv__(*args): + return _py3dna.__truediv__(*args) + +def __eq__(*args): + return _py3dna.__eq__(*args) + +def __ne__(*args): + return _py3dna.__ne__(*args) +DataLayer_Descriptor = _py3dna.DataLayer_Descriptor +DataLayer_Definition = _py3dna.DataLayer_Definition +DataLayer_Behavior = _py3dna.DataLayer_Behavior +DataLayer_Geometry = _py3dna.DataLayer_Geometry +DataLayer_GeometryWithoutBlendShapes = _py3dna.DataLayer_GeometryWithoutBlendShapes +DataLayer_AllWithoutBlendShapes = _py3dna.DataLayer_AllWithoutBlendShapes +DataLayer_All = _py3dna.DataLayer_All +Archetype_asian = _py3dna.Archetype_asian +Archetype_black = _py3dna.Archetype_black +Archetype_caucasian = _py3dna.Archetype_caucasian +Archetype_hispanic = _py3dna.Archetype_hispanic +Archetype_alien = _py3dna.Archetype_alien +Archetype_other = _py3dna.Archetype_other +Gender_male = _py3dna.Gender_male +Gender_female = _py3dna.Gender_female +Gender_other = _py3dna.Gender_other +TranslationUnit_cm = _py3dna.TranslationUnit_cm +TranslationUnit_m = _py3dna.TranslationUnit_m +RotationUnit_degrees = _py3dna.RotationUnit_degrees +RotationUnit_radians = _py3dna.RotationUnit_radians +Direction_left = _py3dna.Direction_left +Direction_right = _py3dna.Direction_right +Direction_up = _py3dna.Direction_up +Direction_down = _py3dna.Direction_down +Direction_front = _py3dna.Direction_front +Direction_back = _py3dna.Direction_back +class CoordinateSystem(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + xAxis = property(_py3dna.CoordinateSystem_xAxis_get, _py3dna.CoordinateSystem_xAxis_set) + yAxis = property(_py3dna.CoordinateSystem_yAxis_get, _py3dna.CoordinateSystem_yAxis_set) + zAxis = property(_py3dna.CoordinateSystem_zAxis_get, _py3dna.CoordinateSystem_zAxis_set) + + def __init__(self): + _py3dna.CoordinateSystem_swiginit(self, _py3dna.new_CoordinateSystem()) + __swig_destroy__ = _py3dna.delete_CoordinateSystem + +# Register CoordinateSystem in _py3dna: +_py3dna.CoordinateSystem_swigregister(CoordinateSystem) + +class DescriptorReader(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getName(self): + return _py3dna.DescriptorReader_getName(self) + + def getArchetype(self): + return _py3dna.DescriptorReader_getArchetype(self) + + def getGender(self): + return _py3dna.DescriptorReader_getGender(self) + + def getAge(self): + return _py3dna.DescriptorReader_getAge(self) + + def getMetaDataCount(self): + return _py3dna.DescriptorReader_getMetaDataCount(self) + + def getMetaDataKey(self, index): + return _py3dna.DescriptorReader_getMetaDataKey(self, index) + + def getMetaDataValue(self, key): + return _py3dna.DescriptorReader_getMetaDataValue(self, key) + + def getTranslationUnit(self): + return _py3dna.DescriptorReader_getTranslationUnit(self) + + def getRotationUnit(self): + return _py3dna.DescriptorReader_getRotationUnit(self) + + def getCoordinateSystem(self): + return _py3dna.DescriptorReader_getCoordinateSystem(self) + + def getLODCount(self): + return _py3dna.DescriptorReader_getLODCount(self) + + def getDBMaxLOD(self): + return _py3dna.DescriptorReader_getDBMaxLOD(self) + + def getDBComplexity(self): + return _py3dna.DescriptorReader_getDBComplexity(self) + + def getDBName(self): + return _py3dna.DescriptorReader_getDBName(self) + +# Register DescriptorReader in _py3dna: +_py3dna.DescriptorReader_swigregister(DescriptorReader) + +class MeshBlendShapeChannelMapping(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + meshIndex = property(_py3dna.MeshBlendShapeChannelMapping_meshIndex_get, _py3dna.MeshBlendShapeChannelMapping_meshIndex_set) + blendShapeChannelIndex = property(_py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_get, _py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_set) + + def __init__(self): + _py3dna.MeshBlendShapeChannelMapping_swiginit(self, _py3dna.new_MeshBlendShapeChannelMapping()) + __swig_destroy__ = _py3dna.delete_MeshBlendShapeChannelMapping + +# Register MeshBlendShapeChannelMapping in _py3dna: +_py3dna.MeshBlendShapeChannelMapping_swigregister(MeshBlendShapeChannelMapping) + +class DefinitionReader(DescriptorReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIControlCount(self): + return _py3dna.DefinitionReader_getGUIControlCount(self) + + def getGUIControlName(self, index): + return _py3dna.DefinitionReader_getGUIControlName(self, index) + + def getRawControlCount(self): + return _py3dna.DefinitionReader_getRawControlCount(self) + + def getRawControlName(self, index): + return _py3dna.DefinitionReader_getRawControlName(self, index) + + def getJointCount(self): + return _py3dna.DefinitionReader_getJointCount(self) + + def getJointName(self, index): + return _py3dna.DefinitionReader_getJointName(self, index) + + def getJointIndexListCount(self): + return _py3dna.DefinitionReader_getJointIndexListCount(self) + + def getJointIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getJointIndicesForLOD(self, lod) + + def getJointParentIndex(self, index): + return _py3dna.DefinitionReader_getJointParentIndex(self, index) + + def getBlendShapeChannelCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelCount(self) + + def getBlendShapeChannelName(self, index): + return _py3dna.DefinitionReader_getBlendShapeChannelName(self, index) + + def getBlendShapeChannelIndexListCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelIndexListCount(self) + + def getBlendShapeChannelIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getBlendShapeChannelIndicesForLOD(self, lod) + + def getAnimatedMapCount(self): + return _py3dna.DefinitionReader_getAnimatedMapCount(self) + + def getAnimatedMapName(self, index): + return _py3dna.DefinitionReader_getAnimatedMapName(self, index) + + def getAnimatedMapIndexListCount(self): + return _py3dna.DefinitionReader_getAnimatedMapIndexListCount(self) + + def getAnimatedMapIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getAnimatedMapIndicesForLOD(self, lod) + + def getMeshCount(self): + return _py3dna.DefinitionReader_getMeshCount(self) + + def getMeshName(self, index): + return _py3dna.DefinitionReader_getMeshName(self, index) + + def getMeshIndexListCount(self): + return _py3dna.DefinitionReader_getMeshIndexListCount(self) + + def getMeshIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshIndicesForLOD(self, lod) + + def getMeshBlendShapeChannelMappingCount(self): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingCount(self) + + def getMeshBlendShapeChannelMapping(self, index): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMapping(self, index) + + def getMeshBlendShapeChannelMappingIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingIndicesForLOD(self, lod) + + def getNeutralJointTranslation(self, index): + return _py3dna.DefinitionReader_getNeutralJointTranslation(self, index) + + def getNeutralJointTranslationXs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationXs(self) + + def getNeutralJointTranslationYs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationYs(self) + + def getNeutralJointTranslationZs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationZs(self) + + def getNeutralJointRotation(self, index): + return _py3dna.DefinitionReader_getNeutralJointRotation(self, index) + + def getNeutralJointRotationXs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationXs(self) + + def getNeutralJointRotationYs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationYs(self) + + def getNeutralJointRotationZs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationZs(self) + +# Register DefinitionReader in _py3dna: +_py3dna.DefinitionReader_swigregister(DefinitionReader) + +class BehaviorReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIToRawInputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawInputIndices(self) + + def getGUIToRawOutputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawOutputIndices(self) + + def getGUIToRawFromValues(self): + return _py3dna.BehaviorReader_getGUIToRawFromValues(self) + + def getGUIToRawToValues(self): + return _py3dna.BehaviorReader_getGUIToRawToValues(self) + + def getGUIToRawSlopeValues(self): + return _py3dna.BehaviorReader_getGUIToRawSlopeValues(self) + + def getGUIToRawCutValues(self): + return _py3dna.BehaviorReader_getGUIToRawCutValues(self) + + def getPSDCount(self): + return _py3dna.BehaviorReader_getPSDCount(self) + + def getPSDRowIndices(self): + return _py3dna.BehaviorReader_getPSDRowIndices(self) + + def getPSDColumnIndices(self): + return _py3dna.BehaviorReader_getPSDColumnIndices(self) + + def getPSDValues(self): + return _py3dna.BehaviorReader_getPSDValues(self) + + def getJointRowCount(self): + return _py3dna.BehaviorReader_getJointRowCount(self) + + def getJointColumnCount(self): + return _py3dna.BehaviorReader_getJointColumnCount(self) + + def getJointVariableAttributeIndices(self, lod): + return _py3dna.BehaviorReader_getJointVariableAttributeIndices(self, lod) + + def getJointGroupCount(self): + return _py3dna.BehaviorReader_getJointGroupCount(self) + + def getJointGroupLODs(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupLODs(self, jointGroupIndex) + + def getJointGroupInputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupInputIndices(self, jointGroupIndex) + + def getJointGroupOutputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupOutputIndices(self, jointGroupIndex) + + def getJointGroupValues(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupValues(self, jointGroupIndex) + + def getJointGroupJointIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupJointIndices(self, jointGroupIndex) + + def getBlendShapeChannelLODs(self): + return _py3dna.BehaviorReader_getBlendShapeChannelLODs(self) + + def getBlendShapeChannelInputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelInputIndices(self) + + def getBlendShapeChannelOutputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelOutputIndices(self) + + def getAnimatedMapLODs(self): + return _py3dna.BehaviorReader_getAnimatedMapLODs(self) + + def getAnimatedMapInputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapInputIndices(self) + + def getAnimatedMapOutputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapOutputIndices(self) + + def getAnimatedMapFromValues(self): + return _py3dna.BehaviorReader_getAnimatedMapFromValues(self) + + def getAnimatedMapToValues(self): + return _py3dna.BehaviorReader_getAnimatedMapToValues(self) + + def getAnimatedMapSlopeValues(self): + return _py3dna.BehaviorReader_getAnimatedMapSlopeValues(self) + + def getAnimatedMapCutValues(self): + return _py3dna.BehaviorReader_getAnimatedMapCutValues(self) + +# Register BehaviorReader in _py3dna: +_py3dna.BehaviorReader_swigregister(BehaviorReader) + +class GeometryReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getVertexPositionCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionCount(self, meshIndex) + + def getVertexPosition(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getVertexPosition(self, meshIndex, vertexIndex) + + def getVertexPositionXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionXs(self, meshIndex) + + def getVertexPositionYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionYs(self, meshIndex) + + def getVertexPositionZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionZs(self, meshIndex) + + def getVertexTextureCoordinateCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateCount(self, meshIndex) + + def getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex) + + def getVertexTextureCoordinateUs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateUs(self, meshIndex) + + def getVertexTextureCoordinateVs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateVs(self, meshIndex) + + def getVertexNormalCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalCount(self, meshIndex) + + def getVertexNormal(self, meshIndex, normalIndex): + return _py3dna.GeometryReader_getVertexNormal(self, meshIndex, normalIndex) + + def getVertexNormalXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalXs(self, meshIndex) + + def getVertexNormalYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalYs(self, meshIndex) + + def getVertexNormalZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalZs(self, meshIndex) + + def getVertexLayoutCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutCount(self, meshIndex) + + def getVertexLayout(self, meshIndex, layoutIndex): + return _py3dna.GeometryReader_getVertexLayout(self, meshIndex, layoutIndex) + + def getVertexLayoutPositionIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutPositionIndices(self, meshIndex) + + def getVertexLayoutTextureCoordinateIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutTextureCoordinateIndices(self, meshIndex) + + def getVertexLayoutNormalIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutNormalIndices(self, meshIndex) + + def getFaceCount(self, meshIndex): + return _py3dna.GeometryReader_getFaceCount(self, meshIndex) + + def getFaceVertexLayoutIndices(self, meshIndex, faceIndex): + return _py3dna.GeometryReader_getFaceVertexLayoutIndices(self, meshIndex, faceIndex) + + def getMaximumInfluencePerVertex(self, meshIndex): + return _py3dna.GeometryReader_getMaximumInfluencePerVertex(self, meshIndex) + + def getSkinWeightsCount(self, meshIndex): + return _py3dna.GeometryReader_getSkinWeightsCount(self, meshIndex) + + def getSkinWeightsValues(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsValues(self, meshIndex, vertexIndex) + + def getSkinWeightsJointIndices(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsJointIndices(self, meshIndex, vertexIndex) + + def getBlendShapeTargetCount(self, meshIndex): + return _py3dna.GeometryReader_getBlendShapeTargetCount(self, meshIndex) + + def getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex) + + def getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex) + +# Register GeometryReader in _py3dna: +_py3dna.GeometryReader_swigregister(GeometryReader) + +class Reader(BehaviorReader, GeometryReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Reader + + def unload(self, layer): + return _py3dna.Reader_unload(self, layer) + +# Register Reader in _py3dna: +_py3dna.Reader_swigregister(Reader) + +class StreamReader(Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamReader + + def read(self): + return _py3dna.StreamReader_read(self) + +# Register StreamReader in _py3dna: +_py3dna.StreamReader_swigregister(StreamReader) +StreamReader.SignatureMismatchError = _py3dna.cvar.StreamReader_SignatureMismatchError +StreamReader.VersionMismatchError = _py3dna.cvar.StreamReader_VersionMismatchError +StreamReader.InvalidDataError = _py3dna.cvar.StreamReader_InvalidDataError + +class BinaryStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.BinaryStreamReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamReader + +# Register BinaryStreamReader in _py3dna: +_py3dna.BinaryStreamReader_swigregister(BinaryStreamReader) + +def BinaryStreamReader_create(*args): + return _py3dna.BinaryStreamReader_create(*args) + +def BinaryStreamReader_destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + +class JSONStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamReader + +# Register JSONStreamReader in _py3dna: +_py3dna.JSONStreamReader_swigregister(JSONStreamReader) + +def JSONStreamReader_create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + +def JSONStreamReader_destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + + +BinaryStreamReader.__new__ = __new_decorator(BinaryStreamReader_create, BinaryStreamReader.__new__) +BinaryStreamReader.__del__ = lambda instance: BinaryStreamReader_destroy(instance) +BinaryStreamReader.__init__ = __managed_init +del BinaryStreamReader.create +del BinaryStreamReader.destroy + + +JSONStreamReader.__new__ = __new_decorator(JSONStreamReader_create, JSONStreamReader.__new__) +JSONStreamReader.__del__ = lambda instance: JSONStreamReader_destroy(instance) +JSONStreamReader.__init__ = __managed_init +del JSONStreamReader.create +del JSONStreamReader.destroy + +class DescriptorWriter(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setName(self, name): + return _py3dna.DescriptorWriter_setName(self, name) + + def setArchetype(self, archetype): + return _py3dna.DescriptorWriter_setArchetype(self, archetype) + + def setGender(self, gender): + return _py3dna.DescriptorWriter_setGender(self, gender) + + def setAge(self, age): + return _py3dna.DescriptorWriter_setAge(self, age) + + def clearMetaData(self): + return _py3dna.DescriptorWriter_clearMetaData(self) + + def setMetaData(self, key, value): + return _py3dna.DescriptorWriter_setMetaData(self, key, value) + + def setTranslationUnit(self, unit): + return _py3dna.DescriptorWriter_setTranslationUnit(self, unit) + + def setRotationUnit(self, unit): + return _py3dna.DescriptorWriter_setRotationUnit(self, unit) + + def setCoordinateSystem(self, system): + return _py3dna.DescriptorWriter_setCoordinateSystem(self, system) + + def setLODCount(self, lodCount): + return _py3dna.DescriptorWriter_setLODCount(self, lodCount) + + def setDBMaxLOD(self, lod): + return _py3dna.DescriptorWriter_setDBMaxLOD(self, lod) + + def setDBComplexity(self, name): + return _py3dna.DescriptorWriter_setDBComplexity(self, name) + + def setDBName(self, name): + return _py3dna.DescriptorWriter_setDBName(self, name) + +# Register DescriptorWriter in _py3dna: +_py3dna.DescriptorWriter_swigregister(DescriptorWriter) + +class DefinitionWriter(DescriptorWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearGUIControlNames(self): + return _py3dna.DefinitionWriter_clearGUIControlNames(self) + + def setGUIControlName(self, index, name): + return _py3dna.DefinitionWriter_setGUIControlName(self, index, name) + + def clearRawControlNames(self): + return _py3dna.DefinitionWriter_clearRawControlNames(self) + + def setRawControlName(self, index, name): + return _py3dna.DefinitionWriter_setRawControlName(self, index, name) + + def clearJointNames(self): + return _py3dna.DefinitionWriter_clearJointNames(self) + + def setJointName(self, index, name): + return _py3dna.DefinitionWriter_setJointName(self, index, name) + + def clearJointIndices(self): + return _py3dna.DefinitionWriter_clearJointIndices(self) + + def setJointIndices(self, index, jointIndices): + return _py3dna.DefinitionWriter_setJointIndices(self, index, jointIndices) + + def clearLODJointMappings(self): + return _py3dna.DefinitionWriter_clearLODJointMappings(self) + + def setLODJointMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODJointMapping(self, lod, index) + + def clearBlendShapeChannelNames(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelNames(self) + + def setBlendShapeChannelName(self, index, name): + return _py3dna.DefinitionWriter_setBlendShapeChannelName(self, index, name) + + def clearBlendShapeChannelIndices(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelIndices(self) + + def setBlendShapeChannelIndices(self, index, blendShapeChannelIndices): + return _py3dna.DefinitionWriter_setBlendShapeChannelIndices(self, index, blendShapeChannelIndices) + + def clearLODBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearLODBlendShapeChannelMappings(self) + + def setLODBlendShapeChannelMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODBlendShapeChannelMapping(self, lod, index) + + def clearAnimatedMapNames(self): + return _py3dna.DefinitionWriter_clearAnimatedMapNames(self) + + def setAnimatedMapName(self, index, name): + return _py3dna.DefinitionWriter_setAnimatedMapName(self, index, name) + + def clearAnimatedMapIndices(self): + return _py3dna.DefinitionWriter_clearAnimatedMapIndices(self) + + def setAnimatedMapIndices(self, index, animatedMapIndices): + return _py3dna.DefinitionWriter_setAnimatedMapIndices(self, index, animatedMapIndices) + + def clearLODAnimatedMapMappings(self): + return _py3dna.DefinitionWriter_clearLODAnimatedMapMappings(self) + + def setLODAnimatedMapMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODAnimatedMapMapping(self, lod, index) + + def clearMeshNames(self): + return _py3dna.DefinitionWriter_clearMeshNames(self) + + def setMeshName(self, index, name): + return _py3dna.DefinitionWriter_setMeshName(self, index, name) + + def clearMeshIndices(self): + return _py3dna.DefinitionWriter_clearMeshIndices(self) + + def setMeshIndices(self, index, meshIndices): + return _py3dna.DefinitionWriter_setMeshIndices(self, index, meshIndices) + + def clearLODMeshMappings(self): + return _py3dna.DefinitionWriter_clearLODMeshMappings(self) + + def setLODMeshMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODMeshMapping(self, lod, index) + + def clearMeshBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearMeshBlendShapeChannelMappings(self) + + def setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex): + return _py3dna.DefinitionWriter_setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex) + + def setJointHierarchy(self, jointIndices): + return _py3dna.DefinitionWriter_setJointHierarchy(self, jointIndices) + + def setNeutralJointTranslations(self, translations): + return _py3dna.DefinitionWriter_setNeutralJointTranslations(self, translations) + + def setNeutralJointRotations(self, rotations): + return _py3dna.DefinitionWriter_setNeutralJointRotations(self, rotations) + +# Register DefinitionWriter in _py3dna: +_py3dna.DefinitionWriter_swigregister(DefinitionWriter) + +class BehaviorWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setGUIToRawInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setGUIToRawInputIndices(self, inputIndices) + + def setGUIToRawOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setGUIToRawOutputIndices(self, outputIndices) + + def setGUIToRawFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setGUIToRawFromValues(self, fromValues) + + def setGUIToRawToValues(self, toValues): + return _py3dna.BehaviorWriter_setGUIToRawToValues(self, toValues) + + def setGUIToRawSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setGUIToRawSlopeValues(self, slopeValues) + + def setGUIToRawCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setGUIToRawCutValues(self, cutValues) + + def setPSDCount(self, count): + return _py3dna.BehaviorWriter_setPSDCount(self, count) + + def setPSDRowIndices(self, rowIndices): + return _py3dna.BehaviorWriter_setPSDRowIndices(self, rowIndices) + + def setPSDColumnIndices(self, columnIndices): + return _py3dna.BehaviorWriter_setPSDColumnIndices(self, columnIndices) + + def setPSDValues(self, weights): + return _py3dna.BehaviorWriter_setPSDValues(self, weights) + + def setJointRowCount(self, rowCount): + return _py3dna.BehaviorWriter_setJointRowCount(self, rowCount) + + def setJointColumnCount(self, columnCount): + return _py3dna.BehaviorWriter_setJointColumnCount(self, columnCount) + + def clearJointGroups(self): + return _py3dna.BehaviorWriter_clearJointGroups(self) + + def deleteJointGroup(self, jointGroupIndex): + return _py3dna.BehaviorWriter_deleteJointGroup(self, jointGroupIndex) + + def setJointGroupLODs(self, jointGroupIndex, lods): + return _py3dna.BehaviorWriter_setJointGroupLODs(self, jointGroupIndex, lods) + + def setJointGroupInputIndices(self, jointGroupIndex, inputIndices): + return _py3dna.BehaviorWriter_setJointGroupInputIndices(self, jointGroupIndex, inputIndices) + + def setJointGroupOutputIndices(self, jointGroupIndex, outputIndices): + return _py3dna.BehaviorWriter_setJointGroupOutputIndices(self, jointGroupIndex, outputIndices) + + def setJointGroupValues(self, jointGroupIndex, values): + return _py3dna.BehaviorWriter_setJointGroupValues(self, jointGroupIndex, values) + + def setJointGroupJointIndices(self, jointGroupIndex, jointIndices): + return _py3dna.BehaviorWriter_setJointGroupJointIndices(self, jointGroupIndex, jointIndices) + + def setBlendShapeChannelLODs(self, lods): + return _py3dna.BehaviorWriter_setBlendShapeChannelLODs(self, lods) + + def setBlendShapeChannelInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelInputIndices(self, inputIndices) + + def setBlendShapeChannelOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelOutputIndices(self, outputIndices) + + def setAnimatedMapLODs(self, lods): + return _py3dna.BehaviorWriter_setAnimatedMapLODs(self, lods) + + def setAnimatedMapInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapInputIndices(self, inputIndices) + + def setAnimatedMapOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapOutputIndices(self, outputIndices) + + def setAnimatedMapFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setAnimatedMapFromValues(self, fromValues) + + def setAnimatedMapToValues(self, toValues): + return _py3dna.BehaviorWriter_setAnimatedMapToValues(self, toValues) + + def setAnimatedMapSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setAnimatedMapSlopeValues(self, slopeValues) + + def setAnimatedMapCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setAnimatedMapCutValues(self, cutValues) + +# Register BehaviorWriter in _py3dna: +_py3dna.BehaviorWriter_swigregister(BehaviorWriter) + +class GeometryWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearMeshes(self): + return _py3dna.GeometryWriter_clearMeshes(self) + + def deleteMesh(self, meshIndex): + return _py3dna.GeometryWriter_deleteMesh(self, meshIndex) + + def setVertexPositions(self, meshIndex, positions): + return _py3dna.GeometryWriter_setVertexPositions(self, meshIndex, positions) + + def setVertexTextureCoordinates(self, meshIndex, textureCoordinates): + return _py3dna.GeometryWriter_setVertexTextureCoordinates(self, meshIndex, textureCoordinates) + + def setVertexNormals(self, meshIndex, normals): + return _py3dna.GeometryWriter_setVertexNormals(self, meshIndex, normals) + + def setVertexLayouts(self, meshIndex, layouts): + return _py3dna.GeometryWriter_setVertexLayouts(self, meshIndex, layouts) + + def clearFaceVertexLayoutIndices(self, meshIndex): + return _py3dna.GeometryWriter_clearFaceVertexLayoutIndices(self, meshIndex) + + def setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices): + return _py3dna.GeometryWriter_setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices) + + def setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount): + return _py3dna.GeometryWriter_setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount) + + def clearSkinWeights(self, meshIndex): + return _py3dna.GeometryWriter_clearSkinWeights(self, meshIndex) + + def setSkinWeightsValues(self, meshIndex, vertexIndex, weights): + return _py3dna.GeometryWriter_setSkinWeightsValues(self, meshIndex, vertexIndex, weights) + + def setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices): + return _py3dna.GeometryWriter_setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices) + + def clearBlendShapeTargets(self, meshIndex): + return _py3dna.GeometryWriter_clearBlendShapeTargets(self, meshIndex) + + def setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex): + return _py3dna.GeometryWriter_setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex) + + def setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas): + return _py3dna.GeometryWriter_setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas) + + def setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices): + return _py3dna.GeometryWriter_setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices) + +# Register GeometryWriter in _py3dna: +_py3dna.GeometryWriter_swigregister(GeometryWriter) + +class Writer(BehaviorWriter, GeometryWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Writer + + def setFrom(self, *args): + return _py3dna.Writer_setFrom(self, *args) + +# Register Writer in _py3dna: +_py3dna.Writer_swigregister(Writer) + +class StreamWriter(Writer): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamWriter + + def write(self): + return _py3dna.StreamWriter_write(self) + +# Register StreamWriter in _py3dna: +_py3dna.StreamWriter_swigregister(StreamWriter) + +class BinaryStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamWriter + +# Register BinaryStreamWriter in _py3dna: +_py3dna.BinaryStreamWriter_swigregister(BinaryStreamWriter) + +def BinaryStreamWriter_create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + +def BinaryStreamWriter_destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + +class JSONStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamWriter + +# Register JSONStreamWriter in _py3dna: +_py3dna.JSONStreamWriter_swigregister(JSONStreamWriter) + +def JSONStreamWriter_create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + +def JSONStreamWriter_destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + + +BinaryStreamWriter.__new__ = __new_decorator(BinaryStreamWriter_create, BinaryStreamWriter.__new__) +BinaryStreamWriter.__del__ = lambda instance: BinaryStreamWriter_destroy(instance) +BinaryStreamWriter.__init__ = __managed_init +del BinaryStreamWriter.create +del BinaryStreamWriter.destroy + + +JSONStreamWriter.__new__ = __new_decorator(JSONStreamWriter_create, JSONStreamWriter.__new__) +JSONStreamWriter.__del__ = lambda instance: JSONStreamWriter_destroy(instance) +JSONStreamWriter.__init__ = __managed_init +del JSONStreamWriter.create +del JSONStreamWriter.destroy + + + diff --git a/plugins/Linux/pydna/python3/libdna.so.7.1.0 b/plugins/Linux/pydna/python3/libdna.so.7.1.0 new file mode 100644 index 0000000..e4f6217 Binary files /dev/null and b/plugins/Linux/pydna/python3/libdna.so.7.1.0 differ diff --git a/plugins/Linux/pydna/python3108/_py3dna.so b/plugins/Linux/pydna/python3108/_py3dna.so new file mode 100644 index 0000000..275f930 Binary files /dev/null and b/plugins/Linux/pydna/python3108/_py3dna.so differ diff --git a/plugins/Linux/pydna/python3108/dna.py b/plugins/Linux/pydna/python3108/dna.py new file mode 100644 index 0000000..2f56dfa --- /dev/null +++ b/plugins/Linux/pydna/python3108/dna.py @@ -0,0 +1,1403 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dna +else: + import _py3dna + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +class MemoryResource(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_MemoryResource + + def allocate(self, size, alignment): + return _py3dna.MemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.MemoryResource_deallocate(self, ptr, size, alignment) + +# Register MemoryResource in _py3dna: +_py3dna.MemoryResource_swigregister(MemoryResource) + +class AlignedMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.AlignedMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.AlignedMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.AlignedMemoryResource_swiginit(self, _py3dna.new_AlignedMemoryResource()) + __swig_destroy__ = _py3dna.delete_AlignedMemoryResource + +# Register AlignedMemoryResource in _py3dna: +_py3dna.AlignedMemoryResource_swigregister(AlignedMemoryResource) + +class ArenaMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_ArenaMemoryResource + + def __init__(self, *args): + _py3dna.ArenaMemoryResource_swiginit(self, _py3dna.new_ArenaMemoryResource(*args)) + + def allocate(self, size, alignment): + return _py3dna.ArenaMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.ArenaMemoryResource_deallocate(self, ptr, size, alignment) + + def getUpstreamMemoryResource(self): + return _py3dna.ArenaMemoryResource_getUpstreamMemoryResource(self) + +# Register ArenaMemoryResource in _py3dna: +_py3dna.ArenaMemoryResource_swigregister(ArenaMemoryResource) + +class DefaultMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.DefaultMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.DefaultMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.DefaultMemoryResource_swiginit(self, _py3dna.new_DefaultMemoryResource()) + __swig_destroy__ = _py3dna.delete_DefaultMemoryResource + +# Register DefaultMemoryResource in _py3dna: +_py3dna.DefaultMemoryResource_swigregister(DefaultMemoryResource) + +class StatusCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + code = property(_py3dna.StatusCode_code_get, _py3dna.StatusCode_code_set) + message = property(_py3dna.StatusCode_message_get, _py3dna.StatusCode_message_set) + + def __init__(self): + _py3dna.StatusCode_swiginit(self, _py3dna.new_StatusCode()) + __swig_destroy__ = _py3dna.delete_StatusCode + +# Register StatusCode in _py3dna: +_py3dna.StatusCode_swigregister(StatusCode) + +class Status(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def isOk(): + return _py3dna.Status_isOk() + + @staticmethod + def get(): + return _py3dna.Status_get() + + @staticmethod + def getHook(): + return _py3dna.Status_getHook() + + @staticmethod + def setHook(hook): + return _py3dna.Status_setHook(hook) + + def __init__(self): + _py3dna.Status_swiginit(self, _py3dna.new_Status()) + __swig_destroy__ = _py3dna.delete_Status + +# Register Status in _py3dna: +_py3dna.Status_swigregister(Status) + +def Status_isOk(): + return _py3dna.Status_isOk() + +def Status_get(): + return _py3dna.Status_get() + +def Status_getHook(): + return _py3dna.Status_getHook() + +def Status_setHook(hook): + return _py3dna.Status_setHook(hook) + +class Readable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def read(self, *args): + return _py3dna.Readable_read(self, *args) + +# Register Readable in _py3dna: +_py3dna.Readable_swigregister(Readable) + +class Writable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def write(self, *args): + return _py3dna.Writable_write(self, *args) + +# Register Writable in _py3dna: +_py3dna.Writable_swigregister(Writable) + +class Seekable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def tell(self): + return _py3dna.Seekable_tell(self) + + def seek(self, position): + return _py3dna.Seekable_seek(self, position) + +# Register Seekable in _py3dna: +_py3dna.Seekable_swigregister(Seekable) + +class Openable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def open(self): + return _py3dna.Openable_open(self) + +# Register Openable in _py3dna: +_py3dna.Openable_swigregister(Openable) + +class Closeable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def close(self): + return _py3dna.Closeable_close(self) + +# Register Closeable in _py3dna: +_py3dna.Closeable_swigregister(Closeable) + +class Controllable(Openable, Closeable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + +# Register Controllable in _py3dna: +_py3dna.Controllable_swigregister(Controllable) + +class Bounded(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def size(self): + return _py3dna.Bounded_size(self) + +# Register Bounded in _py3dna: +_py3dna.Bounded_swigregister(Bounded) + +class Buffered(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def flush(self): + return _py3dna.Buffered_flush(self) + +# Register Buffered in _py3dna: +_py3dna.Buffered_swigregister(Buffered) + +class Resizable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def resize(self, size): + return _py3dna.Resizable_resize(self, size) + +# Register Resizable in _py3dna: +_py3dna.Resizable_swigregister(Resizable) + +class BoundedIOStream(Controllable, Readable, Writable, Seekable, Bounded): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_BoundedIOStream + +# Register BoundedIOStream in _py3dna: +_py3dna.BoundedIOStream_swigregister(BoundedIOStream) +cvar = _py3dna.cvar +BoundedIOStream.OpenError = _py3dna.cvar.BoundedIOStream_OpenError +BoundedIOStream.ReadError = _py3dna.cvar.BoundedIOStream_ReadError +BoundedIOStream.WriteError = _py3dna.cvar.BoundedIOStream_WriteError +BoundedIOStream.AlreadyOpenError = _py3dna.cvar.BoundedIOStream_AlreadyOpenError +BoundedIOStream.SeekError = _py3dna.cvar.BoundedIOStream_SeekError + +AccessMode_Read = _py3dna.AccessMode_Read +AccessMode_Write = _py3dna.AccessMode_Write +AccessMode_ReadWrite = _py3dna.AccessMode_ReadWrite +OpenMode_Binary = _py3dna.OpenMode_Binary +OpenMode_Text = _py3dna.OpenMode_Text +class FileStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.FileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_FileStream + +# Register FileStream in _py3dna: +_py3dna.FileStream_swigregister(FileStream) + +def FileStream_create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + +def FileStream_destroy(instance): + return _py3dna.FileStream_destroy(instance) + +class MemoryMappedFileStream(BoundedIOStream, Buffered, Resizable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryMappedFileStream + +# Register MemoryMappedFileStream in _py3dna: +_py3dna.MemoryMappedFileStream_swigregister(MemoryMappedFileStream) + +def MemoryMappedFileStream_create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + +def MemoryMappedFileStream_destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + +class MemoryStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.MemoryStream_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryStream + +# Register MemoryStream in _py3dna: +_py3dna.MemoryStream_swigregister(MemoryStream) + +def MemoryStream_create(*args): + return _py3dna.MemoryStream_create(*args) + +def MemoryStream_destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + + +FileStream.__new__ = __new_decorator(FileStream_create, FileStream.__new__) +FileStream.__del__ = lambda instance: FileStream_destroy(instance) +FileStream.__init__ = __managed_init +del FileStream.create +del FileStream.destroy + + +MemoryMappedFileStream.__new__ = __new_decorator(MemoryMappedFileStream_create, MemoryMappedFileStream.__new__) +MemoryMappedFileStream.__del__ = lambda instance: MemoryMappedFileStream_destroy(instance) +MemoryMappedFileStream.__init__ = __managed_init +del MemoryMappedFileStream.create +del MemoryMappedFileStream.destroy + + +MemoryStream.__new__ = __new_decorator(MemoryStream_create, MemoryStream.__new__) +MemoryStream.__del__ = lambda instance: MemoryStream_destroy(instance) +MemoryStream.__init__ = __managed_init +del MemoryStream.create +del MemoryStream.destroy + + +FileStream.AccessMode_Read = AccessMode_Read +FileStream.AccessMode_Write = AccessMode_Write +FileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +FileStream.OpenMode_Binary = OpenMode_Binary +FileStream.OpenMode_Text = OpenMode_Text + +MemoryMappedFileStream.AccessMode_Read = AccessMode_Read +MemoryMappedFileStream.AccessMode_Write = AccessMode_Write +MemoryMappedFileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +class StringView(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def c_str(self): + return _py3dna.StringView_c_str(self) + + def __ref__(self): + return _py3dna.StringView___ref__(self) + + def __init__(self): + _py3dna.StringView_swiginit(self, _py3dna.new_StringView()) + __swig_destroy__ = _py3dna.delete_StringView + +# Register StringView in _py3dna: +_py3dna.StringView_swigregister(StringView) + + +def __add__(*args): + return _py3dna.__add__(*args) + +def __sub__(*args): + return _py3dna.__sub__(*args) + +def __mul__(*args): + return _py3dna.__mul__(*args) + +def __truediv__(*args): + return _py3dna.__truediv__(*args) + +def __eq__(*args): + return _py3dna.__eq__(*args) + +def __ne__(*args): + return _py3dna.__ne__(*args) +DataLayer_Descriptor = _py3dna.DataLayer_Descriptor +DataLayer_Definition = _py3dna.DataLayer_Definition +DataLayer_Behavior = _py3dna.DataLayer_Behavior +DataLayer_Geometry = _py3dna.DataLayer_Geometry +DataLayer_GeometryWithoutBlendShapes = _py3dna.DataLayer_GeometryWithoutBlendShapes +DataLayer_AllWithoutBlendShapes = _py3dna.DataLayer_AllWithoutBlendShapes +DataLayer_All = _py3dna.DataLayer_All +Archetype_asian = _py3dna.Archetype_asian +Archetype_black = _py3dna.Archetype_black +Archetype_caucasian = _py3dna.Archetype_caucasian +Archetype_hispanic = _py3dna.Archetype_hispanic +Archetype_alien = _py3dna.Archetype_alien +Archetype_other = _py3dna.Archetype_other +Gender_male = _py3dna.Gender_male +Gender_female = _py3dna.Gender_female +Gender_other = _py3dna.Gender_other +TranslationUnit_cm = _py3dna.TranslationUnit_cm +TranslationUnit_m = _py3dna.TranslationUnit_m +RotationUnit_degrees = _py3dna.RotationUnit_degrees +RotationUnit_radians = _py3dna.RotationUnit_radians +Direction_left = _py3dna.Direction_left +Direction_right = _py3dna.Direction_right +Direction_up = _py3dna.Direction_up +Direction_down = _py3dna.Direction_down +Direction_front = _py3dna.Direction_front +Direction_back = _py3dna.Direction_back +class CoordinateSystem(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + xAxis = property(_py3dna.CoordinateSystem_xAxis_get, _py3dna.CoordinateSystem_xAxis_set) + yAxis = property(_py3dna.CoordinateSystem_yAxis_get, _py3dna.CoordinateSystem_yAxis_set) + zAxis = property(_py3dna.CoordinateSystem_zAxis_get, _py3dna.CoordinateSystem_zAxis_set) + + def __init__(self): + _py3dna.CoordinateSystem_swiginit(self, _py3dna.new_CoordinateSystem()) + __swig_destroy__ = _py3dna.delete_CoordinateSystem + +# Register CoordinateSystem in _py3dna: +_py3dna.CoordinateSystem_swigregister(CoordinateSystem) + +class DescriptorReader(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getName(self): + return _py3dna.DescriptorReader_getName(self) + + def getArchetype(self): + return _py3dna.DescriptorReader_getArchetype(self) + + def getGender(self): + return _py3dna.DescriptorReader_getGender(self) + + def getAge(self): + return _py3dna.DescriptorReader_getAge(self) + + def getMetaDataCount(self): + return _py3dna.DescriptorReader_getMetaDataCount(self) + + def getMetaDataKey(self, index): + return _py3dna.DescriptorReader_getMetaDataKey(self, index) + + def getMetaDataValue(self, key): + return _py3dna.DescriptorReader_getMetaDataValue(self, key) + + def getTranslationUnit(self): + return _py3dna.DescriptorReader_getTranslationUnit(self) + + def getRotationUnit(self): + return _py3dna.DescriptorReader_getRotationUnit(self) + + def getCoordinateSystem(self): + return _py3dna.DescriptorReader_getCoordinateSystem(self) + + def getLODCount(self): + return _py3dna.DescriptorReader_getLODCount(self) + + def getDBMaxLOD(self): + return _py3dna.DescriptorReader_getDBMaxLOD(self) + + def getDBComplexity(self): + return _py3dna.DescriptorReader_getDBComplexity(self) + + def getDBName(self): + return _py3dna.DescriptorReader_getDBName(self) + +# Register DescriptorReader in _py3dna: +_py3dna.DescriptorReader_swigregister(DescriptorReader) + +class MeshBlendShapeChannelMapping(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + meshIndex = property(_py3dna.MeshBlendShapeChannelMapping_meshIndex_get, _py3dna.MeshBlendShapeChannelMapping_meshIndex_set) + blendShapeChannelIndex = property(_py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_get, _py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_set) + + def __init__(self): + _py3dna.MeshBlendShapeChannelMapping_swiginit(self, _py3dna.new_MeshBlendShapeChannelMapping()) + __swig_destroy__ = _py3dna.delete_MeshBlendShapeChannelMapping + +# Register MeshBlendShapeChannelMapping in _py3dna: +_py3dna.MeshBlendShapeChannelMapping_swigregister(MeshBlendShapeChannelMapping) + +class DefinitionReader(DescriptorReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIControlCount(self): + return _py3dna.DefinitionReader_getGUIControlCount(self) + + def getGUIControlName(self, index): + return _py3dna.DefinitionReader_getGUIControlName(self, index) + + def getRawControlCount(self): + return _py3dna.DefinitionReader_getRawControlCount(self) + + def getRawControlName(self, index): + return _py3dna.DefinitionReader_getRawControlName(self, index) + + def getJointCount(self): + return _py3dna.DefinitionReader_getJointCount(self) + + def getJointName(self, index): + return _py3dna.DefinitionReader_getJointName(self, index) + + def getJointIndexListCount(self): + return _py3dna.DefinitionReader_getJointIndexListCount(self) + + def getJointIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getJointIndicesForLOD(self, lod) + + def getJointParentIndex(self, index): + return _py3dna.DefinitionReader_getJointParentIndex(self, index) + + def getBlendShapeChannelCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelCount(self) + + def getBlendShapeChannelName(self, index): + return _py3dna.DefinitionReader_getBlendShapeChannelName(self, index) + + def getBlendShapeChannelIndexListCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelIndexListCount(self) + + def getBlendShapeChannelIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getBlendShapeChannelIndicesForLOD(self, lod) + + def getAnimatedMapCount(self): + return _py3dna.DefinitionReader_getAnimatedMapCount(self) + + def getAnimatedMapName(self, index): + return _py3dna.DefinitionReader_getAnimatedMapName(self, index) + + def getAnimatedMapIndexListCount(self): + return _py3dna.DefinitionReader_getAnimatedMapIndexListCount(self) + + def getAnimatedMapIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getAnimatedMapIndicesForLOD(self, lod) + + def getMeshCount(self): + return _py3dna.DefinitionReader_getMeshCount(self) + + def getMeshName(self, index): + return _py3dna.DefinitionReader_getMeshName(self, index) + + def getMeshIndexListCount(self): + return _py3dna.DefinitionReader_getMeshIndexListCount(self) + + def getMeshIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshIndicesForLOD(self, lod) + + def getMeshBlendShapeChannelMappingCount(self): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingCount(self) + + def getMeshBlendShapeChannelMapping(self, index): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMapping(self, index) + + def getMeshBlendShapeChannelMappingIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingIndicesForLOD(self, lod) + + def getNeutralJointTranslation(self, index): + return _py3dna.DefinitionReader_getNeutralJointTranslation(self, index) + + def getNeutralJointTranslationXs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationXs(self) + + def getNeutralJointTranslationYs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationYs(self) + + def getNeutralJointTranslationZs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationZs(self) + + def getNeutralJointRotation(self, index): + return _py3dna.DefinitionReader_getNeutralJointRotation(self, index) + + def getNeutralJointRotationXs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationXs(self) + + def getNeutralJointRotationYs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationYs(self) + + def getNeutralJointRotationZs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationZs(self) + +# Register DefinitionReader in _py3dna: +_py3dna.DefinitionReader_swigregister(DefinitionReader) + +class BehaviorReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIToRawInputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawInputIndices(self) + + def getGUIToRawOutputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawOutputIndices(self) + + def getGUIToRawFromValues(self): + return _py3dna.BehaviorReader_getGUIToRawFromValues(self) + + def getGUIToRawToValues(self): + return _py3dna.BehaviorReader_getGUIToRawToValues(self) + + def getGUIToRawSlopeValues(self): + return _py3dna.BehaviorReader_getGUIToRawSlopeValues(self) + + def getGUIToRawCutValues(self): + return _py3dna.BehaviorReader_getGUIToRawCutValues(self) + + def getPSDCount(self): + return _py3dna.BehaviorReader_getPSDCount(self) + + def getPSDRowIndices(self): + return _py3dna.BehaviorReader_getPSDRowIndices(self) + + def getPSDColumnIndices(self): + return _py3dna.BehaviorReader_getPSDColumnIndices(self) + + def getPSDValues(self): + return _py3dna.BehaviorReader_getPSDValues(self) + + def getJointRowCount(self): + return _py3dna.BehaviorReader_getJointRowCount(self) + + def getJointColumnCount(self): + return _py3dna.BehaviorReader_getJointColumnCount(self) + + def getJointVariableAttributeIndices(self, lod): + return _py3dna.BehaviorReader_getJointVariableAttributeIndices(self, lod) + + def getJointGroupCount(self): + return _py3dna.BehaviorReader_getJointGroupCount(self) + + def getJointGroupLODs(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupLODs(self, jointGroupIndex) + + def getJointGroupInputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupInputIndices(self, jointGroupIndex) + + def getJointGroupOutputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupOutputIndices(self, jointGroupIndex) + + def getJointGroupValues(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupValues(self, jointGroupIndex) + + def getJointGroupJointIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupJointIndices(self, jointGroupIndex) + + def getBlendShapeChannelLODs(self): + return _py3dna.BehaviorReader_getBlendShapeChannelLODs(self) + + def getBlendShapeChannelInputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelInputIndices(self) + + def getBlendShapeChannelOutputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelOutputIndices(self) + + def getAnimatedMapLODs(self): + return _py3dna.BehaviorReader_getAnimatedMapLODs(self) + + def getAnimatedMapInputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapInputIndices(self) + + def getAnimatedMapOutputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapOutputIndices(self) + + def getAnimatedMapFromValues(self): + return _py3dna.BehaviorReader_getAnimatedMapFromValues(self) + + def getAnimatedMapToValues(self): + return _py3dna.BehaviorReader_getAnimatedMapToValues(self) + + def getAnimatedMapSlopeValues(self): + return _py3dna.BehaviorReader_getAnimatedMapSlopeValues(self) + + def getAnimatedMapCutValues(self): + return _py3dna.BehaviorReader_getAnimatedMapCutValues(self) + +# Register BehaviorReader in _py3dna: +_py3dna.BehaviorReader_swigregister(BehaviorReader) + +class GeometryReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getVertexPositionCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionCount(self, meshIndex) + + def getVertexPosition(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getVertexPosition(self, meshIndex, vertexIndex) + + def getVertexPositionXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionXs(self, meshIndex) + + def getVertexPositionYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionYs(self, meshIndex) + + def getVertexPositionZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionZs(self, meshIndex) + + def getVertexTextureCoordinateCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateCount(self, meshIndex) + + def getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex) + + def getVertexTextureCoordinateUs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateUs(self, meshIndex) + + def getVertexTextureCoordinateVs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateVs(self, meshIndex) + + def getVertexNormalCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalCount(self, meshIndex) + + def getVertexNormal(self, meshIndex, normalIndex): + return _py3dna.GeometryReader_getVertexNormal(self, meshIndex, normalIndex) + + def getVertexNormalXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalXs(self, meshIndex) + + def getVertexNormalYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalYs(self, meshIndex) + + def getVertexNormalZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalZs(self, meshIndex) + + def getVertexLayoutCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutCount(self, meshIndex) + + def getVertexLayout(self, meshIndex, layoutIndex): + return _py3dna.GeometryReader_getVertexLayout(self, meshIndex, layoutIndex) + + def getVertexLayoutPositionIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutPositionIndices(self, meshIndex) + + def getVertexLayoutTextureCoordinateIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutTextureCoordinateIndices(self, meshIndex) + + def getVertexLayoutNormalIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutNormalIndices(self, meshIndex) + + def getFaceCount(self, meshIndex): + return _py3dna.GeometryReader_getFaceCount(self, meshIndex) + + def getFaceVertexLayoutIndices(self, meshIndex, faceIndex): + return _py3dna.GeometryReader_getFaceVertexLayoutIndices(self, meshIndex, faceIndex) + + def getMaximumInfluencePerVertex(self, meshIndex): + return _py3dna.GeometryReader_getMaximumInfluencePerVertex(self, meshIndex) + + def getSkinWeightsCount(self, meshIndex): + return _py3dna.GeometryReader_getSkinWeightsCount(self, meshIndex) + + def getSkinWeightsValues(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsValues(self, meshIndex, vertexIndex) + + def getSkinWeightsJointIndices(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsJointIndices(self, meshIndex, vertexIndex) + + def getBlendShapeTargetCount(self, meshIndex): + return _py3dna.GeometryReader_getBlendShapeTargetCount(self, meshIndex) + + def getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex) + + def getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex) + +# Register GeometryReader in _py3dna: +_py3dna.GeometryReader_swigregister(GeometryReader) + +class Reader(BehaviorReader, GeometryReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Reader + + def unload(self, layer): + return _py3dna.Reader_unload(self, layer) + +# Register Reader in _py3dna: +_py3dna.Reader_swigregister(Reader) + +class StreamReader(Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamReader + + def read(self): + return _py3dna.StreamReader_read(self) + +# Register StreamReader in _py3dna: +_py3dna.StreamReader_swigregister(StreamReader) +StreamReader.SignatureMismatchError = _py3dna.cvar.StreamReader_SignatureMismatchError +StreamReader.VersionMismatchError = _py3dna.cvar.StreamReader_VersionMismatchError +StreamReader.InvalidDataError = _py3dna.cvar.StreamReader_InvalidDataError + +class BinaryStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.BinaryStreamReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamReader + +# Register BinaryStreamReader in _py3dna: +_py3dna.BinaryStreamReader_swigregister(BinaryStreamReader) + +def BinaryStreamReader_create(*args): + return _py3dna.BinaryStreamReader_create(*args) + +def BinaryStreamReader_destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + +class JSONStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamReader + +# Register JSONStreamReader in _py3dna: +_py3dna.JSONStreamReader_swigregister(JSONStreamReader) + +def JSONStreamReader_create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + +def JSONStreamReader_destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + + +BinaryStreamReader.__new__ = __new_decorator(BinaryStreamReader_create, BinaryStreamReader.__new__) +BinaryStreamReader.__del__ = lambda instance: BinaryStreamReader_destroy(instance) +BinaryStreamReader.__init__ = __managed_init +del BinaryStreamReader.create +del BinaryStreamReader.destroy + + +JSONStreamReader.__new__ = __new_decorator(JSONStreamReader_create, JSONStreamReader.__new__) +JSONStreamReader.__del__ = lambda instance: JSONStreamReader_destroy(instance) +JSONStreamReader.__init__ = __managed_init +del JSONStreamReader.create +del JSONStreamReader.destroy + +class DescriptorWriter(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setName(self, name): + return _py3dna.DescriptorWriter_setName(self, name) + + def setArchetype(self, archetype): + return _py3dna.DescriptorWriter_setArchetype(self, archetype) + + def setGender(self, gender): + return _py3dna.DescriptorWriter_setGender(self, gender) + + def setAge(self, age): + return _py3dna.DescriptorWriter_setAge(self, age) + + def clearMetaData(self): + return _py3dna.DescriptorWriter_clearMetaData(self) + + def setMetaData(self, key, value): + return _py3dna.DescriptorWriter_setMetaData(self, key, value) + + def setTranslationUnit(self, unit): + return _py3dna.DescriptorWriter_setTranslationUnit(self, unit) + + def setRotationUnit(self, unit): + return _py3dna.DescriptorWriter_setRotationUnit(self, unit) + + def setCoordinateSystem(self, system): + return _py3dna.DescriptorWriter_setCoordinateSystem(self, system) + + def setLODCount(self, lodCount): + return _py3dna.DescriptorWriter_setLODCount(self, lodCount) + + def setDBMaxLOD(self, lod): + return _py3dna.DescriptorWriter_setDBMaxLOD(self, lod) + + def setDBComplexity(self, name): + return _py3dna.DescriptorWriter_setDBComplexity(self, name) + + def setDBName(self, name): + return _py3dna.DescriptorWriter_setDBName(self, name) + +# Register DescriptorWriter in _py3dna: +_py3dna.DescriptorWriter_swigregister(DescriptorWriter) + +class DefinitionWriter(DescriptorWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearGUIControlNames(self): + return _py3dna.DefinitionWriter_clearGUIControlNames(self) + + def setGUIControlName(self, index, name): + return _py3dna.DefinitionWriter_setGUIControlName(self, index, name) + + def clearRawControlNames(self): + return _py3dna.DefinitionWriter_clearRawControlNames(self) + + def setRawControlName(self, index, name): + return _py3dna.DefinitionWriter_setRawControlName(self, index, name) + + def clearJointNames(self): + return _py3dna.DefinitionWriter_clearJointNames(self) + + def setJointName(self, index, name): + return _py3dna.DefinitionWriter_setJointName(self, index, name) + + def clearJointIndices(self): + return _py3dna.DefinitionWriter_clearJointIndices(self) + + def setJointIndices(self, index, jointIndices): + return _py3dna.DefinitionWriter_setJointIndices(self, index, jointIndices) + + def clearLODJointMappings(self): + return _py3dna.DefinitionWriter_clearLODJointMappings(self) + + def setLODJointMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODJointMapping(self, lod, index) + + def clearBlendShapeChannelNames(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelNames(self) + + def setBlendShapeChannelName(self, index, name): + return _py3dna.DefinitionWriter_setBlendShapeChannelName(self, index, name) + + def clearBlendShapeChannelIndices(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelIndices(self) + + def setBlendShapeChannelIndices(self, index, blendShapeChannelIndices): + return _py3dna.DefinitionWriter_setBlendShapeChannelIndices(self, index, blendShapeChannelIndices) + + def clearLODBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearLODBlendShapeChannelMappings(self) + + def setLODBlendShapeChannelMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODBlendShapeChannelMapping(self, lod, index) + + def clearAnimatedMapNames(self): + return _py3dna.DefinitionWriter_clearAnimatedMapNames(self) + + def setAnimatedMapName(self, index, name): + return _py3dna.DefinitionWriter_setAnimatedMapName(self, index, name) + + def clearAnimatedMapIndices(self): + return _py3dna.DefinitionWriter_clearAnimatedMapIndices(self) + + def setAnimatedMapIndices(self, index, animatedMapIndices): + return _py3dna.DefinitionWriter_setAnimatedMapIndices(self, index, animatedMapIndices) + + def clearLODAnimatedMapMappings(self): + return _py3dna.DefinitionWriter_clearLODAnimatedMapMappings(self) + + def setLODAnimatedMapMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODAnimatedMapMapping(self, lod, index) + + def clearMeshNames(self): + return _py3dna.DefinitionWriter_clearMeshNames(self) + + def setMeshName(self, index, name): + return _py3dna.DefinitionWriter_setMeshName(self, index, name) + + def clearMeshIndices(self): + return _py3dna.DefinitionWriter_clearMeshIndices(self) + + def setMeshIndices(self, index, meshIndices): + return _py3dna.DefinitionWriter_setMeshIndices(self, index, meshIndices) + + def clearLODMeshMappings(self): + return _py3dna.DefinitionWriter_clearLODMeshMappings(self) + + def setLODMeshMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODMeshMapping(self, lod, index) + + def clearMeshBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearMeshBlendShapeChannelMappings(self) + + def setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex): + return _py3dna.DefinitionWriter_setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex) + + def setJointHierarchy(self, jointIndices): + return _py3dna.DefinitionWriter_setJointHierarchy(self, jointIndices) + + def setNeutralJointTranslations(self, translations): + return _py3dna.DefinitionWriter_setNeutralJointTranslations(self, translations) + + def setNeutralJointRotations(self, rotations): + return _py3dna.DefinitionWriter_setNeutralJointRotations(self, rotations) + +# Register DefinitionWriter in _py3dna: +_py3dna.DefinitionWriter_swigregister(DefinitionWriter) + +class BehaviorWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setGUIToRawInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setGUIToRawInputIndices(self, inputIndices) + + def setGUIToRawOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setGUIToRawOutputIndices(self, outputIndices) + + def setGUIToRawFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setGUIToRawFromValues(self, fromValues) + + def setGUIToRawToValues(self, toValues): + return _py3dna.BehaviorWriter_setGUIToRawToValues(self, toValues) + + def setGUIToRawSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setGUIToRawSlopeValues(self, slopeValues) + + def setGUIToRawCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setGUIToRawCutValues(self, cutValues) + + def setPSDCount(self, count): + return _py3dna.BehaviorWriter_setPSDCount(self, count) + + def setPSDRowIndices(self, rowIndices): + return _py3dna.BehaviorWriter_setPSDRowIndices(self, rowIndices) + + def setPSDColumnIndices(self, columnIndices): + return _py3dna.BehaviorWriter_setPSDColumnIndices(self, columnIndices) + + def setPSDValues(self, weights): + return _py3dna.BehaviorWriter_setPSDValues(self, weights) + + def setJointRowCount(self, rowCount): + return _py3dna.BehaviorWriter_setJointRowCount(self, rowCount) + + def setJointColumnCount(self, columnCount): + return _py3dna.BehaviorWriter_setJointColumnCount(self, columnCount) + + def clearJointGroups(self): + return _py3dna.BehaviorWriter_clearJointGroups(self) + + def deleteJointGroup(self, jointGroupIndex): + return _py3dna.BehaviorWriter_deleteJointGroup(self, jointGroupIndex) + + def setJointGroupLODs(self, jointGroupIndex, lods): + return _py3dna.BehaviorWriter_setJointGroupLODs(self, jointGroupIndex, lods) + + def setJointGroupInputIndices(self, jointGroupIndex, inputIndices): + return _py3dna.BehaviorWriter_setJointGroupInputIndices(self, jointGroupIndex, inputIndices) + + def setJointGroupOutputIndices(self, jointGroupIndex, outputIndices): + return _py3dna.BehaviorWriter_setJointGroupOutputIndices(self, jointGroupIndex, outputIndices) + + def setJointGroupValues(self, jointGroupIndex, values): + return _py3dna.BehaviorWriter_setJointGroupValues(self, jointGroupIndex, values) + + def setJointGroupJointIndices(self, jointGroupIndex, jointIndices): + return _py3dna.BehaviorWriter_setJointGroupJointIndices(self, jointGroupIndex, jointIndices) + + def setBlendShapeChannelLODs(self, lods): + return _py3dna.BehaviorWriter_setBlendShapeChannelLODs(self, lods) + + def setBlendShapeChannelInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelInputIndices(self, inputIndices) + + def setBlendShapeChannelOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelOutputIndices(self, outputIndices) + + def setAnimatedMapLODs(self, lods): + return _py3dna.BehaviorWriter_setAnimatedMapLODs(self, lods) + + def setAnimatedMapInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapInputIndices(self, inputIndices) + + def setAnimatedMapOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapOutputIndices(self, outputIndices) + + def setAnimatedMapFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setAnimatedMapFromValues(self, fromValues) + + def setAnimatedMapToValues(self, toValues): + return _py3dna.BehaviorWriter_setAnimatedMapToValues(self, toValues) + + def setAnimatedMapSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setAnimatedMapSlopeValues(self, slopeValues) + + def setAnimatedMapCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setAnimatedMapCutValues(self, cutValues) + +# Register BehaviorWriter in _py3dna: +_py3dna.BehaviorWriter_swigregister(BehaviorWriter) + +class GeometryWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearMeshes(self): + return _py3dna.GeometryWriter_clearMeshes(self) + + def deleteMesh(self, meshIndex): + return _py3dna.GeometryWriter_deleteMesh(self, meshIndex) + + def setVertexPositions(self, meshIndex, positions): + return _py3dna.GeometryWriter_setVertexPositions(self, meshIndex, positions) + + def setVertexTextureCoordinates(self, meshIndex, textureCoordinates): + return _py3dna.GeometryWriter_setVertexTextureCoordinates(self, meshIndex, textureCoordinates) + + def setVertexNormals(self, meshIndex, normals): + return _py3dna.GeometryWriter_setVertexNormals(self, meshIndex, normals) + + def setVertexLayouts(self, meshIndex, layouts): + return _py3dna.GeometryWriter_setVertexLayouts(self, meshIndex, layouts) + + def clearFaceVertexLayoutIndices(self, meshIndex): + return _py3dna.GeometryWriter_clearFaceVertexLayoutIndices(self, meshIndex) + + def setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices): + return _py3dna.GeometryWriter_setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices) + + def setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount): + return _py3dna.GeometryWriter_setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount) + + def clearSkinWeights(self, meshIndex): + return _py3dna.GeometryWriter_clearSkinWeights(self, meshIndex) + + def setSkinWeightsValues(self, meshIndex, vertexIndex, weights): + return _py3dna.GeometryWriter_setSkinWeightsValues(self, meshIndex, vertexIndex, weights) + + def setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices): + return _py3dna.GeometryWriter_setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices) + + def clearBlendShapeTargets(self, meshIndex): + return _py3dna.GeometryWriter_clearBlendShapeTargets(self, meshIndex) + + def setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex): + return _py3dna.GeometryWriter_setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex) + + def setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas): + return _py3dna.GeometryWriter_setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas) + + def setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices): + return _py3dna.GeometryWriter_setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices) + +# Register GeometryWriter in _py3dna: +_py3dna.GeometryWriter_swigregister(GeometryWriter) + +class Writer(BehaviorWriter, GeometryWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Writer + + def setFrom(self, *args): + return _py3dna.Writer_setFrom(self, *args) + +# Register Writer in _py3dna: +_py3dna.Writer_swigregister(Writer) + +class StreamWriter(Writer): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamWriter + + def write(self): + return _py3dna.StreamWriter_write(self) + +# Register StreamWriter in _py3dna: +_py3dna.StreamWriter_swigregister(StreamWriter) + +class BinaryStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamWriter + +# Register BinaryStreamWriter in _py3dna: +_py3dna.BinaryStreamWriter_swigregister(BinaryStreamWriter) + +def BinaryStreamWriter_create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + +def BinaryStreamWriter_destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + +class JSONStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamWriter + +# Register JSONStreamWriter in _py3dna: +_py3dna.JSONStreamWriter_swigregister(JSONStreamWriter) + +def JSONStreamWriter_create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + +def JSONStreamWriter_destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + + +BinaryStreamWriter.__new__ = __new_decorator(BinaryStreamWriter_create, BinaryStreamWriter.__new__) +BinaryStreamWriter.__del__ = lambda instance: BinaryStreamWriter_destroy(instance) +BinaryStreamWriter.__init__ = __managed_init +del BinaryStreamWriter.create +del BinaryStreamWriter.destroy + + +JSONStreamWriter.__new__ = __new_decorator(JSONStreamWriter_create, JSONStreamWriter.__new__) +JSONStreamWriter.__del__ = lambda instance: JSONStreamWriter_destroy(instance) +JSONStreamWriter.__init__ = __managed_init +del JSONStreamWriter.create +del JSONStreamWriter.destroy + + + diff --git a/plugins/Linux/pydna/python3108/libdna.so.7.1.0 b/plugins/Linux/pydna/python3108/libdna.so.7.1.0 new file mode 100644 index 0000000..b400335 Binary files /dev/null and b/plugins/Linux/pydna/python3108/libdna.so.7.1.0 differ diff --git a/plugins/Linux/pydna/python311/_py3dna.so b/plugins/Linux/pydna/python311/_py3dna.so new file mode 100644 index 0000000..e69de29 diff --git a/plugins/Linux/pydna/python311/dna.py b/plugins/Linux/pydna/python311/dna.py new file mode 100644 index 0000000..2f56dfa --- /dev/null +++ b/plugins/Linux/pydna/python311/dna.py @@ -0,0 +1,1403 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dna +else: + import _py3dna + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +class MemoryResource(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_MemoryResource + + def allocate(self, size, alignment): + return _py3dna.MemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.MemoryResource_deallocate(self, ptr, size, alignment) + +# Register MemoryResource in _py3dna: +_py3dna.MemoryResource_swigregister(MemoryResource) + +class AlignedMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.AlignedMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.AlignedMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.AlignedMemoryResource_swiginit(self, _py3dna.new_AlignedMemoryResource()) + __swig_destroy__ = _py3dna.delete_AlignedMemoryResource + +# Register AlignedMemoryResource in _py3dna: +_py3dna.AlignedMemoryResource_swigregister(AlignedMemoryResource) + +class ArenaMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_ArenaMemoryResource + + def __init__(self, *args): + _py3dna.ArenaMemoryResource_swiginit(self, _py3dna.new_ArenaMemoryResource(*args)) + + def allocate(self, size, alignment): + return _py3dna.ArenaMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.ArenaMemoryResource_deallocate(self, ptr, size, alignment) + + def getUpstreamMemoryResource(self): + return _py3dna.ArenaMemoryResource_getUpstreamMemoryResource(self) + +# Register ArenaMemoryResource in _py3dna: +_py3dna.ArenaMemoryResource_swigregister(ArenaMemoryResource) + +class DefaultMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.DefaultMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.DefaultMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.DefaultMemoryResource_swiginit(self, _py3dna.new_DefaultMemoryResource()) + __swig_destroy__ = _py3dna.delete_DefaultMemoryResource + +# Register DefaultMemoryResource in _py3dna: +_py3dna.DefaultMemoryResource_swigregister(DefaultMemoryResource) + +class StatusCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + code = property(_py3dna.StatusCode_code_get, _py3dna.StatusCode_code_set) + message = property(_py3dna.StatusCode_message_get, _py3dna.StatusCode_message_set) + + def __init__(self): + _py3dna.StatusCode_swiginit(self, _py3dna.new_StatusCode()) + __swig_destroy__ = _py3dna.delete_StatusCode + +# Register StatusCode in _py3dna: +_py3dna.StatusCode_swigregister(StatusCode) + +class Status(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def isOk(): + return _py3dna.Status_isOk() + + @staticmethod + def get(): + return _py3dna.Status_get() + + @staticmethod + def getHook(): + return _py3dna.Status_getHook() + + @staticmethod + def setHook(hook): + return _py3dna.Status_setHook(hook) + + def __init__(self): + _py3dna.Status_swiginit(self, _py3dna.new_Status()) + __swig_destroy__ = _py3dna.delete_Status + +# Register Status in _py3dna: +_py3dna.Status_swigregister(Status) + +def Status_isOk(): + return _py3dna.Status_isOk() + +def Status_get(): + return _py3dna.Status_get() + +def Status_getHook(): + return _py3dna.Status_getHook() + +def Status_setHook(hook): + return _py3dna.Status_setHook(hook) + +class Readable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def read(self, *args): + return _py3dna.Readable_read(self, *args) + +# Register Readable in _py3dna: +_py3dna.Readable_swigregister(Readable) + +class Writable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def write(self, *args): + return _py3dna.Writable_write(self, *args) + +# Register Writable in _py3dna: +_py3dna.Writable_swigregister(Writable) + +class Seekable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def tell(self): + return _py3dna.Seekable_tell(self) + + def seek(self, position): + return _py3dna.Seekable_seek(self, position) + +# Register Seekable in _py3dna: +_py3dna.Seekable_swigregister(Seekable) + +class Openable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def open(self): + return _py3dna.Openable_open(self) + +# Register Openable in _py3dna: +_py3dna.Openable_swigregister(Openable) + +class Closeable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def close(self): + return _py3dna.Closeable_close(self) + +# Register Closeable in _py3dna: +_py3dna.Closeable_swigregister(Closeable) + +class Controllable(Openable, Closeable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + +# Register Controllable in _py3dna: +_py3dna.Controllable_swigregister(Controllable) + +class Bounded(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def size(self): + return _py3dna.Bounded_size(self) + +# Register Bounded in _py3dna: +_py3dna.Bounded_swigregister(Bounded) + +class Buffered(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def flush(self): + return _py3dna.Buffered_flush(self) + +# Register Buffered in _py3dna: +_py3dna.Buffered_swigregister(Buffered) + +class Resizable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def resize(self, size): + return _py3dna.Resizable_resize(self, size) + +# Register Resizable in _py3dna: +_py3dna.Resizable_swigregister(Resizable) + +class BoundedIOStream(Controllable, Readable, Writable, Seekable, Bounded): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_BoundedIOStream + +# Register BoundedIOStream in _py3dna: +_py3dna.BoundedIOStream_swigregister(BoundedIOStream) +cvar = _py3dna.cvar +BoundedIOStream.OpenError = _py3dna.cvar.BoundedIOStream_OpenError +BoundedIOStream.ReadError = _py3dna.cvar.BoundedIOStream_ReadError +BoundedIOStream.WriteError = _py3dna.cvar.BoundedIOStream_WriteError +BoundedIOStream.AlreadyOpenError = _py3dna.cvar.BoundedIOStream_AlreadyOpenError +BoundedIOStream.SeekError = _py3dna.cvar.BoundedIOStream_SeekError + +AccessMode_Read = _py3dna.AccessMode_Read +AccessMode_Write = _py3dna.AccessMode_Write +AccessMode_ReadWrite = _py3dna.AccessMode_ReadWrite +OpenMode_Binary = _py3dna.OpenMode_Binary +OpenMode_Text = _py3dna.OpenMode_Text +class FileStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.FileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_FileStream + +# Register FileStream in _py3dna: +_py3dna.FileStream_swigregister(FileStream) + +def FileStream_create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + +def FileStream_destroy(instance): + return _py3dna.FileStream_destroy(instance) + +class MemoryMappedFileStream(BoundedIOStream, Buffered, Resizable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryMappedFileStream + +# Register MemoryMappedFileStream in _py3dna: +_py3dna.MemoryMappedFileStream_swigregister(MemoryMappedFileStream) + +def MemoryMappedFileStream_create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + +def MemoryMappedFileStream_destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + +class MemoryStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.MemoryStream_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryStream + +# Register MemoryStream in _py3dna: +_py3dna.MemoryStream_swigregister(MemoryStream) + +def MemoryStream_create(*args): + return _py3dna.MemoryStream_create(*args) + +def MemoryStream_destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + + +FileStream.__new__ = __new_decorator(FileStream_create, FileStream.__new__) +FileStream.__del__ = lambda instance: FileStream_destroy(instance) +FileStream.__init__ = __managed_init +del FileStream.create +del FileStream.destroy + + +MemoryMappedFileStream.__new__ = __new_decorator(MemoryMappedFileStream_create, MemoryMappedFileStream.__new__) +MemoryMappedFileStream.__del__ = lambda instance: MemoryMappedFileStream_destroy(instance) +MemoryMappedFileStream.__init__ = __managed_init +del MemoryMappedFileStream.create +del MemoryMappedFileStream.destroy + + +MemoryStream.__new__ = __new_decorator(MemoryStream_create, MemoryStream.__new__) +MemoryStream.__del__ = lambda instance: MemoryStream_destroy(instance) +MemoryStream.__init__ = __managed_init +del MemoryStream.create +del MemoryStream.destroy + + +FileStream.AccessMode_Read = AccessMode_Read +FileStream.AccessMode_Write = AccessMode_Write +FileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +FileStream.OpenMode_Binary = OpenMode_Binary +FileStream.OpenMode_Text = OpenMode_Text + +MemoryMappedFileStream.AccessMode_Read = AccessMode_Read +MemoryMappedFileStream.AccessMode_Write = AccessMode_Write +MemoryMappedFileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +class StringView(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def c_str(self): + return _py3dna.StringView_c_str(self) + + def __ref__(self): + return _py3dna.StringView___ref__(self) + + def __init__(self): + _py3dna.StringView_swiginit(self, _py3dna.new_StringView()) + __swig_destroy__ = _py3dna.delete_StringView + +# Register StringView in _py3dna: +_py3dna.StringView_swigregister(StringView) + + +def __add__(*args): + return _py3dna.__add__(*args) + +def __sub__(*args): + return _py3dna.__sub__(*args) + +def __mul__(*args): + return _py3dna.__mul__(*args) + +def __truediv__(*args): + return _py3dna.__truediv__(*args) + +def __eq__(*args): + return _py3dna.__eq__(*args) + +def __ne__(*args): + return _py3dna.__ne__(*args) +DataLayer_Descriptor = _py3dna.DataLayer_Descriptor +DataLayer_Definition = _py3dna.DataLayer_Definition +DataLayer_Behavior = _py3dna.DataLayer_Behavior +DataLayer_Geometry = _py3dna.DataLayer_Geometry +DataLayer_GeometryWithoutBlendShapes = _py3dna.DataLayer_GeometryWithoutBlendShapes +DataLayer_AllWithoutBlendShapes = _py3dna.DataLayer_AllWithoutBlendShapes +DataLayer_All = _py3dna.DataLayer_All +Archetype_asian = _py3dna.Archetype_asian +Archetype_black = _py3dna.Archetype_black +Archetype_caucasian = _py3dna.Archetype_caucasian +Archetype_hispanic = _py3dna.Archetype_hispanic +Archetype_alien = _py3dna.Archetype_alien +Archetype_other = _py3dna.Archetype_other +Gender_male = _py3dna.Gender_male +Gender_female = _py3dna.Gender_female +Gender_other = _py3dna.Gender_other +TranslationUnit_cm = _py3dna.TranslationUnit_cm +TranslationUnit_m = _py3dna.TranslationUnit_m +RotationUnit_degrees = _py3dna.RotationUnit_degrees +RotationUnit_radians = _py3dna.RotationUnit_radians +Direction_left = _py3dna.Direction_left +Direction_right = _py3dna.Direction_right +Direction_up = _py3dna.Direction_up +Direction_down = _py3dna.Direction_down +Direction_front = _py3dna.Direction_front +Direction_back = _py3dna.Direction_back +class CoordinateSystem(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + xAxis = property(_py3dna.CoordinateSystem_xAxis_get, _py3dna.CoordinateSystem_xAxis_set) + yAxis = property(_py3dna.CoordinateSystem_yAxis_get, _py3dna.CoordinateSystem_yAxis_set) + zAxis = property(_py3dna.CoordinateSystem_zAxis_get, _py3dna.CoordinateSystem_zAxis_set) + + def __init__(self): + _py3dna.CoordinateSystem_swiginit(self, _py3dna.new_CoordinateSystem()) + __swig_destroy__ = _py3dna.delete_CoordinateSystem + +# Register CoordinateSystem in _py3dna: +_py3dna.CoordinateSystem_swigregister(CoordinateSystem) + +class DescriptorReader(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getName(self): + return _py3dna.DescriptorReader_getName(self) + + def getArchetype(self): + return _py3dna.DescriptorReader_getArchetype(self) + + def getGender(self): + return _py3dna.DescriptorReader_getGender(self) + + def getAge(self): + return _py3dna.DescriptorReader_getAge(self) + + def getMetaDataCount(self): + return _py3dna.DescriptorReader_getMetaDataCount(self) + + def getMetaDataKey(self, index): + return _py3dna.DescriptorReader_getMetaDataKey(self, index) + + def getMetaDataValue(self, key): + return _py3dna.DescriptorReader_getMetaDataValue(self, key) + + def getTranslationUnit(self): + return _py3dna.DescriptorReader_getTranslationUnit(self) + + def getRotationUnit(self): + return _py3dna.DescriptorReader_getRotationUnit(self) + + def getCoordinateSystem(self): + return _py3dna.DescriptorReader_getCoordinateSystem(self) + + def getLODCount(self): + return _py3dna.DescriptorReader_getLODCount(self) + + def getDBMaxLOD(self): + return _py3dna.DescriptorReader_getDBMaxLOD(self) + + def getDBComplexity(self): + return _py3dna.DescriptorReader_getDBComplexity(self) + + def getDBName(self): + return _py3dna.DescriptorReader_getDBName(self) + +# Register DescriptorReader in _py3dna: +_py3dna.DescriptorReader_swigregister(DescriptorReader) + +class MeshBlendShapeChannelMapping(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + meshIndex = property(_py3dna.MeshBlendShapeChannelMapping_meshIndex_get, _py3dna.MeshBlendShapeChannelMapping_meshIndex_set) + blendShapeChannelIndex = property(_py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_get, _py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_set) + + def __init__(self): + _py3dna.MeshBlendShapeChannelMapping_swiginit(self, _py3dna.new_MeshBlendShapeChannelMapping()) + __swig_destroy__ = _py3dna.delete_MeshBlendShapeChannelMapping + +# Register MeshBlendShapeChannelMapping in _py3dna: +_py3dna.MeshBlendShapeChannelMapping_swigregister(MeshBlendShapeChannelMapping) + +class DefinitionReader(DescriptorReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIControlCount(self): + return _py3dna.DefinitionReader_getGUIControlCount(self) + + def getGUIControlName(self, index): + return _py3dna.DefinitionReader_getGUIControlName(self, index) + + def getRawControlCount(self): + return _py3dna.DefinitionReader_getRawControlCount(self) + + def getRawControlName(self, index): + return _py3dna.DefinitionReader_getRawControlName(self, index) + + def getJointCount(self): + return _py3dna.DefinitionReader_getJointCount(self) + + def getJointName(self, index): + return _py3dna.DefinitionReader_getJointName(self, index) + + def getJointIndexListCount(self): + return _py3dna.DefinitionReader_getJointIndexListCount(self) + + def getJointIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getJointIndicesForLOD(self, lod) + + def getJointParentIndex(self, index): + return _py3dna.DefinitionReader_getJointParentIndex(self, index) + + def getBlendShapeChannelCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelCount(self) + + def getBlendShapeChannelName(self, index): + return _py3dna.DefinitionReader_getBlendShapeChannelName(self, index) + + def getBlendShapeChannelIndexListCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelIndexListCount(self) + + def getBlendShapeChannelIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getBlendShapeChannelIndicesForLOD(self, lod) + + def getAnimatedMapCount(self): + return _py3dna.DefinitionReader_getAnimatedMapCount(self) + + def getAnimatedMapName(self, index): + return _py3dna.DefinitionReader_getAnimatedMapName(self, index) + + def getAnimatedMapIndexListCount(self): + return _py3dna.DefinitionReader_getAnimatedMapIndexListCount(self) + + def getAnimatedMapIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getAnimatedMapIndicesForLOD(self, lod) + + def getMeshCount(self): + return _py3dna.DefinitionReader_getMeshCount(self) + + def getMeshName(self, index): + return _py3dna.DefinitionReader_getMeshName(self, index) + + def getMeshIndexListCount(self): + return _py3dna.DefinitionReader_getMeshIndexListCount(self) + + def getMeshIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshIndicesForLOD(self, lod) + + def getMeshBlendShapeChannelMappingCount(self): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingCount(self) + + def getMeshBlendShapeChannelMapping(self, index): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMapping(self, index) + + def getMeshBlendShapeChannelMappingIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingIndicesForLOD(self, lod) + + def getNeutralJointTranslation(self, index): + return _py3dna.DefinitionReader_getNeutralJointTranslation(self, index) + + def getNeutralJointTranslationXs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationXs(self) + + def getNeutralJointTranslationYs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationYs(self) + + def getNeutralJointTranslationZs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationZs(self) + + def getNeutralJointRotation(self, index): + return _py3dna.DefinitionReader_getNeutralJointRotation(self, index) + + def getNeutralJointRotationXs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationXs(self) + + def getNeutralJointRotationYs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationYs(self) + + def getNeutralJointRotationZs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationZs(self) + +# Register DefinitionReader in _py3dna: +_py3dna.DefinitionReader_swigregister(DefinitionReader) + +class BehaviorReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIToRawInputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawInputIndices(self) + + def getGUIToRawOutputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawOutputIndices(self) + + def getGUIToRawFromValues(self): + return _py3dna.BehaviorReader_getGUIToRawFromValues(self) + + def getGUIToRawToValues(self): + return _py3dna.BehaviorReader_getGUIToRawToValues(self) + + def getGUIToRawSlopeValues(self): + return _py3dna.BehaviorReader_getGUIToRawSlopeValues(self) + + def getGUIToRawCutValues(self): + return _py3dna.BehaviorReader_getGUIToRawCutValues(self) + + def getPSDCount(self): + return _py3dna.BehaviorReader_getPSDCount(self) + + def getPSDRowIndices(self): + return _py3dna.BehaviorReader_getPSDRowIndices(self) + + def getPSDColumnIndices(self): + return _py3dna.BehaviorReader_getPSDColumnIndices(self) + + def getPSDValues(self): + return _py3dna.BehaviorReader_getPSDValues(self) + + def getJointRowCount(self): + return _py3dna.BehaviorReader_getJointRowCount(self) + + def getJointColumnCount(self): + return _py3dna.BehaviorReader_getJointColumnCount(self) + + def getJointVariableAttributeIndices(self, lod): + return _py3dna.BehaviorReader_getJointVariableAttributeIndices(self, lod) + + def getJointGroupCount(self): + return _py3dna.BehaviorReader_getJointGroupCount(self) + + def getJointGroupLODs(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupLODs(self, jointGroupIndex) + + def getJointGroupInputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupInputIndices(self, jointGroupIndex) + + def getJointGroupOutputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupOutputIndices(self, jointGroupIndex) + + def getJointGroupValues(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupValues(self, jointGroupIndex) + + def getJointGroupJointIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupJointIndices(self, jointGroupIndex) + + def getBlendShapeChannelLODs(self): + return _py3dna.BehaviorReader_getBlendShapeChannelLODs(self) + + def getBlendShapeChannelInputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelInputIndices(self) + + def getBlendShapeChannelOutputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelOutputIndices(self) + + def getAnimatedMapLODs(self): + return _py3dna.BehaviorReader_getAnimatedMapLODs(self) + + def getAnimatedMapInputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapInputIndices(self) + + def getAnimatedMapOutputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapOutputIndices(self) + + def getAnimatedMapFromValues(self): + return _py3dna.BehaviorReader_getAnimatedMapFromValues(self) + + def getAnimatedMapToValues(self): + return _py3dna.BehaviorReader_getAnimatedMapToValues(self) + + def getAnimatedMapSlopeValues(self): + return _py3dna.BehaviorReader_getAnimatedMapSlopeValues(self) + + def getAnimatedMapCutValues(self): + return _py3dna.BehaviorReader_getAnimatedMapCutValues(self) + +# Register BehaviorReader in _py3dna: +_py3dna.BehaviorReader_swigregister(BehaviorReader) + +class GeometryReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getVertexPositionCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionCount(self, meshIndex) + + def getVertexPosition(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getVertexPosition(self, meshIndex, vertexIndex) + + def getVertexPositionXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionXs(self, meshIndex) + + def getVertexPositionYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionYs(self, meshIndex) + + def getVertexPositionZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionZs(self, meshIndex) + + def getVertexTextureCoordinateCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateCount(self, meshIndex) + + def getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex) + + def getVertexTextureCoordinateUs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateUs(self, meshIndex) + + def getVertexTextureCoordinateVs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateVs(self, meshIndex) + + def getVertexNormalCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalCount(self, meshIndex) + + def getVertexNormal(self, meshIndex, normalIndex): + return _py3dna.GeometryReader_getVertexNormal(self, meshIndex, normalIndex) + + def getVertexNormalXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalXs(self, meshIndex) + + def getVertexNormalYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalYs(self, meshIndex) + + def getVertexNormalZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalZs(self, meshIndex) + + def getVertexLayoutCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutCount(self, meshIndex) + + def getVertexLayout(self, meshIndex, layoutIndex): + return _py3dna.GeometryReader_getVertexLayout(self, meshIndex, layoutIndex) + + def getVertexLayoutPositionIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutPositionIndices(self, meshIndex) + + def getVertexLayoutTextureCoordinateIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutTextureCoordinateIndices(self, meshIndex) + + def getVertexLayoutNormalIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutNormalIndices(self, meshIndex) + + def getFaceCount(self, meshIndex): + return _py3dna.GeometryReader_getFaceCount(self, meshIndex) + + def getFaceVertexLayoutIndices(self, meshIndex, faceIndex): + return _py3dna.GeometryReader_getFaceVertexLayoutIndices(self, meshIndex, faceIndex) + + def getMaximumInfluencePerVertex(self, meshIndex): + return _py3dna.GeometryReader_getMaximumInfluencePerVertex(self, meshIndex) + + def getSkinWeightsCount(self, meshIndex): + return _py3dna.GeometryReader_getSkinWeightsCount(self, meshIndex) + + def getSkinWeightsValues(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsValues(self, meshIndex, vertexIndex) + + def getSkinWeightsJointIndices(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsJointIndices(self, meshIndex, vertexIndex) + + def getBlendShapeTargetCount(self, meshIndex): + return _py3dna.GeometryReader_getBlendShapeTargetCount(self, meshIndex) + + def getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex) + + def getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex) + +# Register GeometryReader in _py3dna: +_py3dna.GeometryReader_swigregister(GeometryReader) + +class Reader(BehaviorReader, GeometryReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Reader + + def unload(self, layer): + return _py3dna.Reader_unload(self, layer) + +# Register Reader in _py3dna: +_py3dna.Reader_swigregister(Reader) + +class StreamReader(Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamReader + + def read(self): + return _py3dna.StreamReader_read(self) + +# Register StreamReader in _py3dna: +_py3dna.StreamReader_swigregister(StreamReader) +StreamReader.SignatureMismatchError = _py3dna.cvar.StreamReader_SignatureMismatchError +StreamReader.VersionMismatchError = _py3dna.cvar.StreamReader_VersionMismatchError +StreamReader.InvalidDataError = _py3dna.cvar.StreamReader_InvalidDataError + +class BinaryStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.BinaryStreamReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamReader + +# Register BinaryStreamReader in _py3dna: +_py3dna.BinaryStreamReader_swigregister(BinaryStreamReader) + +def BinaryStreamReader_create(*args): + return _py3dna.BinaryStreamReader_create(*args) + +def BinaryStreamReader_destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + +class JSONStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamReader + +# Register JSONStreamReader in _py3dna: +_py3dna.JSONStreamReader_swigregister(JSONStreamReader) + +def JSONStreamReader_create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + +def JSONStreamReader_destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + + +BinaryStreamReader.__new__ = __new_decorator(BinaryStreamReader_create, BinaryStreamReader.__new__) +BinaryStreamReader.__del__ = lambda instance: BinaryStreamReader_destroy(instance) +BinaryStreamReader.__init__ = __managed_init +del BinaryStreamReader.create +del BinaryStreamReader.destroy + + +JSONStreamReader.__new__ = __new_decorator(JSONStreamReader_create, JSONStreamReader.__new__) +JSONStreamReader.__del__ = lambda instance: JSONStreamReader_destroy(instance) +JSONStreamReader.__init__ = __managed_init +del JSONStreamReader.create +del JSONStreamReader.destroy + +class DescriptorWriter(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setName(self, name): + return _py3dna.DescriptorWriter_setName(self, name) + + def setArchetype(self, archetype): + return _py3dna.DescriptorWriter_setArchetype(self, archetype) + + def setGender(self, gender): + return _py3dna.DescriptorWriter_setGender(self, gender) + + def setAge(self, age): + return _py3dna.DescriptorWriter_setAge(self, age) + + def clearMetaData(self): + return _py3dna.DescriptorWriter_clearMetaData(self) + + def setMetaData(self, key, value): + return _py3dna.DescriptorWriter_setMetaData(self, key, value) + + def setTranslationUnit(self, unit): + return _py3dna.DescriptorWriter_setTranslationUnit(self, unit) + + def setRotationUnit(self, unit): + return _py3dna.DescriptorWriter_setRotationUnit(self, unit) + + def setCoordinateSystem(self, system): + return _py3dna.DescriptorWriter_setCoordinateSystem(self, system) + + def setLODCount(self, lodCount): + return _py3dna.DescriptorWriter_setLODCount(self, lodCount) + + def setDBMaxLOD(self, lod): + return _py3dna.DescriptorWriter_setDBMaxLOD(self, lod) + + def setDBComplexity(self, name): + return _py3dna.DescriptorWriter_setDBComplexity(self, name) + + def setDBName(self, name): + return _py3dna.DescriptorWriter_setDBName(self, name) + +# Register DescriptorWriter in _py3dna: +_py3dna.DescriptorWriter_swigregister(DescriptorWriter) + +class DefinitionWriter(DescriptorWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearGUIControlNames(self): + return _py3dna.DefinitionWriter_clearGUIControlNames(self) + + def setGUIControlName(self, index, name): + return _py3dna.DefinitionWriter_setGUIControlName(self, index, name) + + def clearRawControlNames(self): + return _py3dna.DefinitionWriter_clearRawControlNames(self) + + def setRawControlName(self, index, name): + return _py3dna.DefinitionWriter_setRawControlName(self, index, name) + + def clearJointNames(self): + return _py3dna.DefinitionWriter_clearJointNames(self) + + def setJointName(self, index, name): + return _py3dna.DefinitionWriter_setJointName(self, index, name) + + def clearJointIndices(self): + return _py3dna.DefinitionWriter_clearJointIndices(self) + + def setJointIndices(self, index, jointIndices): + return _py3dna.DefinitionWriter_setJointIndices(self, index, jointIndices) + + def clearLODJointMappings(self): + return _py3dna.DefinitionWriter_clearLODJointMappings(self) + + def setLODJointMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODJointMapping(self, lod, index) + + def clearBlendShapeChannelNames(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelNames(self) + + def setBlendShapeChannelName(self, index, name): + return _py3dna.DefinitionWriter_setBlendShapeChannelName(self, index, name) + + def clearBlendShapeChannelIndices(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelIndices(self) + + def setBlendShapeChannelIndices(self, index, blendShapeChannelIndices): + return _py3dna.DefinitionWriter_setBlendShapeChannelIndices(self, index, blendShapeChannelIndices) + + def clearLODBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearLODBlendShapeChannelMappings(self) + + def setLODBlendShapeChannelMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODBlendShapeChannelMapping(self, lod, index) + + def clearAnimatedMapNames(self): + return _py3dna.DefinitionWriter_clearAnimatedMapNames(self) + + def setAnimatedMapName(self, index, name): + return _py3dna.DefinitionWriter_setAnimatedMapName(self, index, name) + + def clearAnimatedMapIndices(self): + return _py3dna.DefinitionWriter_clearAnimatedMapIndices(self) + + def setAnimatedMapIndices(self, index, animatedMapIndices): + return _py3dna.DefinitionWriter_setAnimatedMapIndices(self, index, animatedMapIndices) + + def clearLODAnimatedMapMappings(self): + return _py3dna.DefinitionWriter_clearLODAnimatedMapMappings(self) + + def setLODAnimatedMapMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODAnimatedMapMapping(self, lod, index) + + def clearMeshNames(self): + return _py3dna.DefinitionWriter_clearMeshNames(self) + + def setMeshName(self, index, name): + return _py3dna.DefinitionWriter_setMeshName(self, index, name) + + def clearMeshIndices(self): + return _py3dna.DefinitionWriter_clearMeshIndices(self) + + def setMeshIndices(self, index, meshIndices): + return _py3dna.DefinitionWriter_setMeshIndices(self, index, meshIndices) + + def clearLODMeshMappings(self): + return _py3dna.DefinitionWriter_clearLODMeshMappings(self) + + def setLODMeshMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODMeshMapping(self, lod, index) + + def clearMeshBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearMeshBlendShapeChannelMappings(self) + + def setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex): + return _py3dna.DefinitionWriter_setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex) + + def setJointHierarchy(self, jointIndices): + return _py3dna.DefinitionWriter_setJointHierarchy(self, jointIndices) + + def setNeutralJointTranslations(self, translations): + return _py3dna.DefinitionWriter_setNeutralJointTranslations(self, translations) + + def setNeutralJointRotations(self, rotations): + return _py3dna.DefinitionWriter_setNeutralJointRotations(self, rotations) + +# Register DefinitionWriter in _py3dna: +_py3dna.DefinitionWriter_swigregister(DefinitionWriter) + +class BehaviorWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setGUIToRawInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setGUIToRawInputIndices(self, inputIndices) + + def setGUIToRawOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setGUIToRawOutputIndices(self, outputIndices) + + def setGUIToRawFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setGUIToRawFromValues(self, fromValues) + + def setGUIToRawToValues(self, toValues): + return _py3dna.BehaviorWriter_setGUIToRawToValues(self, toValues) + + def setGUIToRawSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setGUIToRawSlopeValues(self, slopeValues) + + def setGUIToRawCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setGUIToRawCutValues(self, cutValues) + + def setPSDCount(self, count): + return _py3dna.BehaviorWriter_setPSDCount(self, count) + + def setPSDRowIndices(self, rowIndices): + return _py3dna.BehaviorWriter_setPSDRowIndices(self, rowIndices) + + def setPSDColumnIndices(self, columnIndices): + return _py3dna.BehaviorWriter_setPSDColumnIndices(self, columnIndices) + + def setPSDValues(self, weights): + return _py3dna.BehaviorWriter_setPSDValues(self, weights) + + def setJointRowCount(self, rowCount): + return _py3dna.BehaviorWriter_setJointRowCount(self, rowCount) + + def setJointColumnCount(self, columnCount): + return _py3dna.BehaviorWriter_setJointColumnCount(self, columnCount) + + def clearJointGroups(self): + return _py3dna.BehaviorWriter_clearJointGroups(self) + + def deleteJointGroup(self, jointGroupIndex): + return _py3dna.BehaviorWriter_deleteJointGroup(self, jointGroupIndex) + + def setJointGroupLODs(self, jointGroupIndex, lods): + return _py3dna.BehaviorWriter_setJointGroupLODs(self, jointGroupIndex, lods) + + def setJointGroupInputIndices(self, jointGroupIndex, inputIndices): + return _py3dna.BehaviorWriter_setJointGroupInputIndices(self, jointGroupIndex, inputIndices) + + def setJointGroupOutputIndices(self, jointGroupIndex, outputIndices): + return _py3dna.BehaviorWriter_setJointGroupOutputIndices(self, jointGroupIndex, outputIndices) + + def setJointGroupValues(self, jointGroupIndex, values): + return _py3dna.BehaviorWriter_setJointGroupValues(self, jointGroupIndex, values) + + def setJointGroupJointIndices(self, jointGroupIndex, jointIndices): + return _py3dna.BehaviorWriter_setJointGroupJointIndices(self, jointGroupIndex, jointIndices) + + def setBlendShapeChannelLODs(self, lods): + return _py3dna.BehaviorWriter_setBlendShapeChannelLODs(self, lods) + + def setBlendShapeChannelInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelInputIndices(self, inputIndices) + + def setBlendShapeChannelOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelOutputIndices(self, outputIndices) + + def setAnimatedMapLODs(self, lods): + return _py3dna.BehaviorWriter_setAnimatedMapLODs(self, lods) + + def setAnimatedMapInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapInputIndices(self, inputIndices) + + def setAnimatedMapOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapOutputIndices(self, outputIndices) + + def setAnimatedMapFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setAnimatedMapFromValues(self, fromValues) + + def setAnimatedMapToValues(self, toValues): + return _py3dna.BehaviorWriter_setAnimatedMapToValues(self, toValues) + + def setAnimatedMapSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setAnimatedMapSlopeValues(self, slopeValues) + + def setAnimatedMapCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setAnimatedMapCutValues(self, cutValues) + +# Register BehaviorWriter in _py3dna: +_py3dna.BehaviorWriter_swigregister(BehaviorWriter) + +class GeometryWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearMeshes(self): + return _py3dna.GeometryWriter_clearMeshes(self) + + def deleteMesh(self, meshIndex): + return _py3dna.GeometryWriter_deleteMesh(self, meshIndex) + + def setVertexPositions(self, meshIndex, positions): + return _py3dna.GeometryWriter_setVertexPositions(self, meshIndex, positions) + + def setVertexTextureCoordinates(self, meshIndex, textureCoordinates): + return _py3dna.GeometryWriter_setVertexTextureCoordinates(self, meshIndex, textureCoordinates) + + def setVertexNormals(self, meshIndex, normals): + return _py3dna.GeometryWriter_setVertexNormals(self, meshIndex, normals) + + def setVertexLayouts(self, meshIndex, layouts): + return _py3dna.GeometryWriter_setVertexLayouts(self, meshIndex, layouts) + + def clearFaceVertexLayoutIndices(self, meshIndex): + return _py3dna.GeometryWriter_clearFaceVertexLayoutIndices(self, meshIndex) + + def setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices): + return _py3dna.GeometryWriter_setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices) + + def setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount): + return _py3dna.GeometryWriter_setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount) + + def clearSkinWeights(self, meshIndex): + return _py3dna.GeometryWriter_clearSkinWeights(self, meshIndex) + + def setSkinWeightsValues(self, meshIndex, vertexIndex, weights): + return _py3dna.GeometryWriter_setSkinWeightsValues(self, meshIndex, vertexIndex, weights) + + def setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices): + return _py3dna.GeometryWriter_setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices) + + def clearBlendShapeTargets(self, meshIndex): + return _py3dna.GeometryWriter_clearBlendShapeTargets(self, meshIndex) + + def setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex): + return _py3dna.GeometryWriter_setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex) + + def setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas): + return _py3dna.GeometryWriter_setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas) + + def setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices): + return _py3dna.GeometryWriter_setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices) + +# Register GeometryWriter in _py3dna: +_py3dna.GeometryWriter_swigregister(GeometryWriter) + +class Writer(BehaviorWriter, GeometryWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Writer + + def setFrom(self, *args): + return _py3dna.Writer_setFrom(self, *args) + +# Register Writer in _py3dna: +_py3dna.Writer_swigregister(Writer) + +class StreamWriter(Writer): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamWriter + + def write(self): + return _py3dna.StreamWriter_write(self) + +# Register StreamWriter in _py3dna: +_py3dna.StreamWriter_swigregister(StreamWriter) + +class BinaryStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamWriter + +# Register BinaryStreamWriter in _py3dna: +_py3dna.BinaryStreamWriter_swigregister(BinaryStreamWriter) + +def BinaryStreamWriter_create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + +def BinaryStreamWriter_destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + +class JSONStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamWriter + +# Register JSONStreamWriter in _py3dna: +_py3dna.JSONStreamWriter_swigregister(JSONStreamWriter) + +def JSONStreamWriter_create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + +def JSONStreamWriter_destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + + +BinaryStreamWriter.__new__ = __new_decorator(BinaryStreamWriter_create, BinaryStreamWriter.__new__) +BinaryStreamWriter.__del__ = lambda instance: BinaryStreamWriter_destroy(instance) +BinaryStreamWriter.__init__ = __managed_init +del BinaryStreamWriter.create +del BinaryStreamWriter.destroy + + +JSONStreamWriter.__new__ = __new_decorator(JSONStreamWriter_create, JSONStreamWriter.__new__) +JSONStreamWriter.__del__ = lambda instance: JSONStreamWriter_destroy(instance) +JSONStreamWriter.__init__ = __managed_init +del JSONStreamWriter.create +del JSONStreamWriter.destroy + + + diff --git a/plugins/Linux/pydna/python311/libdna.so.7 b/plugins/Linux/pydna/python311/libdna.so.7 new file mode 100644 index 0000000..e69de29 diff --git a/plugins/Linux/pydna/python397/_py3dna.so b/plugins/Linux/pydna/python397/_py3dna.so new file mode 100644 index 0000000..8215abc Binary files /dev/null and b/plugins/Linux/pydna/python397/_py3dna.so differ diff --git a/plugins/Linux/pydna/python397/dna.py b/plugins/Linux/pydna/python397/dna.py new file mode 100644 index 0000000..d21635b --- /dev/null +++ b/plugins/Linux/pydna/python397/dna.py @@ -0,0 +1,1403 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.1 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dna +else: + import _py3dna + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +class MemoryResource(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_MemoryResource + + def allocate(self, size, alignment): + return _py3dna.MemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.MemoryResource_deallocate(self, ptr, size, alignment) + +# Register MemoryResource in _py3dna: +_py3dna.MemoryResource_swigregister(MemoryResource) + +class AlignedMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.AlignedMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.AlignedMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.AlignedMemoryResource_swiginit(self, _py3dna.new_AlignedMemoryResource()) + __swig_destroy__ = _py3dna.delete_AlignedMemoryResource + +# Register AlignedMemoryResource in _py3dna: +_py3dna.AlignedMemoryResource_swigregister(AlignedMemoryResource) + +class ArenaMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_ArenaMemoryResource + + def __init__(self, *args): + _py3dna.ArenaMemoryResource_swiginit(self, _py3dna.new_ArenaMemoryResource(*args)) + + def allocate(self, size, alignment): + return _py3dna.ArenaMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.ArenaMemoryResource_deallocate(self, ptr, size, alignment) + + def getUpstreamMemoryResource(self): + return _py3dna.ArenaMemoryResource_getUpstreamMemoryResource(self) + +# Register ArenaMemoryResource in _py3dna: +_py3dna.ArenaMemoryResource_swigregister(ArenaMemoryResource) + +class DefaultMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.DefaultMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.DefaultMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.DefaultMemoryResource_swiginit(self, _py3dna.new_DefaultMemoryResource()) + __swig_destroy__ = _py3dna.delete_DefaultMemoryResource + +# Register DefaultMemoryResource in _py3dna: +_py3dna.DefaultMemoryResource_swigregister(DefaultMemoryResource) + +class StatusCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + code = property(_py3dna.StatusCode_code_get, _py3dna.StatusCode_code_set) + message = property(_py3dna.StatusCode_message_get, _py3dna.StatusCode_message_set) + + def __init__(self): + _py3dna.StatusCode_swiginit(self, _py3dna.new_StatusCode()) + __swig_destroy__ = _py3dna.delete_StatusCode + +# Register StatusCode in _py3dna: +_py3dna.StatusCode_swigregister(StatusCode) + +class Status(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def isOk(): + return _py3dna.Status_isOk() + + @staticmethod + def get(): + return _py3dna.Status_get() + + @staticmethod + def getHook(): + return _py3dna.Status_getHook() + + @staticmethod + def setHook(hook): + return _py3dna.Status_setHook(hook) + + def __init__(self): + _py3dna.Status_swiginit(self, _py3dna.new_Status()) + __swig_destroy__ = _py3dna.delete_Status + +# Register Status in _py3dna: +_py3dna.Status_swigregister(Status) + +def Status_isOk(): + return _py3dna.Status_isOk() + +def Status_get(): + return _py3dna.Status_get() + +def Status_getHook(): + return _py3dna.Status_getHook() + +def Status_setHook(hook): + return _py3dna.Status_setHook(hook) + +class Readable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def read(self, *args): + return _py3dna.Readable_read(self, *args) + +# Register Readable in _py3dna: +_py3dna.Readable_swigregister(Readable) + +class Writable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def write(self, *args): + return _py3dna.Writable_write(self, *args) + +# Register Writable in _py3dna: +_py3dna.Writable_swigregister(Writable) + +class Seekable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def tell(self): + return _py3dna.Seekable_tell(self) + + def seek(self, position): + return _py3dna.Seekable_seek(self, position) + +# Register Seekable in _py3dna: +_py3dna.Seekable_swigregister(Seekable) + +class Openable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def open(self): + return _py3dna.Openable_open(self) + +# Register Openable in _py3dna: +_py3dna.Openable_swigregister(Openable) + +class Closeable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def close(self): + return _py3dna.Closeable_close(self) + +# Register Closeable in _py3dna: +_py3dna.Closeable_swigregister(Closeable) + +class Controllable(Openable, Closeable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + +# Register Controllable in _py3dna: +_py3dna.Controllable_swigregister(Controllable) + +class Bounded(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def size(self): + return _py3dna.Bounded_size(self) + +# Register Bounded in _py3dna: +_py3dna.Bounded_swigregister(Bounded) + +class Buffered(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def flush(self): + return _py3dna.Buffered_flush(self) + +# Register Buffered in _py3dna: +_py3dna.Buffered_swigregister(Buffered) + +class Resizable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def resize(self, size): + return _py3dna.Resizable_resize(self, size) + +# Register Resizable in _py3dna: +_py3dna.Resizable_swigregister(Resizable) + +class BoundedIOStream(Controllable, Readable, Writable, Seekable, Bounded): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_BoundedIOStream + +# Register BoundedIOStream in _py3dna: +_py3dna.BoundedIOStream_swigregister(BoundedIOStream) +cvar = _py3dna.cvar +BoundedIOStream.OpenError = _py3dna.cvar.BoundedIOStream_OpenError +BoundedIOStream.ReadError = _py3dna.cvar.BoundedIOStream_ReadError +BoundedIOStream.WriteError = _py3dna.cvar.BoundedIOStream_WriteError +BoundedIOStream.AlreadyOpenError = _py3dna.cvar.BoundedIOStream_AlreadyOpenError +BoundedIOStream.SeekError = _py3dna.cvar.BoundedIOStream_SeekError + +AccessMode_Read = _py3dna.AccessMode_Read +AccessMode_Write = _py3dna.AccessMode_Write +AccessMode_ReadWrite = _py3dna.AccessMode_ReadWrite +OpenMode_Binary = _py3dna.OpenMode_Binary +OpenMode_Text = _py3dna.OpenMode_Text +class FileStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.FileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_FileStream + +# Register FileStream in _py3dna: +_py3dna.FileStream_swigregister(FileStream) + +def FileStream_create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + +def FileStream_destroy(instance): + return _py3dna.FileStream_destroy(instance) + +class MemoryMappedFileStream(BoundedIOStream, Buffered, Resizable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryMappedFileStream + +# Register MemoryMappedFileStream in _py3dna: +_py3dna.MemoryMappedFileStream_swigregister(MemoryMappedFileStream) + +def MemoryMappedFileStream_create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + +def MemoryMappedFileStream_destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + +class MemoryStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.MemoryStream_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryStream + +# Register MemoryStream in _py3dna: +_py3dna.MemoryStream_swigregister(MemoryStream) + +def MemoryStream_create(*args): + return _py3dna.MemoryStream_create(*args) + +def MemoryStream_destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + + +FileStream.__new__ = __new_decorator(FileStream_create, FileStream.__new__) +FileStream.__del__ = lambda instance: FileStream_destroy(instance) +FileStream.__init__ = __managed_init +del FileStream.create +del FileStream.destroy + + +MemoryMappedFileStream.__new__ = __new_decorator(MemoryMappedFileStream_create, MemoryMappedFileStream.__new__) +MemoryMappedFileStream.__del__ = lambda instance: MemoryMappedFileStream_destroy(instance) +MemoryMappedFileStream.__init__ = __managed_init +del MemoryMappedFileStream.create +del MemoryMappedFileStream.destroy + + +MemoryStream.__new__ = __new_decorator(MemoryStream_create, MemoryStream.__new__) +MemoryStream.__del__ = lambda instance: MemoryStream_destroy(instance) +MemoryStream.__init__ = __managed_init +del MemoryStream.create +del MemoryStream.destroy + + +FileStream.AccessMode_Read = AccessMode_Read +FileStream.AccessMode_Write = AccessMode_Write +FileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +FileStream.OpenMode_Binary = OpenMode_Binary +FileStream.OpenMode_Text = OpenMode_Text + +MemoryMappedFileStream.AccessMode_Read = AccessMode_Read +MemoryMappedFileStream.AccessMode_Write = AccessMode_Write +MemoryMappedFileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +class StringView(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def c_str(self): + return _py3dna.StringView_c_str(self) + + def __ref__(self): + return _py3dna.StringView___ref__(self) + + def __init__(self): + _py3dna.StringView_swiginit(self, _py3dna.new_StringView()) + __swig_destroy__ = _py3dna.delete_StringView + +# Register StringView in _py3dna: +_py3dna.StringView_swigregister(StringView) + + +def __add__(*args): + return _py3dna.__add__(*args) + +def __sub__(*args): + return _py3dna.__sub__(*args) + +def __mul__(*args): + return _py3dna.__mul__(*args) + +def __truediv__(*args): + return _py3dna.__truediv__(*args) + +def __eq__(*args): + return _py3dna.__eq__(*args) + +def __ne__(*args): + return _py3dna.__ne__(*args) +DataLayer_Descriptor = _py3dna.DataLayer_Descriptor +DataLayer_Definition = _py3dna.DataLayer_Definition +DataLayer_Behavior = _py3dna.DataLayer_Behavior +DataLayer_Geometry = _py3dna.DataLayer_Geometry +DataLayer_GeometryWithoutBlendShapes = _py3dna.DataLayer_GeometryWithoutBlendShapes +DataLayer_AllWithoutBlendShapes = _py3dna.DataLayer_AllWithoutBlendShapes +DataLayer_All = _py3dna.DataLayer_All +Archetype_asian = _py3dna.Archetype_asian +Archetype_black = _py3dna.Archetype_black +Archetype_caucasian = _py3dna.Archetype_caucasian +Archetype_hispanic = _py3dna.Archetype_hispanic +Archetype_alien = _py3dna.Archetype_alien +Archetype_other = _py3dna.Archetype_other +Gender_male = _py3dna.Gender_male +Gender_female = _py3dna.Gender_female +Gender_other = _py3dna.Gender_other +TranslationUnit_cm = _py3dna.TranslationUnit_cm +TranslationUnit_m = _py3dna.TranslationUnit_m +RotationUnit_degrees = _py3dna.RotationUnit_degrees +RotationUnit_radians = _py3dna.RotationUnit_radians +Direction_left = _py3dna.Direction_left +Direction_right = _py3dna.Direction_right +Direction_up = _py3dna.Direction_up +Direction_down = _py3dna.Direction_down +Direction_front = _py3dna.Direction_front +Direction_back = _py3dna.Direction_back +class CoordinateSystem(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + xAxis = property(_py3dna.CoordinateSystem_xAxis_get, _py3dna.CoordinateSystem_xAxis_set) + yAxis = property(_py3dna.CoordinateSystem_yAxis_get, _py3dna.CoordinateSystem_yAxis_set) + zAxis = property(_py3dna.CoordinateSystem_zAxis_get, _py3dna.CoordinateSystem_zAxis_set) + + def __init__(self): + _py3dna.CoordinateSystem_swiginit(self, _py3dna.new_CoordinateSystem()) + __swig_destroy__ = _py3dna.delete_CoordinateSystem + +# Register CoordinateSystem in _py3dna: +_py3dna.CoordinateSystem_swigregister(CoordinateSystem) + +class DescriptorReader(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getName(self): + return _py3dna.DescriptorReader_getName(self) + + def getArchetype(self): + return _py3dna.DescriptorReader_getArchetype(self) + + def getGender(self): + return _py3dna.DescriptorReader_getGender(self) + + def getAge(self): + return _py3dna.DescriptorReader_getAge(self) + + def getMetaDataCount(self): + return _py3dna.DescriptorReader_getMetaDataCount(self) + + def getMetaDataKey(self, index): + return _py3dna.DescriptorReader_getMetaDataKey(self, index) + + def getMetaDataValue(self, key): + return _py3dna.DescriptorReader_getMetaDataValue(self, key) + + def getTranslationUnit(self): + return _py3dna.DescriptorReader_getTranslationUnit(self) + + def getRotationUnit(self): + return _py3dna.DescriptorReader_getRotationUnit(self) + + def getCoordinateSystem(self): + return _py3dna.DescriptorReader_getCoordinateSystem(self) + + def getLODCount(self): + return _py3dna.DescriptorReader_getLODCount(self) + + def getDBMaxLOD(self): + return _py3dna.DescriptorReader_getDBMaxLOD(self) + + def getDBComplexity(self): + return _py3dna.DescriptorReader_getDBComplexity(self) + + def getDBName(self): + return _py3dna.DescriptorReader_getDBName(self) + +# Register DescriptorReader in _py3dna: +_py3dna.DescriptorReader_swigregister(DescriptorReader) + +class MeshBlendShapeChannelMapping(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + meshIndex = property(_py3dna.MeshBlendShapeChannelMapping_meshIndex_get, _py3dna.MeshBlendShapeChannelMapping_meshIndex_set) + blendShapeChannelIndex = property(_py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_get, _py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_set) + + def __init__(self): + _py3dna.MeshBlendShapeChannelMapping_swiginit(self, _py3dna.new_MeshBlendShapeChannelMapping()) + __swig_destroy__ = _py3dna.delete_MeshBlendShapeChannelMapping + +# Register MeshBlendShapeChannelMapping in _py3dna: +_py3dna.MeshBlendShapeChannelMapping_swigregister(MeshBlendShapeChannelMapping) + +class DefinitionReader(DescriptorReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIControlCount(self): + return _py3dna.DefinitionReader_getGUIControlCount(self) + + def getGUIControlName(self, index): + return _py3dna.DefinitionReader_getGUIControlName(self, index) + + def getRawControlCount(self): + return _py3dna.DefinitionReader_getRawControlCount(self) + + def getRawControlName(self, index): + return _py3dna.DefinitionReader_getRawControlName(self, index) + + def getJointCount(self): + return _py3dna.DefinitionReader_getJointCount(self) + + def getJointName(self, index): + return _py3dna.DefinitionReader_getJointName(self, index) + + def getJointIndexListCount(self): + return _py3dna.DefinitionReader_getJointIndexListCount(self) + + def getJointIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getJointIndicesForLOD(self, lod) + + def getJointParentIndex(self, index): + return _py3dna.DefinitionReader_getJointParentIndex(self, index) + + def getBlendShapeChannelCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelCount(self) + + def getBlendShapeChannelName(self, index): + return _py3dna.DefinitionReader_getBlendShapeChannelName(self, index) + + def getBlendShapeChannelIndexListCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelIndexListCount(self) + + def getBlendShapeChannelIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getBlendShapeChannelIndicesForLOD(self, lod) + + def getAnimatedMapCount(self): + return _py3dna.DefinitionReader_getAnimatedMapCount(self) + + def getAnimatedMapName(self, index): + return _py3dna.DefinitionReader_getAnimatedMapName(self, index) + + def getAnimatedMapIndexListCount(self): + return _py3dna.DefinitionReader_getAnimatedMapIndexListCount(self) + + def getAnimatedMapIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getAnimatedMapIndicesForLOD(self, lod) + + def getMeshCount(self): + return _py3dna.DefinitionReader_getMeshCount(self) + + def getMeshName(self, index): + return _py3dna.DefinitionReader_getMeshName(self, index) + + def getMeshIndexListCount(self): + return _py3dna.DefinitionReader_getMeshIndexListCount(self) + + def getMeshIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshIndicesForLOD(self, lod) + + def getMeshBlendShapeChannelMappingCount(self): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingCount(self) + + def getMeshBlendShapeChannelMapping(self, index): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMapping(self, index) + + def getMeshBlendShapeChannelMappingIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingIndicesForLOD(self, lod) + + def getNeutralJointTranslation(self, index): + return _py3dna.DefinitionReader_getNeutralJointTranslation(self, index) + + def getNeutralJointTranslationXs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationXs(self) + + def getNeutralJointTranslationYs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationYs(self) + + def getNeutralJointTranslationZs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationZs(self) + + def getNeutralJointRotation(self, index): + return _py3dna.DefinitionReader_getNeutralJointRotation(self, index) + + def getNeutralJointRotationXs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationXs(self) + + def getNeutralJointRotationYs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationYs(self) + + def getNeutralJointRotationZs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationZs(self) + +# Register DefinitionReader in _py3dna: +_py3dna.DefinitionReader_swigregister(DefinitionReader) + +class BehaviorReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIToRawInputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawInputIndices(self) + + def getGUIToRawOutputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawOutputIndices(self) + + def getGUIToRawFromValues(self): + return _py3dna.BehaviorReader_getGUIToRawFromValues(self) + + def getGUIToRawToValues(self): + return _py3dna.BehaviorReader_getGUIToRawToValues(self) + + def getGUIToRawSlopeValues(self): + return _py3dna.BehaviorReader_getGUIToRawSlopeValues(self) + + def getGUIToRawCutValues(self): + return _py3dna.BehaviorReader_getGUIToRawCutValues(self) + + def getPSDCount(self): + return _py3dna.BehaviorReader_getPSDCount(self) + + def getPSDRowIndices(self): + return _py3dna.BehaviorReader_getPSDRowIndices(self) + + def getPSDColumnIndices(self): + return _py3dna.BehaviorReader_getPSDColumnIndices(self) + + def getPSDValues(self): + return _py3dna.BehaviorReader_getPSDValues(self) + + def getJointRowCount(self): + return _py3dna.BehaviorReader_getJointRowCount(self) + + def getJointColumnCount(self): + return _py3dna.BehaviorReader_getJointColumnCount(self) + + def getJointVariableAttributeIndices(self, lod): + return _py3dna.BehaviorReader_getJointVariableAttributeIndices(self, lod) + + def getJointGroupCount(self): + return _py3dna.BehaviorReader_getJointGroupCount(self) + + def getJointGroupLODs(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupLODs(self, jointGroupIndex) + + def getJointGroupInputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupInputIndices(self, jointGroupIndex) + + def getJointGroupOutputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupOutputIndices(self, jointGroupIndex) + + def getJointGroupValues(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupValues(self, jointGroupIndex) + + def getJointGroupJointIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupJointIndices(self, jointGroupIndex) + + def getBlendShapeChannelLODs(self): + return _py3dna.BehaviorReader_getBlendShapeChannelLODs(self) + + def getBlendShapeChannelInputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelInputIndices(self) + + def getBlendShapeChannelOutputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelOutputIndices(self) + + def getAnimatedMapLODs(self): + return _py3dna.BehaviorReader_getAnimatedMapLODs(self) + + def getAnimatedMapInputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapInputIndices(self) + + def getAnimatedMapOutputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapOutputIndices(self) + + def getAnimatedMapFromValues(self): + return _py3dna.BehaviorReader_getAnimatedMapFromValues(self) + + def getAnimatedMapToValues(self): + return _py3dna.BehaviorReader_getAnimatedMapToValues(self) + + def getAnimatedMapSlopeValues(self): + return _py3dna.BehaviorReader_getAnimatedMapSlopeValues(self) + + def getAnimatedMapCutValues(self): + return _py3dna.BehaviorReader_getAnimatedMapCutValues(self) + +# Register BehaviorReader in _py3dna: +_py3dna.BehaviorReader_swigregister(BehaviorReader) + +class GeometryReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getVertexPositionCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionCount(self, meshIndex) + + def getVertexPosition(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getVertexPosition(self, meshIndex, vertexIndex) + + def getVertexPositionXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionXs(self, meshIndex) + + def getVertexPositionYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionYs(self, meshIndex) + + def getVertexPositionZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionZs(self, meshIndex) + + def getVertexTextureCoordinateCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateCount(self, meshIndex) + + def getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex) + + def getVertexTextureCoordinateUs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateUs(self, meshIndex) + + def getVertexTextureCoordinateVs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateVs(self, meshIndex) + + def getVertexNormalCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalCount(self, meshIndex) + + def getVertexNormal(self, meshIndex, normalIndex): + return _py3dna.GeometryReader_getVertexNormal(self, meshIndex, normalIndex) + + def getVertexNormalXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalXs(self, meshIndex) + + def getVertexNormalYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalYs(self, meshIndex) + + def getVertexNormalZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalZs(self, meshIndex) + + def getVertexLayoutCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutCount(self, meshIndex) + + def getVertexLayout(self, meshIndex, layoutIndex): + return _py3dna.GeometryReader_getVertexLayout(self, meshIndex, layoutIndex) + + def getVertexLayoutPositionIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutPositionIndices(self, meshIndex) + + def getVertexLayoutTextureCoordinateIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutTextureCoordinateIndices(self, meshIndex) + + def getVertexLayoutNormalIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutNormalIndices(self, meshIndex) + + def getFaceCount(self, meshIndex): + return _py3dna.GeometryReader_getFaceCount(self, meshIndex) + + def getFaceVertexLayoutIndices(self, meshIndex, faceIndex): + return _py3dna.GeometryReader_getFaceVertexLayoutIndices(self, meshIndex, faceIndex) + + def getMaximumInfluencePerVertex(self, meshIndex): + return _py3dna.GeometryReader_getMaximumInfluencePerVertex(self, meshIndex) + + def getSkinWeightsCount(self, meshIndex): + return _py3dna.GeometryReader_getSkinWeightsCount(self, meshIndex) + + def getSkinWeightsValues(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsValues(self, meshIndex, vertexIndex) + + def getSkinWeightsJointIndices(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsJointIndices(self, meshIndex, vertexIndex) + + def getBlendShapeTargetCount(self, meshIndex): + return _py3dna.GeometryReader_getBlendShapeTargetCount(self, meshIndex) + + def getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex) + + def getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex) + +# Register GeometryReader in _py3dna: +_py3dna.GeometryReader_swigregister(GeometryReader) + +class Reader(BehaviorReader, GeometryReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Reader + + def unload(self, layer): + return _py3dna.Reader_unload(self, layer) + +# Register Reader in _py3dna: +_py3dna.Reader_swigregister(Reader) + +class StreamReader(Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamReader + + def read(self): + return _py3dna.StreamReader_read(self) + +# Register StreamReader in _py3dna: +_py3dna.StreamReader_swigregister(StreamReader) +StreamReader.SignatureMismatchError = _py3dna.cvar.StreamReader_SignatureMismatchError +StreamReader.VersionMismatchError = _py3dna.cvar.StreamReader_VersionMismatchError +StreamReader.InvalidDataError = _py3dna.cvar.StreamReader_InvalidDataError + +class BinaryStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.BinaryStreamReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamReader + +# Register BinaryStreamReader in _py3dna: +_py3dna.BinaryStreamReader_swigregister(BinaryStreamReader) + +def BinaryStreamReader_create(*args): + return _py3dna.BinaryStreamReader_create(*args) + +def BinaryStreamReader_destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + +class JSONStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamReader + +# Register JSONStreamReader in _py3dna: +_py3dna.JSONStreamReader_swigregister(JSONStreamReader) + +def JSONStreamReader_create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + +def JSONStreamReader_destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + + +BinaryStreamReader.__new__ = __new_decorator(BinaryStreamReader_create, BinaryStreamReader.__new__) +BinaryStreamReader.__del__ = lambda instance: BinaryStreamReader_destroy(instance) +BinaryStreamReader.__init__ = __managed_init +del BinaryStreamReader.create +del BinaryStreamReader.destroy + + +JSONStreamReader.__new__ = __new_decorator(JSONStreamReader_create, JSONStreamReader.__new__) +JSONStreamReader.__del__ = lambda instance: JSONStreamReader_destroy(instance) +JSONStreamReader.__init__ = __managed_init +del JSONStreamReader.create +del JSONStreamReader.destroy + +class DescriptorWriter(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setName(self, name): + return _py3dna.DescriptorWriter_setName(self, name) + + def setArchetype(self, archetype): + return _py3dna.DescriptorWriter_setArchetype(self, archetype) + + def setGender(self, gender): + return _py3dna.DescriptorWriter_setGender(self, gender) + + def setAge(self, age): + return _py3dna.DescriptorWriter_setAge(self, age) + + def clearMetaData(self): + return _py3dna.DescriptorWriter_clearMetaData(self) + + def setMetaData(self, key, value): + return _py3dna.DescriptorWriter_setMetaData(self, key, value) + + def setTranslationUnit(self, unit): + return _py3dna.DescriptorWriter_setTranslationUnit(self, unit) + + def setRotationUnit(self, unit): + return _py3dna.DescriptorWriter_setRotationUnit(self, unit) + + def setCoordinateSystem(self, system): + return _py3dna.DescriptorWriter_setCoordinateSystem(self, system) + + def setLODCount(self, lodCount): + return _py3dna.DescriptorWriter_setLODCount(self, lodCount) + + def setDBMaxLOD(self, lod): + return _py3dna.DescriptorWriter_setDBMaxLOD(self, lod) + + def setDBComplexity(self, name): + return _py3dna.DescriptorWriter_setDBComplexity(self, name) + + def setDBName(self, name): + return _py3dna.DescriptorWriter_setDBName(self, name) + +# Register DescriptorWriter in _py3dna: +_py3dna.DescriptorWriter_swigregister(DescriptorWriter) + +class DefinitionWriter(DescriptorWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearGUIControlNames(self): + return _py3dna.DefinitionWriter_clearGUIControlNames(self) + + def setGUIControlName(self, index, name): + return _py3dna.DefinitionWriter_setGUIControlName(self, index, name) + + def clearRawControlNames(self): + return _py3dna.DefinitionWriter_clearRawControlNames(self) + + def setRawControlName(self, index, name): + return _py3dna.DefinitionWriter_setRawControlName(self, index, name) + + def clearJointNames(self): + return _py3dna.DefinitionWriter_clearJointNames(self) + + def setJointName(self, index, name): + return _py3dna.DefinitionWriter_setJointName(self, index, name) + + def clearJointIndices(self): + return _py3dna.DefinitionWriter_clearJointIndices(self) + + def setJointIndices(self, index, jointIndices): + return _py3dna.DefinitionWriter_setJointIndices(self, index, jointIndices) + + def clearLODJointMappings(self): + return _py3dna.DefinitionWriter_clearLODJointMappings(self) + + def setLODJointMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODJointMapping(self, lod, index) + + def clearBlendShapeChannelNames(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelNames(self) + + def setBlendShapeChannelName(self, index, name): + return _py3dna.DefinitionWriter_setBlendShapeChannelName(self, index, name) + + def clearBlendShapeChannelIndices(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelIndices(self) + + def setBlendShapeChannelIndices(self, index, blendShapeChannelIndices): + return _py3dna.DefinitionWriter_setBlendShapeChannelIndices(self, index, blendShapeChannelIndices) + + def clearLODBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearLODBlendShapeChannelMappings(self) + + def setLODBlendShapeChannelMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODBlendShapeChannelMapping(self, lod, index) + + def clearAnimatedMapNames(self): + return _py3dna.DefinitionWriter_clearAnimatedMapNames(self) + + def setAnimatedMapName(self, index, name): + return _py3dna.DefinitionWriter_setAnimatedMapName(self, index, name) + + def clearAnimatedMapIndices(self): + return _py3dna.DefinitionWriter_clearAnimatedMapIndices(self) + + def setAnimatedMapIndices(self, index, animatedMapIndices): + return _py3dna.DefinitionWriter_setAnimatedMapIndices(self, index, animatedMapIndices) + + def clearLODAnimatedMapMappings(self): + return _py3dna.DefinitionWriter_clearLODAnimatedMapMappings(self) + + def setLODAnimatedMapMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODAnimatedMapMapping(self, lod, index) + + def clearMeshNames(self): + return _py3dna.DefinitionWriter_clearMeshNames(self) + + def setMeshName(self, index, name): + return _py3dna.DefinitionWriter_setMeshName(self, index, name) + + def clearMeshIndices(self): + return _py3dna.DefinitionWriter_clearMeshIndices(self) + + def setMeshIndices(self, index, meshIndices): + return _py3dna.DefinitionWriter_setMeshIndices(self, index, meshIndices) + + def clearLODMeshMappings(self): + return _py3dna.DefinitionWriter_clearLODMeshMappings(self) + + def setLODMeshMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODMeshMapping(self, lod, index) + + def clearMeshBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearMeshBlendShapeChannelMappings(self) + + def setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex): + return _py3dna.DefinitionWriter_setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex) + + def setJointHierarchy(self, jointIndices): + return _py3dna.DefinitionWriter_setJointHierarchy(self, jointIndices) + + def setNeutralJointTranslations(self, translations): + return _py3dna.DefinitionWriter_setNeutralJointTranslations(self, translations) + + def setNeutralJointRotations(self, rotations): + return _py3dna.DefinitionWriter_setNeutralJointRotations(self, rotations) + +# Register DefinitionWriter in _py3dna: +_py3dna.DefinitionWriter_swigregister(DefinitionWriter) + +class BehaviorWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setGUIToRawInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setGUIToRawInputIndices(self, inputIndices) + + def setGUIToRawOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setGUIToRawOutputIndices(self, outputIndices) + + def setGUIToRawFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setGUIToRawFromValues(self, fromValues) + + def setGUIToRawToValues(self, toValues): + return _py3dna.BehaviorWriter_setGUIToRawToValues(self, toValues) + + def setGUIToRawSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setGUIToRawSlopeValues(self, slopeValues) + + def setGUIToRawCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setGUIToRawCutValues(self, cutValues) + + def setPSDCount(self, count): + return _py3dna.BehaviorWriter_setPSDCount(self, count) + + def setPSDRowIndices(self, rowIndices): + return _py3dna.BehaviorWriter_setPSDRowIndices(self, rowIndices) + + def setPSDColumnIndices(self, columnIndices): + return _py3dna.BehaviorWriter_setPSDColumnIndices(self, columnIndices) + + def setPSDValues(self, weights): + return _py3dna.BehaviorWriter_setPSDValues(self, weights) + + def setJointRowCount(self, rowCount): + return _py3dna.BehaviorWriter_setJointRowCount(self, rowCount) + + def setJointColumnCount(self, columnCount): + return _py3dna.BehaviorWriter_setJointColumnCount(self, columnCount) + + def clearJointGroups(self): + return _py3dna.BehaviorWriter_clearJointGroups(self) + + def deleteJointGroup(self, jointGroupIndex): + return _py3dna.BehaviorWriter_deleteJointGroup(self, jointGroupIndex) + + def setJointGroupLODs(self, jointGroupIndex, lods): + return _py3dna.BehaviorWriter_setJointGroupLODs(self, jointGroupIndex, lods) + + def setJointGroupInputIndices(self, jointGroupIndex, inputIndices): + return _py3dna.BehaviorWriter_setJointGroupInputIndices(self, jointGroupIndex, inputIndices) + + def setJointGroupOutputIndices(self, jointGroupIndex, outputIndices): + return _py3dna.BehaviorWriter_setJointGroupOutputIndices(self, jointGroupIndex, outputIndices) + + def setJointGroupValues(self, jointGroupIndex, values): + return _py3dna.BehaviorWriter_setJointGroupValues(self, jointGroupIndex, values) + + def setJointGroupJointIndices(self, jointGroupIndex, jointIndices): + return _py3dna.BehaviorWriter_setJointGroupJointIndices(self, jointGroupIndex, jointIndices) + + def setBlendShapeChannelLODs(self, lods): + return _py3dna.BehaviorWriter_setBlendShapeChannelLODs(self, lods) + + def setBlendShapeChannelInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelInputIndices(self, inputIndices) + + def setBlendShapeChannelOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelOutputIndices(self, outputIndices) + + def setAnimatedMapLODs(self, lods): + return _py3dna.BehaviorWriter_setAnimatedMapLODs(self, lods) + + def setAnimatedMapInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapInputIndices(self, inputIndices) + + def setAnimatedMapOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapOutputIndices(self, outputIndices) + + def setAnimatedMapFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setAnimatedMapFromValues(self, fromValues) + + def setAnimatedMapToValues(self, toValues): + return _py3dna.BehaviorWriter_setAnimatedMapToValues(self, toValues) + + def setAnimatedMapSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setAnimatedMapSlopeValues(self, slopeValues) + + def setAnimatedMapCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setAnimatedMapCutValues(self, cutValues) + +# Register BehaviorWriter in _py3dna: +_py3dna.BehaviorWriter_swigregister(BehaviorWriter) + +class GeometryWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearMeshes(self): + return _py3dna.GeometryWriter_clearMeshes(self) + + def deleteMesh(self, meshIndex): + return _py3dna.GeometryWriter_deleteMesh(self, meshIndex) + + def setVertexPositions(self, meshIndex, positions): + return _py3dna.GeometryWriter_setVertexPositions(self, meshIndex, positions) + + def setVertexTextureCoordinates(self, meshIndex, textureCoordinates): + return _py3dna.GeometryWriter_setVertexTextureCoordinates(self, meshIndex, textureCoordinates) + + def setVertexNormals(self, meshIndex, normals): + return _py3dna.GeometryWriter_setVertexNormals(self, meshIndex, normals) + + def setVertexLayouts(self, meshIndex, layouts): + return _py3dna.GeometryWriter_setVertexLayouts(self, meshIndex, layouts) + + def clearFaceVertexLayoutIndices(self, meshIndex): + return _py3dna.GeometryWriter_clearFaceVertexLayoutIndices(self, meshIndex) + + def setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices): + return _py3dna.GeometryWriter_setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices) + + def setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount): + return _py3dna.GeometryWriter_setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount) + + def clearSkinWeights(self, meshIndex): + return _py3dna.GeometryWriter_clearSkinWeights(self, meshIndex) + + def setSkinWeightsValues(self, meshIndex, vertexIndex, weights): + return _py3dna.GeometryWriter_setSkinWeightsValues(self, meshIndex, vertexIndex, weights) + + def setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices): + return _py3dna.GeometryWriter_setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices) + + def clearBlendShapeTargets(self, meshIndex): + return _py3dna.GeometryWriter_clearBlendShapeTargets(self, meshIndex) + + def setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex): + return _py3dna.GeometryWriter_setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex) + + def setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas): + return _py3dna.GeometryWriter_setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas) + + def setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices): + return _py3dna.GeometryWriter_setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices) + +# Register GeometryWriter in _py3dna: +_py3dna.GeometryWriter_swigregister(GeometryWriter) + +class Writer(BehaviorWriter, GeometryWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Writer + + def setFrom(self, *args): + return _py3dna.Writer_setFrom(self, *args) + +# Register Writer in _py3dna: +_py3dna.Writer_swigregister(Writer) + +class StreamWriter(Writer): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamWriter + + def write(self): + return _py3dna.StreamWriter_write(self) + +# Register StreamWriter in _py3dna: +_py3dna.StreamWriter_swigregister(StreamWriter) + +class BinaryStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamWriter + +# Register BinaryStreamWriter in _py3dna: +_py3dna.BinaryStreamWriter_swigregister(BinaryStreamWriter) + +def BinaryStreamWriter_create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + +def BinaryStreamWriter_destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + +class JSONStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamWriter + +# Register JSONStreamWriter in _py3dna: +_py3dna.JSONStreamWriter_swigregister(JSONStreamWriter) + +def JSONStreamWriter_create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + +def JSONStreamWriter_destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + + +BinaryStreamWriter.__new__ = __new_decorator(BinaryStreamWriter_create, BinaryStreamWriter.__new__) +BinaryStreamWriter.__del__ = lambda instance: BinaryStreamWriter_destroy(instance) +BinaryStreamWriter.__init__ = __managed_init +del BinaryStreamWriter.create +del BinaryStreamWriter.destroy + + +JSONStreamWriter.__new__ = __new_decorator(JSONStreamWriter_create, JSONStreamWriter.__new__) +JSONStreamWriter.__del__ = lambda instance: JSONStreamWriter_destroy(instance) +JSONStreamWriter.__init__ = __managed_init +del JSONStreamWriter.create +del JSONStreamWriter.destroy + + + diff --git a/plugins/Linux/pydna/python397/libdna.so.7.1.0 b/plugins/Linux/pydna/python397/libdna.so.7.1.0 new file mode 100644 index 0000000..285776d Binary files /dev/null and b/plugins/Linux/pydna/python397/libdna.so.7.1.0 differ diff --git a/plugins/Windows/2018/MayaUE4RBFPlugin2018.mll b/plugins/Windows/2018/MayaUE4RBFPlugin2018.mll new file mode 100644 index 0000000..7b330ca Binary files /dev/null and b/plugins/Windows/2018/MayaUE4RBFPlugin2018.mll differ diff --git a/plugins/Windows/2018/MayaUERBFPlugin.mll b/plugins/Windows/2018/MayaUERBFPlugin.mll new file mode 100644 index 0000000..982b9ef Binary files /dev/null and b/plugins/Windows/2018/MayaUERBFPlugin.mll differ diff --git a/plugins/Windows/2018/embeddedRL4.mll b/plugins/Windows/2018/embeddedRL4.mll new file mode 100644 index 0000000..dcecdcc Binary files /dev/null and b/plugins/Windows/2018/embeddedRL4.mll differ diff --git a/plugins/Windows/2019/MayaUE4RBFPlugin2019.mll b/plugins/Windows/2019/MayaUE4RBFPlugin2019.mll new file mode 100644 index 0000000..a518b44 Binary files /dev/null and b/plugins/Windows/2019/MayaUE4RBFPlugin2019.mll differ diff --git a/plugins/Windows/2019/MayaUERBFPlugin.mll b/plugins/Windows/2019/MayaUERBFPlugin.mll new file mode 100644 index 0000000..00adda7 Binary files /dev/null and b/plugins/Windows/2019/MayaUERBFPlugin.mll differ diff --git a/plugins/Windows/2019/embeddedRL4.mll b/plugins/Windows/2019/embeddedRL4.mll new file mode 100644 index 0000000..eac7f9c Binary files /dev/null and b/plugins/Windows/2019/embeddedRL4.mll differ diff --git a/plugins/Windows/2020/MayaUE4RBFPlugin2020.mll b/plugins/Windows/2020/MayaUE4RBFPlugin2020.mll new file mode 100644 index 0000000..2c59128 Binary files /dev/null and b/plugins/Windows/2020/MayaUE4RBFPlugin2020.mll differ diff --git a/plugins/Windows/2020/MayaUERBFPlugin.mll b/plugins/Windows/2020/MayaUERBFPlugin.mll new file mode 100644 index 0000000..77427eb Binary files /dev/null and b/plugins/Windows/2020/MayaUERBFPlugin.mll differ diff --git a/plugins/Windows/2020/embeddedRL4.mll b/plugins/Windows/2020/embeddedRL4.mll new file mode 100644 index 0000000..7eb1a93 Binary files /dev/null and b/plugins/Windows/2020/embeddedRL4.mll differ diff --git a/plugins/Windows/2022/MayaUE4RBFPlugin2022.mll b/plugins/Windows/2022/MayaUE4RBFPlugin2022.mll new file mode 100644 index 0000000..2a74e29 Binary files /dev/null and b/plugins/Windows/2022/MayaUE4RBFPlugin2022.mll differ diff --git a/plugins/Windows/2022/MayaUERBFPlugin.mll b/plugins/Windows/2022/MayaUERBFPlugin.mll new file mode 100644 index 0000000..e0d83d4 Binary files /dev/null and b/plugins/Windows/2022/MayaUERBFPlugin.mll differ diff --git a/plugins/Windows/2022/_py3dnacalib.pyd b/plugins/Windows/2022/_py3dnacalib.pyd new file mode 100644 index 0000000..daf8f57 Binary files /dev/null and b/plugins/Windows/2022/_py3dnacalib.pyd differ diff --git a/plugins/Windows/2022/dnacalib.dll b/plugins/Windows/2022/dnacalib.dll new file mode 100644 index 0000000..d85a926 Binary files /dev/null and b/plugins/Windows/2022/dnacalib.dll differ diff --git a/plugins/Windows/2022/dnacalib.py b/plugins/Windows/2022/dnacalib.py new file mode 100644 index 0000000..49cf7ee --- /dev/null +++ b/plugins/Windows/2022/dnacalib.py @@ -0,0 +1,1127 @@ +# This file was automatically generated by SWIG (https://www.swig.org). +# Version 4.1.1 +# +# Do not make changes to this file unless you know what you are doing - modify +# the SWIG interface file instead. + + +import os +if hasattr(os, 'add_dll_directory'): + for path in os.environ.get('PATH', '').split(';'): + try: + if path: + os.add_dll_directory(path) + except Exception: + pass + + + +from sys import version_info as _swig_python_version_info +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dnacalib +else: + import _py3dnacalib + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "this": + set(self, name, value) + elif name == "thisown": + self.this.own(value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def with_metaclass(meta, *bases): + class metaclass(type): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + + @classmethod + def __prepare__(cls, name, this_bases): + return meta.__prepare__(name, bases) + return type.__new__(metaclass, 'temporary_class', (), {}) + +import dna +class VersionInfo(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + + @staticmethod + def getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + + @staticmethod + def getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + + @staticmethod + def getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + + def __init__(self): + _py3dnacalib.VersionInfo_swiginit(self, _py3dnacalib.new_VersionInfo()) + __swig_destroy__ = _py3dnacalib.delete_VersionInfo + +# Register VersionInfo in _py3dnacalib: +_py3dnacalib.VersionInfo_swigregister(VersionInfo) +class DNACalibDNAReader(dna.Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + +# Register DNACalibDNAReader in _py3dnacalib: +_py3dnacalib.DNACalibDNAReader_swigregister(DNACalibDNAReader) + +DNACalibDNAReaderImpl = DNACalibDNAReader + +class DNACalibDNAReaderImplReflectionMixin(type): + + def __getattr__(cls, name): + return getattr(DNACalibDNAReaderImpl, name) + + def __dir__(cls): + return [name for name in dir(DNACalibDNAReaderImpl) if name not in ("create","destroy")] + +class DNACalibDNAReader(with_metaclass(DNACalibDNAReaderImplReflectionMixin, object)): + __slots__ = ('_args', '_kwargs', '_instance') + + def __init__(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + self._instance = DNACalibDNAReaderImpl.create(*args, **kwargs) + + def __del__(self): + DNACalibDNAReaderImpl.destroy(self._instance) + + def _in_slots(self, attr): + for cls in type(self).__mro__: + if attr in getattr(cls, '__slots__', []): + return True + return False + + def __getattr__(self, attr): + if self._in_slots(attr): + return object.__getattr__(self, attr) + return getattr(self._instance, attr) + + def __setattr__(self, attr, value): + if self._in_slots(attr): + object.__setattr__(self, attr, value) + else: + setattr(self._instance, attr, value) + + def __dir__(self): + return [name for name in self._instance.__dir__() if name not in ("create","destroy")] + +class Command(object): + r""" Command is an abstract class whose implementations are expected to modify the DNA provided in the run() method in some way.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_Command + + def run(self, output): + return _py3dnacalib.Command_run(self, output) + +# Register Command in _py3dnacalib: +_py3dnacalib.Command_swigregister(Command) +VectorOperation_Interpolate = _py3dnacalib.VectorOperation_Interpolate +VectorOperation_Add = _py3dnacalib.VectorOperation_Add +VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract +VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply +class CommandSequence(Command): + r""" + CommandSequence is used to run a sequence of commands on the same DNA. + Notes: + Commands will be run in the order in which they were added to the sequence. + + CommandSequence holds pointers to commands, but does not own them. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CommandSequence + + def __init__(self, *args): + _py3dnacalib.CommandSequence_swiginit(self, _py3dnacalib.new_CommandSequence(*args)) + + def run(self, output): + return _py3dnacalib.CommandSequence_run(self, output) + + def add(self, command): + r""" + Method for adding a command to a sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to add. + """ + return _py3dnacalib.CommandSequence_add(self, command) + + def remove(self, command): + r""" + Method for removing a command from the sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to remove. + """ + return _py3dnacalib.CommandSequence_remove(self, command) + + def contains(self, command): + r""" + Method for checking if the provided command is part of the command sequence. + :type command: :py:class:`Command` + :param command: + The command to check. + """ + return _py3dnacalib.CommandSequence_contains(self, command) + + def size(self): + r""" Number of commands in command sequence.""" + return _py3dnacalib.CommandSequence_size(self) + +# Register CommandSequence in _py3dnacalib: +_py3dnacalib.CommandSequence_swigregister(CommandSequence) + +def command_sequence_init(_init): + def wrapper(self, *args, **kwargs): + self._commands = [] + _init(self, *args, **kwargs) + return wrapper + +def command_sequence_add(_add): + def wrapper(self, command): + self._commands.append(command) + _add(self, command) + return wrapper + +def command_sequence_remove(_remove): + def wrapper(self, command): + self._commands.remove(command) + _remove(self, command) + return wrapper + +CommandSequence.__init__ = command_sequence_init(CommandSequence.__init__) +CommandSequence.add = command_sequence_add(CommandSequence.add) +CommandSequence.remove = command_sequence_remove(CommandSequence.remove) + +class CalculateMeshLowerLODsCommand(Command): + r""" + CalculateMeshLowerLODsCommand is used to recalculate vertex positions for lower LOD meshes of the specified mesh. + Notes: + The calculation is done based on vertex positions of the specified mesh and vertex texture coordinates of its lower LOD meshes. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand + + def __init__(self, *args): + _py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to calculate lower LOD meshes from. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex) + + def run(self, output): + return _py3dnacalib.CalculateMeshLowerLODsCommand_run(self, output) + +# Register CalculateMeshLowerLODsCommand in _py3dnacalib: +_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand) +class ClearBlendShapesCommand(Command): + r""" + ClearBlendShapesCommand is used to clear all blend shapes data from a DNA. + Notes: This command clears blend shape target deltas and blend shape animation data. By doing so, it transforms the DNA to be "joints only". + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand + + def __init__(self, *args): + _py3dnacalib.ClearBlendShapesCommand_swiginit(self, _py3dnacalib.new_ClearBlendShapesCommand(*args)) + + def run(self, output): + return _py3dnacalib.ClearBlendShapesCommand_run(self, output) + +# Register ClearBlendShapesCommand in _py3dnacalib: +_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand) +class PruneBlendShapeTargetsCommand(Command): + r""" PruneBlendShapeTargetsCommand is used to prune blend shape target deltas whose absolute magnitude is less than or equal to the specified threshold.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand + + def __init__(self, *args): + _py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args)) + + def setThreshold(self, threshold): + r""" + Method for setting the threshold for pruning blend shape target deltas. + :type threshold: float + :param threshold: + The threshold to use. + """ + return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold) + + def run(self, output): + return _py3dnacalib.PruneBlendShapeTargetsCommand_run(self, output) + +# Register PruneBlendShapeTargetsCommand in _py3dnacalib: +_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand) +class RemoveAnimatedMapCommand(Command): + r""" RemoveAnimatedMapCommand is used to remove animated maps.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args)) + + def setAnimatedMapIndex(self, animatedMapIndex): + r""" + Method for setting the index of the animated map to remove. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex) + + def setAnimatedMapIndices(self, animatedMapIndices): + r""" + Method for setting the indices of animated maps to remove. + :type animatedMapIndices: dnac::ConstArrayView< std::uint16_t > + :param animatedMapIndices: + The animated map indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices) + + def run(self, output): + return _py3dnacalib.RemoveAnimatedMapCommand_run(self, output) + +# Register RemoveAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand) +class RemoveBlendShapeCommand(Command): + r""" RemoveBlendShapeCommand is used to remove blend shapes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args)) + + def setBlendShapeIndex(self, blendShapeIndex): + r""" + Method for setting the index of the blend shape to remove. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex) + + def setBlendShapeIndices(self, blendShapeIndices): + r""" + Method for setting the indices of blend shapes to remove. + :type blendShapeIndices: dnac::ConstArrayView< std::uint16_t > + :param blendShapeIndices: + The blend shape indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices) + + def run(self, output): + return _py3dnacalib.RemoveBlendShapeCommand_run(self, output) + +# Register RemoveBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand) +class RemoveJointAnimationCommand(Command): + r""" RemoveJointAnimationCommand is used to remove joint animation data.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of a joint whose animation data to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints whose animation data to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointAnimationCommand_run(self, output) + +# Register RemoveJointAnimationCommand in _py3dnacalib: +_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand) +class RemoveJointCommand(Command): + r""" RemoveJointCommand is used to remove joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of the joint to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointCommand_run(self, output) + +# Register RemoveJointCommand in _py3dnacalib: +_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand) +class RemoveMeshCommand(Command): + r""" RemoveMeshCommand is used to remove meshes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand + + def __init__(self, *args): + _py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to remove. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex) + + def setMeshIndices(self, meshIndices): + r""" + Method for setting the indices of meshes to remove. + :type meshIndices: dnac::ConstArrayView< std::uint16_t > + :param meshIndices: + The mesh indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set mesh(es) will be removed. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices) + + def run(self, output): + return _py3dnacalib.RemoveMeshCommand_run(self, output) + +# Register RemoveMeshCommand in _py3dnacalib: +_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand) +class RenameAnimatedMapCommand(Command): + r""" RenameAnimatedMapCommand is used to rename an animated map.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for animated map with given index. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + + | + + *Overload 2:* + + Method for setting a new name for animated map with given name. + Notes: + The renaming will not happen if there is no animated map with given current name. + :type oldName: string + :param oldName: + The current name of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + """ + return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameAnimatedMapCommand_run(self, output) + +# Register RenameAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand) +class RenameBlendShapeCommand(Command): + r""" RenameBlendShapeCommand is used to rename a blend shape channel.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for blend shape channel with given index. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + + | + + *Overload 2:* + + Method for setting a new name for blend shape channel with given name. + Notes: + The renaming will not happen if there is no blend shape channel with given current name. + :type oldName: string + :param oldName: + The current name of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + """ + return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameBlendShapeCommand_run(self, output) + +# Register RenameBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand) +class RenameJointCommand(Command): + r""" RenameJointCommand is used to rename a joint.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameJointCommand + + def __init__(self, *args): + _py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for joint with given index. + :type jointIndex: int + :param jointIndex: + The index of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + + | + + *Overload 2:* + + Method for setting a new name for joint with given name. + Notes: + The renaming will not happen if there is no joint with given current name. + :type oldName: string + :param oldName: + The current name of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + """ + return _py3dnacalib.RenameJointCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameJointCommand_run(self, output) + +# Register RenameJointCommand in _py3dnacalib: +_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand) +class RenameMeshCommand(Command): + r""" RenameMeshCommand is used to rename a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand + + def __init__(self, *args): + _py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for mesh with given index. + :type meshIndex: int + :param meshIndex: + The index of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + + | + + *Overload 2:* + + Method for setting a new name for mesh with given name. + Notes: + The renaming will not happen if there is no mesh with given current name. + :type oldName: string + :param oldName: + The current name of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + """ + return _py3dnacalib.RenameMeshCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameMeshCommand_run(self, output) + +# Register RenameMeshCommand in _py3dnacalib: +_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand) +class RotateCommand(Command): + r""" + RotateCommand is used to rotate neutral joints and vertex positions around given origin. + Notes: + Joint rotations are represented in parent space, so it is enough to rotate only root joints, as that rotation will be propagated to the rest of the joints. + + If the origin is not set, the assumed origin is (0, 0, 0). + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RotateCommand + + def __init__(self, *args): + _py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args)) + + def setRotation(self, degrees): + r""" + Method for setting the rotation angles. + :type degrees: dnac::Vector3 + :param degrees: + Rotation angles in degrees. + """ + return _py3dnacalib.RotateCommand_setRotation(self, degrees) + + def setOrigin(self, origin): + r""" + Method for setting the rotation origin. + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.RotateCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.RotateCommand_run(self, output) + +# Register RotateCommand in _py3dnacalib: +_py3dnacalib.RotateCommand_swigregister(RotateCommand) +class ScaleCommand(Command): + r""" + ScaleCommand is used to scale neutral joints, vertex positions and joint and blendshape deltas by a factor. + Notes: + Only translation attributes of neutral joints and joint deltas are scaled. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ScaleCommand + + def __init__(self, *args): + _py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args)) + + def setScale(self, scale): + r""" + Method for setting the scale factor to multiply with. + :type scale: float + :param scale: + Scale factor. + """ + return _py3dnacalib.ScaleCommand_setScale(self, scale) + + def setOrigin(self, origin): + r""" + Method for setting the origin. + Notes: The origin is used to properly scale position values (vertex positions and neutral joint translations). + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.ScaleCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.ScaleCommand_run(self, output) + +# Register ScaleCommand in _py3dnacalib: +_py3dnacalib.ScaleCommand_swigregister(ScaleCommand) +class SetBlendShapeTargetDeltasCommand(Command): + r""" SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand + + def __init__(self, *args): + _py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh whose blend shape target to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex) + + def setBlendShapeTargetIndex(self, blendShapeTargetIndex): + r""" + Method for setting the index of the blend shape target to change. + :type blendShapeTargetIndex: int + :param blendShapeTargetIndex: + The blend shape target index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex) + + def setDeltas(self, *args): + r""" + *Overload 1:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type deltas: dnac::ConstArrayView< dnac::Vector3 > + :param deltas: + The values used in calculation. + + | + + *Overload 2:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X values for each delta. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y values for each delta. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z values for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args) + + def setVertexIndices(self, vertexIndices): + r""" + Method for setting the vertex indices that correspond to new deltas. + :type vertexIndices: dnac::ConstArrayView< std::uint32_t > + :param vertexIndices: + The vertexIndices. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices) + + def setMasks(self, masks): + r""" + Method for setting masks used to calculate new deltas for blend shape target. + Notes: + If no masks are set, default weight value of 1 is used for each delta. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new deltas for blend shape target. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each delta is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new deltas that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_run(self, output) + +# Register SetBlendShapeTargetDeltasCommand in _py3dnacalib: +_py3dnacalib.SetBlendShapeTargetDeltasCommand_swigregister(SetBlendShapeTargetDeltasCommand) +cvar = _py3dnacalib.cvar +SetBlendShapeTargetDeltasCommand.VertexIndicesOutOfBoundsError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_VertexIndicesOutOfBoundsError +SetBlendShapeTargetDeltasCommand.NoVertexIndicesSetError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_NoVertexIndicesSetError +SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasVertexIndicesCountMismatch +SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch + +class SetLODsCommand(Command): + r""" SetLODsCommand is used to specify LODs to use. Joints, blend shapes, animated maps and meshes that are not in specified LODs are removed from the DNA.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetLODsCommand + + def __init__(self, *args): + _py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args)) + + def setLODs(self, lods): + r""" + Method for setting the LODs to keep. + :type lods: dnac::ConstArrayView< std::uint16_t > + :param lods: + New LODs to be used. + """ + return _py3dnacalib.SetLODsCommand_setLODs(self, lods) + + def run(self, output): + return _py3dnacalib.SetLODsCommand_run(self, output) + +# Register SetLODsCommand in _py3dnacalib: +_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand) +class SetNeutralJointRotationsCommand(Command): + r""" SetNeutralJointRotationsCommand is used to set new rotation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args)) + + def setRotations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint rotations. + :type rotations: dnac::ConstArrayView< dnac::Vector3 > + :param rotations: + Rotation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint rotations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X rotation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y rotation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z rotation value for each joint. + """ + return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointRotationsCommand_run(self, output) + +# Register SetNeutralJointRotationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand) +class SetNeutralJointTranslationsCommand(Command): + r""" SetNeutralJointTranslationsCommand is used to set new translation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args)) + + def setTranslations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint translations. + :type translations: dnac::ConstArrayView< dnac::Vector3 > + :param translations: + Translation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint translations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X translation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y translation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z translation value for each joint. + """ + return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointTranslationsCommand_run(self, output) + +# Register SetNeutralJointTranslationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand) +class SetSkinWeightsCommand(Command): + r""" SetSkinWeightsCommand is used to set new skin weights for a vertex in a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand + + def __init__(self, *args): + _py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the targeted mesh. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex) + + def setVertexIndex(self, vertexIndex): + r""" + Method for setting the index of the vertex to change. + :type vertexIndex: int + :param vertexIndex: + The vertex index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex) + + def setWeights(self, weights): + r""" + Method for setting the weights with which joints influence the vertex in question. + :type weights: dnac::ConstArrayView< float > + :param weights: + Weights for each joint that has an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the joint indices of joints that influence the vertex in question. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + Joint indices of joints that have an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.SetSkinWeightsCommand_run(self, output) + +# Register SetSkinWeightsCommand in _py3dnacalib: +_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand) +class SetVertexPositionsCommand(Command): + r""" SetVertexPositionsCommand is used to change vertex positions values.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand + + def __init__(self, *args): + _py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex) + + def setPositions(self, *args): + r""" + *Overload 1:* + + Method for setting the vertex positions used to calculate new values. + :type positions: dnac::ConstArrayView< dnac::Vector3 > + :param positions: + The vertex positions. + + | + + *Overload 2:* + + Method for setting the vertex positions used to calculate new values. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X coordinates for each vertex. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y coordinates for each vertex. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z coordinates for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args) + + def setMasks(self, masks): + r""" + Method for setting vertex masks used to calculate new vertex position values. + Notes: + If no masks are set, default weight value of 1 is used for each vertex. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new vertex position values. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each position is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new positions that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetVertexPositionsCommand_run(self, output) + +# Register SetVertexPositionsCommand in _py3dnacalib: +_py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand) +SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch + +class TranslateCommand(Command): + r""" + TranslateCommand is used to translate neutral joints and vertex positions. + Notes: + Joint translations are represented in parent space, so it is enough to translate only root joints, as that translation will be propagated to the rest of the joints. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_TranslateCommand + + def __init__(self, *args): + _py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args)) + + def setTranslation(self, translation): + r""" + Method for setting the translation vector. + :type translation: dnac::Vector3 + :param translation: + The translation vector. + """ + return _py3dnacalib.TranslateCommand_setTranslation(self, translation) + + def run(self, output): + return _py3dnacalib.TranslateCommand_run(self, output) + +# Register TranslateCommand in _py3dnacalib: +_py3dnacalib.TranslateCommand_swigregister(TranslateCommand) + diff --git a/plugins/Windows/2022/embeddedRL4.mll b/plugins/Windows/2022/embeddedRL4.mll new file mode 100644 index 0000000..586a76f Binary files /dev/null and b/plugins/Windows/2022/embeddedRL4.mll differ diff --git a/plugins/Windows/2023/MayaUE4RBFPlugin2023.mll b/plugins/Windows/2023/MayaUE4RBFPlugin2023.mll new file mode 100644 index 0000000..956e91b Binary files /dev/null and b/plugins/Windows/2023/MayaUE4RBFPlugin2023.mll differ diff --git a/plugins/Windows/2023/MayaUERBFPlugin.mll b/plugins/Windows/2023/MayaUERBFPlugin.mll new file mode 100644 index 0000000..8900114 Binary files /dev/null and b/plugins/Windows/2023/MayaUERBFPlugin.mll differ diff --git a/plugins/Windows/2023/_py3dnacalib.pyd b/plugins/Windows/2023/_py3dnacalib.pyd new file mode 100644 index 0000000..9cc29b1 Binary files /dev/null and b/plugins/Windows/2023/_py3dnacalib.pyd differ diff --git a/plugins/Windows/2023/dnacalib.dll b/plugins/Windows/2023/dnacalib.dll new file mode 100644 index 0000000..ce8a943 Binary files /dev/null and b/plugins/Windows/2023/dnacalib.dll differ diff --git a/plugins/Windows/2023/dnacalib.py b/plugins/Windows/2023/dnacalib.py new file mode 100644 index 0000000..49cf7ee --- /dev/null +++ b/plugins/Windows/2023/dnacalib.py @@ -0,0 +1,1127 @@ +# This file was automatically generated by SWIG (https://www.swig.org). +# Version 4.1.1 +# +# Do not make changes to this file unless you know what you are doing - modify +# the SWIG interface file instead. + + +import os +if hasattr(os, 'add_dll_directory'): + for path in os.environ.get('PATH', '').split(';'): + try: + if path: + os.add_dll_directory(path) + except Exception: + pass + + + +from sys import version_info as _swig_python_version_info +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dnacalib +else: + import _py3dnacalib + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "this": + set(self, name, value) + elif name == "thisown": + self.this.own(value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def with_metaclass(meta, *bases): + class metaclass(type): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + + @classmethod + def __prepare__(cls, name, this_bases): + return meta.__prepare__(name, bases) + return type.__new__(metaclass, 'temporary_class', (), {}) + +import dna +class VersionInfo(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + + @staticmethod + def getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + + @staticmethod + def getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + + @staticmethod + def getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + + def __init__(self): + _py3dnacalib.VersionInfo_swiginit(self, _py3dnacalib.new_VersionInfo()) + __swig_destroy__ = _py3dnacalib.delete_VersionInfo + +# Register VersionInfo in _py3dnacalib: +_py3dnacalib.VersionInfo_swigregister(VersionInfo) +class DNACalibDNAReader(dna.Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + +# Register DNACalibDNAReader in _py3dnacalib: +_py3dnacalib.DNACalibDNAReader_swigregister(DNACalibDNAReader) + +DNACalibDNAReaderImpl = DNACalibDNAReader + +class DNACalibDNAReaderImplReflectionMixin(type): + + def __getattr__(cls, name): + return getattr(DNACalibDNAReaderImpl, name) + + def __dir__(cls): + return [name for name in dir(DNACalibDNAReaderImpl) if name not in ("create","destroy")] + +class DNACalibDNAReader(with_metaclass(DNACalibDNAReaderImplReflectionMixin, object)): + __slots__ = ('_args', '_kwargs', '_instance') + + def __init__(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + self._instance = DNACalibDNAReaderImpl.create(*args, **kwargs) + + def __del__(self): + DNACalibDNAReaderImpl.destroy(self._instance) + + def _in_slots(self, attr): + for cls in type(self).__mro__: + if attr in getattr(cls, '__slots__', []): + return True + return False + + def __getattr__(self, attr): + if self._in_slots(attr): + return object.__getattr__(self, attr) + return getattr(self._instance, attr) + + def __setattr__(self, attr, value): + if self._in_slots(attr): + object.__setattr__(self, attr, value) + else: + setattr(self._instance, attr, value) + + def __dir__(self): + return [name for name in self._instance.__dir__() if name not in ("create","destroy")] + +class Command(object): + r""" Command is an abstract class whose implementations are expected to modify the DNA provided in the run() method in some way.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_Command + + def run(self, output): + return _py3dnacalib.Command_run(self, output) + +# Register Command in _py3dnacalib: +_py3dnacalib.Command_swigregister(Command) +VectorOperation_Interpolate = _py3dnacalib.VectorOperation_Interpolate +VectorOperation_Add = _py3dnacalib.VectorOperation_Add +VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract +VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply +class CommandSequence(Command): + r""" + CommandSequence is used to run a sequence of commands on the same DNA. + Notes: + Commands will be run in the order in which they were added to the sequence. + + CommandSequence holds pointers to commands, but does not own them. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CommandSequence + + def __init__(self, *args): + _py3dnacalib.CommandSequence_swiginit(self, _py3dnacalib.new_CommandSequence(*args)) + + def run(self, output): + return _py3dnacalib.CommandSequence_run(self, output) + + def add(self, command): + r""" + Method for adding a command to a sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to add. + """ + return _py3dnacalib.CommandSequence_add(self, command) + + def remove(self, command): + r""" + Method for removing a command from the sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to remove. + """ + return _py3dnacalib.CommandSequence_remove(self, command) + + def contains(self, command): + r""" + Method for checking if the provided command is part of the command sequence. + :type command: :py:class:`Command` + :param command: + The command to check. + """ + return _py3dnacalib.CommandSequence_contains(self, command) + + def size(self): + r""" Number of commands in command sequence.""" + return _py3dnacalib.CommandSequence_size(self) + +# Register CommandSequence in _py3dnacalib: +_py3dnacalib.CommandSequence_swigregister(CommandSequence) + +def command_sequence_init(_init): + def wrapper(self, *args, **kwargs): + self._commands = [] + _init(self, *args, **kwargs) + return wrapper + +def command_sequence_add(_add): + def wrapper(self, command): + self._commands.append(command) + _add(self, command) + return wrapper + +def command_sequence_remove(_remove): + def wrapper(self, command): + self._commands.remove(command) + _remove(self, command) + return wrapper + +CommandSequence.__init__ = command_sequence_init(CommandSequence.__init__) +CommandSequence.add = command_sequence_add(CommandSequence.add) +CommandSequence.remove = command_sequence_remove(CommandSequence.remove) + +class CalculateMeshLowerLODsCommand(Command): + r""" + CalculateMeshLowerLODsCommand is used to recalculate vertex positions for lower LOD meshes of the specified mesh. + Notes: + The calculation is done based on vertex positions of the specified mesh and vertex texture coordinates of its lower LOD meshes. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand + + def __init__(self, *args): + _py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to calculate lower LOD meshes from. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex) + + def run(self, output): + return _py3dnacalib.CalculateMeshLowerLODsCommand_run(self, output) + +# Register CalculateMeshLowerLODsCommand in _py3dnacalib: +_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand) +class ClearBlendShapesCommand(Command): + r""" + ClearBlendShapesCommand is used to clear all blend shapes data from a DNA. + Notes: This command clears blend shape target deltas and blend shape animation data. By doing so, it transforms the DNA to be "joints only". + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand + + def __init__(self, *args): + _py3dnacalib.ClearBlendShapesCommand_swiginit(self, _py3dnacalib.new_ClearBlendShapesCommand(*args)) + + def run(self, output): + return _py3dnacalib.ClearBlendShapesCommand_run(self, output) + +# Register ClearBlendShapesCommand in _py3dnacalib: +_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand) +class PruneBlendShapeTargetsCommand(Command): + r""" PruneBlendShapeTargetsCommand is used to prune blend shape target deltas whose absolute magnitude is less than or equal to the specified threshold.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand + + def __init__(self, *args): + _py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args)) + + def setThreshold(self, threshold): + r""" + Method for setting the threshold for pruning blend shape target deltas. + :type threshold: float + :param threshold: + The threshold to use. + """ + return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold) + + def run(self, output): + return _py3dnacalib.PruneBlendShapeTargetsCommand_run(self, output) + +# Register PruneBlendShapeTargetsCommand in _py3dnacalib: +_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand) +class RemoveAnimatedMapCommand(Command): + r""" RemoveAnimatedMapCommand is used to remove animated maps.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args)) + + def setAnimatedMapIndex(self, animatedMapIndex): + r""" + Method for setting the index of the animated map to remove. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex) + + def setAnimatedMapIndices(self, animatedMapIndices): + r""" + Method for setting the indices of animated maps to remove. + :type animatedMapIndices: dnac::ConstArrayView< std::uint16_t > + :param animatedMapIndices: + The animated map indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices) + + def run(self, output): + return _py3dnacalib.RemoveAnimatedMapCommand_run(self, output) + +# Register RemoveAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand) +class RemoveBlendShapeCommand(Command): + r""" RemoveBlendShapeCommand is used to remove blend shapes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args)) + + def setBlendShapeIndex(self, blendShapeIndex): + r""" + Method for setting the index of the blend shape to remove. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex) + + def setBlendShapeIndices(self, blendShapeIndices): + r""" + Method for setting the indices of blend shapes to remove. + :type blendShapeIndices: dnac::ConstArrayView< std::uint16_t > + :param blendShapeIndices: + The blend shape indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices) + + def run(self, output): + return _py3dnacalib.RemoveBlendShapeCommand_run(self, output) + +# Register RemoveBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand) +class RemoveJointAnimationCommand(Command): + r""" RemoveJointAnimationCommand is used to remove joint animation data.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of a joint whose animation data to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints whose animation data to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointAnimationCommand_run(self, output) + +# Register RemoveJointAnimationCommand in _py3dnacalib: +_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand) +class RemoveJointCommand(Command): + r""" RemoveJointCommand is used to remove joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of the joint to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointCommand_run(self, output) + +# Register RemoveJointCommand in _py3dnacalib: +_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand) +class RemoveMeshCommand(Command): + r""" RemoveMeshCommand is used to remove meshes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand + + def __init__(self, *args): + _py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to remove. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex) + + def setMeshIndices(self, meshIndices): + r""" + Method for setting the indices of meshes to remove. + :type meshIndices: dnac::ConstArrayView< std::uint16_t > + :param meshIndices: + The mesh indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set mesh(es) will be removed. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices) + + def run(self, output): + return _py3dnacalib.RemoveMeshCommand_run(self, output) + +# Register RemoveMeshCommand in _py3dnacalib: +_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand) +class RenameAnimatedMapCommand(Command): + r""" RenameAnimatedMapCommand is used to rename an animated map.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for animated map with given index. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + + | + + *Overload 2:* + + Method for setting a new name for animated map with given name. + Notes: + The renaming will not happen if there is no animated map with given current name. + :type oldName: string + :param oldName: + The current name of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + """ + return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameAnimatedMapCommand_run(self, output) + +# Register RenameAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand) +class RenameBlendShapeCommand(Command): + r""" RenameBlendShapeCommand is used to rename a blend shape channel.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for blend shape channel with given index. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + + | + + *Overload 2:* + + Method for setting a new name for blend shape channel with given name. + Notes: + The renaming will not happen if there is no blend shape channel with given current name. + :type oldName: string + :param oldName: + The current name of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + """ + return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameBlendShapeCommand_run(self, output) + +# Register RenameBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand) +class RenameJointCommand(Command): + r""" RenameJointCommand is used to rename a joint.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameJointCommand + + def __init__(self, *args): + _py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for joint with given index. + :type jointIndex: int + :param jointIndex: + The index of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + + | + + *Overload 2:* + + Method for setting a new name for joint with given name. + Notes: + The renaming will not happen if there is no joint with given current name. + :type oldName: string + :param oldName: + The current name of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + """ + return _py3dnacalib.RenameJointCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameJointCommand_run(self, output) + +# Register RenameJointCommand in _py3dnacalib: +_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand) +class RenameMeshCommand(Command): + r""" RenameMeshCommand is used to rename a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand + + def __init__(self, *args): + _py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for mesh with given index. + :type meshIndex: int + :param meshIndex: + The index of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + + | + + *Overload 2:* + + Method for setting a new name for mesh with given name. + Notes: + The renaming will not happen if there is no mesh with given current name. + :type oldName: string + :param oldName: + The current name of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + """ + return _py3dnacalib.RenameMeshCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameMeshCommand_run(self, output) + +# Register RenameMeshCommand in _py3dnacalib: +_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand) +class RotateCommand(Command): + r""" + RotateCommand is used to rotate neutral joints and vertex positions around given origin. + Notes: + Joint rotations are represented in parent space, so it is enough to rotate only root joints, as that rotation will be propagated to the rest of the joints. + + If the origin is not set, the assumed origin is (0, 0, 0). + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RotateCommand + + def __init__(self, *args): + _py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args)) + + def setRotation(self, degrees): + r""" + Method for setting the rotation angles. + :type degrees: dnac::Vector3 + :param degrees: + Rotation angles in degrees. + """ + return _py3dnacalib.RotateCommand_setRotation(self, degrees) + + def setOrigin(self, origin): + r""" + Method for setting the rotation origin. + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.RotateCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.RotateCommand_run(self, output) + +# Register RotateCommand in _py3dnacalib: +_py3dnacalib.RotateCommand_swigregister(RotateCommand) +class ScaleCommand(Command): + r""" + ScaleCommand is used to scale neutral joints, vertex positions and joint and blendshape deltas by a factor. + Notes: + Only translation attributes of neutral joints and joint deltas are scaled. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ScaleCommand + + def __init__(self, *args): + _py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args)) + + def setScale(self, scale): + r""" + Method for setting the scale factor to multiply with. + :type scale: float + :param scale: + Scale factor. + """ + return _py3dnacalib.ScaleCommand_setScale(self, scale) + + def setOrigin(self, origin): + r""" + Method for setting the origin. + Notes: The origin is used to properly scale position values (vertex positions and neutral joint translations). + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.ScaleCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.ScaleCommand_run(self, output) + +# Register ScaleCommand in _py3dnacalib: +_py3dnacalib.ScaleCommand_swigregister(ScaleCommand) +class SetBlendShapeTargetDeltasCommand(Command): + r""" SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand + + def __init__(self, *args): + _py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh whose blend shape target to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex) + + def setBlendShapeTargetIndex(self, blendShapeTargetIndex): + r""" + Method for setting the index of the blend shape target to change. + :type blendShapeTargetIndex: int + :param blendShapeTargetIndex: + The blend shape target index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex) + + def setDeltas(self, *args): + r""" + *Overload 1:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type deltas: dnac::ConstArrayView< dnac::Vector3 > + :param deltas: + The values used in calculation. + + | + + *Overload 2:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X values for each delta. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y values for each delta. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z values for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args) + + def setVertexIndices(self, vertexIndices): + r""" + Method for setting the vertex indices that correspond to new deltas. + :type vertexIndices: dnac::ConstArrayView< std::uint32_t > + :param vertexIndices: + The vertexIndices. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices) + + def setMasks(self, masks): + r""" + Method for setting masks used to calculate new deltas for blend shape target. + Notes: + If no masks are set, default weight value of 1 is used for each delta. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new deltas for blend shape target. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each delta is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new deltas that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_run(self, output) + +# Register SetBlendShapeTargetDeltasCommand in _py3dnacalib: +_py3dnacalib.SetBlendShapeTargetDeltasCommand_swigregister(SetBlendShapeTargetDeltasCommand) +cvar = _py3dnacalib.cvar +SetBlendShapeTargetDeltasCommand.VertexIndicesOutOfBoundsError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_VertexIndicesOutOfBoundsError +SetBlendShapeTargetDeltasCommand.NoVertexIndicesSetError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_NoVertexIndicesSetError +SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasVertexIndicesCountMismatch +SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch + +class SetLODsCommand(Command): + r""" SetLODsCommand is used to specify LODs to use. Joints, blend shapes, animated maps and meshes that are not in specified LODs are removed from the DNA.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetLODsCommand + + def __init__(self, *args): + _py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args)) + + def setLODs(self, lods): + r""" + Method for setting the LODs to keep. + :type lods: dnac::ConstArrayView< std::uint16_t > + :param lods: + New LODs to be used. + """ + return _py3dnacalib.SetLODsCommand_setLODs(self, lods) + + def run(self, output): + return _py3dnacalib.SetLODsCommand_run(self, output) + +# Register SetLODsCommand in _py3dnacalib: +_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand) +class SetNeutralJointRotationsCommand(Command): + r""" SetNeutralJointRotationsCommand is used to set new rotation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args)) + + def setRotations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint rotations. + :type rotations: dnac::ConstArrayView< dnac::Vector3 > + :param rotations: + Rotation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint rotations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X rotation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y rotation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z rotation value for each joint. + """ + return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointRotationsCommand_run(self, output) + +# Register SetNeutralJointRotationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand) +class SetNeutralJointTranslationsCommand(Command): + r""" SetNeutralJointTranslationsCommand is used to set new translation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args)) + + def setTranslations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint translations. + :type translations: dnac::ConstArrayView< dnac::Vector3 > + :param translations: + Translation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint translations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X translation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y translation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z translation value for each joint. + """ + return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointTranslationsCommand_run(self, output) + +# Register SetNeutralJointTranslationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand) +class SetSkinWeightsCommand(Command): + r""" SetSkinWeightsCommand is used to set new skin weights for a vertex in a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand + + def __init__(self, *args): + _py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the targeted mesh. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex) + + def setVertexIndex(self, vertexIndex): + r""" + Method for setting the index of the vertex to change. + :type vertexIndex: int + :param vertexIndex: + The vertex index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex) + + def setWeights(self, weights): + r""" + Method for setting the weights with which joints influence the vertex in question. + :type weights: dnac::ConstArrayView< float > + :param weights: + Weights for each joint that has an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the joint indices of joints that influence the vertex in question. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + Joint indices of joints that have an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.SetSkinWeightsCommand_run(self, output) + +# Register SetSkinWeightsCommand in _py3dnacalib: +_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand) +class SetVertexPositionsCommand(Command): + r""" SetVertexPositionsCommand is used to change vertex positions values.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand + + def __init__(self, *args): + _py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex) + + def setPositions(self, *args): + r""" + *Overload 1:* + + Method for setting the vertex positions used to calculate new values. + :type positions: dnac::ConstArrayView< dnac::Vector3 > + :param positions: + The vertex positions. + + | + + *Overload 2:* + + Method for setting the vertex positions used to calculate new values. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X coordinates for each vertex. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y coordinates for each vertex. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z coordinates for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args) + + def setMasks(self, masks): + r""" + Method for setting vertex masks used to calculate new vertex position values. + Notes: + If no masks are set, default weight value of 1 is used for each vertex. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new vertex position values. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each position is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new positions that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetVertexPositionsCommand_run(self, output) + +# Register SetVertexPositionsCommand in _py3dnacalib: +_py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand) +SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch + +class TranslateCommand(Command): + r""" + TranslateCommand is used to translate neutral joints and vertex positions. + Notes: + Joint translations are represented in parent space, so it is enough to translate only root joints, as that translation will be propagated to the rest of the joints. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_TranslateCommand + + def __init__(self, *args): + _py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args)) + + def setTranslation(self, translation): + r""" + Method for setting the translation vector. + :type translation: dnac::Vector3 + :param translation: + The translation vector. + """ + return _py3dnacalib.TranslateCommand_setTranslation(self, translation) + + def run(self, output): + return _py3dnacalib.TranslateCommand_run(self, output) + +# Register TranslateCommand in _py3dnacalib: +_py3dnacalib.TranslateCommand_swigregister(TranslateCommand) + diff --git a/plugins/Windows/2023/embeddedRL4.mll b/plugins/Windows/2023/embeddedRL4.mll new file mode 100644 index 0000000..7ed5124 Binary files /dev/null and b/plugins/Windows/2023/embeddedRL4.mll differ diff --git a/plugins/Windows/2024/MayaUERBFPlugin.mll b/plugins/Windows/2024/MayaUERBFPlugin.mll new file mode 100644 index 0000000..d8e253d Binary files /dev/null and b/plugins/Windows/2024/MayaUERBFPlugin.mll differ diff --git a/plugins/Windows/2024/_py3dnacalib.pyd b/plugins/Windows/2024/_py3dnacalib.pyd new file mode 100644 index 0000000..930f396 Binary files /dev/null and b/plugins/Windows/2024/_py3dnacalib.pyd differ diff --git a/plugins/Windows/2024/dnacalib.dll b/plugins/Windows/2024/dnacalib.dll new file mode 100644 index 0000000..ed49237 Binary files /dev/null and b/plugins/Windows/2024/dnacalib.dll differ diff --git a/plugins/Windows/2024/dnacalib.py b/plugins/Windows/2024/dnacalib.py new file mode 100644 index 0000000..49cf7ee --- /dev/null +++ b/plugins/Windows/2024/dnacalib.py @@ -0,0 +1,1127 @@ +# This file was automatically generated by SWIG (https://www.swig.org). +# Version 4.1.1 +# +# Do not make changes to this file unless you know what you are doing - modify +# the SWIG interface file instead. + + +import os +if hasattr(os, 'add_dll_directory'): + for path in os.environ.get('PATH', '').split(';'): + try: + if path: + os.add_dll_directory(path) + except Exception: + pass + + + +from sys import version_info as _swig_python_version_info +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dnacalib +else: + import _py3dnacalib + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "this": + set(self, name, value) + elif name == "thisown": + self.this.own(value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def with_metaclass(meta, *bases): + class metaclass(type): + + def __new__(cls, name, this_bases, d): + return meta(name, bases, d) + + @classmethod + def __prepare__(cls, name, this_bases): + return meta.__prepare__(name, bases) + return type.__new__(metaclass, 'temporary_class', (), {}) + +import dna +class VersionInfo(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + + @staticmethod + def getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + + @staticmethod + def getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + + @staticmethod + def getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + + def __init__(self): + _py3dnacalib.VersionInfo_swiginit(self, _py3dnacalib.new_VersionInfo()) + __swig_destroy__ = _py3dnacalib.delete_VersionInfo + +# Register VersionInfo in _py3dnacalib: +_py3dnacalib.VersionInfo_swigregister(VersionInfo) +class DNACalibDNAReader(dna.Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + +# Register DNACalibDNAReader in _py3dnacalib: +_py3dnacalib.DNACalibDNAReader_swigregister(DNACalibDNAReader) + +DNACalibDNAReaderImpl = DNACalibDNAReader + +class DNACalibDNAReaderImplReflectionMixin(type): + + def __getattr__(cls, name): + return getattr(DNACalibDNAReaderImpl, name) + + def __dir__(cls): + return [name for name in dir(DNACalibDNAReaderImpl) if name not in ("create","destroy")] + +class DNACalibDNAReader(with_metaclass(DNACalibDNAReaderImplReflectionMixin, object)): + __slots__ = ('_args', '_kwargs', '_instance') + + def __init__(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + self._instance = DNACalibDNAReaderImpl.create(*args, **kwargs) + + def __del__(self): + DNACalibDNAReaderImpl.destroy(self._instance) + + def _in_slots(self, attr): + for cls in type(self).__mro__: + if attr in getattr(cls, '__slots__', []): + return True + return False + + def __getattr__(self, attr): + if self._in_slots(attr): + return object.__getattr__(self, attr) + return getattr(self._instance, attr) + + def __setattr__(self, attr, value): + if self._in_slots(attr): + object.__setattr__(self, attr, value) + else: + setattr(self._instance, attr, value) + + def __dir__(self): + return [name for name in self._instance.__dir__() if name not in ("create","destroy")] + +class Command(object): + r""" Command is an abstract class whose implementations are expected to modify the DNA provided in the run() method in some way.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_Command + + def run(self, output): + return _py3dnacalib.Command_run(self, output) + +# Register Command in _py3dnacalib: +_py3dnacalib.Command_swigregister(Command) +VectorOperation_Interpolate = _py3dnacalib.VectorOperation_Interpolate +VectorOperation_Add = _py3dnacalib.VectorOperation_Add +VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract +VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply +class CommandSequence(Command): + r""" + CommandSequence is used to run a sequence of commands on the same DNA. + Notes: + Commands will be run in the order in which they were added to the sequence. + + CommandSequence holds pointers to commands, but does not own them. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CommandSequence + + def __init__(self, *args): + _py3dnacalib.CommandSequence_swiginit(self, _py3dnacalib.new_CommandSequence(*args)) + + def run(self, output): + return _py3dnacalib.CommandSequence_run(self, output) + + def add(self, command): + r""" + Method for adding a command to a sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to add. + """ + return _py3dnacalib.CommandSequence_add(self, command) + + def remove(self, command): + r""" + Method for removing a command from the sequence of commands to run. + :type command: :py:class:`Command` + :param command: + The command to remove. + """ + return _py3dnacalib.CommandSequence_remove(self, command) + + def contains(self, command): + r""" + Method for checking if the provided command is part of the command sequence. + :type command: :py:class:`Command` + :param command: + The command to check. + """ + return _py3dnacalib.CommandSequence_contains(self, command) + + def size(self): + r""" Number of commands in command sequence.""" + return _py3dnacalib.CommandSequence_size(self) + +# Register CommandSequence in _py3dnacalib: +_py3dnacalib.CommandSequence_swigregister(CommandSequence) + +def command_sequence_init(_init): + def wrapper(self, *args, **kwargs): + self._commands = [] + _init(self, *args, **kwargs) + return wrapper + +def command_sequence_add(_add): + def wrapper(self, command): + self._commands.append(command) + _add(self, command) + return wrapper + +def command_sequence_remove(_remove): + def wrapper(self, command): + self._commands.remove(command) + _remove(self, command) + return wrapper + +CommandSequence.__init__ = command_sequence_init(CommandSequence.__init__) +CommandSequence.add = command_sequence_add(CommandSequence.add) +CommandSequence.remove = command_sequence_remove(CommandSequence.remove) + +class CalculateMeshLowerLODsCommand(Command): + r""" + CalculateMeshLowerLODsCommand is used to recalculate vertex positions for lower LOD meshes of the specified mesh. + Notes: + The calculation is done based on vertex positions of the specified mesh and vertex texture coordinates of its lower LOD meshes. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand + + def __init__(self, *args): + _py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to calculate lower LOD meshes from. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex) + + def run(self, output): + return _py3dnacalib.CalculateMeshLowerLODsCommand_run(self, output) + +# Register CalculateMeshLowerLODsCommand in _py3dnacalib: +_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand) +class ClearBlendShapesCommand(Command): + r""" + ClearBlendShapesCommand is used to clear all blend shapes data from a DNA. + Notes: This command clears blend shape target deltas and blend shape animation data. By doing so, it transforms the DNA to be "joints only". + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand + + def __init__(self, *args): + _py3dnacalib.ClearBlendShapesCommand_swiginit(self, _py3dnacalib.new_ClearBlendShapesCommand(*args)) + + def run(self, output): + return _py3dnacalib.ClearBlendShapesCommand_run(self, output) + +# Register ClearBlendShapesCommand in _py3dnacalib: +_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand) +class PruneBlendShapeTargetsCommand(Command): + r""" PruneBlendShapeTargetsCommand is used to prune blend shape target deltas whose absolute magnitude is less than or equal to the specified threshold.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand + + def __init__(self, *args): + _py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args)) + + def setThreshold(self, threshold): + r""" + Method for setting the threshold for pruning blend shape target deltas. + :type threshold: float + :param threshold: + The threshold to use. + """ + return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold) + + def run(self, output): + return _py3dnacalib.PruneBlendShapeTargetsCommand_run(self, output) + +# Register PruneBlendShapeTargetsCommand in _py3dnacalib: +_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand) +class RemoveAnimatedMapCommand(Command): + r""" RemoveAnimatedMapCommand is used to remove animated maps.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args)) + + def setAnimatedMapIndex(self, animatedMapIndex): + r""" + Method for setting the index of the animated map to remove. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex) + + def setAnimatedMapIndices(self, animatedMapIndices): + r""" + Method for setting the indices of animated maps to remove. + :type animatedMapIndices: dnac::ConstArrayView< std::uint16_t > + :param animatedMapIndices: + The animated map indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set animated map(s) will be removed. + """ + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices) + + def run(self, output): + return _py3dnacalib.RemoveAnimatedMapCommand_run(self, output) + +# Register RemoveAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand) +class RemoveBlendShapeCommand(Command): + r""" RemoveBlendShapeCommand is used to remove blend shapes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args)) + + def setBlendShapeIndex(self, blendShapeIndex): + r""" + Method for setting the index of the blend shape to remove. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex) + + def setBlendShapeIndices(self, blendShapeIndices): + r""" + Method for setting the indices of blend shapes to remove. + :type blendShapeIndices: dnac::ConstArrayView< std::uint16_t > + :param blendShapeIndices: + The blend shape indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set blend shape(s) will be removed. + """ + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices) + + def run(self, output): + return _py3dnacalib.RemoveBlendShapeCommand_run(self, output) + +# Register RemoveBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand) +class RemoveJointAnimationCommand(Command): + r""" RemoveJointAnimationCommand is used to remove joint animation data.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of a joint whose animation data to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints whose animation data to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint animation(s) will be removed. + """ + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointAnimationCommand_run(self, output) + +# Register RemoveJointAnimationCommand in _py3dnacalib: +_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand) +class RemoveJointCommand(Command): + r""" RemoveJointCommand is used to remove joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args)) + + def setJointIndex(self, jointIndex): + r""" + Method for setting the index of the joint to remove. + :type jointIndex: int + :param jointIndex: + The index of the joint. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the indices of joints to remove. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + The joint indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set joint(s) will be removed. + """ + return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointCommand_run(self, output) + +# Register RemoveJointCommand in _py3dnacalib: +_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand) +class RemoveMeshCommand(Command): + r""" RemoveMeshCommand is used to remove meshes.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand + + def __init__(self, *args): + _py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to remove. + :type meshIndex: int + :param meshIndex: + The index of the mesh. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex) + + def setMeshIndices(self, meshIndices): + r""" + Method for setting the indices of meshes to remove. + :type meshIndices: dnac::ConstArrayView< std::uint16_t > + :param meshIndices: + The mesh indices. + Notes: Call to either setter overwrites previous setter calls. When running the command, the last set mesh(es) will be removed. + """ + return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices) + + def run(self, output): + return _py3dnacalib.RemoveMeshCommand_run(self, output) + +# Register RemoveMeshCommand in _py3dnacalib: +_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand) +class RenameAnimatedMapCommand(Command): + r""" RenameAnimatedMapCommand is used to rename an animated map.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for animated map with given index. + :type animatedMapIndex: int + :param animatedMapIndex: + The index of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + + | + + *Overload 2:* + + Method for setting a new name for animated map with given name. + Notes: + The renaming will not happen if there is no animated map with given current name. + :type oldName: string + :param oldName: + The current name of the animated map whose name to change. + :type newName: string + :param newName: + The new name for the animated map. + """ + return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameAnimatedMapCommand_run(self, output) + +# Register RenameAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand) +class RenameBlendShapeCommand(Command): + r""" RenameBlendShapeCommand is used to rename a blend shape channel.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for blend shape channel with given index. + :type blendShapeIndex: int + :param blendShapeIndex: + The index of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + + | + + *Overload 2:* + + Method for setting a new name for blend shape channel with given name. + Notes: + The renaming will not happen if there is no blend shape channel with given current name. + :type oldName: string + :param oldName: + The current name of the blend shape channel whose name to change. + :type newName: string + :param newName: + The new name for the blend shape channel. + """ + return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameBlendShapeCommand_run(self, output) + +# Register RenameBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand) +class RenameJointCommand(Command): + r""" RenameJointCommand is used to rename a joint.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameJointCommand + + def __init__(self, *args): + _py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for joint with given index. + :type jointIndex: int + :param jointIndex: + The index of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + + | + + *Overload 2:* + + Method for setting a new name for joint with given name. + Notes: + The renaming will not happen if there is no joint with given current name. + :type oldName: string + :param oldName: + The current name of the joint whose name to change. + :type newName: string + :param newName: + The new name for the joint. + """ + return _py3dnacalib.RenameJointCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameJointCommand_run(self, output) + +# Register RenameJointCommand in _py3dnacalib: +_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand) +class RenameMeshCommand(Command): + r""" RenameMeshCommand is used to rename a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand + + def __init__(self, *args): + _py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args)) + + def setName(self, *args): + r""" + *Overload 1:* + + Method for setting a new name for mesh with given index. + :type meshIndex: int + :param meshIndex: + The index of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + + | + + *Overload 2:* + + Method for setting a new name for mesh with given name. + Notes: + The renaming will not happen if there is no mesh with given current name. + :type oldName: string + :param oldName: + The current name of the mesh whose name to change. + :type newName: string + :param newName: + The new name for the mesh. + """ + return _py3dnacalib.RenameMeshCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameMeshCommand_run(self, output) + +# Register RenameMeshCommand in _py3dnacalib: +_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand) +class RotateCommand(Command): + r""" + RotateCommand is used to rotate neutral joints and vertex positions around given origin. + Notes: + Joint rotations are represented in parent space, so it is enough to rotate only root joints, as that rotation will be propagated to the rest of the joints. + + If the origin is not set, the assumed origin is (0, 0, 0). + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RotateCommand + + def __init__(self, *args): + _py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args)) + + def setRotation(self, degrees): + r""" + Method for setting the rotation angles. + :type degrees: dnac::Vector3 + :param degrees: + Rotation angles in degrees. + """ + return _py3dnacalib.RotateCommand_setRotation(self, degrees) + + def setOrigin(self, origin): + r""" + Method for setting the rotation origin. + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.RotateCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.RotateCommand_run(self, output) + +# Register RotateCommand in _py3dnacalib: +_py3dnacalib.RotateCommand_swigregister(RotateCommand) +class ScaleCommand(Command): + r""" + ScaleCommand is used to scale neutral joints, vertex positions and joint and blendshape deltas by a factor. + Notes: + Only translation attributes of neutral joints and joint deltas are scaled. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ScaleCommand + + def __init__(self, *args): + _py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args)) + + def setScale(self, scale): + r""" + Method for setting the scale factor to multiply with. + :type scale: float + :param scale: + Scale factor. + """ + return _py3dnacalib.ScaleCommand_setScale(self, scale) + + def setOrigin(self, origin): + r""" + Method for setting the origin. + Notes: The origin is used to properly scale position values (vertex positions and neutral joint translations). + :type origin: dnac::Vector3 + :param origin: + Origin coordinates. + """ + return _py3dnacalib.ScaleCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.ScaleCommand_run(self, output) + +# Register ScaleCommand in _py3dnacalib: +_py3dnacalib.ScaleCommand_swigregister(ScaleCommand) +class SetBlendShapeTargetDeltasCommand(Command): + r""" SetBlendShapeTargetDeltasCommand is used to change blend shape target deltas.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand + + def __init__(self, *args): + _py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh whose blend shape target to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex) + + def setBlendShapeTargetIndex(self, blendShapeTargetIndex): + r""" + Method for setting the index of the blend shape target to change. + :type blendShapeTargetIndex: int + :param blendShapeTargetIndex: + The blend shape target index. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex) + + def setDeltas(self, *args): + r""" + *Overload 1:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type deltas: dnac::ConstArrayView< dnac::Vector3 > + :param deltas: + The values used in calculation. + + | + + *Overload 2:* + + Method for setting the values used to calculate new deltas for blend shape target. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X values for each delta. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y values for each delta. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z values for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args) + + def setVertexIndices(self, vertexIndices): + r""" + Method for setting the vertex indices that correspond to new deltas. + :type vertexIndices: dnac::ConstArrayView< std::uint32_t > + :param vertexIndices: + The vertexIndices. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices) + + def setMasks(self, masks): + r""" + Method for setting masks used to calculate new deltas for blend shape target. + Notes: + If no masks are set, default weight value of 1 is used for each delta. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each delta. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new deltas for blend shape target. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each delta is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new deltas that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_run(self, output) + +# Register SetBlendShapeTargetDeltasCommand in _py3dnacalib: +_py3dnacalib.SetBlendShapeTargetDeltasCommand_swigregister(SetBlendShapeTargetDeltasCommand) +cvar = _py3dnacalib.cvar +SetBlendShapeTargetDeltasCommand.VertexIndicesOutOfBoundsError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_VertexIndicesOutOfBoundsError +SetBlendShapeTargetDeltasCommand.NoVertexIndicesSetError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_NoVertexIndicesSetError +SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasVertexIndicesCountMismatch +SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch + +class SetLODsCommand(Command): + r""" SetLODsCommand is used to specify LODs to use. Joints, blend shapes, animated maps and meshes that are not in specified LODs are removed from the DNA.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetLODsCommand + + def __init__(self, *args): + _py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args)) + + def setLODs(self, lods): + r""" + Method for setting the LODs to keep. + :type lods: dnac::ConstArrayView< std::uint16_t > + :param lods: + New LODs to be used. + """ + return _py3dnacalib.SetLODsCommand_setLODs(self, lods) + + def run(self, output): + return _py3dnacalib.SetLODsCommand_run(self, output) + +# Register SetLODsCommand in _py3dnacalib: +_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand) +class SetNeutralJointRotationsCommand(Command): + r""" SetNeutralJointRotationsCommand is used to set new rotation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args)) + + def setRotations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint rotations. + :type rotations: dnac::ConstArrayView< dnac::Vector3 > + :param rotations: + Rotation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint rotations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X rotation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y rotation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z rotation value for each joint. + """ + return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointRotationsCommand_run(self, output) + +# Register SetNeutralJointRotationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand) +class SetNeutralJointTranslationsCommand(Command): + r""" SetNeutralJointTranslationsCommand is used to set new translation values to neutral joints.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args)) + + def setTranslations(self, *args): + r""" + *Overload 1:* + + Method for setting the neutral joint translations. + :type translations: dnac::ConstArrayView< dnac::Vector3 > + :param translations: + Translation values for each joint. + + | + + *Overload 2:* + + Method for setting the neutral joint translations. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X translation value for each joint. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y translation value for each joint. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z translation value for each joint. + """ + return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointTranslationsCommand_run(self, output) + +# Register SetNeutralJointTranslationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand) +class SetSkinWeightsCommand(Command): + r""" SetSkinWeightsCommand is used to set new skin weights for a vertex in a mesh.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand + + def __init__(self, *args): + _py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the targeted mesh. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex) + + def setVertexIndex(self, vertexIndex): + r""" + Method for setting the index of the vertex to change. + :type vertexIndex: int + :param vertexIndex: + The vertex index. + """ + return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex) + + def setWeights(self, weights): + r""" + Method for setting the weights with which joints influence the vertex in question. + :type weights: dnac::ConstArrayView< float > + :param weights: + Weights for each joint that has an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights) + + def setJointIndices(self, jointIndices): + r""" + Method for setting the joint indices of joints that influence the vertex in question. + :type jointIndices: dnac::ConstArrayView< std::uint16_t > + :param jointIndices: + Joint indices of joints that have an influence on the vertex. + """ + return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.SetSkinWeightsCommand_run(self, output) + +# Register SetSkinWeightsCommand in _py3dnacalib: +_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand) +class SetVertexPositionsCommand(Command): + r""" SetVertexPositionsCommand is used to change vertex positions values.""" + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand + + def __init__(self, *args): + _py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args)) + + def setMeshIndex(self, meshIndex): + r""" + Method for setting the index of the mesh to change. + :type meshIndex: int + :param meshIndex: + The mesh index. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex) + + def setPositions(self, *args): + r""" + *Overload 1:* + + Method for setting the vertex positions used to calculate new values. + :type positions: dnac::ConstArrayView< dnac::Vector3 > + :param positions: + The vertex positions. + + | + + *Overload 2:* + + Method for setting the vertex positions used to calculate new values. + :type xs: dnac::ConstArrayView< float > + :param xs: + The X coordinates for each vertex. + :type ys: dnac::ConstArrayView< float > + :param ys: + The Y coordinates for each vertex. + :type zs: dnac::ConstArrayView< float > + :param zs: + The Z coordinates for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args) + + def setMasks(self, masks): + r""" + Method for setting vertex masks used to calculate new vertex position values. + Notes: + If no masks are set, default weight value of 1 is used for each vertex. + :type masks: dnac::ConstArrayView< float > + :param masks: + The weights for each vertex. + """ + return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks) + + def setOperation(self, operation): + r""" + Method for setting the type of operation used to calculate new vertex position values. + Notes: + Available operations are: Interpolate, Add, Subtract and Multiply. Each position is calculated based on the provided operation type in the following way: + + Interpolate: = previousValue * (1 - weight) + setValue * weight:math:`\n Add: \f$newValue = previousValue + (setValue * weight)` + + Subtract: = previousValue - (setValue * weight):math:`\n Multiply: \f$newValue = previousValue * (setValue * weight)` + + + setValue is the value from new positions that were set, and weight is the value from masks array. + :type operation: int + :param operation: + The operation to use. + """ + return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetVertexPositionsCommand_run(self, output) + +# Register SetVertexPositionsCommand in _py3dnacalib: +_py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand) +SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch + +class TranslateCommand(Command): + r""" + TranslateCommand is used to translate neutral joints and vertex positions. + Notes: + Joint translations are represented in parent space, so it is enough to translate only root joints, as that translation will be propagated to the rest of the joints. + """ + + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_TranslateCommand + + def __init__(self, *args): + _py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args)) + + def setTranslation(self, translation): + r""" + Method for setting the translation vector. + :type translation: dnac::Vector3 + :param translation: + The translation vector. + """ + return _py3dnacalib.TranslateCommand_setTranslation(self, translation) + + def run(self, output): + return _py3dnacalib.TranslateCommand_run(self, output) + +# Register TranslateCommand in _py3dnacalib: +_py3dnacalib.TranslateCommand_swigregister(TranslateCommand) + diff --git a/plugins/Windows/2024/embeddedRL4.mll b/plugins/Windows/2024/embeddedRL4.mll new file mode 100644 index 0000000..9e1c849 Binary files /dev/null and b/plugins/Windows/2024/embeddedRL4.mll differ diff --git a/plugins/Windows/2025/MayaUERBFPlugin.mll b/plugins/Windows/2025/MayaUERBFPlugin.mll new file mode 100644 index 0000000..5f24e44 Binary files /dev/null and b/plugins/Windows/2025/MayaUERBFPlugin.mll differ diff --git a/plugins/Windows/2025/_py3dnacalib.pyd b/plugins/Windows/2025/_py3dnacalib.pyd new file mode 100644 index 0000000..38442a7 Binary files /dev/null and b/plugins/Windows/2025/_py3dnacalib.pyd differ diff --git a/plugins/Windows/2025/dnacalib.dll b/plugins/Windows/2025/dnacalib.dll new file mode 100644 index 0000000..ca3834f Binary files /dev/null and b/plugins/Windows/2025/dnacalib.dll differ diff --git a/plugins/Windows/2025/dnacalib.py b/plugins/Windows/2025/dnacalib.py new file mode 100644 index 0000000..8e4eca3 --- /dev/null +++ b/plugins/Windows/2025/dnacalib.py @@ -0,0 +1,633 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.1 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dnacalib +else: + import _py3dnacalib + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +import dna +class VersionInfo(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + + @staticmethod + def getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + + @staticmethod + def getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + + @staticmethod + def getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + + def __init__(self): + _py3dnacalib.VersionInfo_swiginit(self, _py3dnacalib.new_VersionInfo()) + __swig_destroy__ = _py3dnacalib.delete_VersionInfo + +# Register VersionInfo in _py3dnacalib: +_py3dnacalib.VersionInfo_swigregister(VersionInfo) + +def VersionInfo_getMajorVersion(): + return _py3dnacalib.VersionInfo_getMajorVersion() + +def VersionInfo_getMinorVersion(): + return _py3dnacalib.VersionInfo_getMinorVersion() + +def VersionInfo_getPatchVersion(): + return _py3dnacalib.VersionInfo_getPatchVersion() + +def VersionInfo_getVersionString(): + return _py3dnacalib.VersionInfo_getVersionString() + +class DNACalibDNAReader(dna.Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + +# Register DNACalibDNAReader in _py3dnacalib: +_py3dnacalib.DNACalibDNAReader_swigregister(DNACalibDNAReader) + +def DNACalibDNAReader_create(*args): + return _py3dnacalib.DNACalibDNAReader_create(*args) + +def DNACalibDNAReader_destroy(instance): + return _py3dnacalib.DNACalibDNAReader_destroy(instance) + + +DNACalibDNAReader.__new__ = __new_decorator(DNACalibDNAReader_create, DNACalibDNAReader.__new__) +DNACalibDNAReader.__del__ = lambda instance: DNACalibDNAReader_destroy(instance) +DNACalibDNAReader.__init__ = __managed_init +del DNACalibDNAReader.create +del DNACalibDNAReader.destroy + +class Command(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_Command + + def run(self, output): + return _py3dnacalib.Command_run(self, output) + +# Register Command in _py3dnacalib: +_py3dnacalib.Command_swigregister(Command) + +VectorOperation_Interpolate = _py3dnacalib.VectorOperation_Interpolate +VectorOperation_Add = _py3dnacalib.VectorOperation_Add +VectorOperation_Subtract = _py3dnacalib.VectorOperation_Subtract +VectorOperation_Multiply = _py3dnacalib.VectorOperation_Multiply +class CommandSequence(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CommandSequence + + def __init__(self, *args): + _py3dnacalib.CommandSequence_swiginit(self, _py3dnacalib.new_CommandSequence(*args)) + + def run(self, output): + return _py3dnacalib.CommandSequence_run(self, output) + + def add(self, command): + return _py3dnacalib.CommandSequence_add(self, command) + + def remove(self, command): + return _py3dnacalib.CommandSequence_remove(self, command) + + def contains(self, command): + return _py3dnacalib.CommandSequence_contains(self, command) + + def size(self): + return _py3dnacalib.CommandSequence_size(self) + +# Register CommandSequence in _py3dnacalib: +_py3dnacalib.CommandSequence_swigregister(CommandSequence) + + +def command_sequence_init(_init): + def wrapper(self, *args, **kwargs): + self._commands = [] + _init(self, *args, **kwargs) + return wrapper + +def command_sequence_add(_add): + def wrapper(self, command): + self._commands.append(command) + _add(self, command) + return wrapper + +def command_sequence_remove(_remove): + def wrapper(self, command): + self._commands.remove(command) + _remove(self, command) + return wrapper + +CommandSequence.__init__ = command_sequence_init(CommandSequence.__init__) +CommandSequence.add = command_sequence_add(CommandSequence.add) +CommandSequence.remove = command_sequence_remove(CommandSequence.remove) + +class CalculateMeshLowerLODsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_CalculateMeshLowerLODsCommand + + def __init__(self, *args): + _py3dnacalib.CalculateMeshLowerLODsCommand_swiginit(self, _py3dnacalib.new_CalculateMeshLowerLODsCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.CalculateMeshLowerLODsCommand_setMeshIndex(self, meshIndex) + + def run(self, output): + return _py3dnacalib.CalculateMeshLowerLODsCommand_run(self, output) + +# Register CalculateMeshLowerLODsCommand in _py3dnacalib: +_py3dnacalib.CalculateMeshLowerLODsCommand_swigregister(CalculateMeshLowerLODsCommand) + +class ClearBlendShapesCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ClearBlendShapesCommand + + def __init__(self, *args): + _py3dnacalib.ClearBlendShapesCommand_swiginit(self, _py3dnacalib.new_ClearBlendShapesCommand(*args)) + + def run(self, output): + return _py3dnacalib.ClearBlendShapesCommand_run(self, output) + +# Register ClearBlendShapesCommand in _py3dnacalib: +_py3dnacalib.ClearBlendShapesCommand_swigregister(ClearBlendShapesCommand) + +class PruneBlendShapeTargetsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_PruneBlendShapeTargetsCommand + + def __init__(self, *args): + _py3dnacalib.PruneBlendShapeTargetsCommand_swiginit(self, _py3dnacalib.new_PruneBlendShapeTargetsCommand(*args)) + + def setThreshold(self, threshold): + return _py3dnacalib.PruneBlendShapeTargetsCommand_setThreshold(self, threshold) + + def run(self, output): + return _py3dnacalib.PruneBlendShapeTargetsCommand_run(self, output) + +# Register PruneBlendShapeTargetsCommand in _py3dnacalib: +_py3dnacalib.PruneBlendShapeTargetsCommand_swigregister(PruneBlendShapeTargetsCommand) + +class RemoveAnimatedMapCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RemoveAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RemoveAnimatedMapCommand(*args)) + + def setAnimatedMapIndex(self, animatedMapIndex): + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndex(self, animatedMapIndex) + + def setAnimatedMapIndices(self, animatedMapIndices): + return _py3dnacalib.RemoveAnimatedMapCommand_setAnimatedMapIndices(self, animatedMapIndices) + + def run(self, output): + return _py3dnacalib.RemoveAnimatedMapCommand_run(self, output) + +# Register RemoveAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RemoveAnimatedMapCommand_swigregister(RemoveAnimatedMapCommand) + +class RemoveBlendShapeCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RemoveBlendShapeCommand_swiginit(self, _py3dnacalib.new_RemoveBlendShapeCommand(*args)) + + def setBlendShapeIndex(self, blendShapeIndex): + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndex(self, blendShapeIndex) + + def setBlendShapeIndices(self, blendShapeIndices): + return _py3dnacalib.RemoveBlendShapeCommand_setBlendShapeIndices(self, blendShapeIndices) + + def run(self, output): + return _py3dnacalib.RemoveBlendShapeCommand_run(self, output) + +# Register RemoveBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RemoveBlendShapeCommand_swigregister(RemoveBlendShapeCommand) + +class RemoveJointAnimationCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointAnimationCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointAnimationCommand_swiginit(self, _py3dnacalib.new_RemoveJointAnimationCommand(*args)) + + def setJointIndex(self, jointIndex): + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + return _py3dnacalib.RemoveJointAnimationCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointAnimationCommand_run(self, output) + +# Register RemoveJointAnimationCommand in _py3dnacalib: +_py3dnacalib.RemoveJointAnimationCommand_swigregister(RemoveJointAnimationCommand) + +class RemoveJointCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveJointCommand + + def __init__(self, *args): + _py3dnacalib.RemoveJointCommand_swiginit(self, _py3dnacalib.new_RemoveJointCommand(*args)) + + def setJointIndex(self, jointIndex): + return _py3dnacalib.RemoveJointCommand_setJointIndex(self, jointIndex) + + def setJointIndices(self, jointIndices): + return _py3dnacalib.RemoveJointCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.RemoveJointCommand_run(self, output) + +# Register RemoveJointCommand in _py3dnacalib: +_py3dnacalib.RemoveJointCommand_swigregister(RemoveJointCommand) + +class RemoveMeshCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RemoveMeshCommand + + def __init__(self, *args): + _py3dnacalib.RemoveMeshCommand_swiginit(self, _py3dnacalib.new_RemoveMeshCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.RemoveMeshCommand_setMeshIndex(self, meshIndex) + + def setMeshIndices(self, meshIndices): + return _py3dnacalib.RemoveMeshCommand_setMeshIndices(self, meshIndices) + + def run(self, output): + return _py3dnacalib.RemoveMeshCommand_run(self, output) + +# Register RemoveMeshCommand in _py3dnacalib: +_py3dnacalib.RemoveMeshCommand_swigregister(RemoveMeshCommand) + +class RenameAnimatedMapCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameAnimatedMapCommand + + def __init__(self, *args): + _py3dnacalib.RenameAnimatedMapCommand_swiginit(self, _py3dnacalib.new_RenameAnimatedMapCommand(*args)) + + def setName(self, *args): + return _py3dnacalib.RenameAnimatedMapCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameAnimatedMapCommand_run(self, output) + +# Register RenameAnimatedMapCommand in _py3dnacalib: +_py3dnacalib.RenameAnimatedMapCommand_swigregister(RenameAnimatedMapCommand) + +class RenameBlendShapeCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameBlendShapeCommand + + def __init__(self, *args): + _py3dnacalib.RenameBlendShapeCommand_swiginit(self, _py3dnacalib.new_RenameBlendShapeCommand(*args)) + + def setName(self, *args): + return _py3dnacalib.RenameBlendShapeCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameBlendShapeCommand_run(self, output) + +# Register RenameBlendShapeCommand in _py3dnacalib: +_py3dnacalib.RenameBlendShapeCommand_swigregister(RenameBlendShapeCommand) + +class RenameJointCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameJointCommand + + def __init__(self, *args): + _py3dnacalib.RenameJointCommand_swiginit(self, _py3dnacalib.new_RenameJointCommand(*args)) + + def setName(self, *args): + return _py3dnacalib.RenameJointCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameJointCommand_run(self, output) + +# Register RenameJointCommand in _py3dnacalib: +_py3dnacalib.RenameJointCommand_swigregister(RenameJointCommand) + +class RenameMeshCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RenameMeshCommand + + def __init__(self, *args): + _py3dnacalib.RenameMeshCommand_swiginit(self, _py3dnacalib.new_RenameMeshCommand(*args)) + + def setName(self, *args): + return _py3dnacalib.RenameMeshCommand_setName(self, *args) + + def run(self, output): + return _py3dnacalib.RenameMeshCommand_run(self, output) + +# Register RenameMeshCommand in _py3dnacalib: +_py3dnacalib.RenameMeshCommand_swigregister(RenameMeshCommand) + +class RotateCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_RotateCommand + + def __init__(self, *args): + _py3dnacalib.RotateCommand_swiginit(self, _py3dnacalib.new_RotateCommand(*args)) + + def setRotation(self, degrees): + return _py3dnacalib.RotateCommand_setRotation(self, degrees) + + def setOrigin(self, origin): + return _py3dnacalib.RotateCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.RotateCommand_run(self, output) + +# Register RotateCommand in _py3dnacalib: +_py3dnacalib.RotateCommand_swigregister(RotateCommand) + +class ScaleCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_ScaleCommand + + def __init__(self, *args): + _py3dnacalib.ScaleCommand_swiginit(self, _py3dnacalib.new_ScaleCommand(*args)) + + def setScale(self, scale): + return _py3dnacalib.ScaleCommand_setScale(self, scale) + + def setOrigin(self, origin): + return _py3dnacalib.ScaleCommand_setOrigin(self, origin) + + def run(self, output): + return _py3dnacalib.ScaleCommand_run(self, output) + +# Register ScaleCommand in _py3dnacalib: +_py3dnacalib.ScaleCommand_swigregister(ScaleCommand) + +class SetBlendShapeTargetDeltasCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetBlendShapeTargetDeltasCommand + + def __init__(self, *args): + _py3dnacalib.SetBlendShapeTargetDeltasCommand_swiginit(self, _py3dnacalib.new_SetBlendShapeTargetDeltasCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMeshIndex(self, meshIndex) + + def setBlendShapeTargetIndex(self, blendShapeTargetIndex): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setBlendShapeTargetIndex(self, blendShapeTargetIndex) + + def setDeltas(self, *args): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setDeltas(self, *args) + + def setVertexIndices(self, vertexIndices): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setVertexIndices(self, vertexIndices) + + def setMasks(self, masks): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setMasks(self, masks) + + def setOperation(self, operation): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetBlendShapeTargetDeltasCommand_run(self, output) + +# Register SetBlendShapeTargetDeltasCommand in _py3dnacalib: +_py3dnacalib.SetBlendShapeTargetDeltasCommand_swigregister(SetBlendShapeTargetDeltasCommand) +cvar = _py3dnacalib.cvar +SetBlendShapeTargetDeltasCommand.VertexIndicesOutOfBoundsError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_VertexIndicesOutOfBoundsError +SetBlendShapeTargetDeltasCommand.NoVertexIndicesSetError = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_NoVertexIndicesSetError +SetBlendShapeTargetDeltasCommand.DeltasVertexIndicesCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasVertexIndicesCountMismatch +SetBlendShapeTargetDeltasCommand.DeltasMasksCountMismatch = _py3dnacalib.cvar.SetBlendShapeTargetDeltasCommand_DeltasMasksCountMismatch + +class SetLODsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetLODsCommand + + def __init__(self, *args): + _py3dnacalib.SetLODsCommand_swiginit(self, _py3dnacalib.new_SetLODsCommand(*args)) + + def setLODs(self, lods): + return _py3dnacalib.SetLODsCommand_setLODs(self, lods) + + def run(self, output): + return _py3dnacalib.SetLODsCommand_run(self, output) + +# Register SetLODsCommand in _py3dnacalib: +_py3dnacalib.SetLODsCommand_swigregister(SetLODsCommand) + +class SetNeutralJointRotationsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointRotationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointRotationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointRotationsCommand(*args)) + + def setRotations(self, *args): + return _py3dnacalib.SetNeutralJointRotationsCommand_setRotations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointRotationsCommand_run(self, output) + +# Register SetNeutralJointRotationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointRotationsCommand_swigregister(SetNeutralJointRotationsCommand) + +class SetNeutralJointTranslationsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetNeutralJointTranslationsCommand + + def __init__(self, *args): + _py3dnacalib.SetNeutralJointTranslationsCommand_swiginit(self, _py3dnacalib.new_SetNeutralJointTranslationsCommand(*args)) + + def setTranslations(self, *args): + return _py3dnacalib.SetNeutralJointTranslationsCommand_setTranslations(self, *args) + + def run(self, output): + return _py3dnacalib.SetNeutralJointTranslationsCommand_run(self, output) + +# Register SetNeutralJointTranslationsCommand in _py3dnacalib: +_py3dnacalib.SetNeutralJointTranslationsCommand_swigregister(SetNeutralJointTranslationsCommand) + +class SetSkinWeightsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetSkinWeightsCommand + + def __init__(self, *args): + _py3dnacalib.SetSkinWeightsCommand_swiginit(self, _py3dnacalib.new_SetSkinWeightsCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.SetSkinWeightsCommand_setMeshIndex(self, meshIndex) + + def setVertexIndex(self, vertexIndex): + return _py3dnacalib.SetSkinWeightsCommand_setVertexIndex(self, vertexIndex) + + def setWeights(self, weights): + return _py3dnacalib.SetSkinWeightsCommand_setWeights(self, weights) + + def setJointIndices(self, jointIndices): + return _py3dnacalib.SetSkinWeightsCommand_setJointIndices(self, jointIndices) + + def run(self, output): + return _py3dnacalib.SetSkinWeightsCommand_run(self, output) + +# Register SetSkinWeightsCommand in _py3dnacalib: +_py3dnacalib.SetSkinWeightsCommand_swigregister(SetSkinWeightsCommand) + +class SetVertexPositionsCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_SetVertexPositionsCommand + + def __init__(self, *args): + _py3dnacalib.SetVertexPositionsCommand_swiginit(self, _py3dnacalib.new_SetVertexPositionsCommand(*args)) + + def setMeshIndex(self, meshIndex): + return _py3dnacalib.SetVertexPositionsCommand_setMeshIndex(self, meshIndex) + + def setPositions(self, *args): + return _py3dnacalib.SetVertexPositionsCommand_setPositions(self, *args) + + def setMasks(self, masks): + return _py3dnacalib.SetVertexPositionsCommand_setMasks(self, masks) + + def setOperation(self, operation): + return _py3dnacalib.SetVertexPositionsCommand_setOperation(self, operation) + + def run(self, output): + return _py3dnacalib.SetVertexPositionsCommand_run(self, output) + +# Register SetVertexPositionsCommand in _py3dnacalib: +_py3dnacalib.SetVertexPositionsCommand_swigregister(SetVertexPositionsCommand) +SetVertexPositionsCommand.PositionsMasksCountMismatch = _py3dnacalib.cvar.SetVertexPositionsCommand_PositionsMasksCountMismatch + +class TranslateCommand(Command): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dnacalib.delete_TranslateCommand + + def __init__(self, *args): + _py3dnacalib.TranslateCommand_swiginit(self, _py3dnacalib.new_TranslateCommand(*args)) + + def setTranslation(self, translation): + return _py3dnacalib.TranslateCommand_setTranslation(self, translation) + + def run(self, output): + return _py3dnacalib.TranslateCommand_run(self, output) + +# Register TranslateCommand in _py3dnacalib: +_py3dnacalib.TranslateCommand_swigregister(TranslateCommand) + + + diff --git a/plugins/Windows/2025/embeddedRL4.mll b/plugins/Windows/2025/embeddedRL4.mll new file mode 100644 index 0000000..94cfba5 Binary files /dev/null and b/plugins/Windows/2025/embeddedRL4.mll differ diff --git a/plugins/Windows/pydna/__init__.py b/plugins/Windows/pydna/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/plugins/Windows/pydna/python3/_py3dna.pyd b/plugins/Windows/pydna/python3/_py3dna.pyd new file mode 100644 index 0000000..83b0816 Binary files /dev/null and b/plugins/Windows/pydna/python3/_py3dna.pyd differ diff --git a/plugins/Windows/pydna/python3/dna.dll b/plugins/Windows/pydna/python3/dna.dll new file mode 100644 index 0000000..adf2b2f Binary files /dev/null and b/plugins/Windows/pydna/python3/dna.dll differ diff --git a/plugins/Windows/pydna/python3/dna.py b/plugins/Windows/pydna/python3/dna.py new file mode 100644 index 0000000..5d915f6 --- /dev/null +++ b/plugins/Windows/pydna/python3/dna.py @@ -0,0 +1,1432 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.0 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError('Python 2.7 or later required') + +# Import the low-level C/C++ module +if __package__ or '.' in __name__: + from . import _py3dna +else: + import _py3dna + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_setattr_nondynamic(self, class_type, name, value, static=1): + if name == "thisown": + return self.this.own(value) + if name == "this": + if type(value).__name__ == 'SwigPyObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name, None) + if method: + return method(self, value) + if not static: + object.__setattr__(self, name, value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + + +def _swig_setattr(self, class_type, name, value): + return _swig_setattr_nondynamic(self, class_type, name, value, 0) + + +def _swig_getattr(self, class_type, name): + if name == "thisown": + return self.this.own() + method = class_type.__swig_getmethods__.get(name, None) + if method: + return method(self) + raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) + + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +class MemoryResource(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_MemoryResource + + def allocate(self, size, alignment): + return _py3dna.MemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.MemoryResource_deallocate(self, ptr, size, alignment) + +# Register MemoryResource in _py3dna: +_py3dna.MemoryResource_swigregister(MemoryResource) + +class AlignedMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.AlignedMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.AlignedMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.AlignedMemoryResource_swiginit(self, _py3dna.new_AlignedMemoryResource()) + __swig_destroy__ = _py3dna.delete_AlignedMemoryResource + +# Register AlignedMemoryResource in _py3dna: +_py3dna.AlignedMemoryResource_swigregister(AlignedMemoryResource) + +class ArenaMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_ArenaMemoryResource + + def __init__(self, *args): + _py3dna.ArenaMemoryResource_swiginit(self, _py3dna.new_ArenaMemoryResource(*args)) + + def allocate(self, size, alignment): + return _py3dna.ArenaMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.ArenaMemoryResource_deallocate(self, ptr, size, alignment) + + def getUpstreamMemoryResource(self): + return _py3dna.ArenaMemoryResource_getUpstreamMemoryResource(self) + +# Register ArenaMemoryResource in _py3dna: +_py3dna.ArenaMemoryResource_swigregister(ArenaMemoryResource) + +class DefaultMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.DefaultMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.DefaultMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.DefaultMemoryResource_swiginit(self, _py3dna.new_DefaultMemoryResource()) + __swig_destroy__ = _py3dna.delete_DefaultMemoryResource + +# Register DefaultMemoryResource in _py3dna: +_py3dna.DefaultMemoryResource_swigregister(DefaultMemoryResource) + +class StatusCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + code = property(_py3dna.StatusCode_code_get, _py3dna.StatusCode_code_set) + message = property(_py3dna.StatusCode_message_get, _py3dna.StatusCode_message_set) + + def __init__(self): + _py3dna.StatusCode_swiginit(self, _py3dna.new_StatusCode()) + __swig_destroy__ = _py3dna.delete_StatusCode + +# Register StatusCode in _py3dna: +_py3dna.StatusCode_swigregister(StatusCode) + +class Status(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + @staticmethod + def isOk(): + return _py3dna.Status_isOk() + + @staticmethod + def get(): + return _py3dna.Status_get() + + @staticmethod + def getHook(): + return _py3dna.Status_getHook() + + @staticmethod + def setHook(hook): + return _py3dna.Status_setHook(hook) + + def __init__(self): + _py3dna.Status_swiginit(self, _py3dna.new_Status()) + __swig_destroy__ = _py3dna.delete_Status + +# Register Status in _py3dna: +_py3dna.Status_swigregister(Status) + +def Status_isOk(): + return _py3dna.Status_isOk() + +def Status_get(): + return _py3dna.Status_get() + +def Status_getHook(): + return _py3dna.Status_getHook() + +def Status_setHook(hook): + return _py3dna.Status_setHook(hook) + +class Readable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def read(self, *args): + return _py3dna.Readable_read(self, *args) + +# Register Readable in _py3dna: +_py3dna.Readable_swigregister(Readable) + +class Writable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def write(self, *args): + return _py3dna.Writable_write(self, *args) + +# Register Writable in _py3dna: +_py3dna.Writable_swigregister(Writable) + +class Seekable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def tell(self): + return _py3dna.Seekable_tell(self) + + def seek(self, position): + return _py3dna.Seekable_seek(self, position) + +# Register Seekable in _py3dna: +_py3dna.Seekable_swigregister(Seekable) + +class Openable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def open(self): + return _py3dna.Openable_open(self) + +# Register Openable in _py3dna: +_py3dna.Openable_swigregister(Openable) + +class Closeable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def close(self): + return _py3dna.Closeable_close(self) + +# Register Closeable in _py3dna: +_py3dna.Closeable_swigregister(Closeable) + +class Controllable(Openable, Closeable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + +# Register Controllable in _py3dna: +_py3dna.Controllable_swigregister(Controllable) + +class Bounded(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def size(self): + return _py3dna.Bounded_size(self) + +# Register Bounded in _py3dna: +_py3dna.Bounded_swigregister(Bounded) + +class Buffered(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def flush(self): + return _py3dna.Buffered_flush(self) + +# Register Buffered in _py3dna: +_py3dna.Buffered_swigregister(Buffered) + +class Resizable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def resize(self, size): + return _py3dna.Resizable_resize(self, size) + +# Register Resizable in _py3dna: +_py3dna.Resizable_swigregister(Resizable) + +class BoundedIOStream(Controllable, Readable, Writable, Seekable, Bounded): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_BoundedIOStream + +# Register BoundedIOStream in _py3dna: +_py3dna.BoundedIOStream_swigregister(BoundedIOStream) +cvar = _py3dna.cvar +BoundedIOStream.OpenError = _py3dna.cvar.BoundedIOStream_OpenError +BoundedIOStream.ReadError = _py3dna.cvar.BoundedIOStream_ReadError +BoundedIOStream.WriteError = _py3dna.cvar.BoundedIOStream_WriteError +BoundedIOStream.AlreadyOpenError = _py3dna.cvar.BoundedIOStream_AlreadyOpenError +BoundedIOStream.SeekError = _py3dna.cvar.BoundedIOStream_SeekError + +AccessMode_Read = _py3dna.AccessMode_Read +AccessMode_Write = _py3dna.AccessMode_Write +AccessMode_ReadWrite = _py3dna.AccessMode_ReadWrite +OpenMode_Binary = _py3dna.OpenMode_Binary +OpenMode_Text = _py3dna.OpenMode_Text +class FileStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.FileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_FileStream + +# Register FileStream in _py3dna: +_py3dna.FileStream_swigregister(FileStream) + +def FileStream_create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + +def FileStream_destroy(instance): + return _py3dna.FileStream_destroy(instance) + +class MemoryMappedFileStream(BoundedIOStream, Buffered, Resizable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryMappedFileStream + +# Register MemoryMappedFileStream in _py3dna: +_py3dna.MemoryMappedFileStream_swigregister(MemoryMappedFileStream) + +def MemoryMappedFileStream_create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + +def MemoryMappedFileStream_destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + +class MemoryStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.MemoryStream_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryStream + +# Register MemoryStream in _py3dna: +_py3dna.MemoryStream_swigregister(MemoryStream) + +def MemoryStream_create(*args): + return _py3dna.MemoryStream_create(*args) + +def MemoryStream_destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + + +FileStream.__new__ = __new_decorator(FileStream_create, FileStream.__new__) +FileStream.__del__ = lambda instance: FileStream_destroy(instance) +FileStream.__init__ = __managed_init +del FileStream.create +del FileStream.destroy + + +MemoryMappedFileStream.__new__ = __new_decorator(MemoryMappedFileStream_create, MemoryMappedFileStream.__new__) +MemoryMappedFileStream.__del__ = lambda instance: MemoryMappedFileStream_destroy(instance) +MemoryMappedFileStream.__init__ = __managed_init +del MemoryMappedFileStream.create +del MemoryMappedFileStream.destroy + + +MemoryStream.__new__ = __new_decorator(MemoryStream_create, MemoryStream.__new__) +MemoryStream.__del__ = lambda instance: MemoryStream_destroy(instance) +MemoryStream.__init__ = __managed_init +del MemoryStream.create +del MemoryStream.destroy + + +FileStream.AccessMode_Read = AccessMode_Read +FileStream.AccessMode_Write = AccessMode_Write +FileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +FileStream.OpenMode_Binary = OpenMode_Binary +FileStream.OpenMode_Text = OpenMode_Text + +MemoryMappedFileStream.AccessMode_Read = AccessMode_Read +MemoryMappedFileStream.AccessMode_Write = AccessMode_Write +MemoryMappedFileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +class StringView(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def c_str(self): + return _py3dna.StringView_c_str(self) + + def __ref__(self): + return _py3dna.StringView___ref__(self) + + def __init__(self): + _py3dna.StringView_swiginit(self, _py3dna.new_StringView()) + __swig_destroy__ = _py3dna.delete_StringView + +# Register StringView in _py3dna: +_py3dna.StringView_swigregister(StringView) + + +def __add__(*args): + return _py3dna.__add__(*args) + +def __sub__(*args): + return _py3dna.__sub__(*args) + +def __mul__(*args): + return _py3dna.__mul__(*args) + +def __truediv__(*args): + return _py3dna.__truediv__(*args) + +def __eq__(*args): + return _py3dna.__eq__(*args) + +def __ne__(*args): + return _py3dna.__ne__(*args) +DataLayer_Descriptor = _py3dna.DataLayer_Descriptor +DataLayer_Definition = _py3dna.DataLayer_Definition +DataLayer_Behavior = _py3dna.DataLayer_Behavior +DataLayer_Geometry = _py3dna.DataLayer_Geometry +DataLayer_GeometryWithoutBlendShapes = _py3dna.DataLayer_GeometryWithoutBlendShapes +DataLayer_AllWithoutBlendShapes = _py3dna.DataLayer_AllWithoutBlendShapes +DataLayer_All = _py3dna.DataLayer_All +Archetype_asian = _py3dna.Archetype_asian +Archetype_black = _py3dna.Archetype_black +Archetype_caucasian = _py3dna.Archetype_caucasian +Archetype_hispanic = _py3dna.Archetype_hispanic +Archetype_alien = _py3dna.Archetype_alien +Archetype_other = _py3dna.Archetype_other +Gender_male = _py3dna.Gender_male +Gender_female = _py3dna.Gender_female +Gender_other = _py3dna.Gender_other +TranslationUnit_cm = _py3dna.TranslationUnit_cm +TranslationUnit_m = _py3dna.TranslationUnit_m +RotationUnit_degrees = _py3dna.RotationUnit_degrees +RotationUnit_radians = _py3dna.RotationUnit_radians +Direction_left = _py3dna.Direction_left +Direction_right = _py3dna.Direction_right +Direction_up = _py3dna.Direction_up +Direction_down = _py3dna.Direction_down +Direction_front = _py3dna.Direction_front +Direction_back = _py3dna.Direction_back +class CoordinateSystem(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + xAxis = property(_py3dna.CoordinateSystem_xAxis_get, _py3dna.CoordinateSystem_xAxis_set) + yAxis = property(_py3dna.CoordinateSystem_yAxis_get, _py3dna.CoordinateSystem_yAxis_set) + zAxis = property(_py3dna.CoordinateSystem_zAxis_get, _py3dna.CoordinateSystem_zAxis_set) + + def __init__(self): + _py3dna.CoordinateSystem_swiginit(self, _py3dna.new_CoordinateSystem()) + __swig_destroy__ = _py3dna.delete_CoordinateSystem + +# Register CoordinateSystem in _py3dna: +_py3dna.CoordinateSystem_swigregister(CoordinateSystem) + +class DescriptorReader(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getName(self): + return _py3dna.DescriptorReader_getName(self) + + def getArchetype(self): + return _py3dna.DescriptorReader_getArchetype(self) + + def getGender(self): + return _py3dna.DescriptorReader_getGender(self) + + def getAge(self): + return _py3dna.DescriptorReader_getAge(self) + + def getMetaDataCount(self): + return _py3dna.DescriptorReader_getMetaDataCount(self) + + def getMetaDataKey(self, index): + return _py3dna.DescriptorReader_getMetaDataKey(self, index) + + def getMetaDataValue(self, key): + return _py3dna.DescriptorReader_getMetaDataValue(self, key) + + def getTranslationUnit(self): + return _py3dna.DescriptorReader_getTranslationUnit(self) + + def getRotationUnit(self): + return _py3dna.DescriptorReader_getRotationUnit(self) + + def getCoordinateSystem(self): + return _py3dna.DescriptorReader_getCoordinateSystem(self) + + def getLODCount(self): + return _py3dna.DescriptorReader_getLODCount(self) + + def getDBMaxLOD(self): + return _py3dna.DescriptorReader_getDBMaxLOD(self) + + def getDBComplexity(self): + return _py3dna.DescriptorReader_getDBComplexity(self) + + def getDBName(self): + return _py3dna.DescriptorReader_getDBName(self) + +# Register DescriptorReader in _py3dna: +_py3dna.DescriptorReader_swigregister(DescriptorReader) + +class MeshBlendShapeChannelMapping(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + meshIndex = property(_py3dna.MeshBlendShapeChannelMapping_meshIndex_get, _py3dna.MeshBlendShapeChannelMapping_meshIndex_set) + blendShapeChannelIndex = property(_py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_get, _py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_set) + + def __init__(self): + _py3dna.MeshBlendShapeChannelMapping_swiginit(self, _py3dna.new_MeshBlendShapeChannelMapping()) + __swig_destroy__ = _py3dna.delete_MeshBlendShapeChannelMapping + +# Register MeshBlendShapeChannelMapping in _py3dna: +_py3dna.MeshBlendShapeChannelMapping_swigregister(MeshBlendShapeChannelMapping) + +class DefinitionReader(DescriptorReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIControlCount(self): + return _py3dna.DefinitionReader_getGUIControlCount(self) + + def getGUIControlName(self, index): + return _py3dna.DefinitionReader_getGUIControlName(self, index) + + def getRawControlCount(self): + return _py3dna.DefinitionReader_getRawControlCount(self) + + def getRawControlName(self, index): + return _py3dna.DefinitionReader_getRawControlName(self, index) + + def getJointCount(self): + return _py3dna.DefinitionReader_getJointCount(self) + + def getJointName(self, index): + return _py3dna.DefinitionReader_getJointName(self, index) + + def getJointIndexListCount(self): + return _py3dna.DefinitionReader_getJointIndexListCount(self) + + def getJointIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getJointIndicesForLOD(self, lod) + + def getJointParentIndex(self, index): + return _py3dna.DefinitionReader_getJointParentIndex(self, index) + + def getBlendShapeChannelCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelCount(self) + + def getBlendShapeChannelName(self, index): + return _py3dna.DefinitionReader_getBlendShapeChannelName(self, index) + + def getBlendShapeChannelIndexListCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelIndexListCount(self) + + def getBlendShapeChannelIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getBlendShapeChannelIndicesForLOD(self, lod) + + def getAnimatedMapCount(self): + return _py3dna.DefinitionReader_getAnimatedMapCount(self) + + def getAnimatedMapName(self, index): + return _py3dna.DefinitionReader_getAnimatedMapName(self, index) + + def getAnimatedMapIndexListCount(self): + return _py3dna.DefinitionReader_getAnimatedMapIndexListCount(self) + + def getAnimatedMapIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getAnimatedMapIndicesForLOD(self, lod) + + def getMeshCount(self): + return _py3dna.DefinitionReader_getMeshCount(self) + + def getMeshName(self, index): + return _py3dna.DefinitionReader_getMeshName(self, index) + + def getMeshIndexListCount(self): + return _py3dna.DefinitionReader_getMeshIndexListCount(self) + + def getMeshIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshIndicesForLOD(self, lod) + + def getMeshBlendShapeChannelMappingCount(self): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingCount(self) + + def getMeshBlendShapeChannelMapping(self, index): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMapping(self, index) + + def getMeshBlendShapeChannelMappingIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingIndicesForLOD(self, lod) + + def getNeutralJointTranslation(self, index): + return _py3dna.DefinitionReader_getNeutralJointTranslation(self, index) + + def getNeutralJointTranslationXs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationXs(self) + + def getNeutralJointTranslationYs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationYs(self) + + def getNeutralJointTranslationZs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationZs(self) + + def getNeutralJointRotation(self, index): + return _py3dna.DefinitionReader_getNeutralJointRotation(self, index) + + def getNeutralJointRotationXs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationXs(self) + + def getNeutralJointRotationYs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationYs(self) + + def getNeutralJointRotationZs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationZs(self) + +# Register DefinitionReader in _py3dna: +_py3dna.DefinitionReader_swigregister(DefinitionReader) + +class BehaviorReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIToRawInputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawInputIndices(self) + + def getGUIToRawOutputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawOutputIndices(self) + + def getGUIToRawFromValues(self): + return _py3dna.BehaviorReader_getGUIToRawFromValues(self) + + def getGUIToRawToValues(self): + return _py3dna.BehaviorReader_getGUIToRawToValues(self) + + def getGUIToRawSlopeValues(self): + return _py3dna.BehaviorReader_getGUIToRawSlopeValues(self) + + def getGUIToRawCutValues(self): + return _py3dna.BehaviorReader_getGUIToRawCutValues(self) + + def getPSDCount(self): + return _py3dna.BehaviorReader_getPSDCount(self) + + def getPSDRowIndices(self): + return _py3dna.BehaviorReader_getPSDRowIndices(self) + + def getPSDColumnIndices(self): + return _py3dna.BehaviorReader_getPSDColumnIndices(self) + + def getPSDValues(self): + return _py3dna.BehaviorReader_getPSDValues(self) + + def getJointRowCount(self): + return _py3dna.BehaviorReader_getJointRowCount(self) + + def getJointColumnCount(self): + return _py3dna.BehaviorReader_getJointColumnCount(self) + + def getJointVariableAttributeIndices(self, lod): + return _py3dna.BehaviorReader_getJointVariableAttributeIndices(self, lod) + + def getJointGroupCount(self): + return _py3dna.BehaviorReader_getJointGroupCount(self) + + def getJointGroupLODs(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupLODs(self, jointGroupIndex) + + def getJointGroupInputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupInputIndices(self, jointGroupIndex) + + def getJointGroupOutputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupOutputIndices(self, jointGroupIndex) + + def getJointGroupValues(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupValues(self, jointGroupIndex) + + def getJointGroupJointIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupJointIndices(self, jointGroupIndex) + + def getBlendShapeChannelLODs(self): + return _py3dna.BehaviorReader_getBlendShapeChannelLODs(self) + + def getBlendShapeChannelInputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelInputIndices(self) + + def getBlendShapeChannelOutputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelOutputIndices(self) + + def getAnimatedMapLODs(self): + return _py3dna.BehaviorReader_getAnimatedMapLODs(self) + + def getAnimatedMapInputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapInputIndices(self) + + def getAnimatedMapOutputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapOutputIndices(self) + + def getAnimatedMapFromValues(self): + return _py3dna.BehaviorReader_getAnimatedMapFromValues(self) + + def getAnimatedMapToValues(self): + return _py3dna.BehaviorReader_getAnimatedMapToValues(self) + + def getAnimatedMapSlopeValues(self): + return _py3dna.BehaviorReader_getAnimatedMapSlopeValues(self) + + def getAnimatedMapCutValues(self): + return _py3dna.BehaviorReader_getAnimatedMapCutValues(self) + +# Register BehaviorReader in _py3dna: +_py3dna.BehaviorReader_swigregister(BehaviorReader) + +class GeometryReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getVertexPositionCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionCount(self, meshIndex) + + def getVertexPosition(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getVertexPosition(self, meshIndex, vertexIndex) + + def getVertexPositionXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionXs(self, meshIndex) + + def getVertexPositionYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionYs(self, meshIndex) + + def getVertexPositionZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionZs(self, meshIndex) + + def getVertexTextureCoordinateCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateCount(self, meshIndex) + + def getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex) + + def getVertexTextureCoordinateUs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateUs(self, meshIndex) + + def getVertexTextureCoordinateVs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateVs(self, meshIndex) + + def getVertexNormalCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalCount(self, meshIndex) + + def getVertexNormal(self, meshIndex, normalIndex): + return _py3dna.GeometryReader_getVertexNormal(self, meshIndex, normalIndex) + + def getVertexNormalXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalXs(self, meshIndex) + + def getVertexNormalYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalYs(self, meshIndex) + + def getVertexNormalZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalZs(self, meshIndex) + + def getVertexLayoutCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutCount(self, meshIndex) + + def getVertexLayout(self, meshIndex, layoutIndex): + return _py3dna.GeometryReader_getVertexLayout(self, meshIndex, layoutIndex) + + def getVertexLayoutPositionIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutPositionIndices(self, meshIndex) + + def getVertexLayoutTextureCoordinateIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutTextureCoordinateIndices(self, meshIndex) + + def getVertexLayoutNormalIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutNormalIndices(self, meshIndex) + + def getFaceCount(self, meshIndex): + return _py3dna.GeometryReader_getFaceCount(self, meshIndex) + + def getFaceVertexLayoutIndices(self, meshIndex, faceIndex): + return _py3dna.GeometryReader_getFaceVertexLayoutIndices(self, meshIndex, faceIndex) + + def getMaximumInfluencePerVertex(self, meshIndex): + return _py3dna.GeometryReader_getMaximumInfluencePerVertex(self, meshIndex) + + def getSkinWeightsCount(self, meshIndex): + return _py3dna.GeometryReader_getSkinWeightsCount(self, meshIndex) + + def getSkinWeightsValues(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsValues(self, meshIndex, vertexIndex) + + def getSkinWeightsJointIndices(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsJointIndices(self, meshIndex, vertexIndex) + + def getBlendShapeTargetCount(self, meshIndex): + return _py3dna.GeometryReader_getBlendShapeTargetCount(self, meshIndex) + + def getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex) + + def getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex) + +# Register GeometryReader in _py3dna: +_py3dna.GeometryReader_swigregister(GeometryReader) + +class Reader(BehaviorReader, GeometryReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Reader + + def unload(self, layer): + return _py3dna.Reader_unload(self, layer) + +# Register Reader in _py3dna: +_py3dna.Reader_swigregister(Reader) + +class StreamReader(Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamReader + + def read(self): + return _py3dna.StreamReader_read(self) + +# Register StreamReader in _py3dna: +_py3dna.StreamReader_swigregister(StreamReader) +StreamReader.SignatureMismatchError = _py3dna.cvar.StreamReader_SignatureMismatchError +StreamReader.VersionMismatchError = _py3dna.cvar.StreamReader_VersionMismatchError +StreamReader.InvalidDataError = _py3dna.cvar.StreamReader_InvalidDataError + +class BinaryStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.BinaryStreamReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamReader + +# Register BinaryStreamReader in _py3dna: +_py3dna.BinaryStreamReader_swigregister(BinaryStreamReader) + +def BinaryStreamReader_create(*args): + return _py3dna.BinaryStreamReader_create(*args) + +def BinaryStreamReader_destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + +class JSONStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamReader + +# Register JSONStreamReader in _py3dna: +_py3dna.JSONStreamReader_swigregister(JSONStreamReader) + +def JSONStreamReader_create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + +def JSONStreamReader_destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + + +BinaryStreamReader.__new__ = __new_decorator(BinaryStreamReader_create, BinaryStreamReader.__new__) +BinaryStreamReader.__del__ = lambda instance: BinaryStreamReader_destroy(instance) +BinaryStreamReader.__init__ = __managed_init +del BinaryStreamReader.create +del BinaryStreamReader.destroy + + +JSONStreamReader.__new__ = __new_decorator(JSONStreamReader_create, JSONStreamReader.__new__) +JSONStreamReader.__del__ = lambda instance: JSONStreamReader_destroy(instance) +JSONStreamReader.__init__ = __managed_init +del JSONStreamReader.create +del JSONStreamReader.destroy + +class DescriptorWriter(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setName(self, name): + return _py3dna.DescriptorWriter_setName(self, name) + + def setArchetype(self, archetype): + return _py3dna.DescriptorWriter_setArchetype(self, archetype) + + def setGender(self, gender): + return _py3dna.DescriptorWriter_setGender(self, gender) + + def setAge(self, age): + return _py3dna.DescriptorWriter_setAge(self, age) + + def clearMetaData(self): + return _py3dna.DescriptorWriter_clearMetaData(self) + + def setMetaData(self, key, value): + return _py3dna.DescriptorWriter_setMetaData(self, key, value) + + def setTranslationUnit(self, unit): + return _py3dna.DescriptorWriter_setTranslationUnit(self, unit) + + def setRotationUnit(self, unit): + return _py3dna.DescriptorWriter_setRotationUnit(self, unit) + + def setCoordinateSystem(self, system): + return _py3dna.DescriptorWriter_setCoordinateSystem(self, system) + + def setLODCount(self, lodCount): + return _py3dna.DescriptorWriter_setLODCount(self, lodCount) + + def setDBMaxLOD(self, lod): + return _py3dna.DescriptorWriter_setDBMaxLOD(self, lod) + + def setDBComplexity(self, name): + return _py3dna.DescriptorWriter_setDBComplexity(self, name) + + def setDBName(self, name): + return _py3dna.DescriptorWriter_setDBName(self, name) + +# Register DescriptorWriter in _py3dna: +_py3dna.DescriptorWriter_swigregister(DescriptorWriter) + +class DefinitionWriter(DescriptorWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearGUIControlNames(self): + return _py3dna.DefinitionWriter_clearGUIControlNames(self) + + def setGUIControlName(self, index, name): + return _py3dna.DefinitionWriter_setGUIControlName(self, index, name) + + def clearRawControlNames(self): + return _py3dna.DefinitionWriter_clearRawControlNames(self) + + def setRawControlName(self, index, name): + return _py3dna.DefinitionWriter_setRawControlName(self, index, name) + + def clearJointNames(self): + return _py3dna.DefinitionWriter_clearJointNames(self) + + def setJointName(self, index, name): + return _py3dna.DefinitionWriter_setJointName(self, index, name) + + def clearJointIndices(self): + return _py3dna.DefinitionWriter_clearJointIndices(self) + + def setJointIndices(self, index, jointIndices): + return _py3dna.DefinitionWriter_setJointIndices(self, index, jointIndices) + + def clearLODJointMappings(self): + return _py3dna.DefinitionWriter_clearLODJointMappings(self) + + def setLODJointMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODJointMapping(self, lod, index) + + def clearBlendShapeChannelNames(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelNames(self) + + def setBlendShapeChannelName(self, index, name): + return _py3dna.DefinitionWriter_setBlendShapeChannelName(self, index, name) + + def clearBlendShapeChannelIndices(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelIndices(self) + + def setBlendShapeChannelIndices(self, index, blendShapeChannelIndices): + return _py3dna.DefinitionWriter_setBlendShapeChannelIndices(self, index, blendShapeChannelIndices) + + def clearLODBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearLODBlendShapeChannelMappings(self) + + def setLODBlendShapeChannelMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODBlendShapeChannelMapping(self, lod, index) + + def clearAnimatedMapNames(self): + return _py3dna.DefinitionWriter_clearAnimatedMapNames(self) + + def setAnimatedMapName(self, index, name): + return _py3dna.DefinitionWriter_setAnimatedMapName(self, index, name) + + def clearAnimatedMapIndices(self): + return _py3dna.DefinitionWriter_clearAnimatedMapIndices(self) + + def setAnimatedMapIndices(self, index, animatedMapIndices): + return _py3dna.DefinitionWriter_setAnimatedMapIndices(self, index, animatedMapIndices) + + def clearLODAnimatedMapMappings(self): + return _py3dna.DefinitionWriter_clearLODAnimatedMapMappings(self) + + def setLODAnimatedMapMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODAnimatedMapMapping(self, lod, index) + + def clearMeshNames(self): + return _py3dna.DefinitionWriter_clearMeshNames(self) + + def setMeshName(self, index, name): + return _py3dna.DefinitionWriter_setMeshName(self, index, name) + + def clearMeshIndices(self): + return _py3dna.DefinitionWriter_clearMeshIndices(self) + + def setMeshIndices(self, index, meshIndices): + return _py3dna.DefinitionWriter_setMeshIndices(self, index, meshIndices) + + def clearLODMeshMappings(self): + return _py3dna.DefinitionWriter_clearLODMeshMappings(self) + + def setLODMeshMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODMeshMapping(self, lod, index) + + def clearMeshBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearMeshBlendShapeChannelMappings(self) + + def setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex): + return _py3dna.DefinitionWriter_setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex) + + def setJointHierarchy(self, jointIndices): + return _py3dna.DefinitionWriter_setJointHierarchy(self, jointIndices) + + def setNeutralJointTranslations(self, translations): + return _py3dna.DefinitionWriter_setNeutralJointTranslations(self, translations) + + def setNeutralJointRotations(self, rotations): + return _py3dna.DefinitionWriter_setNeutralJointRotations(self, rotations) + +# Register DefinitionWriter in _py3dna: +_py3dna.DefinitionWriter_swigregister(DefinitionWriter) + +class BehaviorWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setGUIToRawInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setGUIToRawInputIndices(self, inputIndices) + + def setGUIToRawOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setGUIToRawOutputIndices(self, outputIndices) + + def setGUIToRawFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setGUIToRawFromValues(self, fromValues) + + def setGUIToRawToValues(self, toValues): + return _py3dna.BehaviorWriter_setGUIToRawToValues(self, toValues) + + def setGUIToRawSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setGUIToRawSlopeValues(self, slopeValues) + + def setGUIToRawCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setGUIToRawCutValues(self, cutValues) + + def setPSDCount(self, count): + return _py3dna.BehaviorWriter_setPSDCount(self, count) + + def setPSDRowIndices(self, rowIndices): + return _py3dna.BehaviorWriter_setPSDRowIndices(self, rowIndices) + + def setPSDColumnIndices(self, columnIndices): + return _py3dna.BehaviorWriter_setPSDColumnIndices(self, columnIndices) + + def setPSDValues(self, weights): + return _py3dna.BehaviorWriter_setPSDValues(self, weights) + + def setJointRowCount(self, rowCount): + return _py3dna.BehaviorWriter_setJointRowCount(self, rowCount) + + def setJointColumnCount(self, columnCount): + return _py3dna.BehaviorWriter_setJointColumnCount(self, columnCount) + + def clearJointGroups(self): + return _py3dna.BehaviorWriter_clearJointGroups(self) + + def deleteJointGroup(self, jointGroupIndex): + return _py3dna.BehaviorWriter_deleteJointGroup(self, jointGroupIndex) + + def setJointGroupLODs(self, jointGroupIndex, lods): + return _py3dna.BehaviorWriter_setJointGroupLODs(self, jointGroupIndex, lods) + + def setJointGroupInputIndices(self, jointGroupIndex, inputIndices): + return _py3dna.BehaviorWriter_setJointGroupInputIndices(self, jointGroupIndex, inputIndices) + + def setJointGroupOutputIndices(self, jointGroupIndex, outputIndices): + return _py3dna.BehaviorWriter_setJointGroupOutputIndices(self, jointGroupIndex, outputIndices) + + def setJointGroupValues(self, jointGroupIndex, values): + return _py3dna.BehaviorWriter_setJointGroupValues(self, jointGroupIndex, values) + + def setJointGroupJointIndices(self, jointGroupIndex, jointIndices): + return _py3dna.BehaviorWriter_setJointGroupJointIndices(self, jointGroupIndex, jointIndices) + + def setBlendShapeChannelLODs(self, lods): + return _py3dna.BehaviorWriter_setBlendShapeChannelLODs(self, lods) + + def setBlendShapeChannelInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelInputIndices(self, inputIndices) + + def setBlendShapeChannelOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelOutputIndices(self, outputIndices) + + def setAnimatedMapLODs(self, lods): + return _py3dna.BehaviorWriter_setAnimatedMapLODs(self, lods) + + def setAnimatedMapInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapInputIndices(self, inputIndices) + + def setAnimatedMapOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapOutputIndices(self, outputIndices) + + def setAnimatedMapFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setAnimatedMapFromValues(self, fromValues) + + def setAnimatedMapToValues(self, toValues): + return _py3dna.BehaviorWriter_setAnimatedMapToValues(self, toValues) + + def setAnimatedMapSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setAnimatedMapSlopeValues(self, slopeValues) + + def setAnimatedMapCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setAnimatedMapCutValues(self, cutValues) + +# Register BehaviorWriter in _py3dna: +_py3dna.BehaviorWriter_swigregister(BehaviorWriter) + +class GeometryWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearMeshes(self): + return _py3dna.GeometryWriter_clearMeshes(self) + + def deleteMesh(self, meshIndex): + return _py3dna.GeometryWriter_deleteMesh(self, meshIndex) + + def setVertexPositions(self, meshIndex, positions): + return _py3dna.GeometryWriter_setVertexPositions(self, meshIndex, positions) + + def setVertexTextureCoordinates(self, meshIndex, textureCoordinates): + return _py3dna.GeometryWriter_setVertexTextureCoordinates(self, meshIndex, textureCoordinates) + + def setVertexNormals(self, meshIndex, normals): + return _py3dna.GeometryWriter_setVertexNormals(self, meshIndex, normals) + + def setVertexLayouts(self, meshIndex, layouts): + return _py3dna.GeometryWriter_setVertexLayouts(self, meshIndex, layouts) + + def clearFaceVertexLayoutIndices(self, meshIndex): + return _py3dna.GeometryWriter_clearFaceVertexLayoutIndices(self, meshIndex) + + def setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices): + return _py3dna.GeometryWriter_setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices) + + def setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount): + return _py3dna.GeometryWriter_setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount) + + def clearSkinWeights(self, meshIndex): + return _py3dna.GeometryWriter_clearSkinWeights(self, meshIndex) + + def setSkinWeightsValues(self, meshIndex, vertexIndex, weights): + return _py3dna.GeometryWriter_setSkinWeightsValues(self, meshIndex, vertexIndex, weights) + + def setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices): + return _py3dna.GeometryWriter_setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices) + + def clearBlendShapeTargets(self, meshIndex): + return _py3dna.GeometryWriter_clearBlendShapeTargets(self, meshIndex) + + def setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex): + return _py3dna.GeometryWriter_setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex) + + def setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas): + return _py3dna.GeometryWriter_setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas) + + def setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices): + return _py3dna.GeometryWriter_setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices) + +# Register GeometryWriter in _py3dna: +_py3dna.GeometryWriter_swigregister(GeometryWriter) + +class Writer(BehaviorWriter, GeometryWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Writer + + def setFrom(self, *args): + return _py3dna.Writer_setFrom(self, *args) + +# Register Writer in _py3dna: +_py3dna.Writer_swigregister(Writer) + +class StreamWriter(Writer): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamWriter + + def write(self): + return _py3dna.StreamWriter_write(self) + +# Register StreamWriter in _py3dna: +_py3dna.StreamWriter_swigregister(StreamWriter) + +class BinaryStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamWriter + +# Register BinaryStreamWriter in _py3dna: +_py3dna.BinaryStreamWriter_swigregister(BinaryStreamWriter) + +def BinaryStreamWriter_create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + +def BinaryStreamWriter_destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + +class JSONStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamWriter + +# Register JSONStreamWriter in _py3dna: +_py3dna.JSONStreamWriter_swigregister(JSONStreamWriter) + +def JSONStreamWriter_create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + +def JSONStreamWriter_destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + + +BinaryStreamWriter.__new__ = __new_decorator(BinaryStreamWriter_create, BinaryStreamWriter.__new__) +BinaryStreamWriter.__del__ = lambda instance: BinaryStreamWriter_destroy(instance) +BinaryStreamWriter.__init__ = __managed_init +del BinaryStreamWriter.create +del BinaryStreamWriter.destroy + + +JSONStreamWriter.__new__ = __new_decorator(JSONStreamWriter_create, JSONStreamWriter.__new__) +JSONStreamWriter.__del__ = lambda instance: JSONStreamWriter_destroy(instance) +JSONStreamWriter.__init__ = __managed_init +del JSONStreamWriter.create +del JSONStreamWriter.destroy + + + diff --git a/plugins/Windows/pydna/python3108/_py3dna.pyd b/plugins/Windows/pydna/python3108/_py3dna.pyd new file mode 100644 index 0000000..6c364fb Binary files /dev/null and b/plugins/Windows/pydna/python3108/_py3dna.pyd differ diff --git a/plugins/Windows/pydna/python3108/dna.dll b/plugins/Windows/pydna/python3108/dna.dll new file mode 100644 index 0000000..0beea9b Binary files /dev/null and b/plugins/Windows/pydna/python3108/dna.dll differ diff --git a/plugins/Windows/pydna/python3108/dna.py b/plugins/Windows/pydna/python3108/dna.py new file mode 100644 index 0000000..2f56dfa --- /dev/null +++ b/plugins/Windows/pydna/python3108/dna.py @@ -0,0 +1,1403 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.2 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dna +else: + import _py3dna + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +class MemoryResource(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_MemoryResource + + def allocate(self, size, alignment): + return _py3dna.MemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.MemoryResource_deallocate(self, ptr, size, alignment) + +# Register MemoryResource in _py3dna: +_py3dna.MemoryResource_swigregister(MemoryResource) + +class AlignedMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.AlignedMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.AlignedMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.AlignedMemoryResource_swiginit(self, _py3dna.new_AlignedMemoryResource()) + __swig_destroy__ = _py3dna.delete_AlignedMemoryResource + +# Register AlignedMemoryResource in _py3dna: +_py3dna.AlignedMemoryResource_swigregister(AlignedMemoryResource) + +class ArenaMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_ArenaMemoryResource + + def __init__(self, *args): + _py3dna.ArenaMemoryResource_swiginit(self, _py3dna.new_ArenaMemoryResource(*args)) + + def allocate(self, size, alignment): + return _py3dna.ArenaMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.ArenaMemoryResource_deallocate(self, ptr, size, alignment) + + def getUpstreamMemoryResource(self): + return _py3dna.ArenaMemoryResource_getUpstreamMemoryResource(self) + +# Register ArenaMemoryResource in _py3dna: +_py3dna.ArenaMemoryResource_swigregister(ArenaMemoryResource) + +class DefaultMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.DefaultMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.DefaultMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.DefaultMemoryResource_swiginit(self, _py3dna.new_DefaultMemoryResource()) + __swig_destroy__ = _py3dna.delete_DefaultMemoryResource + +# Register DefaultMemoryResource in _py3dna: +_py3dna.DefaultMemoryResource_swigregister(DefaultMemoryResource) + +class StatusCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + code = property(_py3dna.StatusCode_code_get, _py3dna.StatusCode_code_set) + message = property(_py3dna.StatusCode_message_get, _py3dna.StatusCode_message_set) + + def __init__(self): + _py3dna.StatusCode_swiginit(self, _py3dna.new_StatusCode()) + __swig_destroy__ = _py3dna.delete_StatusCode + +# Register StatusCode in _py3dna: +_py3dna.StatusCode_swigregister(StatusCode) + +class Status(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def isOk(): + return _py3dna.Status_isOk() + + @staticmethod + def get(): + return _py3dna.Status_get() + + @staticmethod + def getHook(): + return _py3dna.Status_getHook() + + @staticmethod + def setHook(hook): + return _py3dna.Status_setHook(hook) + + def __init__(self): + _py3dna.Status_swiginit(self, _py3dna.new_Status()) + __swig_destroy__ = _py3dna.delete_Status + +# Register Status in _py3dna: +_py3dna.Status_swigregister(Status) + +def Status_isOk(): + return _py3dna.Status_isOk() + +def Status_get(): + return _py3dna.Status_get() + +def Status_getHook(): + return _py3dna.Status_getHook() + +def Status_setHook(hook): + return _py3dna.Status_setHook(hook) + +class Readable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def read(self, *args): + return _py3dna.Readable_read(self, *args) + +# Register Readable in _py3dna: +_py3dna.Readable_swigregister(Readable) + +class Writable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def write(self, *args): + return _py3dna.Writable_write(self, *args) + +# Register Writable in _py3dna: +_py3dna.Writable_swigregister(Writable) + +class Seekable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def tell(self): + return _py3dna.Seekable_tell(self) + + def seek(self, position): + return _py3dna.Seekable_seek(self, position) + +# Register Seekable in _py3dna: +_py3dna.Seekable_swigregister(Seekable) + +class Openable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def open(self): + return _py3dna.Openable_open(self) + +# Register Openable in _py3dna: +_py3dna.Openable_swigregister(Openable) + +class Closeable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def close(self): + return _py3dna.Closeable_close(self) + +# Register Closeable in _py3dna: +_py3dna.Closeable_swigregister(Closeable) + +class Controllable(Openable, Closeable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + +# Register Controllable in _py3dna: +_py3dna.Controllable_swigregister(Controllable) + +class Bounded(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def size(self): + return _py3dna.Bounded_size(self) + +# Register Bounded in _py3dna: +_py3dna.Bounded_swigregister(Bounded) + +class Buffered(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def flush(self): + return _py3dna.Buffered_flush(self) + +# Register Buffered in _py3dna: +_py3dna.Buffered_swigregister(Buffered) + +class Resizable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def resize(self, size): + return _py3dna.Resizable_resize(self, size) + +# Register Resizable in _py3dna: +_py3dna.Resizable_swigregister(Resizable) + +class BoundedIOStream(Controllable, Readable, Writable, Seekable, Bounded): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_BoundedIOStream + +# Register BoundedIOStream in _py3dna: +_py3dna.BoundedIOStream_swigregister(BoundedIOStream) +cvar = _py3dna.cvar +BoundedIOStream.OpenError = _py3dna.cvar.BoundedIOStream_OpenError +BoundedIOStream.ReadError = _py3dna.cvar.BoundedIOStream_ReadError +BoundedIOStream.WriteError = _py3dna.cvar.BoundedIOStream_WriteError +BoundedIOStream.AlreadyOpenError = _py3dna.cvar.BoundedIOStream_AlreadyOpenError +BoundedIOStream.SeekError = _py3dna.cvar.BoundedIOStream_SeekError + +AccessMode_Read = _py3dna.AccessMode_Read +AccessMode_Write = _py3dna.AccessMode_Write +AccessMode_ReadWrite = _py3dna.AccessMode_ReadWrite +OpenMode_Binary = _py3dna.OpenMode_Binary +OpenMode_Text = _py3dna.OpenMode_Text +class FileStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.FileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_FileStream + +# Register FileStream in _py3dna: +_py3dna.FileStream_swigregister(FileStream) + +def FileStream_create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + +def FileStream_destroy(instance): + return _py3dna.FileStream_destroy(instance) + +class MemoryMappedFileStream(BoundedIOStream, Buffered, Resizable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryMappedFileStream + +# Register MemoryMappedFileStream in _py3dna: +_py3dna.MemoryMappedFileStream_swigregister(MemoryMappedFileStream) + +def MemoryMappedFileStream_create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + +def MemoryMappedFileStream_destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + +class MemoryStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.MemoryStream_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryStream + +# Register MemoryStream in _py3dna: +_py3dna.MemoryStream_swigregister(MemoryStream) + +def MemoryStream_create(*args): + return _py3dna.MemoryStream_create(*args) + +def MemoryStream_destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + + +FileStream.__new__ = __new_decorator(FileStream_create, FileStream.__new__) +FileStream.__del__ = lambda instance: FileStream_destroy(instance) +FileStream.__init__ = __managed_init +del FileStream.create +del FileStream.destroy + + +MemoryMappedFileStream.__new__ = __new_decorator(MemoryMappedFileStream_create, MemoryMappedFileStream.__new__) +MemoryMappedFileStream.__del__ = lambda instance: MemoryMappedFileStream_destroy(instance) +MemoryMappedFileStream.__init__ = __managed_init +del MemoryMappedFileStream.create +del MemoryMappedFileStream.destroy + + +MemoryStream.__new__ = __new_decorator(MemoryStream_create, MemoryStream.__new__) +MemoryStream.__del__ = lambda instance: MemoryStream_destroy(instance) +MemoryStream.__init__ = __managed_init +del MemoryStream.create +del MemoryStream.destroy + + +FileStream.AccessMode_Read = AccessMode_Read +FileStream.AccessMode_Write = AccessMode_Write +FileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +FileStream.OpenMode_Binary = OpenMode_Binary +FileStream.OpenMode_Text = OpenMode_Text + +MemoryMappedFileStream.AccessMode_Read = AccessMode_Read +MemoryMappedFileStream.AccessMode_Write = AccessMode_Write +MemoryMappedFileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +class StringView(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def c_str(self): + return _py3dna.StringView_c_str(self) + + def __ref__(self): + return _py3dna.StringView___ref__(self) + + def __init__(self): + _py3dna.StringView_swiginit(self, _py3dna.new_StringView()) + __swig_destroy__ = _py3dna.delete_StringView + +# Register StringView in _py3dna: +_py3dna.StringView_swigregister(StringView) + + +def __add__(*args): + return _py3dna.__add__(*args) + +def __sub__(*args): + return _py3dna.__sub__(*args) + +def __mul__(*args): + return _py3dna.__mul__(*args) + +def __truediv__(*args): + return _py3dna.__truediv__(*args) + +def __eq__(*args): + return _py3dna.__eq__(*args) + +def __ne__(*args): + return _py3dna.__ne__(*args) +DataLayer_Descriptor = _py3dna.DataLayer_Descriptor +DataLayer_Definition = _py3dna.DataLayer_Definition +DataLayer_Behavior = _py3dna.DataLayer_Behavior +DataLayer_Geometry = _py3dna.DataLayer_Geometry +DataLayer_GeometryWithoutBlendShapes = _py3dna.DataLayer_GeometryWithoutBlendShapes +DataLayer_AllWithoutBlendShapes = _py3dna.DataLayer_AllWithoutBlendShapes +DataLayer_All = _py3dna.DataLayer_All +Archetype_asian = _py3dna.Archetype_asian +Archetype_black = _py3dna.Archetype_black +Archetype_caucasian = _py3dna.Archetype_caucasian +Archetype_hispanic = _py3dna.Archetype_hispanic +Archetype_alien = _py3dna.Archetype_alien +Archetype_other = _py3dna.Archetype_other +Gender_male = _py3dna.Gender_male +Gender_female = _py3dna.Gender_female +Gender_other = _py3dna.Gender_other +TranslationUnit_cm = _py3dna.TranslationUnit_cm +TranslationUnit_m = _py3dna.TranslationUnit_m +RotationUnit_degrees = _py3dna.RotationUnit_degrees +RotationUnit_radians = _py3dna.RotationUnit_radians +Direction_left = _py3dna.Direction_left +Direction_right = _py3dna.Direction_right +Direction_up = _py3dna.Direction_up +Direction_down = _py3dna.Direction_down +Direction_front = _py3dna.Direction_front +Direction_back = _py3dna.Direction_back +class CoordinateSystem(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + xAxis = property(_py3dna.CoordinateSystem_xAxis_get, _py3dna.CoordinateSystem_xAxis_set) + yAxis = property(_py3dna.CoordinateSystem_yAxis_get, _py3dna.CoordinateSystem_yAxis_set) + zAxis = property(_py3dna.CoordinateSystem_zAxis_get, _py3dna.CoordinateSystem_zAxis_set) + + def __init__(self): + _py3dna.CoordinateSystem_swiginit(self, _py3dna.new_CoordinateSystem()) + __swig_destroy__ = _py3dna.delete_CoordinateSystem + +# Register CoordinateSystem in _py3dna: +_py3dna.CoordinateSystem_swigregister(CoordinateSystem) + +class DescriptorReader(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getName(self): + return _py3dna.DescriptorReader_getName(self) + + def getArchetype(self): + return _py3dna.DescriptorReader_getArchetype(self) + + def getGender(self): + return _py3dna.DescriptorReader_getGender(self) + + def getAge(self): + return _py3dna.DescriptorReader_getAge(self) + + def getMetaDataCount(self): + return _py3dna.DescriptorReader_getMetaDataCount(self) + + def getMetaDataKey(self, index): + return _py3dna.DescriptorReader_getMetaDataKey(self, index) + + def getMetaDataValue(self, key): + return _py3dna.DescriptorReader_getMetaDataValue(self, key) + + def getTranslationUnit(self): + return _py3dna.DescriptorReader_getTranslationUnit(self) + + def getRotationUnit(self): + return _py3dna.DescriptorReader_getRotationUnit(self) + + def getCoordinateSystem(self): + return _py3dna.DescriptorReader_getCoordinateSystem(self) + + def getLODCount(self): + return _py3dna.DescriptorReader_getLODCount(self) + + def getDBMaxLOD(self): + return _py3dna.DescriptorReader_getDBMaxLOD(self) + + def getDBComplexity(self): + return _py3dna.DescriptorReader_getDBComplexity(self) + + def getDBName(self): + return _py3dna.DescriptorReader_getDBName(self) + +# Register DescriptorReader in _py3dna: +_py3dna.DescriptorReader_swigregister(DescriptorReader) + +class MeshBlendShapeChannelMapping(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + meshIndex = property(_py3dna.MeshBlendShapeChannelMapping_meshIndex_get, _py3dna.MeshBlendShapeChannelMapping_meshIndex_set) + blendShapeChannelIndex = property(_py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_get, _py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_set) + + def __init__(self): + _py3dna.MeshBlendShapeChannelMapping_swiginit(self, _py3dna.new_MeshBlendShapeChannelMapping()) + __swig_destroy__ = _py3dna.delete_MeshBlendShapeChannelMapping + +# Register MeshBlendShapeChannelMapping in _py3dna: +_py3dna.MeshBlendShapeChannelMapping_swigregister(MeshBlendShapeChannelMapping) + +class DefinitionReader(DescriptorReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIControlCount(self): + return _py3dna.DefinitionReader_getGUIControlCount(self) + + def getGUIControlName(self, index): + return _py3dna.DefinitionReader_getGUIControlName(self, index) + + def getRawControlCount(self): + return _py3dna.DefinitionReader_getRawControlCount(self) + + def getRawControlName(self, index): + return _py3dna.DefinitionReader_getRawControlName(self, index) + + def getJointCount(self): + return _py3dna.DefinitionReader_getJointCount(self) + + def getJointName(self, index): + return _py3dna.DefinitionReader_getJointName(self, index) + + def getJointIndexListCount(self): + return _py3dna.DefinitionReader_getJointIndexListCount(self) + + def getJointIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getJointIndicesForLOD(self, lod) + + def getJointParentIndex(self, index): + return _py3dna.DefinitionReader_getJointParentIndex(self, index) + + def getBlendShapeChannelCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelCount(self) + + def getBlendShapeChannelName(self, index): + return _py3dna.DefinitionReader_getBlendShapeChannelName(self, index) + + def getBlendShapeChannelIndexListCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelIndexListCount(self) + + def getBlendShapeChannelIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getBlendShapeChannelIndicesForLOD(self, lod) + + def getAnimatedMapCount(self): + return _py3dna.DefinitionReader_getAnimatedMapCount(self) + + def getAnimatedMapName(self, index): + return _py3dna.DefinitionReader_getAnimatedMapName(self, index) + + def getAnimatedMapIndexListCount(self): + return _py3dna.DefinitionReader_getAnimatedMapIndexListCount(self) + + def getAnimatedMapIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getAnimatedMapIndicesForLOD(self, lod) + + def getMeshCount(self): + return _py3dna.DefinitionReader_getMeshCount(self) + + def getMeshName(self, index): + return _py3dna.DefinitionReader_getMeshName(self, index) + + def getMeshIndexListCount(self): + return _py3dna.DefinitionReader_getMeshIndexListCount(self) + + def getMeshIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshIndicesForLOD(self, lod) + + def getMeshBlendShapeChannelMappingCount(self): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingCount(self) + + def getMeshBlendShapeChannelMapping(self, index): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMapping(self, index) + + def getMeshBlendShapeChannelMappingIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingIndicesForLOD(self, lod) + + def getNeutralJointTranslation(self, index): + return _py3dna.DefinitionReader_getNeutralJointTranslation(self, index) + + def getNeutralJointTranslationXs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationXs(self) + + def getNeutralJointTranslationYs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationYs(self) + + def getNeutralJointTranslationZs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationZs(self) + + def getNeutralJointRotation(self, index): + return _py3dna.DefinitionReader_getNeutralJointRotation(self, index) + + def getNeutralJointRotationXs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationXs(self) + + def getNeutralJointRotationYs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationYs(self) + + def getNeutralJointRotationZs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationZs(self) + +# Register DefinitionReader in _py3dna: +_py3dna.DefinitionReader_swigregister(DefinitionReader) + +class BehaviorReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIToRawInputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawInputIndices(self) + + def getGUIToRawOutputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawOutputIndices(self) + + def getGUIToRawFromValues(self): + return _py3dna.BehaviorReader_getGUIToRawFromValues(self) + + def getGUIToRawToValues(self): + return _py3dna.BehaviorReader_getGUIToRawToValues(self) + + def getGUIToRawSlopeValues(self): + return _py3dna.BehaviorReader_getGUIToRawSlopeValues(self) + + def getGUIToRawCutValues(self): + return _py3dna.BehaviorReader_getGUIToRawCutValues(self) + + def getPSDCount(self): + return _py3dna.BehaviorReader_getPSDCount(self) + + def getPSDRowIndices(self): + return _py3dna.BehaviorReader_getPSDRowIndices(self) + + def getPSDColumnIndices(self): + return _py3dna.BehaviorReader_getPSDColumnIndices(self) + + def getPSDValues(self): + return _py3dna.BehaviorReader_getPSDValues(self) + + def getJointRowCount(self): + return _py3dna.BehaviorReader_getJointRowCount(self) + + def getJointColumnCount(self): + return _py3dna.BehaviorReader_getJointColumnCount(self) + + def getJointVariableAttributeIndices(self, lod): + return _py3dna.BehaviorReader_getJointVariableAttributeIndices(self, lod) + + def getJointGroupCount(self): + return _py3dna.BehaviorReader_getJointGroupCount(self) + + def getJointGroupLODs(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupLODs(self, jointGroupIndex) + + def getJointGroupInputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupInputIndices(self, jointGroupIndex) + + def getJointGroupOutputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupOutputIndices(self, jointGroupIndex) + + def getJointGroupValues(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupValues(self, jointGroupIndex) + + def getJointGroupJointIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupJointIndices(self, jointGroupIndex) + + def getBlendShapeChannelLODs(self): + return _py3dna.BehaviorReader_getBlendShapeChannelLODs(self) + + def getBlendShapeChannelInputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelInputIndices(self) + + def getBlendShapeChannelOutputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelOutputIndices(self) + + def getAnimatedMapLODs(self): + return _py3dna.BehaviorReader_getAnimatedMapLODs(self) + + def getAnimatedMapInputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapInputIndices(self) + + def getAnimatedMapOutputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapOutputIndices(self) + + def getAnimatedMapFromValues(self): + return _py3dna.BehaviorReader_getAnimatedMapFromValues(self) + + def getAnimatedMapToValues(self): + return _py3dna.BehaviorReader_getAnimatedMapToValues(self) + + def getAnimatedMapSlopeValues(self): + return _py3dna.BehaviorReader_getAnimatedMapSlopeValues(self) + + def getAnimatedMapCutValues(self): + return _py3dna.BehaviorReader_getAnimatedMapCutValues(self) + +# Register BehaviorReader in _py3dna: +_py3dna.BehaviorReader_swigregister(BehaviorReader) + +class GeometryReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getVertexPositionCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionCount(self, meshIndex) + + def getVertexPosition(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getVertexPosition(self, meshIndex, vertexIndex) + + def getVertexPositionXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionXs(self, meshIndex) + + def getVertexPositionYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionYs(self, meshIndex) + + def getVertexPositionZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionZs(self, meshIndex) + + def getVertexTextureCoordinateCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateCount(self, meshIndex) + + def getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex) + + def getVertexTextureCoordinateUs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateUs(self, meshIndex) + + def getVertexTextureCoordinateVs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateVs(self, meshIndex) + + def getVertexNormalCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalCount(self, meshIndex) + + def getVertexNormal(self, meshIndex, normalIndex): + return _py3dna.GeometryReader_getVertexNormal(self, meshIndex, normalIndex) + + def getVertexNormalXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalXs(self, meshIndex) + + def getVertexNormalYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalYs(self, meshIndex) + + def getVertexNormalZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalZs(self, meshIndex) + + def getVertexLayoutCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutCount(self, meshIndex) + + def getVertexLayout(self, meshIndex, layoutIndex): + return _py3dna.GeometryReader_getVertexLayout(self, meshIndex, layoutIndex) + + def getVertexLayoutPositionIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutPositionIndices(self, meshIndex) + + def getVertexLayoutTextureCoordinateIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutTextureCoordinateIndices(self, meshIndex) + + def getVertexLayoutNormalIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutNormalIndices(self, meshIndex) + + def getFaceCount(self, meshIndex): + return _py3dna.GeometryReader_getFaceCount(self, meshIndex) + + def getFaceVertexLayoutIndices(self, meshIndex, faceIndex): + return _py3dna.GeometryReader_getFaceVertexLayoutIndices(self, meshIndex, faceIndex) + + def getMaximumInfluencePerVertex(self, meshIndex): + return _py3dna.GeometryReader_getMaximumInfluencePerVertex(self, meshIndex) + + def getSkinWeightsCount(self, meshIndex): + return _py3dna.GeometryReader_getSkinWeightsCount(self, meshIndex) + + def getSkinWeightsValues(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsValues(self, meshIndex, vertexIndex) + + def getSkinWeightsJointIndices(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsJointIndices(self, meshIndex, vertexIndex) + + def getBlendShapeTargetCount(self, meshIndex): + return _py3dna.GeometryReader_getBlendShapeTargetCount(self, meshIndex) + + def getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex) + + def getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex) + +# Register GeometryReader in _py3dna: +_py3dna.GeometryReader_swigregister(GeometryReader) + +class Reader(BehaviorReader, GeometryReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Reader + + def unload(self, layer): + return _py3dna.Reader_unload(self, layer) + +# Register Reader in _py3dna: +_py3dna.Reader_swigregister(Reader) + +class StreamReader(Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamReader + + def read(self): + return _py3dna.StreamReader_read(self) + +# Register StreamReader in _py3dna: +_py3dna.StreamReader_swigregister(StreamReader) +StreamReader.SignatureMismatchError = _py3dna.cvar.StreamReader_SignatureMismatchError +StreamReader.VersionMismatchError = _py3dna.cvar.StreamReader_VersionMismatchError +StreamReader.InvalidDataError = _py3dna.cvar.StreamReader_InvalidDataError + +class BinaryStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.BinaryStreamReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamReader + +# Register BinaryStreamReader in _py3dna: +_py3dna.BinaryStreamReader_swigregister(BinaryStreamReader) + +def BinaryStreamReader_create(*args): + return _py3dna.BinaryStreamReader_create(*args) + +def BinaryStreamReader_destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + +class JSONStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamReader + +# Register JSONStreamReader in _py3dna: +_py3dna.JSONStreamReader_swigregister(JSONStreamReader) + +def JSONStreamReader_create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + +def JSONStreamReader_destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + + +BinaryStreamReader.__new__ = __new_decorator(BinaryStreamReader_create, BinaryStreamReader.__new__) +BinaryStreamReader.__del__ = lambda instance: BinaryStreamReader_destroy(instance) +BinaryStreamReader.__init__ = __managed_init +del BinaryStreamReader.create +del BinaryStreamReader.destroy + + +JSONStreamReader.__new__ = __new_decorator(JSONStreamReader_create, JSONStreamReader.__new__) +JSONStreamReader.__del__ = lambda instance: JSONStreamReader_destroy(instance) +JSONStreamReader.__init__ = __managed_init +del JSONStreamReader.create +del JSONStreamReader.destroy + +class DescriptorWriter(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setName(self, name): + return _py3dna.DescriptorWriter_setName(self, name) + + def setArchetype(self, archetype): + return _py3dna.DescriptorWriter_setArchetype(self, archetype) + + def setGender(self, gender): + return _py3dna.DescriptorWriter_setGender(self, gender) + + def setAge(self, age): + return _py3dna.DescriptorWriter_setAge(self, age) + + def clearMetaData(self): + return _py3dna.DescriptorWriter_clearMetaData(self) + + def setMetaData(self, key, value): + return _py3dna.DescriptorWriter_setMetaData(self, key, value) + + def setTranslationUnit(self, unit): + return _py3dna.DescriptorWriter_setTranslationUnit(self, unit) + + def setRotationUnit(self, unit): + return _py3dna.DescriptorWriter_setRotationUnit(self, unit) + + def setCoordinateSystem(self, system): + return _py3dna.DescriptorWriter_setCoordinateSystem(self, system) + + def setLODCount(self, lodCount): + return _py3dna.DescriptorWriter_setLODCount(self, lodCount) + + def setDBMaxLOD(self, lod): + return _py3dna.DescriptorWriter_setDBMaxLOD(self, lod) + + def setDBComplexity(self, name): + return _py3dna.DescriptorWriter_setDBComplexity(self, name) + + def setDBName(self, name): + return _py3dna.DescriptorWriter_setDBName(self, name) + +# Register DescriptorWriter in _py3dna: +_py3dna.DescriptorWriter_swigregister(DescriptorWriter) + +class DefinitionWriter(DescriptorWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearGUIControlNames(self): + return _py3dna.DefinitionWriter_clearGUIControlNames(self) + + def setGUIControlName(self, index, name): + return _py3dna.DefinitionWriter_setGUIControlName(self, index, name) + + def clearRawControlNames(self): + return _py3dna.DefinitionWriter_clearRawControlNames(self) + + def setRawControlName(self, index, name): + return _py3dna.DefinitionWriter_setRawControlName(self, index, name) + + def clearJointNames(self): + return _py3dna.DefinitionWriter_clearJointNames(self) + + def setJointName(self, index, name): + return _py3dna.DefinitionWriter_setJointName(self, index, name) + + def clearJointIndices(self): + return _py3dna.DefinitionWriter_clearJointIndices(self) + + def setJointIndices(self, index, jointIndices): + return _py3dna.DefinitionWriter_setJointIndices(self, index, jointIndices) + + def clearLODJointMappings(self): + return _py3dna.DefinitionWriter_clearLODJointMappings(self) + + def setLODJointMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODJointMapping(self, lod, index) + + def clearBlendShapeChannelNames(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelNames(self) + + def setBlendShapeChannelName(self, index, name): + return _py3dna.DefinitionWriter_setBlendShapeChannelName(self, index, name) + + def clearBlendShapeChannelIndices(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelIndices(self) + + def setBlendShapeChannelIndices(self, index, blendShapeChannelIndices): + return _py3dna.DefinitionWriter_setBlendShapeChannelIndices(self, index, blendShapeChannelIndices) + + def clearLODBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearLODBlendShapeChannelMappings(self) + + def setLODBlendShapeChannelMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODBlendShapeChannelMapping(self, lod, index) + + def clearAnimatedMapNames(self): + return _py3dna.DefinitionWriter_clearAnimatedMapNames(self) + + def setAnimatedMapName(self, index, name): + return _py3dna.DefinitionWriter_setAnimatedMapName(self, index, name) + + def clearAnimatedMapIndices(self): + return _py3dna.DefinitionWriter_clearAnimatedMapIndices(self) + + def setAnimatedMapIndices(self, index, animatedMapIndices): + return _py3dna.DefinitionWriter_setAnimatedMapIndices(self, index, animatedMapIndices) + + def clearLODAnimatedMapMappings(self): + return _py3dna.DefinitionWriter_clearLODAnimatedMapMappings(self) + + def setLODAnimatedMapMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODAnimatedMapMapping(self, lod, index) + + def clearMeshNames(self): + return _py3dna.DefinitionWriter_clearMeshNames(self) + + def setMeshName(self, index, name): + return _py3dna.DefinitionWriter_setMeshName(self, index, name) + + def clearMeshIndices(self): + return _py3dna.DefinitionWriter_clearMeshIndices(self) + + def setMeshIndices(self, index, meshIndices): + return _py3dna.DefinitionWriter_setMeshIndices(self, index, meshIndices) + + def clearLODMeshMappings(self): + return _py3dna.DefinitionWriter_clearLODMeshMappings(self) + + def setLODMeshMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODMeshMapping(self, lod, index) + + def clearMeshBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearMeshBlendShapeChannelMappings(self) + + def setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex): + return _py3dna.DefinitionWriter_setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex) + + def setJointHierarchy(self, jointIndices): + return _py3dna.DefinitionWriter_setJointHierarchy(self, jointIndices) + + def setNeutralJointTranslations(self, translations): + return _py3dna.DefinitionWriter_setNeutralJointTranslations(self, translations) + + def setNeutralJointRotations(self, rotations): + return _py3dna.DefinitionWriter_setNeutralJointRotations(self, rotations) + +# Register DefinitionWriter in _py3dna: +_py3dna.DefinitionWriter_swigregister(DefinitionWriter) + +class BehaviorWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setGUIToRawInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setGUIToRawInputIndices(self, inputIndices) + + def setGUIToRawOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setGUIToRawOutputIndices(self, outputIndices) + + def setGUIToRawFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setGUIToRawFromValues(self, fromValues) + + def setGUIToRawToValues(self, toValues): + return _py3dna.BehaviorWriter_setGUIToRawToValues(self, toValues) + + def setGUIToRawSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setGUIToRawSlopeValues(self, slopeValues) + + def setGUIToRawCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setGUIToRawCutValues(self, cutValues) + + def setPSDCount(self, count): + return _py3dna.BehaviorWriter_setPSDCount(self, count) + + def setPSDRowIndices(self, rowIndices): + return _py3dna.BehaviorWriter_setPSDRowIndices(self, rowIndices) + + def setPSDColumnIndices(self, columnIndices): + return _py3dna.BehaviorWriter_setPSDColumnIndices(self, columnIndices) + + def setPSDValues(self, weights): + return _py3dna.BehaviorWriter_setPSDValues(self, weights) + + def setJointRowCount(self, rowCount): + return _py3dna.BehaviorWriter_setJointRowCount(self, rowCount) + + def setJointColumnCount(self, columnCount): + return _py3dna.BehaviorWriter_setJointColumnCount(self, columnCount) + + def clearJointGroups(self): + return _py3dna.BehaviorWriter_clearJointGroups(self) + + def deleteJointGroup(self, jointGroupIndex): + return _py3dna.BehaviorWriter_deleteJointGroup(self, jointGroupIndex) + + def setJointGroupLODs(self, jointGroupIndex, lods): + return _py3dna.BehaviorWriter_setJointGroupLODs(self, jointGroupIndex, lods) + + def setJointGroupInputIndices(self, jointGroupIndex, inputIndices): + return _py3dna.BehaviorWriter_setJointGroupInputIndices(self, jointGroupIndex, inputIndices) + + def setJointGroupOutputIndices(self, jointGroupIndex, outputIndices): + return _py3dna.BehaviorWriter_setJointGroupOutputIndices(self, jointGroupIndex, outputIndices) + + def setJointGroupValues(self, jointGroupIndex, values): + return _py3dna.BehaviorWriter_setJointGroupValues(self, jointGroupIndex, values) + + def setJointGroupJointIndices(self, jointGroupIndex, jointIndices): + return _py3dna.BehaviorWriter_setJointGroupJointIndices(self, jointGroupIndex, jointIndices) + + def setBlendShapeChannelLODs(self, lods): + return _py3dna.BehaviorWriter_setBlendShapeChannelLODs(self, lods) + + def setBlendShapeChannelInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelInputIndices(self, inputIndices) + + def setBlendShapeChannelOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelOutputIndices(self, outputIndices) + + def setAnimatedMapLODs(self, lods): + return _py3dna.BehaviorWriter_setAnimatedMapLODs(self, lods) + + def setAnimatedMapInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapInputIndices(self, inputIndices) + + def setAnimatedMapOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapOutputIndices(self, outputIndices) + + def setAnimatedMapFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setAnimatedMapFromValues(self, fromValues) + + def setAnimatedMapToValues(self, toValues): + return _py3dna.BehaviorWriter_setAnimatedMapToValues(self, toValues) + + def setAnimatedMapSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setAnimatedMapSlopeValues(self, slopeValues) + + def setAnimatedMapCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setAnimatedMapCutValues(self, cutValues) + +# Register BehaviorWriter in _py3dna: +_py3dna.BehaviorWriter_swigregister(BehaviorWriter) + +class GeometryWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearMeshes(self): + return _py3dna.GeometryWriter_clearMeshes(self) + + def deleteMesh(self, meshIndex): + return _py3dna.GeometryWriter_deleteMesh(self, meshIndex) + + def setVertexPositions(self, meshIndex, positions): + return _py3dna.GeometryWriter_setVertexPositions(self, meshIndex, positions) + + def setVertexTextureCoordinates(self, meshIndex, textureCoordinates): + return _py3dna.GeometryWriter_setVertexTextureCoordinates(self, meshIndex, textureCoordinates) + + def setVertexNormals(self, meshIndex, normals): + return _py3dna.GeometryWriter_setVertexNormals(self, meshIndex, normals) + + def setVertexLayouts(self, meshIndex, layouts): + return _py3dna.GeometryWriter_setVertexLayouts(self, meshIndex, layouts) + + def clearFaceVertexLayoutIndices(self, meshIndex): + return _py3dna.GeometryWriter_clearFaceVertexLayoutIndices(self, meshIndex) + + def setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices): + return _py3dna.GeometryWriter_setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices) + + def setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount): + return _py3dna.GeometryWriter_setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount) + + def clearSkinWeights(self, meshIndex): + return _py3dna.GeometryWriter_clearSkinWeights(self, meshIndex) + + def setSkinWeightsValues(self, meshIndex, vertexIndex, weights): + return _py3dna.GeometryWriter_setSkinWeightsValues(self, meshIndex, vertexIndex, weights) + + def setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices): + return _py3dna.GeometryWriter_setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices) + + def clearBlendShapeTargets(self, meshIndex): + return _py3dna.GeometryWriter_clearBlendShapeTargets(self, meshIndex) + + def setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex): + return _py3dna.GeometryWriter_setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex) + + def setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas): + return _py3dna.GeometryWriter_setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas) + + def setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices): + return _py3dna.GeometryWriter_setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices) + +# Register GeometryWriter in _py3dna: +_py3dna.GeometryWriter_swigregister(GeometryWriter) + +class Writer(BehaviorWriter, GeometryWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Writer + + def setFrom(self, *args): + return _py3dna.Writer_setFrom(self, *args) + +# Register Writer in _py3dna: +_py3dna.Writer_swigregister(Writer) + +class StreamWriter(Writer): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamWriter + + def write(self): + return _py3dna.StreamWriter_write(self) + +# Register StreamWriter in _py3dna: +_py3dna.StreamWriter_swigregister(StreamWriter) + +class BinaryStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamWriter + +# Register BinaryStreamWriter in _py3dna: +_py3dna.BinaryStreamWriter_swigregister(BinaryStreamWriter) + +def BinaryStreamWriter_create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + +def BinaryStreamWriter_destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + +class JSONStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamWriter + +# Register JSONStreamWriter in _py3dna: +_py3dna.JSONStreamWriter_swigregister(JSONStreamWriter) + +def JSONStreamWriter_create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + +def JSONStreamWriter_destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + + +BinaryStreamWriter.__new__ = __new_decorator(BinaryStreamWriter_create, BinaryStreamWriter.__new__) +BinaryStreamWriter.__del__ = lambda instance: BinaryStreamWriter_destroy(instance) +BinaryStreamWriter.__init__ = __managed_init +del BinaryStreamWriter.create +del BinaryStreamWriter.destroy + + +JSONStreamWriter.__new__ = __new_decorator(JSONStreamWriter_create, JSONStreamWriter.__new__) +JSONStreamWriter.__del__ = lambda instance: JSONStreamWriter_destroy(instance) +JSONStreamWriter.__init__ = __managed_init +del JSONStreamWriter.create +del JSONStreamWriter.destroy + + + diff --git a/plugins/Windows/pydna/python311/_py3dna.pyd b/plugins/Windows/pydna/python311/_py3dna.pyd new file mode 100644 index 0000000..93b352e Binary files /dev/null and b/plugins/Windows/pydna/python311/_py3dna.pyd differ diff --git a/plugins/Windows/pydna/python311/_py3dna9_4_3.pyd b/plugins/Windows/pydna/python311/_py3dna9_4_3.pyd new file mode 100644 index 0000000..652aafd Binary files /dev/null and b/plugins/Windows/pydna/python311/_py3dna9_4_3.pyd differ diff --git a/plugins/Windows/pydna/python311/dna.dll b/plugins/Windows/pydna/python311/dna.dll new file mode 100644 index 0000000..97e1920 Binary files /dev/null and b/plugins/Windows/pydna/python311/dna.dll differ diff --git a/plugins/Windows/pydna/python311/dna.py b/plugins/Windows/pydna/python311/dna.py new file mode 100644 index 0000000..d21635b --- /dev/null +++ b/plugins/Windows/pydna/python311/dna.py @@ -0,0 +1,1403 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.1 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError("Python 2.7 or later required") + +# Import the low-level C/C++ module +if __package__ or "." in __name__: + from . import _py3dna +else: + import _py3dna + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +class MemoryResource(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_MemoryResource + + def allocate(self, size, alignment): + return _py3dna.MemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.MemoryResource_deallocate(self, ptr, size, alignment) + +# Register MemoryResource in _py3dna: +_py3dna.MemoryResource_swigregister(MemoryResource) + +class AlignedMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.AlignedMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.AlignedMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.AlignedMemoryResource_swiginit(self, _py3dna.new_AlignedMemoryResource()) + __swig_destroy__ = _py3dna.delete_AlignedMemoryResource + +# Register AlignedMemoryResource in _py3dna: +_py3dna.AlignedMemoryResource_swigregister(AlignedMemoryResource) + +class ArenaMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_ArenaMemoryResource + + def __init__(self, *args): + _py3dna.ArenaMemoryResource_swiginit(self, _py3dna.new_ArenaMemoryResource(*args)) + + def allocate(self, size, alignment): + return _py3dna.ArenaMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.ArenaMemoryResource_deallocate(self, ptr, size, alignment) + + def getUpstreamMemoryResource(self): + return _py3dna.ArenaMemoryResource_getUpstreamMemoryResource(self) + +# Register ArenaMemoryResource in _py3dna: +_py3dna.ArenaMemoryResource_swigregister(ArenaMemoryResource) + +class DefaultMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.DefaultMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.DefaultMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.DefaultMemoryResource_swiginit(self, _py3dna.new_DefaultMemoryResource()) + __swig_destroy__ = _py3dna.delete_DefaultMemoryResource + +# Register DefaultMemoryResource in _py3dna: +_py3dna.DefaultMemoryResource_swigregister(DefaultMemoryResource) + +class StatusCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + code = property(_py3dna.StatusCode_code_get, _py3dna.StatusCode_code_set) + message = property(_py3dna.StatusCode_message_get, _py3dna.StatusCode_message_set) + + def __init__(self): + _py3dna.StatusCode_swiginit(self, _py3dna.new_StatusCode()) + __swig_destroy__ = _py3dna.delete_StatusCode + +# Register StatusCode in _py3dna: +_py3dna.StatusCode_swigregister(StatusCode) + +class Status(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + @staticmethod + def isOk(): + return _py3dna.Status_isOk() + + @staticmethod + def get(): + return _py3dna.Status_get() + + @staticmethod + def getHook(): + return _py3dna.Status_getHook() + + @staticmethod + def setHook(hook): + return _py3dna.Status_setHook(hook) + + def __init__(self): + _py3dna.Status_swiginit(self, _py3dna.new_Status()) + __swig_destroy__ = _py3dna.delete_Status + +# Register Status in _py3dna: +_py3dna.Status_swigregister(Status) + +def Status_isOk(): + return _py3dna.Status_isOk() + +def Status_get(): + return _py3dna.Status_get() + +def Status_getHook(): + return _py3dna.Status_getHook() + +def Status_setHook(hook): + return _py3dna.Status_setHook(hook) + +class Readable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def read(self, *args): + return _py3dna.Readable_read(self, *args) + +# Register Readable in _py3dna: +_py3dna.Readable_swigregister(Readable) + +class Writable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def write(self, *args): + return _py3dna.Writable_write(self, *args) + +# Register Writable in _py3dna: +_py3dna.Writable_swigregister(Writable) + +class Seekable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def tell(self): + return _py3dna.Seekable_tell(self) + + def seek(self, position): + return _py3dna.Seekable_seek(self, position) + +# Register Seekable in _py3dna: +_py3dna.Seekable_swigregister(Seekable) + +class Openable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def open(self): + return _py3dna.Openable_open(self) + +# Register Openable in _py3dna: +_py3dna.Openable_swigregister(Openable) + +class Closeable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def close(self): + return _py3dna.Closeable_close(self) + +# Register Closeable in _py3dna: +_py3dna.Closeable_swigregister(Closeable) + +class Controllable(Openable, Closeable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + +# Register Controllable in _py3dna: +_py3dna.Controllable_swigregister(Controllable) + +class Bounded(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def size(self): + return _py3dna.Bounded_size(self) + +# Register Bounded in _py3dna: +_py3dna.Bounded_swigregister(Bounded) + +class Buffered(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def flush(self): + return _py3dna.Buffered_flush(self) + +# Register Buffered in _py3dna: +_py3dna.Buffered_swigregister(Buffered) + +class Resizable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def resize(self, size): + return _py3dna.Resizable_resize(self, size) + +# Register Resizable in _py3dna: +_py3dna.Resizable_swigregister(Resizable) + +class BoundedIOStream(Controllable, Readable, Writable, Seekable, Bounded): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_BoundedIOStream + +# Register BoundedIOStream in _py3dna: +_py3dna.BoundedIOStream_swigregister(BoundedIOStream) +cvar = _py3dna.cvar +BoundedIOStream.OpenError = _py3dna.cvar.BoundedIOStream_OpenError +BoundedIOStream.ReadError = _py3dna.cvar.BoundedIOStream_ReadError +BoundedIOStream.WriteError = _py3dna.cvar.BoundedIOStream_WriteError +BoundedIOStream.AlreadyOpenError = _py3dna.cvar.BoundedIOStream_AlreadyOpenError +BoundedIOStream.SeekError = _py3dna.cvar.BoundedIOStream_SeekError + +AccessMode_Read = _py3dna.AccessMode_Read +AccessMode_Write = _py3dna.AccessMode_Write +AccessMode_ReadWrite = _py3dna.AccessMode_ReadWrite +OpenMode_Binary = _py3dna.OpenMode_Binary +OpenMode_Text = _py3dna.OpenMode_Text +class FileStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.FileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_FileStream + +# Register FileStream in _py3dna: +_py3dna.FileStream_swigregister(FileStream) + +def FileStream_create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + +def FileStream_destroy(instance): + return _py3dna.FileStream_destroy(instance) + +class MemoryMappedFileStream(BoundedIOStream, Buffered, Resizable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryMappedFileStream + +# Register MemoryMappedFileStream in _py3dna: +_py3dna.MemoryMappedFileStream_swigregister(MemoryMappedFileStream) + +def MemoryMappedFileStream_create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + +def MemoryMappedFileStream_destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + +class MemoryStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.MemoryStream_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryStream + +# Register MemoryStream in _py3dna: +_py3dna.MemoryStream_swigregister(MemoryStream) + +def MemoryStream_create(*args): + return _py3dna.MemoryStream_create(*args) + +def MemoryStream_destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + + +FileStream.__new__ = __new_decorator(FileStream_create, FileStream.__new__) +FileStream.__del__ = lambda instance: FileStream_destroy(instance) +FileStream.__init__ = __managed_init +del FileStream.create +del FileStream.destroy + + +MemoryMappedFileStream.__new__ = __new_decorator(MemoryMappedFileStream_create, MemoryMappedFileStream.__new__) +MemoryMappedFileStream.__del__ = lambda instance: MemoryMappedFileStream_destroy(instance) +MemoryMappedFileStream.__init__ = __managed_init +del MemoryMappedFileStream.create +del MemoryMappedFileStream.destroy + + +MemoryStream.__new__ = __new_decorator(MemoryStream_create, MemoryStream.__new__) +MemoryStream.__del__ = lambda instance: MemoryStream_destroy(instance) +MemoryStream.__init__ = __managed_init +del MemoryStream.create +del MemoryStream.destroy + + +FileStream.AccessMode_Read = AccessMode_Read +FileStream.AccessMode_Write = AccessMode_Write +FileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +FileStream.OpenMode_Binary = OpenMode_Binary +FileStream.OpenMode_Text = OpenMode_Text + +MemoryMappedFileStream.AccessMode_Read = AccessMode_Read +MemoryMappedFileStream.AccessMode_Write = AccessMode_Write +MemoryMappedFileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +class StringView(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + + def c_str(self): + return _py3dna.StringView_c_str(self) + + def __ref__(self): + return _py3dna.StringView___ref__(self) + + def __init__(self): + _py3dna.StringView_swiginit(self, _py3dna.new_StringView()) + __swig_destroy__ = _py3dna.delete_StringView + +# Register StringView in _py3dna: +_py3dna.StringView_swigregister(StringView) + + +def __add__(*args): + return _py3dna.__add__(*args) + +def __sub__(*args): + return _py3dna.__sub__(*args) + +def __mul__(*args): + return _py3dna.__mul__(*args) + +def __truediv__(*args): + return _py3dna.__truediv__(*args) + +def __eq__(*args): + return _py3dna.__eq__(*args) + +def __ne__(*args): + return _py3dna.__ne__(*args) +DataLayer_Descriptor = _py3dna.DataLayer_Descriptor +DataLayer_Definition = _py3dna.DataLayer_Definition +DataLayer_Behavior = _py3dna.DataLayer_Behavior +DataLayer_Geometry = _py3dna.DataLayer_Geometry +DataLayer_GeometryWithoutBlendShapes = _py3dna.DataLayer_GeometryWithoutBlendShapes +DataLayer_AllWithoutBlendShapes = _py3dna.DataLayer_AllWithoutBlendShapes +DataLayer_All = _py3dna.DataLayer_All +Archetype_asian = _py3dna.Archetype_asian +Archetype_black = _py3dna.Archetype_black +Archetype_caucasian = _py3dna.Archetype_caucasian +Archetype_hispanic = _py3dna.Archetype_hispanic +Archetype_alien = _py3dna.Archetype_alien +Archetype_other = _py3dna.Archetype_other +Gender_male = _py3dna.Gender_male +Gender_female = _py3dna.Gender_female +Gender_other = _py3dna.Gender_other +TranslationUnit_cm = _py3dna.TranslationUnit_cm +TranslationUnit_m = _py3dna.TranslationUnit_m +RotationUnit_degrees = _py3dna.RotationUnit_degrees +RotationUnit_radians = _py3dna.RotationUnit_radians +Direction_left = _py3dna.Direction_left +Direction_right = _py3dna.Direction_right +Direction_up = _py3dna.Direction_up +Direction_down = _py3dna.Direction_down +Direction_front = _py3dna.Direction_front +Direction_back = _py3dna.Direction_back +class CoordinateSystem(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + xAxis = property(_py3dna.CoordinateSystem_xAxis_get, _py3dna.CoordinateSystem_xAxis_set) + yAxis = property(_py3dna.CoordinateSystem_yAxis_get, _py3dna.CoordinateSystem_yAxis_set) + zAxis = property(_py3dna.CoordinateSystem_zAxis_get, _py3dna.CoordinateSystem_zAxis_set) + + def __init__(self): + _py3dna.CoordinateSystem_swiginit(self, _py3dna.new_CoordinateSystem()) + __swig_destroy__ = _py3dna.delete_CoordinateSystem + +# Register CoordinateSystem in _py3dna: +_py3dna.CoordinateSystem_swigregister(CoordinateSystem) + +class DescriptorReader(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getName(self): + return _py3dna.DescriptorReader_getName(self) + + def getArchetype(self): + return _py3dna.DescriptorReader_getArchetype(self) + + def getGender(self): + return _py3dna.DescriptorReader_getGender(self) + + def getAge(self): + return _py3dna.DescriptorReader_getAge(self) + + def getMetaDataCount(self): + return _py3dna.DescriptorReader_getMetaDataCount(self) + + def getMetaDataKey(self, index): + return _py3dna.DescriptorReader_getMetaDataKey(self, index) + + def getMetaDataValue(self, key): + return _py3dna.DescriptorReader_getMetaDataValue(self, key) + + def getTranslationUnit(self): + return _py3dna.DescriptorReader_getTranslationUnit(self) + + def getRotationUnit(self): + return _py3dna.DescriptorReader_getRotationUnit(self) + + def getCoordinateSystem(self): + return _py3dna.DescriptorReader_getCoordinateSystem(self) + + def getLODCount(self): + return _py3dna.DescriptorReader_getLODCount(self) + + def getDBMaxLOD(self): + return _py3dna.DescriptorReader_getDBMaxLOD(self) + + def getDBComplexity(self): + return _py3dna.DescriptorReader_getDBComplexity(self) + + def getDBName(self): + return _py3dna.DescriptorReader_getDBName(self) + +# Register DescriptorReader in _py3dna: +_py3dna.DescriptorReader_swigregister(DescriptorReader) + +class MeshBlendShapeChannelMapping(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + __repr__ = _swig_repr + meshIndex = property(_py3dna.MeshBlendShapeChannelMapping_meshIndex_get, _py3dna.MeshBlendShapeChannelMapping_meshIndex_set) + blendShapeChannelIndex = property(_py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_get, _py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_set) + + def __init__(self): + _py3dna.MeshBlendShapeChannelMapping_swiginit(self, _py3dna.new_MeshBlendShapeChannelMapping()) + __swig_destroy__ = _py3dna.delete_MeshBlendShapeChannelMapping + +# Register MeshBlendShapeChannelMapping in _py3dna: +_py3dna.MeshBlendShapeChannelMapping_swigregister(MeshBlendShapeChannelMapping) + +class DefinitionReader(DescriptorReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIControlCount(self): + return _py3dna.DefinitionReader_getGUIControlCount(self) + + def getGUIControlName(self, index): + return _py3dna.DefinitionReader_getGUIControlName(self, index) + + def getRawControlCount(self): + return _py3dna.DefinitionReader_getRawControlCount(self) + + def getRawControlName(self, index): + return _py3dna.DefinitionReader_getRawControlName(self, index) + + def getJointCount(self): + return _py3dna.DefinitionReader_getJointCount(self) + + def getJointName(self, index): + return _py3dna.DefinitionReader_getJointName(self, index) + + def getJointIndexListCount(self): + return _py3dna.DefinitionReader_getJointIndexListCount(self) + + def getJointIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getJointIndicesForLOD(self, lod) + + def getJointParentIndex(self, index): + return _py3dna.DefinitionReader_getJointParentIndex(self, index) + + def getBlendShapeChannelCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelCount(self) + + def getBlendShapeChannelName(self, index): + return _py3dna.DefinitionReader_getBlendShapeChannelName(self, index) + + def getBlendShapeChannelIndexListCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelIndexListCount(self) + + def getBlendShapeChannelIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getBlendShapeChannelIndicesForLOD(self, lod) + + def getAnimatedMapCount(self): + return _py3dna.DefinitionReader_getAnimatedMapCount(self) + + def getAnimatedMapName(self, index): + return _py3dna.DefinitionReader_getAnimatedMapName(self, index) + + def getAnimatedMapIndexListCount(self): + return _py3dna.DefinitionReader_getAnimatedMapIndexListCount(self) + + def getAnimatedMapIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getAnimatedMapIndicesForLOD(self, lod) + + def getMeshCount(self): + return _py3dna.DefinitionReader_getMeshCount(self) + + def getMeshName(self, index): + return _py3dna.DefinitionReader_getMeshName(self, index) + + def getMeshIndexListCount(self): + return _py3dna.DefinitionReader_getMeshIndexListCount(self) + + def getMeshIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshIndicesForLOD(self, lod) + + def getMeshBlendShapeChannelMappingCount(self): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingCount(self) + + def getMeshBlendShapeChannelMapping(self, index): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMapping(self, index) + + def getMeshBlendShapeChannelMappingIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingIndicesForLOD(self, lod) + + def getNeutralJointTranslation(self, index): + return _py3dna.DefinitionReader_getNeutralJointTranslation(self, index) + + def getNeutralJointTranslationXs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationXs(self) + + def getNeutralJointTranslationYs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationYs(self) + + def getNeutralJointTranslationZs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationZs(self) + + def getNeutralJointRotation(self, index): + return _py3dna.DefinitionReader_getNeutralJointRotation(self, index) + + def getNeutralJointRotationXs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationXs(self) + + def getNeutralJointRotationYs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationYs(self) + + def getNeutralJointRotationZs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationZs(self) + +# Register DefinitionReader in _py3dna: +_py3dna.DefinitionReader_swigregister(DefinitionReader) + +class BehaviorReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIToRawInputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawInputIndices(self) + + def getGUIToRawOutputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawOutputIndices(self) + + def getGUIToRawFromValues(self): + return _py3dna.BehaviorReader_getGUIToRawFromValues(self) + + def getGUIToRawToValues(self): + return _py3dna.BehaviorReader_getGUIToRawToValues(self) + + def getGUIToRawSlopeValues(self): + return _py3dna.BehaviorReader_getGUIToRawSlopeValues(self) + + def getGUIToRawCutValues(self): + return _py3dna.BehaviorReader_getGUIToRawCutValues(self) + + def getPSDCount(self): + return _py3dna.BehaviorReader_getPSDCount(self) + + def getPSDRowIndices(self): + return _py3dna.BehaviorReader_getPSDRowIndices(self) + + def getPSDColumnIndices(self): + return _py3dna.BehaviorReader_getPSDColumnIndices(self) + + def getPSDValues(self): + return _py3dna.BehaviorReader_getPSDValues(self) + + def getJointRowCount(self): + return _py3dna.BehaviorReader_getJointRowCount(self) + + def getJointColumnCount(self): + return _py3dna.BehaviorReader_getJointColumnCount(self) + + def getJointVariableAttributeIndices(self, lod): + return _py3dna.BehaviorReader_getJointVariableAttributeIndices(self, lod) + + def getJointGroupCount(self): + return _py3dna.BehaviorReader_getJointGroupCount(self) + + def getJointGroupLODs(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupLODs(self, jointGroupIndex) + + def getJointGroupInputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupInputIndices(self, jointGroupIndex) + + def getJointGroupOutputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupOutputIndices(self, jointGroupIndex) + + def getJointGroupValues(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupValues(self, jointGroupIndex) + + def getJointGroupJointIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupJointIndices(self, jointGroupIndex) + + def getBlendShapeChannelLODs(self): + return _py3dna.BehaviorReader_getBlendShapeChannelLODs(self) + + def getBlendShapeChannelInputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelInputIndices(self) + + def getBlendShapeChannelOutputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelOutputIndices(self) + + def getAnimatedMapLODs(self): + return _py3dna.BehaviorReader_getAnimatedMapLODs(self) + + def getAnimatedMapInputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapInputIndices(self) + + def getAnimatedMapOutputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapOutputIndices(self) + + def getAnimatedMapFromValues(self): + return _py3dna.BehaviorReader_getAnimatedMapFromValues(self) + + def getAnimatedMapToValues(self): + return _py3dna.BehaviorReader_getAnimatedMapToValues(self) + + def getAnimatedMapSlopeValues(self): + return _py3dna.BehaviorReader_getAnimatedMapSlopeValues(self) + + def getAnimatedMapCutValues(self): + return _py3dna.BehaviorReader_getAnimatedMapCutValues(self) + +# Register BehaviorReader in _py3dna: +_py3dna.BehaviorReader_swigregister(BehaviorReader) + +class GeometryReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getVertexPositionCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionCount(self, meshIndex) + + def getVertexPosition(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getVertexPosition(self, meshIndex, vertexIndex) + + def getVertexPositionXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionXs(self, meshIndex) + + def getVertexPositionYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionYs(self, meshIndex) + + def getVertexPositionZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionZs(self, meshIndex) + + def getVertexTextureCoordinateCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateCount(self, meshIndex) + + def getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex) + + def getVertexTextureCoordinateUs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateUs(self, meshIndex) + + def getVertexTextureCoordinateVs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateVs(self, meshIndex) + + def getVertexNormalCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalCount(self, meshIndex) + + def getVertexNormal(self, meshIndex, normalIndex): + return _py3dna.GeometryReader_getVertexNormal(self, meshIndex, normalIndex) + + def getVertexNormalXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalXs(self, meshIndex) + + def getVertexNormalYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalYs(self, meshIndex) + + def getVertexNormalZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalZs(self, meshIndex) + + def getVertexLayoutCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutCount(self, meshIndex) + + def getVertexLayout(self, meshIndex, layoutIndex): + return _py3dna.GeometryReader_getVertexLayout(self, meshIndex, layoutIndex) + + def getVertexLayoutPositionIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutPositionIndices(self, meshIndex) + + def getVertexLayoutTextureCoordinateIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutTextureCoordinateIndices(self, meshIndex) + + def getVertexLayoutNormalIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutNormalIndices(self, meshIndex) + + def getFaceCount(self, meshIndex): + return _py3dna.GeometryReader_getFaceCount(self, meshIndex) + + def getFaceVertexLayoutIndices(self, meshIndex, faceIndex): + return _py3dna.GeometryReader_getFaceVertexLayoutIndices(self, meshIndex, faceIndex) + + def getMaximumInfluencePerVertex(self, meshIndex): + return _py3dna.GeometryReader_getMaximumInfluencePerVertex(self, meshIndex) + + def getSkinWeightsCount(self, meshIndex): + return _py3dna.GeometryReader_getSkinWeightsCount(self, meshIndex) + + def getSkinWeightsValues(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsValues(self, meshIndex, vertexIndex) + + def getSkinWeightsJointIndices(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsJointIndices(self, meshIndex, vertexIndex) + + def getBlendShapeTargetCount(self, meshIndex): + return _py3dna.GeometryReader_getBlendShapeTargetCount(self, meshIndex) + + def getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex) + + def getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex) + +# Register GeometryReader in _py3dna: +_py3dna.GeometryReader_swigregister(GeometryReader) + +class Reader(BehaviorReader, GeometryReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Reader + + def unload(self, layer): + return _py3dna.Reader_unload(self, layer) + +# Register Reader in _py3dna: +_py3dna.Reader_swigregister(Reader) + +class StreamReader(Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamReader + + def read(self): + return _py3dna.StreamReader_read(self) + +# Register StreamReader in _py3dna: +_py3dna.StreamReader_swigregister(StreamReader) +StreamReader.SignatureMismatchError = _py3dna.cvar.StreamReader_SignatureMismatchError +StreamReader.VersionMismatchError = _py3dna.cvar.StreamReader_VersionMismatchError +StreamReader.InvalidDataError = _py3dna.cvar.StreamReader_InvalidDataError + +class BinaryStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.BinaryStreamReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamReader + +# Register BinaryStreamReader in _py3dna: +_py3dna.BinaryStreamReader_swigregister(BinaryStreamReader) + +def BinaryStreamReader_create(*args): + return _py3dna.BinaryStreamReader_create(*args) + +def BinaryStreamReader_destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + +class JSONStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamReader + +# Register JSONStreamReader in _py3dna: +_py3dna.JSONStreamReader_swigregister(JSONStreamReader) + +def JSONStreamReader_create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + +def JSONStreamReader_destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + + +BinaryStreamReader.__new__ = __new_decorator(BinaryStreamReader_create, BinaryStreamReader.__new__) +BinaryStreamReader.__del__ = lambda instance: BinaryStreamReader_destroy(instance) +BinaryStreamReader.__init__ = __managed_init +del BinaryStreamReader.create +del BinaryStreamReader.destroy + + +JSONStreamReader.__new__ = __new_decorator(JSONStreamReader_create, JSONStreamReader.__new__) +JSONStreamReader.__del__ = lambda instance: JSONStreamReader_destroy(instance) +JSONStreamReader.__init__ = __managed_init +del JSONStreamReader.create +del JSONStreamReader.destroy + +class DescriptorWriter(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setName(self, name): + return _py3dna.DescriptorWriter_setName(self, name) + + def setArchetype(self, archetype): + return _py3dna.DescriptorWriter_setArchetype(self, archetype) + + def setGender(self, gender): + return _py3dna.DescriptorWriter_setGender(self, gender) + + def setAge(self, age): + return _py3dna.DescriptorWriter_setAge(self, age) + + def clearMetaData(self): + return _py3dna.DescriptorWriter_clearMetaData(self) + + def setMetaData(self, key, value): + return _py3dna.DescriptorWriter_setMetaData(self, key, value) + + def setTranslationUnit(self, unit): + return _py3dna.DescriptorWriter_setTranslationUnit(self, unit) + + def setRotationUnit(self, unit): + return _py3dna.DescriptorWriter_setRotationUnit(self, unit) + + def setCoordinateSystem(self, system): + return _py3dna.DescriptorWriter_setCoordinateSystem(self, system) + + def setLODCount(self, lodCount): + return _py3dna.DescriptorWriter_setLODCount(self, lodCount) + + def setDBMaxLOD(self, lod): + return _py3dna.DescriptorWriter_setDBMaxLOD(self, lod) + + def setDBComplexity(self, name): + return _py3dna.DescriptorWriter_setDBComplexity(self, name) + + def setDBName(self, name): + return _py3dna.DescriptorWriter_setDBName(self, name) + +# Register DescriptorWriter in _py3dna: +_py3dna.DescriptorWriter_swigregister(DescriptorWriter) + +class DefinitionWriter(DescriptorWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearGUIControlNames(self): + return _py3dna.DefinitionWriter_clearGUIControlNames(self) + + def setGUIControlName(self, index, name): + return _py3dna.DefinitionWriter_setGUIControlName(self, index, name) + + def clearRawControlNames(self): + return _py3dna.DefinitionWriter_clearRawControlNames(self) + + def setRawControlName(self, index, name): + return _py3dna.DefinitionWriter_setRawControlName(self, index, name) + + def clearJointNames(self): + return _py3dna.DefinitionWriter_clearJointNames(self) + + def setJointName(self, index, name): + return _py3dna.DefinitionWriter_setJointName(self, index, name) + + def clearJointIndices(self): + return _py3dna.DefinitionWriter_clearJointIndices(self) + + def setJointIndices(self, index, jointIndices): + return _py3dna.DefinitionWriter_setJointIndices(self, index, jointIndices) + + def clearLODJointMappings(self): + return _py3dna.DefinitionWriter_clearLODJointMappings(self) + + def setLODJointMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODJointMapping(self, lod, index) + + def clearBlendShapeChannelNames(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelNames(self) + + def setBlendShapeChannelName(self, index, name): + return _py3dna.DefinitionWriter_setBlendShapeChannelName(self, index, name) + + def clearBlendShapeChannelIndices(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelIndices(self) + + def setBlendShapeChannelIndices(self, index, blendShapeChannelIndices): + return _py3dna.DefinitionWriter_setBlendShapeChannelIndices(self, index, blendShapeChannelIndices) + + def clearLODBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearLODBlendShapeChannelMappings(self) + + def setLODBlendShapeChannelMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODBlendShapeChannelMapping(self, lod, index) + + def clearAnimatedMapNames(self): + return _py3dna.DefinitionWriter_clearAnimatedMapNames(self) + + def setAnimatedMapName(self, index, name): + return _py3dna.DefinitionWriter_setAnimatedMapName(self, index, name) + + def clearAnimatedMapIndices(self): + return _py3dna.DefinitionWriter_clearAnimatedMapIndices(self) + + def setAnimatedMapIndices(self, index, animatedMapIndices): + return _py3dna.DefinitionWriter_setAnimatedMapIndices(self, index, animatedMapIndices) + + def clearLODAnimatedMapMappings(self): + return _py3dna.DefinitionWriter_clearLODAnimatedMapMappings(self) + + def setLODAnimatedMapMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODAnimatedMapMapping(self, lod, index) + + def clearMeshNames(self): + return _py3dna.DefinitionWriter_clearMeshNames(self) + + def setMeshName(self, index, name): + return _py3dna.DefinitionWriter_setMeshName(self, index, name) + + def clearMeshIndices(self): + return _py3dna.DefinitionWriter_clearMeshIndices(self) + + def setMeshIndices(self, index, meshIndices): + return _py3dna.DefinitionWriter_setMeshIndices(self, index, meshIndices) + + def clearLODMeshMappings(self): + return _py3dna.DefinitionWriter_clearLODMeshMappings(self) + + def setLODMeshMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODMeshMapping(self, lod, index) + + def clearMeshBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearMeshBlendShapeChannelMappings(self) + + def setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex): + return _py3dna.DefinitionWriter_setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex) + + def setJointHierarchy(self, jointIndices): + return _py3dna.DefinitionWriter_setJointHierarchy(self, jointIndices) + + def setNeutralJointTranslations(self, translations): + return _py3dna.DefinitionWriter_setNeutralJointTranslations(self, translations) + + def setNeutralJointRotations(self, rotations): + return _py3dna.DefinitionWriter_setNeutralJointRotations(self, rotations) + +# Register DefinitionWriter in _py3dna: +_py3dna.DefinitionWriter_swigregister(DefinitionWriter) + +class BehaviorWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setGUIToRawInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setGUIToRawInputIndices(self, inputIndices) + + def setGUIToRawOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setGUIToRawOutputIndices(self, outputIndices) + + def setGUIToRawFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setGUIToRawFromValues(self, fromValues) + + def setGUIToRawToValues(self, toValues): + return _py3dna.BehaviorWriter_setGUIToRawToValues(self, toValues) + + def setGUIToRawSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setGUIToRawSlopeValues(self, slopeValues) + + def setGUIToRawCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setGUIToRawCutValues(self, cutValues) + + def setPSDCount(self, count): + return _py3dna.BehaviorWriter_setPSDCount(self, count) + + def setPSDRowIndices(self, rowIndices): + return _py3dna.BehaviorWriter_setPSDRowIndices(self, rowIndices) + + def setPSDColumnIndices(self, columnIndices): + return _py3dna.BehaviorWriter_setPSDColumnIndices(self, columnIndices) + + def setPSDValues(self, weights): + return _py3dna.BehaviorWriter_setPSDValues(self, weights) + + def setJointRowCount(self, rowCount): + return _py3dna.BehaviorWriter_setJointRowCount(self, rowCount) + + def setJointColumnCount(self, columnCount): + return _py3dna.BehaviorWriter_setJointColumnCount(self, columnCount) + + def clearJointGroups(self): + return _py3dna.BehaviorWriter_clearJointGroups(self) + + def deleteJointGroup(self, jointGroupIndex): + return _py3dna.BehaviorWriter_deleteJointGroup(self, jointGroupIndex) + + def setJointGroupLODs(self, jointGroupIndex, lods): + return _py3dna.BehaviorWriter_setJointGroupLODs(self, jointGroupIndex, lods) + + def setJointGroupInputIndices(self, jointGroupIndex, inputIndices): + return _py3dna.BehaviorWriter_setJointGroupInputIndices(self, jointGroupIndex, inputIndices) + + def setJointGroupOutputIndices(self, jointGroupIndex, outputIndices): + return _py3dna.BehaviorWriter_setJointGroupOutputIndices(self, jointGroupIndex, outputIndices) + + def setJointGroupValues(self, jointGroupIndex, values): + return _py3dna.BehaviorWriter_setJointGroupValues(self, jointGroupIndex, values) + + def setJointGroupJointIndices(self, jointGroupIndex, jointIndices): + return _py3dna.BehaviorWriter_setJointGroupJointIndices(self, jointGroupIndex, jointIndices) + + def setBlendShapeChannelLODs(self, lods): + return _py3dna.BehaviorWriter_setBlendShapeChannelLODs(self, lods) + + def setBlendShapeChannelInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelInputIndices(self, inputIndices) + + def setBlendShapeChannelOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelOutputIndices(self, outputIndices) + + def setAnimatedMapLODs(self, lods): + return _py3dna.BehaviorWriter_setAnimatedMapLODs(self, lods) + + def setAnimatedMapInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapInputIndices(self, inputIndices) + + def setAnimatedMapOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapOutputIndices(self, outputIndices) + + def setAnimatedMapFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setAnimatedMapFromValues(self, fromValues) + + def setAnimatedMapToValues(self, toValues): + return _py3dna.BehaviorWriter_setAnimatedMapToValues(self, toValues) + + def setAnimatedMapSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setAnimatedMapSlopeValues(self, slopeValues) + + def setAnimatedMapCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setAnimatedMapCutValues(self, cutValues) + +# Register BehaviorWriter in _py3dna: +_py3dna.BehaviorWriter_swigregister(BehaviorWriter) + +class GeometryWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearMeshes(self): + return _py3dna.GeometryWriter_clearMeshes(self) + + def deleteMesh(self, meshIndex): + return _py3dna.GeometryWriter_deleteMesh(self, meshIndex) + + def setVertexPositions(self, meshIndex, positions): + return _py3dna.GeometryWriter_setVertexPositions(self, meshIndex, positions) + + def setVertexTextureCoordinates(self, meshIndex, textureCoordinates): + return _py3dna.GeometryWriter_setVertexTextureCoordinates(self, meshIndex, textureCoordinates) + + def setVertexNormals(self, meshIndex, normals): + return _py3dna.GeometryWriter_setVertexNormals(self, meshIndex, normals) + + def setVertexLayouts(self, meshIndex, layouts): + return _py3dna.GeometryWriter_setVertexLayouts(self, meshIndex, layouts) + + def clearFaceVertexLayoutIndices(self, meshIndex): + return _py3dna.GeometryWriter_clearFaceVertexLayoutIndices(self, meshIndex) + + def setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices): + return _py3dna.GeometryWriter_setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices) + + def setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount): + return _py3dna.GeometryWriter_setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount) + + def clearSkinWeights(self, meshIndex): + return _py3dna.GeometryWriter_clearSkinWeights(self, meshIndex) + + def setSkinWeightsValues(self, meshIndex, vertexIndex, weights): + return _py3dna.GeometryWriter_setSkinWeightsValues(self, meshIndex, vertexIndex, weights) + + def setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices): + return _py3dna.GeometryWriter_setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices) + + def clearBlendShapeTargets(self, meshIndex): + return _py3dna.GeometryWriter_clearBlendShapeTargets(self, meshIndex) + + def setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex): + return _py3dna.GeometryWriter_setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex) + + def setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas): + return _py3dna.GeometryWriter_setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas) + + def setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices): + return _py3dna.GeometryWriter_setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices) + +# Register GeometryWriter in _py3dna: +_py3dna.GeometryWriter_swigregister(GeometryWriter) + +class Writer(BehaviorWriter, GeometryWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Writer + + def setFrom(self, *args): + return _py3dna.Writer_setFrom(self, *args) + +# Register Writer in _py3dna: +_py3dna.Writer_swigregister(Writer) + +class StreamWriter(Writer): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamWriter + + def write(self): + return _py3dna.StreamWriter_write(self) + +# Register StreamWriter in _py3dna: +_py3dna.StreamWriter_swigregister(StreamWriter) + +class BinaryStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamWriter + +# Register BinaryStreamWriter in _py3dna: +_py3dna.BinaryStreamWriter_swigregister(BinaryStreamWriter) + +def BinaryStreamWriter_create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + +def BinaryStreamWriter_destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + +class JSONStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag") + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamWriter + +# Register JSONStreamWriter in _py3dna: +_py3dna.JSONStreamWriter_swigregister(JSONStreamWriter) + +def JSONStreamWriter_create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + +def JSONStreamWriter_destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + + +BinaryStreamWriter.__new__ = __new_decorator(BinaryStreamWriter_create, BinaryStreamWriter.__new__) +BinaryStreamWriter.__del__ = lambda instance: BinaryStreamWriter_destroy(instance) +BinaryStreamWriter.__init__ = __managed_init +del BinaryStreamWriter.create +del BinaryStreamWriter.destroy + + +JSONStreamWriter.__new__ = __new_decorator(JSONStreamWriter_create, JSONStreamWriter.__new__) +JSONStreamWriter.__del__ = lambda instance: JSONStreamWriter_destroy(instance) +JSONStreamWriter.__init__ = __managed_init +del JSONStreamWriter.create +del JSONStreamWriter.destroy + + + diff --git a/plugins/Windows/pydna/python311/dna9_4_3.dll b/plugins/Windows/pydna/python311/dna9_4_3.dll new file mode 100644 index 0000000..e7ffe01 Binary files /dev/null and b/plugins/Windows/pydna/python311/dna9_4_3.dll differ diff --git a/plugins/Windows/pydna/python311/polyalloc1_3_12.dll b/plugins/Windows/pydna/python311/polyalloc1_3_12.dll new file mode 100644 index 0000000..310fc38 Binary files /dev/null and b/plugins/Windows/pydna/python311/polyalloc1_3_12.dll differ diff --git a/plugins/Windows/pydna/python311/statuscode1_2_6.dll b/plugins/Windows/pydna/python311/statuscode1_2_6.dll new file mode 100644 index 0000000..bcb8d30 Binary files /dev/null and b/plugins/Windows/pydna/python311/statuscode1_2_6.dll differ diff --git a/plugins/Windows/pydna/python311/trio4_0_16.dll b/plugins/Windows/pydna/python311/trio4_0_16.dll new file mode 100644 index 0000000..63b54af Binary files /dev/null and b/plugins/Windows/pydna/python311/trio4_0_16.dll differ diff --git a/plugins/Windows/pydna/python397/_py3dna.pyd b/plugins/Windows/pydna/python397/_py3dna.pyd new file mode 100644 index 0000000..d21c1b0 Binary files /dev/null and b/plugins/Windows/pydna/python397/_py3dna.pyd differ diff --git a/plugins/Windows/pydna/python397/dna.dll b/plugins/Windows/pydna/python397/dna.dll new file mode 100644 index 0000000..c7e4375 Binary files /dev/null and b/plugins/Windows/pydna/python397/dna.dll differ diff --git a/plugins/Windows/pydna/python397/dna.py b/plugins/Windows/pydna/python397/dna.py new file mode 100644 index 0000000..5d915f6 --- /dev/null +++ b/plugins/Windows/pydna/python397/dna.py @@ -0,0 +1,1432 @@ +# This file was automatically generated by SWIG (http://www.swig.org). +# Version 4.0.0 +# +# Do not make changes to this file unless you know what you are doing--modify +# the SWIG interface file instead. + +from sys import version_info as _swig_python_version_info +if _swig_python_version_info < (2, 7, 0): + raise RuntimeError('Python 2.7 or later required') + +# Import the low-level C/C++ module +if __package__ or '.' in __name__: + from . import _py3dna +else: + import _py3dna + +try: + import builtins as __builtin__ +except ImportError: + import __builtin__ + +def _swig_setattr_nondynamic(self, class_type, name, value, static=1): + if name == "thisown": + return self.this.own(value) + if name == "this": + if type(value).__name__ == 'SwigPyObject': + self.__dict__[name] = value + return + method = class_type.__swig_setmethods__.get(name, None) + if method: + return method(self, value) + if not static: + object.__setattr__(self, name, value) + else: + raise AttributeError("You cannot add attributes to %s" % self) + + +def _swig_setattr(self, class_type, name, value): + return _swig_setattr_nondynamic(self, class_type, name, value, 0) + + +def _swig_getattr(self, class_type, name): + if name == "thisown": + return self.this.own() + method = class_type.__swig_getmethods__.get(name, None) + if method: + return method(self) + raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name)) + + +def _swig_repr(self): + try: + strthis = "proxy of " + self.this.__repr__() + except __builtin__.Exception: + strthis = "" + return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,) + + +def _swig_setattr_nondynamic_instance_variable(set): + def set_instance_attr(self, name, value): + if name == "thisown": + self.this.own(value) + elif name == "this": + set(self, name, value) + elif hasattr(self, name) and isinstance(getattr(type(self), name), property): + set(self, name, value) + else: + raise AttributeError("You cannot add instance attributes to %s" % self) + return set_instance_attr + + +def _swig_setattr_nondynamic_class_variable(set): + def set_class_attr(cls, name, value): + if hasattr(cls, name) and not isinstance(getattr(cls, name), property): + set(cls, name, value) + else: + raise AttributeError("You cannot add class attributes to %s" % cls) + return set_class_attr + + +def _swig_add_metaclass(metaclass): + """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass""" + def wrapper(cls): + return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy()) + return wrapper + + +class _SwigNonDynamicMeta(type): + """Meta class to enforce nondynamic attributes (no new attributes) for a class""" + __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__) + + + +def __new_decorator(factory_func, original_new): + @staticmethod + def __new(cls, *args, **kwargs): +# FIXME: while this workaround solves the immediate issue with the set of classes we currently have, +# it will fail for classes that use a factory function but need no parameters at all, in which case +# the factory function will never be invoked, only the original __new__ function. + if args or kwargs: + return factory_func(*args, **kwargs) + return original_new(cls) + return __new + +def __managed_init(self, *args, **kwargs): + self._args = args + self._kwargs = kwargs + +class MemoryResource(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_MemoryResource + + def allocate(self, size, alignment): + return _py3dna.MemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.MemoryResource_deallocate(self, ptr, size, alignment) + +# Register MemoryResource in _py3dna: +_py3dna.MemoryResource_swigregister(MemoryResource) + +class AlignedMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.AlignedMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.AlignedMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.AlignedMemoryResource_swiginit(self, _py3dna.new_AlignedMemoryResource()) + __swig_destroy__ = _py3dna.delete_AlignedMemoryResource + +# Register AlignedMemoryResource in _py3dna: +_py3dna.AlignedMemoryResource_swigregister(AlignedMemoryResource) + +class ArenaMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_ArenaMemoryResource + + def __init__(self, *args): + _py3dna.ArenaMemoryResource_swiginit(self, _py3dna.new_ArenaMemoryResource(*args)) + + def allocate(self, size, alignment): + return _py3dna.ArenaMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.ArenaMemoryResource_deallocate(self, ptr, size, alignment) + + def getUpstreamMemoryResource(self): + return _py3dna.ArenaMemoryResource_getUpstreamMemoryResource(self) + +# Register ArenaMemoryResource in _py3dna: +_py3dna.ArenaMemoryResource_swigregister(ArenaMemoryResource) + +class DefaultMemoryResource(MemoryResource): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def allocate(self, size, alignment): + return _py3dna.DefaultMemoryResource_allocate(self, size, alignment) + + def deallocate(self, ptr, size, alignment): + return _py3dna.DefaultMemoryResource_deallocate(self, ptr, size, alignment) + + def __init__(self): + _py3dna.DefaultMemoryResource_swiginit(self, _py3dna.new_DefaultMemoryResource()) + __swig_destroy__ = _py3dna.delete_DefaultMemoryResource + +# Register DefaultMemoryResource in _py3dna: +_py3dna.DefaultMemoryResource_swigregister(DefaultMemoryResource) + +class StatusCode(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + code = property(_py3dna.StatusCode_code_get, _py3dna.StatusCode_code_set) + message = property(_py3dna.StatusCode_message_get, _py3dna.StatusCode_message_set) + + def __init__(self): + _py3dna.StatusCode_swiginit(self, _py3dna.new_StatusCode()) + __swig_destroy__ = _py3dna.delete_StatusCode + +# Register StatusCode in _py3dna: +_py3dna.StatusCode_swigregister(StatusCode) + +class Status(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + @staticmethod + def isOk(): + return _py3dna.Status_isOk() + + @staticmethod + def get(): + return _py3dna.Status_get() + + @staticmethod + def getHook(): + return _py3dna.Status_getHook() + + @staticmethod + def setHook(hook): + return _py3dna.Status_setHook(hook) + + def __init__(self): + _py3dna.Status_swiginit(self, _py3dna.new_Status()) + __swig_destroy__ = _py3dna.delete_Status + +# Register Status in _py3dna: +_py3dna.Status_swigregister(Status) + +def Status_isOk(): + return _py3dna.Status_isOk() + +def Status_get(): + return _py3dna.Status_get() + +def Status_getHook(): + return _py3dna.Status_getHook() + +def Status_setHook(hook): + return _py3dna.Status_setHook(hook) + +class Readable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def read(self, *args): + return _py3dna.Readable_read(self, *args) + +# Register Readable in _py3dna: +_py3dna.Readable_swigregister(Readable) + +class Writable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def write(self, *args): + return _py3dna.Writable_write(self, *args) + +# Register Writable in _py3dna: +_py3dna.Writable_swigregister(Writable) + +class Seekable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def tell(self): + return _py3dna.Seekable_tell(self) + + def seek(self, position): + return _py3dna.Seekable_seek(self, position) + +# Register Seekable in _py3dna: +_py3dna.Seekable_swigregister(Seekable) + +class Openable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def open(self): + return _py3dna.Openable_open(self) + +# Register Openable in _py3dna: +_py3dna.Openable_swigregister(Openable) + +class Closeable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def close(self): + return _py3dna.Closeable_close(self) + +# Register Closeable in _py3dna: +_py3dna.Closeable_swigregister(Closeable) + +class Controllable(Openable, Closeable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + +# Register Controllable in _py3dna: +_py3dna.Controllable_swigregister(Controllable) + +class Bounded(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def size(self): + return _py3dna.Bounded_size(self) + +# Register Bounded in _py3dna: +_py3dna.Bounded_swigregister(Bounded) + +class Buffered(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def flush(self): + return _py3dna.Buffered_flush(self) + +# Register Buffered in _py3dna: +_py3dna.Buffered_swigregister(Buffered) + +class Resizable(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def resize(self, size): + return _py3dna.Resizable_resize(self, size) + +# Register Resizable in _py3dna: +_py3dna.Resizable_swigregister(Resizable) + +class BoundedIOStream(Controllable, Readable, Writable, Seekable, Bounded): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_BoundedIOStream + +# Register BoundedIOStream in _py3dna: +_py3dna.BoundedIOStream_swigregister(BoundedIOStream) +cvar = _py3dna.cvar +BoundedIOStream.OpenError = _py3dna.cvar.BoundedIOStream_OpenError +BoundedIOStream.ReadError = _py3dna.cvar.BoundedIOStream_ReadError +BoundedIOStream.WriteError = _py3dna.cvar.BoundedIOStream_WriteError +BoundedIOStream.AlreadyOpenError = _py3dna.cvar.BoundedIOStream_AlreadyOpenError +BoundedIOStream.SeekError = _py3dna.cvar.BoundedIOStream_SeekError + +AccessMode_Read = _py3dna.AccessMode_Read +AccessMode_Write = _py3dna.AccessMode_Write +AccessMode_ReadWrite = _py3dna.AccessMode_ReadWrite +OpenMode_Binary = _py3dna.OpenMode_Binary +OpenMode_Text = _py3dna.OpenMode_Text +class FileStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.FileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_FileStream + +# Register FileStream in _py3dna: +_py3dna.FileStream_swigregister(FileStream) + +def FileStream_create(path, accessMode, openMode, memRes=None): + return _py3dna.FileStream_create(path, accessMode, openMode, memRes) + +def FileStream_destroy(instance): + return _py3dna.FileStream_destroy(instance) + +class MemoryMappedFileStream(BoundedIOStream, Buffered, Resizable): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryMappedFileStream + +# Register MemoryMappedFileStream in _py3dna: +_py3dna.MemoryMappedFileStream_swigregister(MemoryMappedFileStream) + +def MemoryMappedFileStream_create(path, accessMode, memRes=None): + return _py3dna.MemoryMappedFileStream_create(path, accessMode, memRes) + +def MemoryMappedFileStream_destroy(instance): + return _py3dna.MemoryMappedFileStream_destroy(instance) + +class MemoryStream(BoundedIOStream): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.MemoryStream_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + __swig_destroy__ = _py3dna.delete_MemoryStream + +# Register MemoryStream in _py3dna: +_py3dna.MemoryStream_swigregister(MemoryStream) + +def MemoryStream_create(*args): + return _py3dna.MemoryStream_create(*args) + +def MemoryStream_destroy(instance): + return _py3dna.MemoryStream_destroy(instance) + + +FileStream.__new__ = __new_decorator(FileStream_create, FileStream.__new__) +FileStream.__del__ = lambda instance: FileStream_destroy(instance) +FileStream.__init__ = __managed_init +del FileStream.create +del FileStream.destroy + + +MemoryMappedFileStream.__new__ = __new_decorator(MemoryMappedFileStream_create, MemoryMappedFileStream.__new__) +MemoryMappedFileStream.__del__ = lambda instance: MemoryMappedFileStream_destroy(instance) +MemoryMappedFileStream.__init__ = __managed_init +del MemoryMappedFileStream.create +del MemoryMappedFileStream.destroy + + +MemoryStream.__new__ = __new_decorator(MemoryStream_create, MemoryStream.__new__) +MemoryStream.__del__ = lambda instance: MemoryStream_destroy(instance) +MemoryStream.__init__ = __managed_init +del MemoryStream.create +del MemoryStream.destroy + + +FileStream.AccessMode_Read = AccessMode_Read +FileStream.AccessMode_Write = AccessMode_Write +FileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +FileStream.OpenMode_Binary = OpenMode_Binary +FileStream.OpenMode_Text = OpenMode_Text + +MemoryMappedFileStream.AccessMode_Read = AccessMode_Read +MemoryMappedFileStream.AccessMode_Write = AccessMode_Write +MemoryMappedFileStream.AccessMode_ReadWrite = AccessMode_ReadWrite + +class StringView(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + + def c_str(self): + return _py3dna.StringView_c_str(self) + + def __ref__(self): + return _py3dna.StringView___ref__(self) + + def __init__(self): + _py3dna.StringView_swiginit(self, _py3dna.new_StringView()) + __swig_destroy__ = _py3dna.delete_StringView + +# Register StringView in _py3dna: +_py3dna.StringView_swigregister(StringView) + + +def __add__(*args): + return _py3dna.__add__(*args) + +def __sub__(*args): + return _py3dna.__sub__(*args) + +def __mul__(*args): + return _py3dna.__mul__(*args) + +def __truediv__(*args): + return _py3dna.__truediv__(*args) + +def __eq__(*args): + return _py3dna.__eq__(*args) + +def __ne__(*args): + return _py3dna.__ne__(*args) +DataLayer_Descriptor = _py3dna.DataLayer_Descriptor +DataLayer_Definition = _py3dna.DataLayer_Definition +DataLayer_Behavior = _py3dna.DataLayer_Behavior +DataLayer_Geometry = _py3dna.DataLayer_Geometry +DataLayer_GeometryWithoutBlendShapes = _py3dna.DataLayer_GeometryWithoutBlendShapes +DataLayer_AllWithoutBlendShapes = _py3dna.DataLayer_AllWithoutBlendShapes +DataLayer_All = _py3dna.DataLayer_All +Archetype_asian = _py3dna.Archetype_asian +Archetype_black = _py3dna.Archetype_black +Archetype_caucasian = _py3dna.Archetype_caucasian +Archetype_hispanic = _py3dna.Archetype_hispanic +Archetype_alien = _py3dna.Archetype_alien +Archetype_other = _py3dna.Archetype_other +Gender_male = _py3dna.Gender_male +Gender_female = _py3dna.Gender_female +Gender_other = _py3dna.Gender_other +TranslationUnit_cm = _py3dna.TranslationUnit_cm +TranslationUnit_m = _py3dna.TranslationUnit_m +RotationUnit_degrees = _py3dna.RotationUnit_degrees +RotationUnit_radians = _py3dna.RotationUnit_radians +Direction_left = _py3dna.Direction_left +Direction_right = _py3dna.Direction_right +Direction_up = _py3dna.Direction_up +Direction_down = _py3dna.Direction_down +Direction_front = _py3dna.Direction_front +Direction_back = _py3dna.Direction_back +class CoordinateSystem(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + xAxis = property(_py3dna.CoordinateSystem_xAxis_get, _py3dna.CoordinateSystem_xAxis_set) + yAxis = property(_py3dna.CoordinateSystem_yAxis_get, _py3dna.CoordinateSystem_yAxis_set) + zAxis = property(_py3dna.CoordinateSystem_zAxis_get, _py3dna.CoordinateSystem_zAxis_set) + + def __init__(self): + _py3dna.CoordinateSystem_swiginit(self, _py3dna.new_CoordinateSystem()) + __swig_destroy__ = _py3dna.delete_CoordinateSystem + +# Register CoordinateSystem in _py3dna: +_py3dna.CoordinateSystem_swigregister(CoordinateSystem) + +class DescriptorReader(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getName(self): + return _py3dna.DescriptorReader_getName(self) + + def getArchetype(self): + return _py3dna.DescriptorReader_getArchetype(self) + + def getGender(self): + return _py3dna.DescriptorReader_getGender(self) + + def getAge(self): + return _py3dna.DescriptorReader_getAge(self) + + def getMetaDataCount(self): + return _py3dna.DescriptorReader_getMetaDataCount(self) + + def getMetaDataKey(self, index): + return _py3dna.DescriptorReader_getMetaDataKey(self, index) + + def getMetaDataValue(self, key): + return _py3dna.DescriptorReader_getMetaDataValue(self, key) + + def getTranslationUnit(self): + return _py3dna.DescriptorReader_getTranslationUnit(self) + + def getRotationUnit(self): + return _py3dna.DescriptorReader_getRotationUnit(self) + + def getCoordinateSystem(self): + return _py3dna.DescriptorReader_getCoordinateSystem(self) + + def getLODCount(self): + return _py3dna.DescriptorReader_getLODCount(self) + + def getDBMaxLOD(self): + return _py3dna.DescriptorReader_getDBMaxLOD(self) + + def getDBComplexity(self): + return _py3dna.DescriptorReader_getDBComplexity(self) + + def getDBName(self): + return _py3dna.DescriptorReader_getDBName(self) + +# Register DescriptorReader in _py3dna: +_py3dna.DescriptorReader_swigregister(DescriptorReader) + +class MeshBlendShapeChannelMapping(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + __repr__ = _swig_repr + meshIndex = property(_py3dna.MeshBlendShapeChannelMapping_meshIndex_get, _py3dna.MeshBlendShapeChannelMapping_meshIndex_set) + blendShapeChannelIndex = property(_py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_get, _py3dna.MeshBlendShapeChannelMapping_blendShapeChannelIndex_set) + + def __init__(self): + _py3dna.MeshBlendShapeChannelMapping_swiginit(self, _py3dna.new_MeshBlendShapeChannelMapping()) + __swig_destroy__ = _py3dna.delete_MeshBlendShapeChannelMapping + +# Register MeshBlendShapeChannelMapping in _py3dna: +_py3dna.MeshBlendShapeChannelMapping_swigregister(MeshBlendShapeChannelMapping) + +class DefinitionReader(DescriptorReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIControlCount(self): + return _py3dna.DefinitionReader_getGUIControlCount(self) + + def getGUIControlName(self, index): + return _py3dna.DefinitionReader_getGUIControlName(self, index) + + def getRawControlCount(self): + return _py3dna.DefinitionReader_getRawControlCount(self) + + def getRawControlName(self, index): + return _py3dna.DefinitionReader_getRawControlName(self, index) + + def getJointCount(self): + return _py3dna.DefinitionReader_getJointCount(self) + + def getJointName(self, index): + return _py3dna.DefinitionReader_getJointName(self, index) + + def getJointIndexListCount(self): + return _py3dna.DefinitionReader_getJointIndexListCount(self) + + def getJointIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getJointIndicesForLOD(self, lod) + + def getJointParentIndex(self, index): + return _py3dna.DefinitionReader_getJointParentIndex(self, index) + + def getBlendShapeChannelCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelCount(self) + + def getBlendShapeChannelName(self, index): + return _py3dna.DefinitionReader_getBlendShapeChannelName(self, index) + + def getBlendShapeChannelIndexListCount(self): + return _py3dna.DefinitionReader_getBlendShapeChannelIndexListCount(self) + + def getBlendShapeChannelIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getBlendShapeChannelIndicesForLOD(self, lod) + + def getAnimatedMapCount(self): + return _py3dna.DefinitionReader_getAnimatedMapCount(self) + + def getAnimatedMapName(self, index): + return _py3dna.DefinitionReader_getAnimatedMapName(self, index) + + def getAnimatedMapIndexListCount(self): + return _py3dna.DefinitionReader_getAnimatedMapIndexListCount(self) + + def getAnimatedMapIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getAnimatedMapIndicesForLOD(self, lod) + + def getMeshCount(self): + return _py3dna.DefinitionReader_getMeshCount(self) + + def getMeshName(self, index): + return _py3dna.DefinitionReader_getMeshName(self, index) + + def getMeshIndexListCount(self): + return _py3dna.DefinitionReader_getMeshIndexListCount(self) + + def getMeshIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshIndicesForLOD(self, lod) + + def getMeshBlendShapeChannelMappingCount(self): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingCount(self) + + def getMeshBlendShapeChannelMapping(self, index): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMapping(self, index) + + def getMeshBlendShapeChannelMappingIndicesForLOD(self, lod): + return _py3dna.DefinitionReader_getMeshBlendShapeChannelMappingIndicesForLOD(self, lod) + + def getNeutralJointTranslation(self, index): + return _py3dna.DefinitionReader_getNeutralJointTranslation(self, index) + + def getNeutralJointTranslationXs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationXs(self) + + def getNeutralJointTranslationYs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationYs(self) + + def getNeutralJointTranslationZs(self): + return _py3dna.DefinitionReader_getNeutralJointTranslationZs(self) + + def getNeutralJointRotation(self, index): + return _py3dna.DefinitionReader_getNeutralJointRotation(self, index) + + def getNeutralJointRotationXs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationXs(self) + + def getNeutralJointRotationYs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationYs(self) + + def getNeutralJointRotationZs(self): + return _py3dna.DefinitionReader_getNeutralJointRotationZs(self) + +# Register DefinitionReader in _py3dna: +_py3dna.DefinitionReader_swigregister(DefinitionReader) + +class BehaviorReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getGUIToRawInputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawInputIndices(self) + + def getGUIToRawOutputIndices(self): + return _py3dna.BehaviorReader_getGUIToRawOutputIndices(self) + + def getGUIToRawFromValues(self): + return _py3dna.BehaviorReader_getGUIToRawFromValues(self) + + def getGUIToRawToValues(self): + return _py3dna.BehaviorReader_getGUIToRawToValues(self) + + def getGUIToRawSlopeValues(self): + return _py3dna.BehaviorReader_getGUIToRawSlopeValues(self) + + def getGUIToRawCutValues(self): + return _py3dna.BehaviorReader_getGUIToRawCutValues(self) + + def getPSDCount(self): + return _py3dna.BehaviorReader_getPSDCount(self) + + def getPSDRowIndices(self): + return _py3dna.BehaviorReader_getPSDRowIndices(self) + + def getPSDColumnIndices(self): + return _py3dna.BehaviorReader_getPSDColumnIndices(self) + + def getPSDValues(self): + return _py3dna.BehaviorReader_getPSDValues(self) + + def getJointRowCount(self): + return _py3dna.BehaviorReader_getJointRowCount(self) + + def getJointColumnCount(self): + return _py3dna.BehaviorReader_getJointColumnCount(self) + + def getJointVariableAttributeIndices(self, lod): + return _py3dna.BehaviorReader_getJointVariableAttributeIndices(self, lod) + + def getJointGroupCount(self): + return _py3dna.BehaviorReader_getJointGroupCount(self) + + def getJointGroupLODs(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupLODs(self, jointGroupIndex) + + def getJointGroupInputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupInputIndices(self, jointGroupIndex) + + def getJointGroupOutputIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupOutputIndices(self, jointGroupIndex) + + def getJointGroupValues(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupValues(self, jointGroupIndex) + + def getJointGroupJointIndices(self, jointGroupIndex): + return _py3dna.BehaviorReader_getJointGroupJointIndices(self, jointGroupIndex) + + def getBlendShapeChannelLODs(self): + return _py3dna.BehaviorReader_getBlendShapeChannelLODs(self) + + def getBlendShapeChannelInputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelInputIndices(self) + + def getBlendShapeChannelOutputIndices(self): + return _py3dna.BehaviorReader_getBlendShapeChannelOutputIndices(self) + + def getAnimatedMapLODs(self): + return _py3dna.BehaviorReader_getAnimatedMapLODs(self) + + def getAnimatedMapInputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapInputIndices(self) + + def getAnimatedMapOutputIndices(self): + return _py3dna.BehaviorReader_getAnimatedMapOutputIndices(self) + + def getAnimatedMapFromValues(self): + return _py3dna.BehaviorReader_getAnimatedMapFromValues(self) + + def getAnimatedMapToValues(self): + return _py3dna.BehaviorReader_getAnimatedMapToValues(self) + + def getAnimatedMapSlopeValues(self): + return _py3dna.BehaviorReader_getAnimatedMapSlopeValues(self) + + def getAnimatedMapCutValues(self): + return _py3dna.BehaviorReader_getAnimatedMapCutValues(self) + +# Register BehaviorReader in _py3dna: +_py3dna.BehaviorReader_swigregister(BehaviorReader) + +class GeometryReader(DefinitionReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def getVertexPositionCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionCount(self, meshIndex) + + def getVertexPosition(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getVertexPosition(self, meshIndex, vertexIndex) + + def getVertexPositionXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionXs(self, meshIndex) + + def getVertexPositionYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionYs(self, meshIndex) + + def getVertexPositionZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexPositionZs(self, meshIndex) + + def getVertexTextureCoordinateCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateCount(self, meshIndex) + + def getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinate(self, meshIndex, textureCoordinateIndex) + + def getVertexTextureCoordinateUs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateUs(self, meshIndex) + + def getVertexTextureCoordinateVs(self, meshIndex): + return _py3dna.GeometryReader_getVertexTextureCoordinateVs(self, meshIndex) + + def getVertexNormalCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalCount(self, meshIndex) + + def getVertexNormal(self, meshIndex, normalIndex): + return _py3dna.GeometryReader_getVertexNormal(self, meshIndex, normalIndex) + + def getVertexNormalXs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalXs(self, meshIndex) + + def getVertexNormalYs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalYs(self, meshIndex) + + def getVertexNormalZs(self, meshIndex): + return _py3dna.GeometryReader_getVertexNormalZs(self, meshIndex) + + def getVertexLayoutCount(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutCount(self, meshIndex) + + def getVertexLayout(self, meshIndex, layoutIndex): + return _py3dna.GeometryReader_getVertexLayout(self, meshIndex, layoutIndex) + + def getVertexLayoutPositionIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutPositionIndices(self, meshIndex) + + def getVertexLayoutTextureCoordinateIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutTextureCoordinateIndices(self, meshIndex) + + def getVertexLayoutNormalIndices(self, meshIndex): + return _py3dna.GeometryReader_getVertexLayoutNormalIndices(self, meshIndex) + + def getFaceCount(self, meshIndex): + return _py3dna.GeometryReader_getFaceCount(self, meshIndex) + + def getFaceVertexLayoutIndices(self, meshIndex, faceIndex): + return _py3dna.GeometryReader_getFaceVertexLayoutIndices(self, meshIndex, faceIndex) + + def getMaximumInfluencePerVertex(self, meshIndex): + return _py3dna.GeometryReader_getMaximumInfluencePerVertex(self, meshIndex) + + def getSkinWeightsCount(self, meshIndex): + return _py3dna.GeometryReader_getSkinWeightsCount(self, meshIndex) + + def getSkinWeightsValues(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsValues(self, meshIndex, vertexIndex) + + def getSkinWeightsJointIndices(self, meshIndex, vertexIndex): + return _py3dna.GeometryReader_getSkinWeightsJointIndices(self, meshIndex, vertexIndex) + + def getBlendShapeTargetCount(self, meshIndex): + return _py3dna.GeometryReader_getBlendShapeTargetCount(self, meshIndex) + + def getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaCount(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDelta(self, meshIndex, blendShapeTargetIndex, deltaIndex) + + def getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaXs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaYs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetDeltaZs(self, meshIndex, blendShapeTargetIndex) + + def getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex): + return _py3dna.GeometryReader_getBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex) + +# Register GeometryReader in _py3dna: +_py3dna.GeometryReader_swigregister(GeometryReader) + +class Reader(BehaviorReader, GeometryReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Reader + + def unload(self, layer): + return _py3dna.Reader_unload(self, layer) + +# Register Reader in _py3dna: +_py3dna.Reader_swigregister(Reader) + +class StreamReader(Reader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamReader + + def read(self): + return _py3dna.StreamReader_read(self) + +# Register StreamReader in _py3dna: +_py3dna.StreamReader_swigregister(StreamReader) +StreamReader.SignatureMismatchError = _py3dna.cvar.StreamReader_SignatureMismatchError +StreamReader.VersionMismatchError = _py3dna.cvar.StreamReader_VersionMismatchError +StreamReader.InvalidDataError = _py3dna.cvar.StreamReader_InvalidDataError + +class BinaryStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(*args): + return _py3dna.BinaryStreamReader_create(*args) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamReader + +# Register BinaryStreamReader in _py3dna: +_py3dna.BinaryStreamReader_swigregister(BinaryStreamReader) + +def BinaryStreamReader_create(*args): + return _py3dna.BinaryStreamReader_create(*args) + +def BinaryStreamReader_destroy(instance): + return _py3dna.BinaryStreamReader_destroy(instance) + +class JSONStreamReader(StreamReader): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamReader + +# Register JSONStreamReader in _py3dna: +_py3dna.JSONStreamReader_swigregister(JSONStreamReader) + +def JSONStreamReader_create(stream, memRes=None): + return _py3dna.JSONStreamReader_create(stream, memRes) + +def JSONStreamReader_destroy(instance): + return _py3dna.JSONStreamReader_destroy(instance) + + +BinaryStreamReader.__new__ = __new_decorator(BinaryStreamReader_create, BinaryStreamReader.__new__) +BinaryStreamReader.__del__ = lambda instance: BinaryStreamReader_destroy(instance) +BinaryStreamReader.__init__ = __managed_init +del BinaryStreamReader.create +del BinaryStreamReader.destroy + + +JSONStreamReader.__new__ = __new_decorator(JSONStreamReader_create, JSONStreamReader.__new__) +JSONStreamReader.__del__ = lambda instance: JSONStreamReader_destroy(instance) +JSONStreamReader.__init__ = __managed_init +del JSONStreamReader.create +del JSONStreamReader.destroy + +class DescriptorWriter(object): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setName(self, name): + return _py3dna.DescriptorWriter_setName(self, name) + + def setArchetype(self, archetype): + return _py3dna.DescriptorWriter_setArchetype(self, archetype) + + def setGender(self, gender): + return _py3dna.DescriptorWriter_setGender(self, gender) + + def setAge(self, age): + return _py3dna.DescriptorWriter_setAge(self, age) + + def clearMetaData(self): + return _py3dna.DescriptorWriter_clearMetaData(self) + + def setMetaData(self, key, value): + return _py3dna.DescriptorWriter_setMetaData(self, key, value) + + def setTranslationUnit(self, unit): + return _py3dna.DescriptorWriter_setTranslationUnit(self, unit) + + def setRotationUnit(self, unit): + return _py3dna.DescriptorWriter_setRotationUnit(self, unit) + + def setCoordinateSystem(self, system): + return _py3dna.DescriptorWriter_setCoordinateSystem(self, system) + + def setLODCount(self, lodCount): + return _py3dna.DescriptorWriter_setLODCount(self, lodCount) + + def setDBMaxLOD(self, lod): + return _py3dna.DescriptorWriter_setDBMaxLOD(self, lod) + + def setDBComplexity(self, name): + return _py3dna.DescriptorWriter_setDBComplexity(self, name) + + def setDBName(self, name): + return _py3dna.DescriptorWriter_setDBName(self, name) + +# Register DescriptorWriter in _py3dna: +_py3dna.DescriptorWriter_swigregister(DescriptorWriter) + +class DefinitionWriter(DescriptorWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearGUIControlNames(self): + return _py3dna.DefinitionWriter_clearGUIControlNames(self) + + def setGUIControlName(self, index, name): + return _py3dna.DefinitionWriter_setGUIControlName(self, index, name) + + def clearRawControlNames(self): + return _py3dna.DefinitionWriter_clearRawControlNames(self) + + def setRawControlName(self, index, name): + return _py3dna.DefinitionWriter_setRawControlName(self, index, name) + + def clearJointNames(self): + return _py3dna.DefinitionWriter_clearJointNames(self) + + def setJointName(self, index, name): + return _py3dna.DefinitionWriter_setJointName(self, index, name) + + def clearJointIndices(self): + return _py3dna.DefinitionWriter_clearJointIndices(self) + + def setJointIndices(self, index, jointIndices): + return _py3dna.DefinitionWriter_setJointIndices(self, index, jointIndices) + + def clearLODJointMappings(self): + return _py3dna.DefinitionWriter_clearLODJointMappings(self) + + def setLODJointMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODJointMapping(self, lod, index) + + def clearBlendShapeChannelNames(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelNames(self) + + def setBlendShapeChannelName(self, index, name): + return _py3dna.DefinitionWriter_setBlendShapeChannelName(self, index, name) + + def clearBlendShapeChannelIndices(self): + return _py3dna.DefinitionWriter_clearBlendShapeChannelIndices(self) + + def setBlendShapeChannelIndices(self, index, blendShapeChannelIndices): + return _py3dna.DefinitionWriter_setBlendShapeChannelIndices(self, index, blendShapeChannelIndices) + + def clearLODBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearLODBlendShapeChannelMappings(self) + + def setLODBlendShapeChannelMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODBlendShapeChannelMapping(self, lod, index) + + def clearAnimatedMapNames(self): + return _py3dna.DefinitionWriter_clearAnimatedMapNames(self) + + def setAnimatedMapName(self, index, name): + return _py3dna.DefinitionWriter_setAnimatedMapName(self, index, name) + + def clearAnimatedMapIndices(self): + return _py3dna.DefinitionWriter_clearAnimatedMapIndices(self) + + def setAnimatedMapIndices(self, index, animatedMapIndices): + return _py3dna.DefinitionWriter_setAnimatedMapIndices(self, index, animatedMapIndices) + + def clearLODAnimatedMapMappings(self): + return _py3dna.DefinitionWriter_clearLODAnimatedMapMappings(self) + + def setLODAnimatedMapMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODAnimatedMapMapping(self, lod, index) + + def clearMeshNames(self): + return _py3dna.DefinitionWriter_clearMeshNames(self) + + def setMeshName(self, index, name): + return _py3dna.DefinitionWriter_setMeshName(self, index, name) + + def clearMeshIndices(self): + return _py3dna.DefinitionWriter_clearMeshIndices(self) + + def setMeshIndices(self, index, meshIndices): + return _py3dna.DefinitionWriter_setMeshIndices(self, index, meshIndices) + + def clearLODMeshMappings(self): + return _py3dna.DefinitionWriter_clearLODMeshMappings(self) + + def setLODMeshMapping(self, lod, index): + return _py3dna.DefinitionWriter_setLODMeshMapping(self, lod, index) + + def clearMeshBlendShapeChannelMappings(self): + return _py3dna.DefinitionWriter_clearMeshBlendShapeChannelMappings(self) + + def setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex): + return _py3dna.DefinitionWriter_setMeshBlendShapeChannelMapping(self, index, meshIndex, blendShapeChannelIndex) + + def setJointHierarchy(self, jointIndices): + return _py3dna.DefinitionWriter_setJointHierarchy(self, jointIndices) + + def setNeutralJointTranslations(self, translations): + return _py3dna.DefinitionWriter_setNeutralJointTranslations(self, translations) + + def setNeutralJointRotations(self, rotations): + return _py3dna.DefinitionWriter_setNeutralJointRotations(self, rotations) + +# Register DefinitionWriter in _py3dna: +_py3dna.DefinitionWriter_swigregister(DefinitionWriter) + +class BehaviorWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def setGUIToRawInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setGUIToRawInputIndices(self, inputIndices) + + def setGUIToRawOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setGUIToRawOutputIndices(self, outputIndices) + + def setGUIToRawFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setGUIToRawFromValues(self, fromValues) + + def setGUIToRawToValues(self, toValues): + return _py3dna.BehaviorWriter_setGUIToRawToValues(self, toValues) + + def setGUIToRawSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setGUIToRawSlopeValues(self, slopeValues) + + def setGUIToRawCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setGUIToRawCutValues(self, cutValues) + + def setPSDCount(self, count): + return _py3dna.BehaviorWriter_setPSDCount(self, count) + + def setPSDRowIndices(self, rowIndices): + return _py3dna.BehaviorWriter_setPSDRowIndices(self, rowIndices) + + def setPSDColumnIndices(self, columnIndices): + return _py3dna.BehaviorWriter_setPSDColumnIndices(self, columnIndices) + + def setPSDValues(self, weights): + return _py3dna.BehaviorWriter_setPSDValues(self, weights) + + def setJointRowCount(self, rowCount): + return _py3dna.BehaviorWriter_setJointRowCount(self, rowCount) + + def setJointColumnCount(self, columnCount): + return _py3dna.BehaviorWriter_setJointColumnCount(self, columnCount) + + def clearJointGroups(self): + return _py3dna.BehaviorWriter_clearJointGroups(self) + + def deleteJointGroup(self, jointGroupIndex): + return _py3dna.BehaviorWriter_deleteJointGroup(self, jointGroupIndex) + + def setJointGroupLODs(self, jointGroupIndex, lods): + return _py3dna.BehaviorWriter_setJointGroupLODs(self, jointGroupIndex, lods) + + def setJointGroupInputIndices(self, jointGroupIndex, inputIndices): + return _py3dna.BehaviorWriter_setJointGroupInputIndices(self, jointGroupIndex, inputIndices) + + def setJointGroupOutputIndices(self, jointGroupIndex, outputIndices): + return _py3dna.BehaviorWriter_setJointGroupOutputIndices(self, jointGroupIndex, outputIndices) + + def setJointGroupValues(self, jointGroupIndex, values): + return _py3dna.BehaviorWriter_setJointGroupValues(self, jointGroupIndex, values) + + def setJointGroupJointIndices(self, jointGroupIndex, jointIndices): + return _py3dna.BehaviorWriter_setJointGroupJointIndices(self, jointGroupIndex, jointIndices) + + def setBlendShapeChannelLODs(self, lods): + return _py3dna.BehaviorWriter_setBlendShapeChannelLODs(self, lods) + + def setBlendShapeChannelInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelInputIndices(self, inputIndices) + + def setBlendShapeChannelOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setBlendShapeChannelOutputIndices(self, outputIndices) + + def setAnimatedMapLODs(self, lods): + return _py3dna.BehaviorWriter_setAnimatedMapLODs(self, lods) + + def setAnimatedMapInputIndices(self, inputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapInputIndices(self, inputIndices) + + def setAnimatedMapOutputIndices(self, outputIndices): + return _py3dna.BehaviorWriter_setAnimatedMapOutputIndices(self, outputIndices) + + def setAnimatedMapFromValues(self, fromValues): + return _py3dna.BehaviorWriter_setAnimatedMapFromValues(self, fromValues) + + def setAnimatedMapToValues(self, toValues): + return _py3dna.BehaviorWriter_setAnimatedMapToValues(self, toValues) + + def setAnimatedMapSlopeValues(self, slopeValues): + return _py3dna.BehaviorWriter_setAnimatedMapSlopeValues(self, slopeValues) + + def setAnimatedMapCutValues(self, cutValues): + return _py3dna.BehaviorWriter_setAnimatedMapCutValues(self, cutValues) + +# Register BehaviorWriter in _py3dna: +_py3dna.BehaviorWriter_swigregister(BehaviorWriter) + +class GeometryWriter(DefinitionWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + def clearMeshes(self): + return _py3dna.GeometryWriter_clearMeshes(self) + + def deleteMesh(self, meshIndex): + return _py3dna.GeometryWriter_deleteMesh(self, meshIndex) + + def setVertexPositions(self, meshIndex, positions): + return _py3dna.GeometryWriter_setVertexPositions(self, meshIndex, positions) + + def setVertexTextureCoordinates(self, meshIndex, textureCoordinates): + return _py3dna.GeometryWriter_setVertexTextureCoordinates(self, meshIndex, textureCoordinates) + + def setVertexNormals(self, meshIndex, normals): + return _py3dna.GeometryWriter_setVertexNormals(self, meshIndex, normals) + + def setVertexLayouts(self, meshIndex, layouts): + return _py3dna.GeometryWriter_setVertexLayouts(self, meshIndex, layouts) + + def clearFaceVertexLayoutIndices(self, meshIndex): + return _py3dna.GeometryWriter_clearFaceVertexLayoutIndices(self, meshIndex) + + def setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices): + return _py3dna.GeometryWriter_setFaceVertexLayoutIndices(self, meshIndex, faceIndex, layoutIndices) + + def setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount): + return _py3dna.GeometryWriter_setMaximumInfluencePerVertex(self, meshIndex, maxInfluenceCount) + + def clearSkinWeights(self, meshIndex): + return _py3dna.GeometryWriter_clearSkinWeights(self, meshIndex) + + def setSkinWeightsValues(self, meshIndex, vertexIndex, weights): + return _py3dna.GeometryWriter_setSkinWeightsValues(self, meshIndex, vertexIndex, weights) + + def setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices): + return _py3dna.GeometryWriter_setSkinWeightsJointIndices(self, meshIndex, vertexIndex, jointIndices) + + def clearBlendShapeTargets(self, meshIndex): + return _py3dna.GeometryWriter_clearBlendShapeTargets(self, meshIndex) + + def setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex): + return _py3dna.GeometryWriter_setBlendShapeChannelIndex(self, meshIndex, blendShapeTargetIndex, blendShapeChannelIndex) + + def setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas): + return _py3dna.GeometryWriter_setBlendShapeTargetDeltas(self, meshIndex, blendShapeTargetIndex, deltas) + + def setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices): + return _py3dna.GeometryWriter_setBlendShapeTargetVertexIndices(self, meshIndex, blendShapeTargetIndex, vertexIndices) + +# Register GeometryWriter in _py3dna: +_py3dna.GeometryWriter_swigregister(GeometryWriter) + +class Writer(BehaviorWriter, GeometryWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_Writer + + def setFrom(self, *args): + return _py3dna.Writer_setFrom(self, *args) + +# Register Writer in _py3dna: +_py3dna.Writer_swigregister(Writer) + +class StreamWriter(Writer): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + __swig_destroy__ = _py3dna.delete_StreamWriter + + def write(self): + return _py3dna.StreamWriter_write(self) + +# Register StreamWriter in _py3dna: +_py3dna.StreamWriter_swigregister(StreamWriter) + +class BinaryStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_BinaryStreamWriter + +# Register BinaryStreamWriter in _py3dna: +_py3dna.BinaryStreamWriter_swigregister(BinaryStreamWriter) + +def BinaryStreamWriter_create(stream, memRes=None): + return _py3dna.BinaryStreamWriter_create(stream, memRes) + +def BinaryStreamWriter_destroy(instance): + return _py3dna.BinaryStreamWriter_destroy(instance) + +class JSONStreamWriter(StreamWriter): + thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc='The membership flag') + + def __init__(self, *args, **kwargs): + raise AttributeError("No constructor defined - class is abstract") + __repr__ = _swig_repr + + @staticmethod + def create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + + @staticmethod + def destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + __swig_destroy__ = _py3dna.delete_JSONStreamWriter + +# Register JSONStreamWriter in _py3dna: +_py3dna.JSONStreamWriter_swigregister(JSONStreamWriter) + +def JSONStreamWriter_create(stream, indentWidth=4, memRes=None): + return _py3dna.JSONStreamWriter_create(stream, indentWidth, memRes) + +def JSONStreamWriter_destroy(instance): + return _py3dna.JSONStreamWriter_destroy(instance) + + +BinaryStreamWriter.__new__ = __new_decorator(BinaryStreamWriter_create, BinaryStreamWriter.__new__) +BinaryStreamWriter.__del__ = lambda instance: BinaryStreamWriter_destroy(instance) +BinaryStreamWriter.__init__ = __managed_init +del BinaryStreamWriter.create +del BinaryStreamWriter.destroy + + +JSONStreamWriter.__new__ = __new_decorator(JSONStreamWriter_create, JSONStreamWriter.__new__) +JSONStreamWriter.__del__ = lambda instance: JSONStreamWriter_destroy(instance) +JSONStreamWriter.__init__ = __managed_init +del JSONStreamWriter.create +del JSONStreamWriter.destroy + + + diff --git a/scripts/Main.py b/scripts/Main.py new file mode 100644 index 0000000..f383621 --- /dev/null +++ b/scripts/Main.py @@ -0,0 +1,284 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Main module for Metahuman customize plugin +主模块 - 负责初始化UI和功能集成 +功能: 从ui模块加载子模块显示 +作者: Virtuos Games +版本: Alpha v1.0.0 +""" +#===================================== IMPORT MODULES ===================================== +from Qt import QtWidgets, QtCore, QtGui +from Qt.QtCompat import wrapInstance +from maya import OpenMayaUI as omui +import maya.cmds as cmds +import maya.mel as mel +import maya.utils as utils +import webbrowser +import subprocess +import importlib +import traceback +import locale +import sys +import os +#===================================== IMPORT UI MODULES =================================== +from scripts.ui import toolbar +from scripts.ui import geometry +from scripts.ui import rigging +from scripts.ui import behaviour +from scripts.ui import definition +#========================================== CONFIG ======================================== +import config +TOOL_NAME = config.TOOL_NAME +TOOL_VERSION = config.TOOL_VERSION +TOOL_AUTHOR = config.TOOL_AUTHOR +TOOL_YEAR = config.TOOL_VERSION +TOOL_MOD_FILENAME = config.TOOL_MOD_FILENAME +TOOL_LANG = config.TOOL_LANG +TOOL_WSCL_NAME = config.TOOL_WSCL_NAME +TOOL_HELP_URL = config.TOOL_HELP_URL +TOOL_PATH = config.TOOL_PATH +SCRIPTS_PATH = config.SCRIPTS_PATH +TOOL_MAIN_SCRIPT = config.TOOL_MAIN_SCRIPT +UI_PATH = config.UI_PATH +STYLE_FILE = config.STYLE_FILE +ICONS_PATH = config.ICONS_PATH +TOOL_ICON = config.TOOL_ICON +ASSETS_PATH = config.ASSETS_PATH +DNA_FILE_PATH = config.DNA_FILE_PATH +DNA_IMG_PATH = config.DNA_IMG_PATH +TOOL_COMMAND_ICON = config.TOOL_COMMAND_ICON +#====================================== LOCALIZATION ================================== +from scripts.ui import localization +LANG = localization.LANG +#========================================= INIT ======================================= +def get_system_encoding(): + encoding = sys.getdefaultencoding() + if encoding.lower() == 'ascii': + encoding = locale.getpreferredencoding() + return encoding + +def maya_main_window(): + main_window_ptr = omui.MQtUtil.mainWindow() + return wrapInstance(int(main_window_ptr), QtWidgets.QWidget) +#===================================== MAIN FUNCTION =================================== +class MainWindow(QtWidgets.QWidget): + def __init__(self, parent=maya_main_window()): + super(MainWindow, self).__init__(parent) + self.setWindowTitle(TOOL_NAME) + self.setObjectName(f"{TOOL_NAME}MainWindow") + self.setWindowFlags(QtCore.Qt.Window) + self.setAttribute(QtCore.Qt.WA_DeleteOnClose) + + # 设置自适应大小策略 + self.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + self.setMinimumSize(300, 600) # 减小最小高度,让窗口更灵活 + + self.create_widgets() + self.create_layouts() + self.create_connections() + if os.path.exists(TOOL_ICON): + self.setWindowIcon(QtGui.QIcon(TOOL_ICON)) + else: + print("WARNING: Icon file not found: {}".format(TOOL_ICON)) + + def dock_to_maya(self): + if cmds.workspaceControl(TOOL_WSCL_NAME, exists=True): + cmds.deleteUI(TOOL_WSCL_NAME) + + def create_control(): + try: + workspace_control = cmds.workspaceControl( + TOOL_WSCL_NAME, + label=TOOL_NAME, + floating=True, + retain=True, + resizeWidth=True, + initialWidth=300, + minimumWidth=300 + ) + cmds.workspaceControl(TOOL_WSCL_NAME, e=True, resizeWidth=True) + cmds.control(self.objectName(), e=True, p=workspace_control) + cmds.evalDeferred(lambda: cmds.workspaceControl(TOOL_WSCL_NAME, e=True, resizeWidth=True)) + except Exception as e: + print("Error creating workspace control: {}".format(e)) + + cmds.evalDeferred(create_control) +#===================================== UI COMPONENTS ===================================== + def create_widgets(self): + # 创建滚动区域 + self.scroll_area = QtWidgets.QScrollArea() + self.scroll_area.setObjectName("main_scroll_area") + self.scroll_area.setWidgetResizable(True) + self.scroll_area.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff) + self.scroll_area.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded) # 改回按需显示 + self.scroll_area.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + # 创建滚动区域内容控件 + self.scroll_content = QtWidgets.QWidget() + self.scroll_content.setObjectName("scroll_content") + self.scroll_content.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + # 创建主标签页 + self.main_tab = QtWidgets.QTabWidget() + self.main_tab.setObjectName("main_tab") + self.main_tab.setTabPosition(QtWidgets.QTabWidget.North) + self.main_tab.setTabShape(QtWidgets.QTabWidget.Rounded) + self.main_tab.setDocumentMode(True) + self.main_tab.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + self.main_tab.setMinimumHeight(400) + + # 创建各功能模块标签页 + self.geometry_tab = QtWidgets.QWidget() + self.geometry_tab.setObjectName("geometry_tab") + self.geometry_tab.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + self.rigging_tab = QtWidgets.QWidget() + self.rigging_tab.setObjectName("rigging_tab") + self.rigging_tab.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + self.behaviour_tab = QtWidgets.QWidget() + self.behaviour_tab.setObjectName("behaviour_tab") + self.behaviour_tab.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + self.definition_tab = QtWidgets.QWidget() + self.definition_tab.setObjectName("definition_tab") + self.definition_tab.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + # 创建工具栏 + self.toolbar_frame = QtWidgets.QFrame() + self.toolbar_frame.setObjectName("toolbar_frame") + self.toolbar_frame.setFrameShape(QtWidgets.QFrame.StyledPanel) + self.toolbar_frame.setFrameShadow(QtWidgets.QFrame.Raised) + self.toolbar_frame.setMaximumHeight(40) + self.toolbar_frame.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + + # 创建状态栏 + self.status_bar = QtWidgets.QStatusBar() + self.status_bar.setObjectName("status_bar") + self.status_bar.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + self.status_bar.showMessage(f"{TOOL_NAME} {TOOL_VERSION}") + + # 初始化各模块UI组件 + toolbar.widgets() + geometry.widgets() + rigging.widgets() + behaviour.widgets() + definition.widgets() + + def create_layouts(self): + # 主布局 + self.main_layout = QtWidgets.QVBoxLayout(self) + self.main_layout.setContentsMargins(2, 2, 2, 2) + self.main_layout.setSpacing(2) + + # 滚动区域内容布局 + self.scroll_content_layout = QtWidgets.QVBoxLayout(self.scroll_content) + self.scroll_content_layout.setContentsMargins(2, 2, 2, 2) + self.scroll_content_layout.setSpacing(2) + + # 添加工具栏 + self.toolbar_layout = QtWidgets.QVBoxLayout(self.toolbar_frame) + self.toolbar_layout.setContentsMargins(0, 0, 0, 0) + toolbar.layouts(parent_frame=self.toolbar_frame) + + # 设置各标签页布局 + self.geometry_layout = QtWidgets.QVBoxLayout(self.geometry_tab) + self.geometry_layout.setContentsMargins(4, 4, 4, 4) + geometry.layouts(parent_tab=self.geometry_tab) + + self.rigging_layout = QtWidgets.QVBoxLayout(self.rigging_tab) + self.rigging_layout.setContentsMargins(4, 4, 4, 4) + rigging.layouts(parent_tab=self.rigging_tab) + + self.behaviour_layout = QtWidgets.QVBoxLayout(self.behaviour_tab) + self.behaviour_layout.setContentsMargins(4, 4, 4, 4) + behaviour.layouts(parent_tab=self.behaviour_tab) + + self.definition_layout = QtWidgets.QVBoxLayout(self.definition_tab) + self.definition_layout.setContentsMargins(4, 4, 4, 4) + definition.layouts(parent_tab=self.definition_tab) + + # 添加标签页到主标签控件 + self.main_tab.addTab(self.geometry_tab, "几何模型") + self.main_tab.addTab(self.rigging_tab, "绑定系统") + self.main_tab.addTab(self.behaviour_tab, "行为系统") + self.main_tab.addTab(self.definition_tab, "定义系统") + + # 将组件添加到滚动区域内容布局 + self.scroll_content_layout.addWidget(self.toolbar_frame) + self.scroll_content_layout.addWidget(self.main_tab) + + # 设置滚动区域的内容控件 + self.scroll_area.setWidget(self.scroll_content) + + # 将滚动区域和状态栏添加到主布局 + self.main_layout.addWidget(self.scroll_area) + self.main_layout.addWidget(self.status_bar) + + # 加载样式表 + if os.path.exists(STYLE_FILE): + try: + with open(STYLE_FILE, "r", encoding="utf-8") as f: + style = f.read() + self.setStyleSheet(style) + except UnicodeDecodeError: + # 尝试使用系统默认编码 + encoding = get_system_encoding() + try: + with open(STYLE_FILE, "r", encoding=encoding) as f: + style = f.read() + self.setStyleSheet(style) + except Exception as e: + print(f"警告: 无法加载样式表文件: {e}") + else: + print(f"警告: 样式表文件不存在: {STYLE_FILE}") + + def create_connections(self): + # 连接各模块的信号和槽 + toolbar.connections() + geometry.connections() + rigging.connections() + behaviour.connections() + definition.connections() + + # 标签页切换信号 + self.main_tab.currentChanged.connect(self.on_tab_changed) + + def on_tab_changed(self, index): + tab_name = self.main_tab.tabText(index) + self.status_bar.showMessage(f"当前模块: {tab_name}") + print(f"切换到模块: {tab_name}") + +def main(): + """ + Main function to initialize and show the Plugin UI + """ + try: + # Initialize UI modules with placeholder functions + # Each module only contains UI framework without actual functionality + toolbar.toolbar_temp_function() + geometry.geometry_temp_function() + rigging.rigging_temp_function() + behaviour.behaviour_temp_function() + definition.definition_temp_function() + + # Create and show main window + global tool_window + tool_window = MainWindow() + tool_window.dock_to_maya() + + print(f"{TOOL_NAME} plugin initialized successfully!") + return tool_window + except Exception as e: + error_msg = f"Error initializing {TOOL_NAME} plugin: {str(e)}" + print(error_msg) + traceback.print_exc() + cmds.warning(error_msg) + return None + + +# Auto-run when imported +if __name__ == "__main__": + main() diff --git a/scripts/ReloadModules.py b/scripts/ReloadModules.py new file mode 100644 index 0000000..d6fa625 --- /dev/null +++ b/scripts/ReloadModules.py @@ -0,0 +1,741 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Tool - Module Reload Tool +Provides module reloading functionality for the plugin, supporting hot updates + +用法说明: +1. 在Maya中直接运行: + import scripts.ReloadModules + scripts.ReloadModules.main() + +2. 从命令行重新加载所有模块: + import scripts.ReloadModules + scripts.ReloadModules.reload_all() + +3. 重新加载特定模块: + import scripts.ReloadModules + scripts.ReloadModules.ModuleReloader.reload_module('module_name') + +4. 在开发过程中使用: + - 当修改了代码后,运行此模块可以热更新所有更改 + - 无需重启Maya即可测试新功能 + - 支持UI和命令行两种方式 + +注意事项: +- 某些深度依赖的模块可能需要手动重启Maya +- 如果遇到导入错误,请检查模块路径是否正确 +- 重新加载可能不会影响已经创建的对象实例 +""" + +import sys +import importlib +import os +import traceback +import shutil +from maya import cmds + +# 设置工具路径 +TOOL_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if TOOL_PATH not in sys.path: + sys.path.insert(0, TOOL_PATH) + +# 设置脚本路径 +SCRIPTS_PATH = os.path.dirname(os.path.abspath(__file__)) +if SCRIPTS_PATH not in sys.path: + sys.path.insert(0, SCRIPTS_PATH) + +# 导入主配置 - 多级尝试导入策略 +def import_main_config(): + """尝试多种方式导入主配置文件""" + global TOOL_NAME, TOOL_VERSION, TOOL_AUTHOR, TOOL_PATH, SCRIPTS_PATH + global UI_PATH, STYLE_FILE, ICONS_PATH, ASSETS_PATH, DNA_FILE_PATH, Config + + # 尝试直接导入 + try: + import config + importlib.reload(config) # 确保获取最新配置 + # 从主配置文件导入路径和设置 + TOOL_NAME = config.TOOL_NAME + TOOL_VERSION = config.TOOL_VERSION + TOOL_AUTHOR = config.TOOL_AUTHOR + TOOL_PATH = config.TOOL_PATH + SCRIPTS_PATH = config.SCRIPTS_PATH + UI_PATH = config.UI_PATH + STYLE_FILE = config.STYLE_FILE + ICONS_PATH = config.ICONS_PATH + ASSETS_PATH = config.ASSETS_PATH + DNA_FILE_PATH = config.DNA_FILE_PATH + + print(f"成功从主配置文件导入配置") + return True + except ImportError as e: + print(f"直接导入主配置文件失败: {str(e)}") + + # 尝试从上级目录导入 + parent_dir = os.path.dirname(TOOL_PATH) + if parent_dir not in sys.path: + sys.path.insert(0, parent_dir) + + try: + import config + importlib.reload(config) # 确保获取最新配置 + # 从主配置文件导入路径和设置 + TOOL_NAME = config.TOOL_NAME + TOOL_VERSION = config.TOOL_VERSION + TOOL_AUTHOR = config.TOOL_AUTHOR + TOOL_PATH = config.TOOL_PATH + SCRIPTS_PATH = config.SCRIPTS_PATH + UI_PATH = config.UI_PATH + STYLE_FILE = config.STYLE_FILE + ICONS_PATH = config.ICONS_PATH + ASSETS_PATH = config.ASSETS_PATH + DNA_FILE_PATH = config.DNA_FILE_PATH + + print(f"成功从上级目录导入主配置文件") + return True + except ImportError as e: + print(f"从上级目录导入主配置文件失败: {str(e)}") + if parent_dir in sys.path: + sys.path.remove(parent_dir) + + return False + +# 尝试导入主配置 +if not import_main_config(): + print("警告: 无法导入主配置文件,使用默认配置") + # 使用默认路径 + TOOL_NAME = "Delos" + TOOL_VERSION = "Alpha v1.0.0" + TOOL_AUTHOR = "Virtuos Games" + TOOL_PATH = TOOL_PATH + UI_PATH = os.path.join(SCRIPTS_PATH, 'ui') + STYLE_FILE = os.path.join(SCRIPTS_PATH, 'ui', 'style.qss') + ICONS_PATH = os.path.join(TOOL_PATH, 'icons') + ASSETS_PATH = os.path.join(TOOL_PATH, 'assets') + DNA_FILE_PATH = os.path.join(TOOL_PATH, 'assets', 'dna') + +# 尝试导入Config模块 +try: + from scripts.utils import Config +except ImportError: + try: + from utils import Config + except ImportError: + try: + import Config + except ImportError: + print("警告: 无法导入Config模块") + Config = None + + # 创建默认Config对象 + class DefaultConfig: + # 使用TOOL_PATH而不是ROOT_DIR + DNA_CONFIG = { + 'DNA_PATH': os.path.join(TOOL_PATH, 'assets', 'dna'), + 'DNA_FILE_PATH': os.path.join(TOOL_PATH, 'assets', 'dna', 'default.dna'), + 'DNA_VERSION': 'DNAv4', + 'LOD_LEVELS': [0, 1, 2, 3, 4], + 'DEFAULT_MESH_INDICES': [0], + 'GUI_PATH': os.path.join(TOOL_PATH, 'ui'), + 'ASSEMBLE_SCRIPT': os.path.join(TOOL_PATH, 'scripts', 'assemble.py') + } + DNA_LIB_PATHS = [ + os.path.join(TOOL_PATH, 'lib'), + os.path.join(TOOL_PATH, 'lib', 'windows' if sys.platform == 'win32' else 'linux') + ] + Config = DefaultConfig() + + +# 尝试导入 Qt 模块 +# 首先尝试使用项目中的 Qt.py 兼容层 +try: + # 添加父目录到路径中以确保可以导入 Qt.py + parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + if parent_dir not in sys.path: + sys.path.append(parent_dir) + + # 尝试导入 Qt.py + from Qt import QtWidgets, QtCore, QtGui + from Qt.QtCompat import wrapInstance + + # 获取 Maya 主窗口 + def getMayaMainWindow(): + from maya import OpenMayaUI as omui + mainWindowPtr = omui.MQtUtil.mainWindow() + return wrapInstance(int(mainWindowPtr), QtWidgets.QWidget) + + HAS_QT = True + print("Successfully imported Qt modules using Qt.py compatibility layer") + +except ImportError: + # 如果无法导入 Qt.py,尝试直接导入 PySide2/PySide6 + try: + from PySide2 import QtWidgets, QtCore, QtGui + from shiboken2 import wrapInstance + from maya import OpenMayaUI as omui + + def getMayaMainWindow(): + mainWindowPtr = omui.MQtUtil.mainWindow() + return wrapInstance(int(mainWindowPtr), QtWidgets.QWidget) + + HAS_QT = True + print("Successfully imported Qt modules using PySide2") + + except ImportError: + try: + from PySide6 import QtWidgets, QtCore, QtGui + from shiboken6 import wrapInstance + from maya import OpenMayaUI as omui + + def getMayaMainWindow(): + mainWindowPtr = omui.MQtUtil.mainWindow() + return wrapInstance(int(mainWindowPtr), QtWidgets.QWidget) + + HAS_QT = True + print("Successfully imported Qt modules using PySide6") + + except ImportError: + # 如果所有导入尝试都失败,设置标志并显示警告 + HAS_QT = False + cmds.warning("Failed to import Qt modules. UI functionality will be limited to command line only.") + + +def clean_pycache(root_dir): + """Delete all __pycache__ directories and .pyc files under the given root directory + + Args: + root_dir (str): Root directory to search for __pycache__ folders and .pyc files + + Returns: + int: Number of __pycache__ directories and .pyc files removed + """ + count = 0 + try: + # 首先确保目录存在 + if not os.path.exists(root_dir) or not os.path.isdir(root_dir): + print(f"Warning: Directory does not exist or is not a directory: {root_dir}") + return count + + print(f"Cleaning __pycache__ in directory: {root_dir}") + + # 收集所有需要删除的路径,避免在遍历时修改目录结构 + pycache_dirs = [] + pyc_files = [] + + # 首先收集所有 __pycache__ 目录和 .pyc 文件 + for root, dirs, files in os.walk(root_dir): + # 收集 __pycache__ 目录 + if "__pycache__" in dirs: + pycache_path = os.path.join(root, "__pycache__") + pycache_dirs.append(pycache_path) + + # 收集 .pyc 文件 + for file in files: + if file.endswith(".pyc"): + file_path = os.path.join(root, file) + pyc_files.append(file_path) + + # 优先使用批处理命令删除 __pycache__ 目录(更可靠) + if os.name == 'nt': # Windows + # 创建临时批处理文件 + temp_bat = os.path.join(os.environ.get('TEMP', '.'), 'clean_pycache_temp.bat') + with open(temp_bat, 'w') as f: + f.write('@echo off\n') + # 添加删除 __pycache__ 目录的命令 + for pycache_path in pycache_dirs: + f.write(f'if exist "{pycache_path}" rd /s /q "{pycache_path}"\n') + # 添加删除 .pyc 文件的命令 + for file_path in pyc_files: + f.write(f'if exist "{file_path}" del /f /q "{file_path}"\n') + + # 执行批处理文件 + os.system(f'"{temp_bat}"') + + # 删除临时批处理文件 + try: + os.remove(temp_bat) + except: + pass + + # 验证是否删除成功 + remaining_pycache = 0 + for pycache_path in pycache_dirs: + if not os.path.exists(pycache_path): + count += 1 + else: + remaining_pycache += 1 + + remaining_pyc = 0 + for file_path in pyc_files: + if not os.path.exists(file_path): + count += 1 + else: + remaining_pyc += 1 + + if remaining_pycache > 0 or remaining_pyc > 0: + print(f"Warning: {remaining_pycache} __pycache__ directories and {remaining_pyc} .pyc files could not be removed") + else: # Unix/Linux + # 使用系统命令删除 __pycache__ 目录 + for pycache_path in pycache_dirs: + if os.system(f'rm -rf "{pycache_path}"') == 0: + print(f"Removed __pycache__ directory: {pycache_path}") + count += 1 + else: + print(f"Failed to remove {pycache_path}") + + # 使用系统命令删除 .pyc 文件 + for file_path in pyc_files: + if os.system(f'rm -f "{file_path}"') == 0: + print(f"Removed .pyc file: {file_path}") + count += 1 + else: + print(f"Failed to remove {file_path}") + + except Exception as error: + print(f"Error cleaning __pycache__ directories: {str(error)}") + print(f"Removed {count} files/directories: {len(pycache_dirs)} __pycache__ directories and {len(pyc_files)} .pyc files") + traceback.print_exc() + + return count + + +class ModuleReloader(object): + """Class for reloading modules in the Plugin""" + + @staticmethod + def get_package_modules(package_name): + """ + Get all modules in a package + + Args: + package_name (str): Name of the package + + Returns: + list: List of module names + """ + package_modules = [] + try: + # 尝试导入包 + package = importlib.import_module(package_name) + package_path = os.path.dirname(package.__file__) + + # 遍历包目录查找模块 + for root, dirs, files in os.walk(package_path): + for file in files: + if file.endswith('.py') and file != '__init__.py': + # 计算相对路径 + rel_path = os.path.relpath(os.path.join(root, file), package_path) + # 转换为模块路径格式 + module_path = os.path.splitext(rel_path)[0].replace(os.sep, '.') + # 构建完整模块名 + module_name = f"{package_name}.{module_path}" + package_modules.append(module_name) + + # 添加子包 + for dir_name in dirs: + init_file = os.path.join(root, dir_name, '__init__.py') + if os.path.exists(init_file): + rel_path = os.path.relpath(os.path.join(root, dir_name), package_path) + module_name = f"{package_name}.{rel_path.replace(os.sep, '.')}" + package_modules.append(module_name) + + return package_modules + except Exception as e: + print(f"错误: 无法导入包 {package_name}: {str(e)}") + traceback.print_exc() + return [] + + @staticmethod + def reload_module(module_name): + """Reload a specific module + + Args: + module_name (str): Name of the module to reload + + Returns: + bool: True if successful, False otherwise + """ + try: + # 尝试导入模块 + try: + module = __import__(module_name, fromlist=["*"]) + except ImportError: + # 如果失败,尝试将点替换为斜杠 + module_path = module_name.replace('.', '/') + if os.path.exists(os.path.join(TOOL_PATH, module_path + '.py')): + sys_path_modified = False + if TOOL_PATH not in sys.path: + sys.path.insert(0, TOOL_PATH) + sys_path_modified = True + + module = __import__(module_name, fromlist=["*"]) + + if sys_path_modified: + sys.path.remove(TOOL_PATH) + else: + raise ImportError(f"Module {module_name} not found") + + # 重新加载模块 + importlib.reload(module) + + print(f"成功重新加载模块: {module_name}") + return True + except Exception as e: + print(f"重新加载模块 {module_name} 时出错: {str(e)}") + traceback.print_exc() + return False + + @classmethod + def reload_all_modules(cls): + """ + Reload all Plugin modules + + Returns: + dict: Results of reloading each module + """ + # 首先声明全局变量 + global TOOL_NAME, TOOL_VERSION, TOOL_AUTHOR, TOOL_PATH, SCRIPTS_PATH + global UI_PATH, STYLE_FILE, ICONS_PATH, ASSETS_PATH, DNA_FILE_PATH + + results = {} + + # 清理缓存文件 + clean_pycache(TOOL_PATH) + + # 首先尝试重新加载主配置文件 + try: + # 尝试直接导入主配置 + if 'config' in sys.modules: + config_module = sys.modules['config'] + importlib.reload(config_module) + print("成功重新加载主配置文件") + results['config'] = True + + TOOL_NAME = config_module.TOOL_NAME + TOOL_VERSION = config_module.TOOL_VERSION + TOOL_AUTHOR = config_module.TOOL_AUTHOR + TOOL_PATH = config_module.TOOL_PATH + SCRIPTS_PATH = config_module.SCRIPTS_PATH + UI_PATH = config_module.UI_PATH + STYLE_FILE = config_module.STYLE_FILE + ICONS_PATH = config_module.ICONS_PATH + ASSETS_PATH = config_module.ASSETS_PATH + DNA_FILE_PATH = config_module.DNA_FILE_PATH + else: + # 尝试重新导入 + import_main_config() + results['config'] = True + except Exception as e: + print(f"重新加载主配置文件时出错: {str(e)}") + results['config'] = False + + # 定义要重新加载的模块 + modules_to_reload = [ + "scripts.utils.Config", # 首先重新加载配置 + "scripts.utils", + "scripts.ui", + "scripts.Main" + ] + + # 获取所有子模块 + all_modules = [] + for module in modules_to_reload: + all_modules.append(module) + try: + submodules = cls.get_package_modules(module) + if submodules: + all_modules.extend(submodules) + except Exception as e: + print(f"获取模块 {module} 的子模块时出错: {str(e)}") + + # 去除重复项并排序 + all_modules = sorted(list(set(all_modules))) + + # 按照依赖关系对模块进行排序 + # 确保配置模块先重新加载 + priority_modules = [] + normal_modules = [] + + for module in all_modules: + if "Config" in module or module.endswith(".config"): + priority_modules.append(module) + else: + normal_modules.append(module) + + # 先重新加载优先级模块,然后是普通模块 + for module in priority_modules + normal_modules: + results[module] = cls.reload_module(module) + + return results + + +def reload_all(): + """Reload all Plugin modules and display results""" + print("\n" + "-"*50) + print("Reloading Plugin modules...") + print("-"*50) + + # 获取插件根目录 - 使用config中定义的TOOL_PATH + try: + import config + TOOL_PATH = config.TOOL_PATH + except ImportError: + # 如果无法导入config,则使用相对路径 + TOOL_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + print(f"Plugin root directory: {TOOL_PATH}") + + # 清理 __pycache__ 目录 + print("Cleaning __pycache__ directories...") + pycache_count = clean_pycache(TOOL_PATH) + print(f"Removed {pycache_count} __pycache__ directories and .pyc files") + + # Reload modules + results = ModuleReloader.reload_all_modules() + + success_count = sum(1 for success in results.values() if success) + total_count = len(results) + + print("\nReload Summary:") + print(f"Successfully reloaded {success_count} of {total_count} modules") + + if success_count < total_count: + print("\nFailed modules:") + for module, success in results.items(): + if not success: + print(f" - {module}") + + print("-"*50) + return results + + +def show_reload_ui(): + """Show a UI for reloading modules""" + # 检查是否有Qt模块可用 + if not 'HAS_QT' in globals() or not HAS_QT: + cmds.warning("Qt modules not available. Falling back to command line reload.") + return reload_all() + + try: + # 创建对话框 + dialog = QtWidgets.QDialog(getMayaMainWindow()) + dialog.setWindowTitle("Plugin Reload UI") + dialog.setMinimumWidth(450) + dialog.setWindowFlags(dialog.windowFlags() ^ QtCore.Qt.WindowContextHelpButtonHint) + + # 创建布局 + layout = QtWidgets.QVBoxLayout(dialog) + + # 创建信息标签 + info_label = QtWidgets.QLabel("Reload Plugin modules, no need to restart Maya.") + layout.addWidget(info_label) + + # 创建模块选择区域 + module_group = QtWidgets.QGroupBox("Select Modules to Reload") + module_layout = QtWidgets.QVBoxLayout(module_group) + + # 创建全选复选框 + all_modules_cb = QtWidgets.QCheckBox("All Modules") + all_modules_cb.setChecked(True) + module_layout.addWidget(all_modules_cb) + + # 创建模块类别复选框 + module_cbs = {} + module_categories = [ + ("Core Modules", [ + "scripts", + "scripts.Main", + "scripts.ReloadModules" + ] + ), + ("UI Modules", [ + "scripts.ui", + "scripts.ui.toolbar", + "scripts.ui.geometry", + "scripts.ui.rigging", + "scripts.ui.behaviour", + "scripts.ui.definition" + ] + ), + ("Utility Modules", [ + "scripts.utils", + "scripts.utils.utils_toolbar", + "scripts.utils.utils_geometry", + "scripts.utils.utils_rigging", + "scripts.utils.utils_behaviour", + "scripts.utils.utils_definition" + ] + ), + ("Config", ["config"]) + ] + for category, modules in module_categories: + category_cb = QtWidgets.QCheckBox(category) + category_cb.setChecked(True) + category_cb.setEnabled(False) + module_layout.addWidget(category_cb) + module_cbs[category] = (category_cb, modules) + + # 全选/取消全选逻辑 + def toggle_all_modules(): + checked = all_modules_cb.isChecked() + for category, (cb, _) in module_cbs.items(): + cb.setChecked(checked) + cb.setEnabled(not checked) + + all_modules_cb.toggled.connect(toggle_all_modules) + + layout.addWidget(module_group) + + # 创建操作按钮区域 + button_layout = QtWidgets.QHBoxLayout() + + # 创建重载按钮 + reload_button = QtWidgets.QPushButton("Reload Selected Modules") + reload_button.setMinimumHeight(30) + button_layout.addWidget(reload_button) + + # 创建清理缓存按钮 + clean_button = QtWidgets.QPushButton("Clean Caches Only") + clean_button.setMinimumHeight(30) + button_layout.addWidget(clean_button) + + layout.addLayout(button_layout) + + # 创建结果文本区域 + results_text = QtWidgets.QTextEdit() + results_text.setReadOnly(True) + results_text.setMinimumHeight(300) + layout.addWidget(results_text) + + # 创建关闭按钮 + close_button = QtWidgets.QPushButton("Close") + close_button.setMinimumHeight(30) + close_button.clicked.connect(dialog.close) + layout.addWidget(close_button) + + # 重载并更新UI的函数 + def reload_and_update_ui(text_widget): + text_widget.clear() + text_widget.append("Reloading modules...\n") + + # 获取插件根目录 - 使用config中定义的TOOL_PATH + try: + import config + TOOL_PATH = config.TOOL_PATH + except ImportError: + # 如果无法导入config,则使用相对路径 + TOOL_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + text_widget.append(f"Plugin root directory: {TOOL_PATH}") + + # 清理 __pycache__ 目录 + text_widget.append("Cleaning __pycache__ directories...") + pycache_count = clean_pycache(TOOL_PATH) + text_widget.append(f"Removed {pycache_count} __pycache__ directories and .pyc files\n") + + # 确定要重载的模块 + results = {} + + if all_modules_cb.isChecked(): + # 重载所有模块 + results = ModuleReloader.reload_all_modules() + else: + # 重载选定的模块类别 + selected_categories = [] + for category, (cb, modules) in module_cbs.items(): + if cb.isChecked(): + selected_categories.extend(modules) + + if not selected_categories: + text_widget.append("No module was selected, the operation was canceled.") + return + + # 获取所有模块 + all_modules = [] + for package in selected_categories: + if package.startswith("scripts."): + all_modules.extend(ModuleReloader.get_package_modules(package)) + else: + all_modules.append(package) + + # 重载选定的模块 + results = {} + for module in all_modules: + results[module] = ModuleReloader.reload_module(module) + + # 更新UI显示结果 + success_count = sum(1 for success in results.values() if success) + total_count = len(results) + + text_widget.append(f"Successfully reloaded {success_count}/{total_count} modules\n") + + # 显示成功重载的模块 + text_widget.append("Successfully reloaded modules:") + for module, success in results.items(): + if success: + text_widget.append(f" - {module}") + + # 显示失败的模块(如果有) + if success_count < total_count: + text_widget.append("\nFailed to reload modules:") + for module, success in results.items(): + if not success: + text_widget.append(f" - {module}") + + # 提示用户重载完成 + text_widget.append("\nReload operation completed!") + + # 仅清理缓存的函数 + def clean_cache_only(text_widget): + text_widget.clear() + text_widget.append("Cleaning caches only...\n") + + # 获取插件根目录 + try: + import config + TOOL_PATH = config.TOOL_PATH + except ImportError: + TOOL_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + text_widget.append(f"Plugin root directory: {TOOL_PATH}") + + # 清理 __pycache__ 目录 + pycache_count = clean_pycache(TOOL_PATH) + text_widget.append(f"Removed {pycache_count} __pycache__ directories and .pyc files") + text_widget.append("\nCache cleaning operation completed!") + + # 连接按钮信号 + reload_button.clicked.connect(lambda: reload_and_update_ui(results_text)) + clean_button.clicked.connect(lambda: clean_cache_only(results_text)) + + # 显示对话框 + dialog.show() + + except Exception as e: + traceback.print_exc() + cmds.warning(f"Failed to show UI: {str(e)}. Falling back to command line reload.") + return reload_all() + + +# Main function to be called from Maya +def main(): + """Main function to be called from Maya""" + try: + if HAS_QT: + show_reload_ui() + else: + reload_all() + + print("Modules reloaded successfully!") + return True + except Exception as e: + print(f"Error during module reload: {str(e)}") + traceback.print_exc() + return False + + +# Allow running this script directly +if __name__ == "__main__": + main() diff --git a/scripts/__init__.py b/scripts/__init__.py new file mode 100644 index 0000000..0a1a423 --- /dev/null +++ b/scripts/__init__.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +MetaHuman DNA工具包 + +这个包包含了用于处理MetaHuman DNA文件的工具和实用程序。 +""" + +import os +import sys + +import config +# 将主配置中的变量导入到当前模块的命名空间 +TOOL_NAME = config.TOOL_NAME +TOOL_VERSION = config.TOOL_VERSION +TOOL_AUTHOR = config.TOOL_AUTHOR +TOOL_PATH = config.TOOL_PATH +SCRIPTS_PATH = config.SCRIPTS_PATH +UI_PATH = config.UI_PATH +STYLE_FILE = config.STYLE_FILE +ICONS_PATH = config.ICONS_PATH +ASSETS_PATH = config.ASSETS_PATH +DNA_FILE_PATH = config.DNA_FILE_PATH + +# 确保项目路径在sys.path中 +if TOOL_PATH not in sys.path: + sys.path.insert(0, TOOL_PATH) + +# 确保scripts路径在sys.path中 +if SCRIPTS_PATH not in sys.path: + sys.path.insert(0, SCRIPTS_PATH) \ No newline at end of file diff --git a/scripts/builder/__init__.py b/scripts/builder/__init__.py new file mode 100644 index 0000000..7756200 --- /dev/null +++ b/scripts/builder/__init__.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from . import * \ No newline at end of file diff --git a/scripts/builder/builder.py b/scripts/builder/builder.py new file mode 100644 index 0000000..3525afa --- /dev/null +++ b/scripts/builder/builder.py @@ -0,0 +1,436 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import logging +import traceback +from dataclasses import dataclass, field +from pathlib import Path +from typing import Dict, List, Optional + +from maya import cmds, mel + +from ..builder.maya.util import Maya +from ..common import DNAViewerError +from ..dnalib.dnalib import DNA +from ..model import Joint as JointModel +from .config import AngleUnit, Config, LinearUnit +from .joint import Joint as JointBuilder +from .mesh import Mesh + + +@dataclass +class BuildResult: + """ + A class used for returning data after finishing the build process + + Attributes + ---------- + @type meshes_per_lod: Dict[int, List[str]] + @param meshes_per_lod: The list of mesh names created group by LOD number + """ + + meshes_per_lod: Dict[int, List[str]] = field(default_factory=dict) + + def get_all_meshes(self) -> List[str]: + """ + Flatten meshes to single list. + + @rtype: List[str] + @returns: The list of all mesh names. + """ + + all_meshes = [] + for meshes_per_lod in self.meshes_per_lod.values(): + all_meshes.extend(meshes_per_lod) + return all_meshes + + +class Builder: + """ + A builder class used for building the character + + Attributes + ---------- + @type config: Config + @param config: The configuration options used for building the character + + @type dna: DNA + @param dna: The DNA object read from the DNA file + + @type meshes: Dict[int, List[str]] + @param meshes: A list of meshes created grouped by lod + + """ + + def __init__(self, dna: DNA, config: Optional[Config] = None) -> None: + self.config = config or Config() + self.dna = dna + self.meshes: Dict[int, List[str]] = {} + self.all_loaded_meshes: List[int] = [] + + def _build(self) -> bool: + self.new_scene() + self.set_filtered_meshes() + if not self.all_loaded_meshes: + logging.error("No mashes has been loaded.") + return False + + self.create_groups() + + self.set_units() + self.add_joints() + self.build_meshes() + self.add_ctrl_attributes_on_root_joint() + self.add_animated_map_attributes_on_root_joint() + self.add_key_frames() + return True + + def build(self) -> BuildResult: + """Builds the character""" + self.meshes = {} + try: + filename = Path(self.dna.path).stem + logging.info("******************************") + logging.info(f"{filename} started building") + logging.info("******************************") + + self._build() + + logging.info(f"{filename} built successfully!") + + except DNAViewerError as e: + traceback.print_exc() + raise e + except Exception as e: + traceback.print_exc() + logging.error(f"Unhandled exception, {e}") + raise DNAViewerError(f"Scene creation failed! Reason: {e}") from e + return BuildResult(meshes_per_lod=self.meshes) + + def new_scene(self) -> None: + cmds.file(new=True, force=True) + + def add_mesh_to_display_layer(self, mesh_name: str, lod: int) -> None: + """ + Add the mesh with the given name to an already created display layer. + + @type mesh_name: str + @param mesh_name: The name of the mesh that should be added to a display layer. + + @type lod: int + @param lod: The lod value, this is needed for determining the name of the display layer that the mesh should be added to. + """ + if self.config.create_display_layers: + cmds.editDisplayLayerMembers( + f"{self.config.top_level_group}_lod{lod}_layer", mesh_name + ) + + def _add_joints(self) -> List[JointModel]: + """ + Reads and adds the joints to the scene, also returns a list model objects of joints that were added. + + @rtype: List[JointModel] + @returns: The list containing model objects representing the joints that were added to the scene. + """ + + joints: List[JointModel] = self.dna.read_all_neutral_joints() + builder = JointBuilder( + joints, + ) + builder.process() + return joints + + def add_joints(self) -> None: + """ + Starts adding the joints the character, if the character configuration options have add_joints set to False, + this step will be skipped. + """ + + if self.config.add_joints: + logging.info("adding joints to character...") + joints = self._add_joints() + + if self.config.group_by_lod and joints: + cmds.parent(joints[0].name, self.config.get_top_level_group()) + + def create_groups(self) -> None: + """ + Creates a Maya transform which will hold the character, if the character configuration options have + create_character_node set to False, this step will be skipped. + """ + + if self.config.group_by_lod: + logging.info("building character node...") + cmds.group(world=True, empty=True, name=self.config.get_top_level_group()) + cmds.group( + parent=self.config.get_top_level_group(), + empty=True, + name=self.config.get_geometry_group(), + ) + cmds.group( + parent=self.config.get_top_level_group(), + empty=True, + name=self.config.get_rig_group(), + ) + for lod in self.get_display_layers(): + name = f"{self.config.top_level_group}_lod{lod}_layer" + if not cmds.objExists(name): + if self.config.group_by_lod: + cmds.group( + parent=self.config.get_geometry_group(), + empty=True, + name=f"{self.config.top_level_group}_lod{lod}_grp", + ) + cmds.select( + f"{self.config.top_level_group}_lod{lod}_grp", + replace=True, + ) + if self.config.create_display_layers: + cmds.createDisplayLayer(name=name, noRecurse=True) + + def attach_mesh_to_lod(self, mesh_name: str, lod: int) -> None: + """ + Attaches the mesh called mesh_name to a given lod. + + @type mesh_name: str + @param mesh_name: The mesh that needs to be attached to a lod holder object. + + @type lod: str + @param lod: The name of the mesh that should be added to a display layer. + """ + if self.config.group_by_lod: + parent_node = f"{self.config.get_top_level_group()}|{self.config.get_geometry_group()}|{self.config.top_level_group}_lod{lod}_grp" + cmds.parent( + self.get_mesh_node_fullpath_on_root(mesh_name=mesh_name), parent_node + ) + + def get_mesh_node_fullpath_on_root(self, mesh_name: str) -> str: + """ + Gets the full path in the scene of a mesh. + + @type mesh_name: str + @param mesh_name: The mesh thats path is needed. + + @rtype: str + @returns: The full path of the mesh object in the scene + """ + + return str(Maya.get_element(f"|{mesh_name}").fullPathName()) + + def add_ctrl_attributes_on_root_joint(self) -> None: + """ + Adds and sets the raw gui control attributes on root joint. + """ + + if self.config.add_ctrl_attributes_on_root_joint and self.config.add_joints: + gui_control_names = self.dna.get_raw_control_names() + for name in gui_control_names: + ctrl_and_attr_names = name.split(".") + self.add_attribute( + control_name=self.config.facial_root_joint_name, + long_name=ctrl_and_attr_names[1], + ) + + def add_animated_map_attributes_on_root_joint(self) -> None: + """ + Adds and sets the animated map attributes on root joint. + """ + + if ( + self.config.add_animated_map_attributes_on_root_joint + and self.config.add_joints + ): + names = self.dna.get_animated_map_names() + for name in names: + long_name = name.replace(".", "_") + self.add_attribute( + control_name=self.config.facial_root_joint_name, long_name=long_name + ) + + def add_attribute(self, control_name: str, long_name: str) -> None: + """ + Adds attributes wrapper for internal usage. + """ + cmds.addAttr( + control_name, + longName=long_name, + keyable=True, + attributeType="float", + minValue=0.0, + maxValue=1.0, + ) + + def add_key_frames(self) -> None: + """ + Adds a starting key frame to the facial root joint if joints are added and the add_key_frames option is set + to True. + """ + + if self.config.add_key_frames and self.config.add_joints: + logging.info("setting keyframe on the root joint...") + cmds.currentTime(0) + if cmds.objExists(self.config.facial_root_joint_name): + cmds.select(self.config.facial_root_joint_name, replace=True) + cmds.setKeyframe(inTangentType="linear", outTangentType="linear") + + def set_filtered_meshes(self) -> None: + self.all_loaded_meshes = self.get_filtered_meshes() + + def get_mesh_indices_filter(self) -> List[int]: + indices = [] + for index in range(self.dna.get_mesh_count()): + mesh_name = self.dna.get_mesh_name(index) + for cur_filter in self.config.mesh_filter: + if cur_filter in mesh_name: + indices.append(index) + return indices + + def get_filtered_meshes(self) -> List[int]: + if not self.config.mesh_filter and not self.config.lod_filter: + if self.config.meshes: + return self.config.meshes + return list(range(self.dna.get_mesh_count())) + + meshes: List[int] = [] + meshes_by_lod = self.dna.get_all_meshes_grouped_by_lod() + all_meshes = [mesh_index for meshes in meshes_by_lod for mesh_index in meshes] + mesh_indices_filter = self.get_mesh_indices_filter() + + if self.config.lod_filter: + for lod in self.config.lod_filter: + if 0 <= lod < len(meshes_by_lod): + meshes.extend(meshes_by_lod[lod]) + if mesh_indices_filter: + return list(set(meshes) & set(mesh_indices_filter)) + return meshes + if self.config.mesh_filter: + return list(set(all_meshes) & set(mesh_indices_filter)) + return all_meshes + + def build_meshes(self) -> None: + """ + Builds the meshes. If specified in the config they get parented to a created + character node transform, otherwise the meshes get put to the root level of the scene. + """ + + logging.info("adding character meshes...") + self.meshes = {} + for lod, meshes_per_lod in enumerate( + self.dna.get_meshes_by_lods(self.all_loaded_meshes) + ): + self.meshes[lod] = self.build_meshes_by_lod( + lod=lod, meshes_per_lod=meshes_per_lod + ) + + def build_meshes_by_lod(self, lod: int, meshes_per_lod: List[int]) -> List[str]: + """ + Builds the meshes from the provided mesh ids and then attaches them to a given lod if specified in the + character configuration. + + @type lod: int + @param lod: The lod number representing the display layer the meshes to the display layer. + + @type meshes_per_lod: List[int] + @param meshes_per_lod: List of mesh indices that are being built. + + @rtype: List[MObject] + @returns: The list of maya objects that represent the meshes added to the scene. + """ + + meshes: List[str] = [] + for mesh_index in meshes_per_lod: + builder = Mesh( + config=self.config, + dna=self.dna, + mesh_index=mesh_index, + ) + builder.build() + + mesh_name = self.dna.get_mesh_name(index=mesh_index) + meshes.append(mesh_name) + + self.add_mesh_to_display_layer(mesh_name, lod) + self.attach_mesh_to_lod(mesh_name, lod) + self.default_lambert_shader(mesh_name) + return meshes + + def default_lambert_shader(self, mesh_name: str) -> None: + try: + if self.config.group_by_lod: + names = cmds.ls(f"*|{mesh_name}", l=True) + for item in names: + if item.startswith(f"|{self.config.get_top_level_group()}"): + cmds.select(item, r=True) + break + else: + cmds.select(mesh_name, r=True) + + mel.eval("sets -e -forceElement initialShadingGroup") + + except Exception as e: + logging.error( + f"Couldn't set lambert shader for mesh {mesh_name}. Reason: {e}" + ) + raise DNAViewerError(e) from e + + def set_units(self) -> None: + """Sets the translation and rotation units of the scene from @config""" + + linear_unit = self.get_linear_unit() + angle_unit = self.get_angle_unit() + + cmds.currentUnit(linear=linear_unit.name, angle=angle_unit.name) + + def get_linear_unit(self) -> LinearUnit: + return self.get_linear_unit_from_int(self.dna.get_translation_unit()) + + def get_angle_unit(self) -> AngleUnit: + return self.get_angle_unit_from_int(self.dna.get_rotation_unit()) + + def get_linear_unit_from_int(self, value: int) -> LinearUnit: + """ + Returns an enum from an int value. + 0 -> cm + 1 -> m + + @type value: int + @param value: The value that the enum is mapped to. + + @rtype: LinearUnit + @returns: LinearUnit.cm or LinearUnit.m + """ + + if value == 0: + return LinearUnit.cm + if value == 1: + return LinearUnit.m + raise DNAViewerError(f"Unknown linear unit set in DNA file! value {value}") + + def get_angle_unit_from_int(self, value: int) -> AngleUnit: + """ + Returns an enum from an int value. + 0 -> degree + 1 -> radian + + @type value: int + @param value: The value that the enum is mapped to. + + @rtype: AngleUnit + @returns: AngleUnit.degree or AngleUnit.radian + """ + + if value == 0: + return AngleUnit.degree + if value == 1: + return AngleUnit.radian + raise DNAViewerError(f"Unknown angle unit set in DNA file! value {value}") + + def get_display_layers(self) -> List[int]: + """Gets a lod id list that need to be created for the meshes from @config""" + meshes: List[int] = [] + for idx, meshes_per_lod in enumerate( + self.dna.get_meshes_by_lods(self.all_loaded_meshes) + ): + if meshes_per_lod: + meshes.append(idx) + return list(set(meshes)) diff --git a/scripts/builder/config.py b/scripts/builder/config.py new file mode 100644 index 0000000..4dd4638 --- /dev/null +++ b/scripts/builder/config.py @@ -0,0 +1,260 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from dataclasses import dataclass, field +from enum import Enum +from typing import Any, Dict, List, Optional + + +class LinearUnit(Enum): + """ + An enum used to represent the unit used for linear representation. + + Attributes + ---------- + @cm: using cm as unit + @m: using m as unit + """ + + cm = 0 + m = 1 + + +class AngleUnit(Enum): + """ + An enum used to represent the unit used for angle representation. + + Attributes + ---------- + @degree: using degree as unit + @radian: using radian as unit + """ + + degree = 0 + radian = 1 + + +@dataclass +class Config: + """ + A class used to represent the config for @Builder + + Attributes + ---------- + @type mesh_filter: List[str] + @param mesh_filter: List of mesh names that should be filtered. Mash names can be just substrings. ["head"] will find all meshes that contins string "head" in its mash name. + + + @type lod_filter: List[int] + @param lod_filter: List of lods that should be filtered. + + @type group_by_lod: bool + @param group_by_lod: A flag representing whether the character should be parented to a character transform node in the scene hierarchy + + @type group_by_lod: bool + @param group_by_lod: A flag representing whether the character should be parented to a character transform node in rig hierarchy + + @type top_level_group: str + @param top_level_group: Value that is going to be used when creating root group + + @type geometry_group: str + @param geometry_group: Value that is going to be used when creating group that contains geometry + + @type facial_root_joint_name: str + @param facial_root_joint_name: The name of the facial root joint + + @type blend_shape_group_prefix: str + @param blend_shape_group_prefix: prefix string for blend shape group + + @type blend_shape_name_postfix: str + @param blend_shape_name_postfix: postfix string for blend shape name + + @type skin_cluster_suffix: str + @param skin_cluster_suffix: postfix string for skin cluster name + + @type animated_map_attribute_multipliers_name: str + @param animated_map_attribute_multipliers_name: string for frame animated map attribute name + + @type create_display_layers: bool + @param create_display_layers: A flag representing whether the created meshes should be assigned to a display layer + + @type add_joints: bool + @param add_joints: A flag representing whether joints should be added + + @type add_blend_shapes: bool + @param add_blend_shapes: A flag representing whether blend shapes should be added + + @type add_skin_cluster: bool + @param add_skin_cluster: A flag representing whether skin should be added + + @type add_ctrl_attributes_on_root_joint: bool + @param add_ctrl_attributes_on_root_joint: A flag representing whether control attributes should be added to the root joint + + @type add_animated_map_attributes_on_root_joint: bool + @param add_animated_map_attributes_on_root_joint: A flag representing whether animated map attributes should be added to the root joint + + @type add_key_frames: bool + @param add_key_frames: A flag representing whether key frames should be added + + @type add_mesh_name_to_blend_shape_channel_name: bool + @param add_mesh_name_to_blend_shape_channel_name: A flag representing whether mesh name of blend shape channel is added to name when creating it + """ + + meshes: List[int] = field(default_factory=list) + mesh_filter: List[str] = field(default_factory=list) + lod_filter: List[int] = field(default_factory=list) + + group_by_lod: bool = field(default=True) + top_level_group: str = "head" + geometry_group: str = "geometry" + + facial_root_joint_name: str = "FACIAL_C_FacialRoot" + + blend_shape_group_prefix: str = "BlendshapeGroup_" + blend_shape_name_postfix: str = "_blendShapes" + skin_cluster_suffix: str = "skinCluster" + + animated_map_attribute_multipliers_name = "FRM_WMmultipliers" + + create_display_layers: bool = field(default=True) + + add_joints: bool = field(default=True) + add_blend_shapes: bool = field(default=True) + add_skin_cluster: bool = field(default=True) + add_ctrl_attributes_on_root_joint: bool = field(default=True) + add_animated_map_attributes_on_root_joint: bool = field(default=True) + add_key_frames: bool = field(default=True) + add_mesh_name_to_blend_shape_channel_name: bool = field(default=True) + + def get_top_level_group(self) -> str: + return f"{self.top_level_group}_grp" + + def get_geometry_group(self) -> str: + return f"{self.geometry_group}_grp" + + def get_rig_group(self) -> str: + return f"{self.top_level_group}Rig_grp" + + +@dataclass +class RigConfig(Config): + """ + A class used to represent the config for @RigBuilder + + + @type add_rig_logic: bool + @param add_rig_logic: A flag representing whether normals should be added + + @type rig_logic_command: str + @param rig_logic_command: The command used to start creating the rig logic using the plugin + + @type rig_logic_name: str + @param rig_logic_name: The name of the rig logic node + + @type control_naming: str + @param control_naming: The naming pattern of controls + + @type joint_naming: str + @param joint_naming: The naming pattern of joints + + @type blend_shape_naming: str + @param blend_shape_naming: The naming pattern of blend shapes + + @type animated_map_naming: str + @param animated_map_naming: The naming pattern of animated maps + + @type gui_path: str + @param gui_path: The location of the gui file + + @type left_eye_joint_name: str + @param left_eye_joint_name: The name of the left eye joint + + @type eye_gui_name: str + @param eye_gui_name: The name of the control in the gui + + @type gui_translate_x: float + @param gui_translate_x: Represents the value that the gui should be additionally translated on the X axis + + @type analog_gui_path: str + @param analog_gui_path: The location of the analog gui file + + @type left_eye_joint_name: str + @param left_eye_joint_name: The name of the left eye joint + + @type right_eye_joint_name: str + @param right_eye_joint_name: The name of the right eye joint + + @type central_driver_name: str + @param central_driver_name: The name of the central driver + + @type left_eye_driver_name: str + @param left_eye_driver_name: The name of the left eye driver + + @type right_eye_driver_name: str + @param right_eye_driver_name: The name of the right eye driver + + @type central_aim: str + @param central_aim: The name of the central aim + + @type le_aim: str + @param le_aim: The name of the left eye aim + + @type re_aim: str + @param re_aim: The name of the right eye aim + + @type aas_path: Optional[str] + @param aas_path: The location of the script file + + @type aas_method: str + @param aas_method: The method that should be called + + @type aas_parameter: Dict[Any, Any] + @param aas_parameter: The parameters that will be passed as the method arguments + + """ + + add_rig_logic: bool = field(default=True) + rig_logic_command: str = field(default="createEmbeddedNodeRL4") + rig_logic_name: str = field(default="") + control_naming: str = field(default=".") + joint_naming: str = field(default=".") + blend_shape_naming: str = field(default="") + animated_map_naming: str = field(default="") + gui_path: str = field(default=None) + + eye_gui_name: str = "CTRL_C_eye" + gui_translate_x: float = 10 + + analog_gui_path: str = field(default=None) + + left_eye_joint_name: str = "FACIAL_L_Eye" + right_eye_joint_name: str = "FACIAL_R_Eye" + + central_driver_name: str = "LOC_C_eyeDriver" + left_eye_driver_name: str = "LOC_L_eyeDriver" + right_eye_driver_name: str = "LOC_R_eyeDriver" + + left_eye_aim_up_name: str = "LOC_L_eyeAimUp" + right_eye_aim_up_name: str = "LOC_R_eyeAimUp" + central_aim: str = "GRP_C_eyesAim" + + le_aim: str = "GRP_L_eyeAim" + re_aim: str = "GRP_R_eyeAim" + + aas_path: Optional[str] = field(default=None) + aas_method: str = "run_after_assemble" + aas_parameter: Dict[Any, Any] = field(default_factory=dict) + + def __post_init__(self) -> None: + if self.add_mesh_name_to_blend_shape_channel_name: + self.blend_shape_naming = ( + f"{self.blend_shape_name_postfix}.__" + ) + else: + self.blend_shape_naming = ( + f"{self.blend_shape_name_postfix}." + ) + + self.animated_map_naming = ( + f"{self.animated_map_attribute_multipliers_name}._" + ) diff --git a/scripts/builder/joint.py b/scripts/builder/joint.py new file mode 100644 index 0000000..25854cc --- /dev/null +++ b/scripts/builder/joint.py @@ -0,0 +1,81 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from typing import Dict, List + +from maya import cmds + +from ..model import Joint as JointModel + + +class Joint: + """ + A builder class used for adding joints to the scene + + Attributes + ---------- + @type joints: List[JointModel] + @param joints: data representing the joints + + @type joint_flags: Dict[str, bool] + @param joint_flags: A mapping used for setting flags that are used to avoid adding the same joint multiple times + """ + + def __init__(self, joints: List[JointModel]) -> None: + self.joints = joints + self.joint_flags: Dict[str, bool] = {} + + for joint in self.joints: + self.joint_flags[joint.name] = False + + def add_joint_to_scene(self, joint: JointModel) -> None: + """ + Adds the given joint to the scene + + @type joint: JointModel + @param joint: The joint to be added to the scene + """ + + if self.joint_flags[joint.name]: + return + + in_parent_space = True + + if cmds.objExists(joint.parent_name): + cmds.select(joint.parent_name) + else: + if joint.name != joint.parent_name: + parent_joint = next( + j for j in self.joints if j.name == joint.parent_name + ) + self.add_joint_to_scene(parent_joint) + else: + # this is the first node + cmds.select(d=True) + in_parent_space = False + + position = ( + joint.translation.x, + joint.translation.y, + joint.translation.z, + ) + orientation = ( + joint.orientation.x, + joint.orientation.y, + joint.orientation.z, + ) + cmds.joint( + p=position, + o=orientation, + n=joint.name, + r=in_parent_space, + a=not in_parent_space, + scaleCompensate=False, + ) + self.joint_flags[joint.name] = True + + def process(self) -> None: + """Starts adding all the provided joints to the scene""" + + for joint in self.joints: + self.add_joint_to_scene(joint) diff --git a/scripts/builder/maya/__init__.py b/scripts/builder/maya/__init__.py new file mode 100644 index 0000000..7756200 --- /dev/null +++ b/scripts/builder/maya/__init__.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from . import * \ No newline at end of file diff --git a/scripts/builder/maya/mesh.py b/scripts/builder/maya/mesh.py new file mode 100644 index 0000000..6ee817a --- /dev/null +++ b/scripts/builder/maya/mesh.py @@ -0,0 +1,424 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import logging +from dataclasses import dataclass, field +from typing import List, Tuple + +from maya import cmds +from maya.api.OpenMaya import MDagModifier, MFnDagNode, MFnMesh, MObject, MPoint + +from ...builder.maya.util import Maya +from ...common import SKIN_WEIGHT_PRINT_RANGE +from ...dnalib.dnalib import DNA +from ...model import Point3 + + +@dataclass +class Mesh: + """ + A model class for holding data needed in the mesh building process + + Attributes + ---------- + @type dna_vertex_positions: List[Point3] + @param dna_vertex_positions: Data representing the positions of the vertices + + @type dna_vertex_layout_positions: List[int] + @param dna_vertex_layout_positions: Data representing layout position indices of vertices + + @type polygon_faces: List[int] + @param polygon_faces: List of lengths of vertex layout indices + + @type polygon_connects: List[int] + @param polygon_connects: List of vertex layout position indices + + @type derived_mesh_names: List[str] + @param derived_mesh_names: List of mesh names + """ + + dna_vertex_positions: List[Point3] = field(default_factory=list) + dna_vertex_layout_positions: List[int] = field(default_factory=list) + polygon_faces: List[int] = field(default_factory=list) + polygon_connects: List[int] = field(default_factory=list) + derived_mesh_names: List[str] = field(default_factory=list) + + +class MayaMesh: + """ + A builder class used for adding joints to the scene + + Attributes + ---------- + @type mesh_index: int + @param mesh_index: The index of the mesh + + @type dna: DNA + @param dna: Instance of DNA + + @type blend_shape_group_prefix: str + @param blend_shape_group_prefix: prefix string for blend shape group + + @type blend_shape_name_postfix: str + @param blend_shape_name_postfix: postfix string for blend shape name + + @type skin_cluster_suffix: str + @param skin_cluster_suffix: postfix string for skin cluster name + + @type data: Mesh + @param data: mesh data used in the mesh creation process + + @type fn_mesh: om.MFnMesh + @param fn_mesh: OpenMaya class used for creating the mesh + + @type mesh_object: om.MObject + @param mesh_object: the object representing the mesh + + @type dag_modifier: om.MDagModifier + @param dag_modifier: OpenMaya class used for naming the mesh + """ + + def __init__( + self, + mesh_index: int, + dna: DNA, + blend_shape_group_prefix: str, + blend_shape_name_postfix: str, + skin_cluster_suffix: str, + ) -> None: + self.mesh_index = mesh_index + self.data: Mesh = Mesh() + self.fn_mesh = MFnMesh() + self.mesh_object: MObject = None + self.dag_modifier: MDagModifier = None + self.dna = dna + self.blend_shape_group_prefix = blend_shape_group_prefix + self.blend_shape_name_postfix = blend_shape_name_postfix + self.skin_cluster_suffix = skin_cluster_suffix + + def create_neutral_mesh(self) -> MObject: + """ + Creates the neutral mesh using the config provided for this builder class object + + @rtype: om.MObject + @returns: the instance of the created mesh object + """ + self.prepare_mesh() + self.mesh_object = self.create_mesh_object() + self.dag_modifier = self.rename_mesh() + self.add_texture_coordinates() + return self.mesh_object + + def create_mesh_object(self) -> MObject: + """ + Gets a list of points that represent the vertex positions. + + @rtype: MObject + @returns: Maya objects representing maya mesh functions and the created maya mesh object. + """ + + mesh_object = self.fn_mesh.create( + self.get_vertex_positions_from_dna_vertex_positions(), + self.data.polygon_faces, + self.data.polygon_connects, + ) + + return mesh_object + + def get_vertex_positions_from_dna_vertex_positions(self) -> List[MPoint]: + """ + Gets a list of points that represent the vertex positions. + + @rtype: List[MPoint] + @returns: List of maya point objects. + """ + + vertex_positions = [] + for position in self.data.dna_vertex_positions: + vertex_positions.append( + MPoint( + position.x, + position.y, + position.z, + ) + ) + return vertex_positions + + def rename_mesh(self) -> MDagModifier: + """ + Renames the initial mesh object that was created to the name from the configuration. + + @rtype: Tuple[MDagModifier] + @returns: Maya object representing the dag modifier. + """ + + mesh_name = self.dna.get_mesh_name(self.mesh_index) + dag_modifier = MDagModifier() + dag_modifier.renameNode(self.mesh_object, mesh_name) + dag_modifier.doIt() + return dag_modifier + + def prepare_mesh(self) -> None: + """ + Gets a list of points that represent the vertex positions. + + """ + + logging.info("==============================") + mesh_name = self.dna.get_mesh_name(self.mesh_index) + logging.info(f"adding mesh: {mesh_name}") + self.data.dna_vertex_positions = self.dna.get_vertex_positions_for_mesh_index( + self.mesh_index + ) + self.data.dna_vertex_layout_positions = ( + self.dna.get_vertex_layout_positions_for_mesh_index(self.mesh_index) + ) + + ( + self.data.polygon_faces, + self.data.polygon_connects, + ) = self.dna.get_polygon_faces_and_connects(self.mesh_index) + + def add_texture_coordinates(self) -> None: + """ + Method for adding texture coordinates. + + """ + + logging.info("adding texture coordinates...") + + ( + texture_coordinate_us, + texture_coordinate_vs, + texture_coordinate_indices, + ) = self.get_texture_data() + + self.fn_mesh.setUVs(texture_coordinate_us, texture_coordinate_vs) + self.fn_mesh.assignUVs(self.data.polygon_faces, texture_coordinate_indices) + + mesh_name = self.dna.get_mesh_name(self.mesh_index) + + cmds.select(mesh_name, replace=True) + cmds.polyMergeUV(mesh_name, distance=0.01, constructionHistory=False) + + def get_texture_data(self) -> Tuple[List[float], List[float], List[int]]: + """ + Gets the data needed for the creation of textures. + + @rtype: Tuple[List[float], List[float], List[int]] @returns: The tuple containing the list of texture + coordinate Us, the list of texture coordinate Vs and the list of texture coordinate indices. + """ + + texture_coordinates = self.dna.get_vertex_texture_coordinates_for_mesh( + self.mesh_index + ) + dna_faces = self.dna.get_faces(self.mesh_index) + + coordinate_indices = [] + for layout_id in range( + len(self.dna.get_layouts_for_mesh_index(self.mesh_index)) + ): + coordinate_indices.append( + self.dna.get_texture_coordinate_index(self.mesh_index, layout_id) + ) + + texture_coordinate_us = [] + texture_coordinate_vs = [] + texture_coordinate_indices = [] + + index_counter = 0 + + for vertices_layout_index_array in dna_faces: + for vertex_layout_index_array in vertices_layout_index_array: + texture_coordinate = texture_coordinates[ + coordinate_indices[vertex_layout_index_array] + ] + texture_coordinate_us.append(texture_coordinate.u) + texture_coordinate_vs.append(texture_coordinate.v) + texture_coordinate_indices.append(index_counter) + index_counter += 1 + + return texture_coordinate_us, texture_coordinate_vs, texture_coordinate_indices + + def add_blend_shapes(self, add_mesh_name_to_blend_shape_channel_name: bool) -> None: + """Adds blend shapes to the mesh""" + if self.dna.has_blend_shapes(self.mesh_index): + self.create_blend_shapes(add_mesh_name_to_blend_shape_channel_name) + self.create_blend_shape_node() + + def create_blend_shape_node(self) -> None: + """ + Creates a blend shape node. + """ + mesh_name = self.dna.get_mesh_name(self.mesh_index) + + nodes = [] + for derived_mesh_name in self.data.derived_mesh_names: + nodes.append(derived_mesh_name) + + cmds.select(nodes, replace=True) + + cmds.select(mesh_name, add=True) + cmds.blendShape(name=f"{mesh_name}{self.blend_shape_name_postfix}") + cmds.delete(f"{self.blend_shape_group_prefix}{mesh_name}") + + def create_blend_shapes( + self, add_mesh_name_to_blend_shape_channel_name: bool + ) -> None: + """ + Builds all the derived meshes using the provided mesh and the blend shapes data of the DNA. + + @type add_mesh_name_to_blend_shape_channel_name: bool + @param add_mesh_name_to_blend_shape_channel_name: A flag representing whether mesh name of blend shape channel is added to name when creating it + """ + + logging.info("adding derived meshes...") + + group: str = cmds.group( + empty=True, + name=f"{self.blend_shape_group_prefix}{self.dna.get_mesh_name(self.mesh_index)}", + ) + + self.data.derived_mesh_names = [] + blend_shapes = self.dna.get_blend_shapes(self.mesh_index) + for blend_shape_target_index, blend_shape in enumerate(blend_shapes): + + self.create_blend_shape( + blend_shape_target_index, + blend_shape.channel, + group, + add_mesh_name_to_blend_shape_channel_name, + ) + cmds.setAttr(f"{group}.visibility", 0) + + def create_blend_shape( + self, + blend_shape_target_index: int, + blend_shape_channel: int, + group: str, + add_mesh_name_to_blend_shape_channel_name: bool, + ) -> None: + """ + Builds a single derived mesh using the provided mesh and the blend shape data of the DNA. + + + @type blend_shape_target_index: int + @param blend_shape_target_index: Used for getting a delta value representing the value change concerning the blend shape. + + @type blend_shape_channel: int + @param blend_shape_channel: Used for getting the blend shape name from the DNA. + + @type group: str + @param group: The transform the new meshes will be added to. + + @type add_mesh_name_to_blend_shape_channel_name: bool + @param add_mesh_name_to_blend_shape_channel_name: A flag representing whether mesh name of blend shape channel is added to name when creating it + """ + + new_vert_layout = self.get_vertex_positions_from_dna_vertex_positions() + + zipped_deltas = self.dna.get_blend_shape_target_deltas_with_vertex_id( + self.mesh_index, blend_shape_target_index + ) + for zipped_delta in zipped_deltas: + delta: Point3 = zipped_delta[1] + new_vert_layout[zipped_delta[0]] += MPoint( + delta.x, + delta.y, + delta.z, + ) + + new_mesh = self.fn_mesh.create( + new_vert_layout, self.data.polygon_faces, self.data.polygon_connects + ) + derived_name = self.dna.get_blend_shape_channel_name(blend_shape_channel) + name = ( + f"{self.dna.geometry_meshes[self.mesh_index].name}__{derived_name}" + if add_mesh_name_to_blend_shape_channel_name + else derived_name + ) + self.dag_modifier.renameNode(new_mesh, name) + self.dag_modifier.doIt() + + dag = MFnDagNode(Maya.get_element(group)) + dag.addChild(new_mesh) + + self.data.derived_mesh_names.append(name) + + def add_skin_cluster(self, joint_names: List[str], joint_ids: List[int]) -> None: + """ + Adds skin cluster to the mesh + + @type joint_names: List[str] + @param joint_names: Joint names needed for adding the skin cluster + + @type joint_ids: List[int] + @param joint_ids: Joint indices needed for setting skin weights + """ + + mesh_name = self.dna.get_mesh_name(self.mesh_index) + + self._add_skin_cluster(mesh_name, joint_names) + self.set_skin_weights(mesh_name, joint_ids) + + def _add_skin_cluster(self, mesh_name: str, joint_names: List[str]) -> None: + """ + Creates a skin cluster object. + + @type mesh_name: str + @param mesh_name: The mesh name that is used for skin cluster naming. + + @type joints: List[Joint] + @param joints: List of joints used for adding the skin cluster. + """ + + logging.info("adding skin cluster...") + maximum_influences = self.dna.get_maximum_influence_per_vertex(self.mesh_index) + + cmds.select(joint_names[0], replace=True) + + cmds.select(mesh_name, add=True) + skin_cluster = cmds.skinCluster( + toSelectedBones=True, + name=f"{mesh_name}_{self.skin_cluster_suffix}", + maximumInfluences=maximum_influences, + skinMethod=0, + obeyMaxInfluences=True, + ) + cmds.skinCluster( + skin_cluster, edit=True, addInfluence=joint_names[1:], weight=0 + ) + + def set_skin_weights(self, mesh_name: str, joint_ids: List[int]) -> None: + """ + Sets the skin weights attributes. + + @type mesh_name: str + @param mesh_name: The mesh name that is used for getting the skin cluster name. + + @type joint_ids: List[int] + @param joint_ids: List of joint indices used for setting the skin weight attribute. + """ + + logging.info("adding skin weights...") + skin_weights = self.dna.get_skin_weight_matrix_for_mesh(self.mesh_index) + + # import skin weights + temp_str = f"{mesh_name}_{self.skin_cluster_suffix}.wl[" + for vertex_id, skin_weight in enumerate(skin_weights): + if not (vertex_id + 1) % SKIN_WEIGHT_PRINT_RANGE: + logging.info(f"\t{vertex_id + 1} / {len(skin_weights)}") + vertex_infos = skin_weight + + # set all skin weights to zero + vertex_string = f"{temp_str}{str(vertex_id)}].w[" + cmds.setAttr(f"{vertex_string}0]", 0.0) + + # import skin weights + for vertex_info in vertex_infos: + cmds.setAttr( + f"{vertex_string}{str(joint_ids.index(vertex_info[0]))}]", + float(vertex_info[1]), + ) + if len(skin_weights) % SKIN_WEIGHT_PRINT_RANGE != 0: + logging.info(f"\t{len(skin_weights)} / {len(skin_weights)}") diff --git a/scripts/builder/maya/skin_weights.py b/scripts/builder/maya/skin_weights.py new file mode 100644 index 0000000..264fb8c --- /dev/null +++ b/scripts/builder/maya/skin_weights.py @@ -0,0 +1,204 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import logging +from typing import List, Tuple, Union + +from maya import cmds, mel +from maya.api.OpenMaya import MFnMesh, MGlobal +from maya.api.OpenMayaAnim import MFnSkinCluster + +from ...builder.maya.util import Maya +from ...common import DNAViewerError + + +class MayaSkinWeights: + """ + A class used for reading and storing skin weight related data needed for adding skin clusters + """ + + no_of_influences: int + skinning_method: int + joints: List[str] + vertices_info: List[List[Union[int, float]]] + + def __init__(self, skin_cluster: MFnSkinCluster, mesh_name: str) -> None: + self.no_of_influences = cmds.skinCluster(skin_cluster.name(), q=True, mi=True) + + self.skinning_method = cmds.skinCluster(skin_cluster.name(), q=True, sm=True) + + self.joints = self.get_skin_cluster_influence(skin_cluster) + + self.vertices_info = self.get_skin_weights_for_mesh_name( + skin_cluster, mesh_name + ) + + def get_skin_cluster_influence(self, skin_cluster: MFnSkinCluster) -> List[str]: + """ + Gets a list of joint names that are influences to the skin cluster. + + @type skin_cluster: MFnSkinCluster + @param skin_cluster: The functionalities of a maya skin cluster object + + @rtype: List[str] + @returns: The list if names of the joints that influence the skin cluster + """ + + influences: List[str] = cmds.skinCluster(skin_cluster.name(), q=True, inf=True) + if influences and not isinstance(influences[0], str): + influences = [obj.name() for obj in influences] + return influences + + def get_skin_weights_for_mesh_name( + self, + skin_cluster: MFnSkinCluster, + mesh_name: str, + ) -> List[List[Union[int, float]]]: + """ + Gets the skin weights concerning the given mesh. + + @type skin_cluster: MFnSkinCluster + @param skin_cluster: The functionalities of a maya skin cluster object + + @type mesh_name: str + @param mesh_name: The name of the mesh + + @rtype: List[List[Union[int, float]]] + @returns: A list of list of weight indices and the weight values + """ + + mesh = Maya.get_element(mesh_name) + components = MGlobal.getSelectionListByName(f"{mesh_name}.vtx[*]").getComponent( + 0 + )[1] + weights_data, chunk = skin_cluster.getWeights(mesh, components) + iterator = [ + weights_data[i : i + chunk] for i in range(0, len(weights_data), chunk) + ] + + vertices_info = [] + for weights in iterator: + vertex_weights: List[float] = [] + vertices_info.append(vertex_weights) + + for i, weight in enumerate(weights): + if weight: + vertex_weights.append(i) + vertex_weights.append(weight) + return vertices_info + + +def get_skin_weights_data(mesh_name: str) -> Tuple[MFnMesh, MFnSkinCluster]: + """ + Gets the maya objects that manipulate the mesh node and the skin cluster for a given mesh name. + + @type mesh_name: str + @param mesh_name: The name of the mesh + + @rtype: Tuple[MFnMesh, MFnSkinCluster] + @returns: The maya object that manipulate the mesh node and the skin cluster for a given mesh name. + """ + + skin_cluster_name = mel.eval(f"findRelatedSkinCluster {mesh_name}") + if skin_cluster_name: + skin_cluster = MFnSkinCluster(Maya.get_element(skin_cluster_name)) + mesh_node = MFnMesh(Maya.get_element(mesh_name)) + return mesh_node, skin_cluster + raise DNAViewerError(f"Unable to find skin for given mesh: {mesh_name}") + + +def get_skin_weights_from_scene(mesh_name: str) -> MayaSkinWeights: + """ + Gets the instance of this class filled with data from the scene for a given mesh name. + + @type mesh_name: str + @param mesh_name: The mesh name + + @rtype: MayaSkinWeights + @returns: An instance of this class with the data from the scene + """ + + _, skin_cluster = get_skin_weights_data(mesh_name) + + return MayaSkinWeights(skin_cluster, mesh_name) + + +def get_file_joint_mappings( + skin_weights: MayaSkinWeights, skin_cluster: MFnSkinCluster +) -> List[int]: + """ + Returns a list of object indices representing the influences concerning the joint names specified in the skin weight model. + + @type skin_weights: MayaSkinWeights + @param skin_weights: The instance of the model storing data about skin weights + + @type skin_cluster: MFnSkinCluster + @param skin_cluster: An object for working with functions concerning a skin cluster in maya + + @rtype: List[int] + @returns: a list of indices representing the influences concerning the given joints + """ + + file_joint_mapping: List[int] = [] + for joint_name in skin_weights.joints: + file_joint_mapping.append( + skin_cluster.indexForInfluenceObject(Maya.get_element(joint_name)) + ) + return file_joint_mapping + + +def set_skin_weights_to_scene(mesh_name: str, skin_weights: MayaSkinWeights) -> None: + """ + Sets the skin weights to the scene. + + @type mesh_name: str + @param mesh_name: The mesh name + + @type skin_weights: MayaSkinWeights + @param skin_weights: The object containing data that need to be set to the scene. + """ + + mesh_node, skin_cluster = get_skin_weights_data(mesh_name) + + file_joint_mapping = get_file_joint_mappings(skin_weights, skin_cluster) + + import_skin_weights(skin_cluster, mesh_node, skin_weights, file_joint_mapping) + + logging.info("Set skin weights ended.") + + +def import_skin_weights( + skin_cluster: MFnSkinCluster, + mesh_node: MFnMesh, + skin_weights: MayaSkinWeights, + file_joint_mapping: List[int], +) -> None: + """ + Imports the skin weights to the scene using the joint mapping and the data provided in the model containing the weights. + + @type skin_cluster: MFnSkinCluster + @param skin_cluster: An object for working with functions concerning a skin cluster in maya + + @type mesh_node: MFnMesh + @param mesh_node: An object for working with functions concerning meshes in maya + + @type skin_weights: MayaSkinWeights + @param skin_weights: The instance of the model storing data about skin weights + + @type file_joint_mapping: List[int] + @param file_joint_mapping: a list of indices representing the influences concerning joints + """ + + temp_str = f"{skin_cluster.name()}.wl[" + for vtx_id in range(cmds.polyEvaluate(mesh_node.name(), vertex=True)): + vtx_info = skin_weights.vertices_info[vtx_id] + + vtx_str = f"{temp_str}{str(vtx_id)}].w[" + + cmds.setAttr(f"{vtx_str}0]", 0.0) + + for i in range(0, len(vtx_info), 2): + cmds.setAttr( + f"{vtx_str}{str(file_joint_mapping[int(vtx_info[i])])}]", + vtx_info[i + 1], + ) diff --git a/scripts/builder/maya/util.py b/scripts/builder/maya/util.py new file mode 100644 index 0000000..1a707c3 --- /dev/null +++ b/scripts/builder/maya/util.py @@ -0,0 +1,84 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from typing import Union + +from maya.api.OpenMaya import ( + MDagPath, + MFnDagNode, + MFnTransform, + MGlobal, + MSpace, + MVector, +) + +from ...common import DNAViewerError + + +class Maya: + """A utility class used for interfacing with maya transforms""" + + @staticmethod + def get_element(name: str) -> Union[MDagPath, MFnDagNode]: + """gets the Union[MDagPath, MFnDagNode] object of the element with the given name + + @type name: str + @param name: The name of the element to be retrieved + + @rtype: Union[MDagPath, MFnDagNode] + @returns: A OpenMaya object representing the given element + """ + try: + sellist = MGlobal.getSelectionListByName(name) + except Exception as exception: + raise DNAViewerError(f"Element with name:{name} not found!") from exception + + try: + return sellist.getDagPath(0) + except Exception: + return sellist.getDependNode(0) + + @staticmethod + def get_transform(name: str) -> MFnTransform: + """gets the transform of the element with the given name + + @type element: str + @param element: The element name that we want the transform of + + @rtype: MFnTransform + @returns: A MFnTransform object representing the given elements transform + """ + return MFnTransform(Maya.get_element(name)) + + @staticmethod + def get_translation(element: str, space: int = MSpace.kObject) -> MVector: + """gets the translation of the element with the given name + + @type element: str + @param element: The element name that we want the translation of + + @type space: str + @param space: A string value representing the translation space (default is "world") + + @rtype: MVector + @returns: A MVector object representing the given elements translation + """ + return MFnTransform(Maya.get_element(element)).translation(space) + + @staticmethod + def set_translation( + element: str, translation: MVector, space: int = MSpace.kObject + ) -> None: + """sets the translation of the element with the given name + + @type element: str + @param element: The element name that we want to set the translation of + + @type translation: MVector + @param translation: The new translation value + + @type space: str + @param space: A string value representing the translation space (default is "object") + """ + element_obj = Maya.get_transform(element) + element_obj.setTranslation(translation, space) diff --git a/scripts/builder/mesh.py b/scripts/builder/mesh.py new file mode 100644 index 0000000..5d21eca --- /dev/null +++ b/scripts/builder/mesh.py @@ -0,0 +1,117 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import logging +from typing import List + +from ..builder.maya.mesh import MayaMesh +from ..dnalib.dnalib import DNA +from .config import Config + + +class Mesh: + """ + A builder class used for adding joints to the scene + + Attributes + ---------- + @type dna: DNA + @param dna: The location of the DNA file + + @type mesh_index: int + @param mesh_index: The mesh index we are working with + + @type joint_ids: List[int] + @param joint_ids: The joint indices used for adding skin + + @type joint_names: List[str] + @param joint_names: The joint names used for adding skin + + @type config: Config + @param config: The build options that will be applied when creating the mesh + + + @type mesh: MayaMesh + @param mesh: The builder class object for creating the meshes + + @type dna: DNA + @param dna: The DNA object that was loaded in + """ + + def __init__( + self, + config: Config, + dna: DNA, + mesh_index: int, + ) -> None: + self.mesh_index: int = mesh_index + self.joint_ids: List[int] = [] + self.joint_names: List[str] = [] + self.config = config + self.dna = dna + self.mesh = MayaMesh( + self.mesh_index, + self.dna, + blend_shape_group_prefix=self.config.blend_shape_group_prefix, + blend_shape_name_postfix=self.config.blend_shape_name_postfix, + skin_cluster_suffix=self.config.skin_cluster_suffix, + ) + + def build(self) -> None: + """Starts the build process, creates the neutral mesh, then adds normals, blends shapes and skin if needed""" + + self.create_neutral_mesh() + self.add_blend_shapes() + self.add_skin_cluster() + + def create_neutral_mesh(self) -> None: + """Creates the neutral mesh""" + + self.mesh.create_neutral_mesh() + + def add_blend_shapes(self) -> None: + """Reads in the blend shapes, then adds them to the mesh if it is set in the build options""" + + if self.config.add_blend_shapes: + logging.info("adding blend shapes...") + self.mesh.add_blend_shapes( + self.config.add_mesh_name_to_blend_shape_channel_name + ) + + def add_skin_cluster(self) -> None: + """Adds skin cluster to the mesh if it is set in the build options""" + + if self.config.add_skin_cluster and self.config.add_joints: + self.prepare_joints() + if self.joint_names: + self.mesh.add_skin_cluster(self.joint_names, self.joint_ids) + + def prepare_joints(self) -> None: + """ + Gets the joint indices and names needed for the given mesh. + """ + + self.prepare_joint_ids() + + joints = self.dna.read_all_neutral_joints() + self.joint_names = [] + for joint_id in self.joint_ids: + self.joint_names.append(joints[joint_id].name) + + def prepare_joint_ids(self) -> None: + joints_temp: List[int] = [] + joint_indices = self.dna.get_all_skin_weights_joint_indices_for_mesh( + self.mesh_index + ) + self.joint_ids = [] + if any(joint_indices): + for row in joint_indices: + for column in row: + joints_temp.append(column) + + self.joint_ids = list(set(joints_temp)) + self.joint_ids.sort() + else: + lod = self.dna.get_lowest_lod_containing_meshes([self.mesh_index]) + if lod: + self.joint_ids = self.dna.get_joint_indices_for_lod(lod) diff --git a/scripts/builder/rig_builder.py b/scripts/builder/rig_builder.py new file mode 100644 index 0000000..6c49997 --- /dev/null +++ b/scripts/builder/rig_builder.py @@ -0,0 +1,293 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import logging +from importlib.machinery import SourceFileLoader +from importlib.util import module_from_spec, spec_from_loader +from pathlib import Path +from types import ModuleType +from typing import Optional + +from maya import cmds, mel +from maya.api.OpenMaya import MSpace, MVector + +from ..builder.maya.util import Maya +from ..common import ANALOG_GUI_HOLDER, GUI_HOLDER, RIG_LOGIC_PREFIX, DNAViewerError +from ..dnalib.dnalib import DNA +from .builder import Builder +from .config import RigConfig + + +class RigBuilder(Builder): + """ + A builder class used for building meshes + """ + + def __init__(self, dna: DNA, config: Optional[RigConfig] = None) -> None: + super().__init__(dna=dna, config=config) + self.config: Optional[RigConfig] + self.eye_l_pos: MVector + self.eye_r_pos: MVector + + def _build(self) -> None: + if super()._build(): + self.add_gui() + self.add_analog_gui() + self.add_rig_logic() + self.run_additional_assemble_script() + + def run_additional_assemble_script(self) -> None: + """ + Runs an additional assemble script if specified in the character configuration. + """ + + if self.config.aas_path: + logging.info("running additional assemble script...") + try: + module_name = Path(self.config.aas_path).stem + script = self.source_py_file(module_name, self.config.aas_path) + script_method = getattr(script, self.config.aas_method) + script_method( + self.config.get_top_level_group(), + self.config.get_rig_group(), + self.config.aas_parameter, + ) + except Exception as e: + raise DNAViewerError(f"Can't run aas script. Reason: {e}") from e + + def add_rig_logic(self) -> None: + """ + Creates and adds a rig logic node specified in the character configuration. + """ + + if ( + self.config.add_rig_logic + and self.config.add_joints + and self.config.add_skin_cluster + and self.config.add_blend_shapes + and self.config.aas_path + and self.config.analog_gui_path + and self.config.gui_path + ): + logging.info("adding rig logic...") + try: + cmds.loadPlugin("embeddedRL4.mll") + self.config.rig_logic_name = f"{RIG_LOGIC_PREFIX}{self.dna.name}" + dna = self.dna.path.replace("\\", "/") + + mel_command = self.config.rig_logic_command + mel_command += f' -n "{self.config.rig_logic_name}"' + mel_command += f' -dfp "{dna}"' + mel_command += f' -cn "{self.config.control_naming}"' + mel_command += f' -jn "{self.config.joint_naming}"' + mel_command += f' -bsn "{self.config.blend_shape_naming}"' + mel_command += f' -amn "{self.config.animated_map_naming}"; ' + + logging.info(f"mel command: {mel_command}") + mel.eval(mel_command) + except Exception as e: + logging.error( + "The procedure needed for assembling the rig logic was not found, the plugin needed for this might not be loaded." + ) + raise DNAViewerError( + f"Something went wrong, skipping adding the rig logic... Reason: {e}" + ) from e + + def add_gui(self) -> None: + """ + Adds a gui according to the specified gui options. If none is specified no gui will be added. + """ + + if self.config.gui_path: + logging.info("adding gui...") + + self.import_gui( + gui_path=self.config.gui_path, + group_name=GUI_HOLDER, + ) + self.position_gui(GUI_HOLDER) + + self.add_ctrl_attributes() + self.add_animated_map_attributes() + + def add_ctrl_attributes(self) -> None: + """ + Adds and sets the raw gui control attributes. + """ + + gui_control_names = self.dna.get_raw_control_names() + for name in gui_control_names: + ctrl_and_attr_names = name.split(".") + self.add_attribute( + control_name=ctrl_and_attr_names[0], + long_name=ctrl_and_attr_names[1], + ) + + def add_animated_map_attributes(self) -> None: + """ + Adds and sets the animated map attributes. + """ + + names = self.dna.get_animated_map_names() + for name in names: + long_name = name.replace(".", "_") + if self.config.gui_path: + self.add_attribute( + control_name=self.config.animated_map_attribute_multipliers_name, + long_name=long_name, + ) + + def position_gui(self, group_name: str) -> None: + """Sets the gui position to align with the character eyes""" + + if not cmds.objExists(self.config.eye_gui_name) or not cmds.objExists( + self.config.left_eye_joint_name + ): + logging.warning( + "could not find joints needed for positioning the gui, leaving it at its default position..." + ) + return + + gui_y = ( + Maya.get_transform(self.config.eye_gui_name).translation(MSpace.kObject).y + ) + eyes_y = ( + Maya.get_transform(self.config.left_eye_joint_name) + .translation(MSpace.kObject) + .y + ) + delta_y = eyes_y - gui_y + + if isinstance(self.config.gui_translate_x, str): + try: + logging.warning( + "gui_translate_x should be a float, trying to cast the value to float..." + ) + self.config.gui_translate_x = float(self.config.gui_translate_x) + except ValueError: + logging.error("could not cast string value to float") + return + + Maya.get_transform(group_name).translateBy( + MVector(self.config.gui_translate_x, delta_y, 0), MSpace.kObject + ) + + def add_analog_gui(self) -> None: + """ + Adds an analog gui according to the specified analog gui options. If none is specified no analog gui will be + added. + """ + + if self.config.analog_gui_path and self.config.add_joints: + logging.info("adding analog gui...") + self.import_gui( + gui_path=self.config.analog_gui_path, + group_name=ANALOG_GUI_HOLDER, + ) + if self.dna.joints.names: + self.add_eyes() + self.add_eye_locators() + + def add_eyes(self) -> None: + """Add eyes to the analog gui""" + + self.eye_l_pos = Maya.get_translation(self.config.left_eye_joint_name) + self.eye_r_pos = Maya.get_translation(self.config.right_eye_joint_name) + + Maya.set_translation( + self.config.central_driver_name, + Maya.get_translation(self.config.facial_root_joint_name), + ) + + delta_l = Maya.get_translation( + self.config.left_eye_aim_up_name + ) - Maya.get_translation(self.config.left_eye_driver_name) + delta_r = Maya.get_translation( + self.config.right_eye_aim_up_name + ) - Maya.get_translation(self.config.right_eye_driver_name) + + Maya.set_translation(self.config.left_eye_driver_name, self.eye_l_pos) + Maya.set_translation( + self.config.right_eye_driver_name, + self.eye_r_pos, + ) + Maya.set_translation( + self.config.left_eye_aim_up_name, + MVector( + self.eye_l_pos[0] + delta_l[0], + self.eye_l_pos[1] + delta_l[1], + self.eye_l_pos[2] + delta_l[2], + ), + ) + Maya.set_translation( + self.config.right_eye_aim_up_name, + MVector( + self.eye_r_pos[0] + delta_r[0], + self.eye_r_pos[1] + delta_r[1], + self.eye_r_pos[2] + delta_r[2], + ), + ) + + def add_eye_locators(self) -> None: + """Add eye locators to the analog gui""" + + eye_l_locator_pos = Maya.get_translation(self.config.le_aim) + eye_r_locator_pos = Maya.get_translation(self.config.re_aim) + central_aim_pos = Maya.get_translation(self.config.central_aim) + + eye_middle_delta = (self.eye_l_pos - self.eye_r_pos) / 2 + + eye_middle = self.eye_r_pos + eye_middle_delta + + Maya.set_translation( + self.config.central_aim, + MVector(eye_middle[0], eye_middle[1], central_aim_pos[2]), + ) + Maya.set_translation( + self.config.le_aim, + MVector(self.eye_l_pos[0], self.eye_l_pos[1], eye_l_locator_pos[2]), + ) + Maya.set_translation( + self.config.re_aim, + MVector(self.eye_r_pos[0], self.eye_r_pos[1], eye_r_locator_pos[2]), + ) + + def source_py_file(self, name: str, path: str) -> Optional[ModuleType]: + """ + Used for loading a python file, used for additional assemble script. + + @type name: str + @param name: The name of the module. + + @type path: str + @param path: The path of the python file. + + @rtype: Optional[ModuleType] + @returns: The loaded module. + """ + + path_obj = Path(path.strip()) + if ( + path + and path_obj.exists() + and path_obj.is_file() + and path_obj.suffix == ".py" + ): + spec = spec_from_loader(name, SourceFileLoader(name, path)) + module = module_from_spec(spec) + spec.loader.exec_module(module) + return module + raise DNAViewerError(f"File {path} is not found!") + + def import_gui(self, gui_path: str, group_name: str) -> None: + """ + Imports a gui using the provided parameters. + + @type gui_path: str + @param gui_path: The path of the gui file that needs to be imported. + + @type group_name: str + @param group_name: The name of the transform that holds the imported asset. + """ + + cmds.file(gui_path, i=True, groupReference=True, groupName=group_name) diff --git a/scripts/dnalib/__init__.py b/scripts/dnalib/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/scripts/dnalib/behavior.py b/scripts/dnalib/behavior.py new file mode 100644 index 0000000..d824890 --- /dev/null +++ b/scripts/dnalib/behavior.py @@ -0,0 +1,371 @@ +from dataclasses import dataclass, field +from typing import List, Optional, cast + +from dna import BinaryStreamReader as DNAReader + +from .definition import Definition +from .layer import Layer + + +class Behavior(Definition): + """ + @type reader: BinaryStreamReader + @param reader: The binary stream reader being used + + @type gui_to_raw: ConditionalTable + @param gui_to_raw: Mapping data about gui to raw values + + @type psd: PSDMatrix + @param psd: The data representing Pose Space Deformation + + @type blend_shapes: BlendShapesData + @param blend_shapes: The data representing blend shapes + + @type animated_maps: AnimatedMapsConditionalTable + @param animated_maps: The data representing animated maps + + @type joints: JointGroups + @param joints: The data representing joints + """ + + def __init__(self, reader: DNAReader, layers: Optional[List[Layer]]) -> None: + super().__init__(reader, layers) + + self.gui_to_raw = ConditionalTable() + self.psd = PSDMatrix() + self.blend_shapes = BlendShapesData() + self.animated_maps_conditional_table = AnimatedMapsConditionalTable() + self.joint_groups = JointGroups() + self.behavior_read = False + + def start_read(self) -> None: + super().start_read() + self.behavior_read = False + + def is_read(self) -> bool: + return super().is_read() and self.behavior_read + + def read(self) -> None: + """ + Starts reading in the behavior part of the DNA + """ + super().read() + + if not self.behavior_read and self.layer_enabled(Layer.behavior): + self.behavior_read = True + self.add_gui_to_raw() + self.add_psd() + self.add_joint_groups() + self.add_blend_shapes() + self.add_animated_maps_conditional_table() + + def get_animated_map_lods(self) -> List[int]: + return cast(List[int], self.reader.getAnimatedMapLODs()) + + def get_animated_map_from_values(self) -> List[float]: + return cast(List[float], self.reader.getAnimatedMapFromValues()) + + def get_animated_map_to_values(self) -> List[float]: + return cast(List[float], self.reader.getAnimatedMapToValues()) + + def get_animated_map_slope_values(self) -> List[float]: + return cast(List[float], self.reader.getAnimatedMapSlopeValues()) + + def get_animated_map_cut_values(self) -> List[float]: + return cast(List[float], self.reader.getAnimatedMapCutValues()) + + def get_animated_map_input_indices(self) -> List[int]: + return cast(List[int], self.reader.getAnimatedMapInputIndices()) + + def get_animated_map_output_indices(self) -> List[int]: + return cast(List[int], self.reader.getAnimatedMapOutputIndices()) + + def get_gui_to_raw_from_values(self) -> List[float]: + return cast(List[float], self.reader.getGUIToRawFromValues()) + + def get_gui_to_raw_to_values(self) -> List[float]: + return cast(List[float], self.reader.getGUIToRawToValues()) + + def gget_gui_to_raw_slope_values(self) -> List[float]: + return cast(List[float], self.reader.getGUIToRawSlopeValues()) + + def get_gui_to_raw_cut_values(self) -> List[float]: + return cast(List[float], self.reader.getGUIToRawCutValues()) + + def get_gui_to_raw_input_indices(self) -> List[int]: + return cast(List[int], self.reader.getGUIToRawInputIndices()) + + def get_gui_to_raw_output_indices(self) -> List[int]: + return cast(List[int], self.reader.getGUIToRawOutputIndices()) + + def get_psd_count(self) -> int: + return cast(int, self.reader.getPSDCount()) + + def get_psd_row_indices(self) -> List[int]: + return cast(List[int], self.reader.getPSDRowIndices()) + + def get_psd_column_indices(self) -> List[int]: + return cast(List[int], self.reader.getPSDColumnIndices()) + + def get_psd_values(self) -> List[float]: + return cast(List[float], self.reader.getPSDValues()) + + def get_blend_shape_channel_lods(self) -> List[int]: + return cast(List[int], self.reader.getBlendShapeChannelLODs()) + + def get_blend_shape_channel_input_indices(self) -> List[int]: + return cast(List[int], self.reader.getBlendShapeChannelInputIndices()) + + def get_blend_shape_channel_output_indices(self) -> List[int]: + return cast(List[int], self.reader.getBlendShapeChannelOutputIndices()) + + def get_joint_row_count(self) -> int: + return cast(int, self.reader.getJointRowCount()) + + def get_joint_column_count(self) -> int: + return cast(int, self.reader.getJointColumnCount()) + + def get_joint_variable_attribute_indices(self) -> int: + return cast(int, self.reader.getJointVariableAttributeIndices()) + + def get_joint_group_count(self) -> int: + return cast(int, self.reader.getJointGroupCount()) + + def get_joint_group_logs(self, joint_group_index: int) -> List[int]: + return cast(List[int], self.reader.getJointGroupLODs(joint_group_index)) + + def get_joint_group_input_indices(self, joint_group_index: int) -> List[int]: + return cast(List[int], self.reader.getJointGroupInputIndices(joint_group_index)) + + def get_joint_group_output_indices(self, joint_group_index: int) -> List[int]: + return cast( + List[int], self.reader.getJointGroupOutputIndices(joint_group_index) + ) + + def get_joint_group_values(self, joint_group_index: int) -> List[float]: + return cast(List[float], self.reader.getJointGroupValues(joint_group_index)) + + def get_joint_group_joint_indices(self, joint_group_index: int) -> List[int]: + return cast(List[int], self.reader.getJointGroupJointIndices(joint_group_index)) + + def add_gui_to_raw(self) -> None: + """Reads in the gui to raw mapping""" + + self.reader.gui_to_raw = ConditionalTable( + inputs=self.get_gui_to_raw_input_indices(), + outputs=self.get_gui_to_raw_output_indices(), + from_values=self.get_gui_to_raw_from_values(), + to_values=self.get_gui_to_raw_to_values(), + slope_values=self.gget_gui_to_raw_slope_values(), + cut_values=self.get_gui_to_raw_cut_values(), + ) + + def add_psd(self) -> None: + """Reads in the PSD part of the behavior""" + + self.psd = PSDMatrix( + count=self.get_psd_count(), + rows=self.get_psd_row_indices(), + columns=self.get_psd_column_indices(), + values=self.get_psd_values(), + ) + + def add_joint_groups(self) -> None: + """Reads in the joints part of the behavior""" + + self.joint_groups.joint_row_count = self.reader.getJointRowCount() + self.joint_groups.joint_column_count = self.reader.getJointColumnCount() + for lod in range(self.get_lod_count()): + self.joint_groups.joint_variable_attribute_indices.append( + self.reader.getJointVariableAttributeIndices(lod) + ) + for joint_group_index in range(self.get_joint_group_count()): + self.joint_groups.joint_groups.append( + JointGroup( + lods=self.get_joint_group_logs(joint_group_index), + inputs=self.get_joint_group_input_indices(joint_group_index), + outputs=self.get_joint_group_output_indices(joint_group_index), + values=self.get_joint_group_values(joint_group_index), + joints=self.get_joint_group_joint_indices(joint_group_index), + ) + ) + + def add_blend_shapes(self) -> None: + """Reads in the blend shapes part of the behavior""" + + self.blend_shapes = BlendShapesData( + lods=self.get_blend_shape_channel_lods(), + inputs=self.get_blend_shape_channel_input_indices(), + outputs=self.get_blend_shape_channel_output_indices(), + ) + + def add_animated_maps_conditional_table(self) -> None: + """Reads in the animated maps part of the behavior""" + + self.reader.animated_maps_conditional_table = AnimatedMapsConditionalTable( + lods=self.get_animated_map_lods(), + conditional_table=ConditionalTable( + from_values=self.get_animated_map_from_values(), + to_values=self.get_animated_map_to_values(), + slope_values=self.get_animated_map_slope_values(), + cut_values=self.get_animated_map_cut_values(), + inputs=self.get_animated_map_input_indices(), + outputs=self.get_animated_map_output_indices(), + ), + ) + + +@dataclass +class ConditionalTable: + """ + A model class for holding various values + + Attributes + ---------- + @type from_values: List[float] + @param from_values: The list of values + + @type to_values: List[float] + @param to_values: The list of values + + @type slope_values: List[float] + @param slope_values: The list of slope values + + @type cut_values: List[float] + @param cut_values: The list of cut values + + @type inputs: List[int] + @param inputs: The indices of inputs + + @type outputs: List[int] + @param outputs: The indices of outputs + """ + + from_values: List[float] = field(default_factory=list) + to_values: List[float] = field(default_factory=list) + slope_values: List[float] = field(default_factory=list) + cut_values: List[float] = field(default_factory=list) + inputs: List[int] = field(default_factory=list) + outputs: List[int] = field(default_factory=list) + + +@dataclass +class PSDMatrix: + """ + A model class for holding data about Pose Space Deformation + + Attributes + ---------- + @type count: int + @param count: The list of values + + @type rows: List[int] + @param rows: List of row indices used for storing values + + @type columns: List[int] + @param columns: List of row indices used for storing values + + @type values: List[float] + @param values: The list of values, that can be accessed from the row and column index + """ + + count: Optional[int] = field(default=None) + rows: List[int] = field(default_factory=list) + columns: List[int] = field(default_factory=list) + values: List[float] = field(default_factory=list) + + +@dataclass +class JointGroup: + """ + A model class for holding data about joint groups + + Attributes + ---------- + @type lods: List[int] + @param lods: A list of lod indices that the joint group is contained within + + @type values: List[float] + @param values: A list of values + + @type joints: List[int] + @param joints: A list of joint indices + + @type inputs: List[int] + @param inputs: The indices of inputs + + @type outputs: List[int] + @param outputs: The indices of outputs + """ + + lods: List[int] = field(default_factory=list) + values: List[float] = field(default_factory=list) + joints: List[int] = field(default_factory=list) + inputs: List[int] = field(default_factory=list) + outputs: List[int] = field(default_factory=list) + + +@dataclass +class BlendShapesData: + """ + A model class for holding data about blend shapes + + Attributes + ---------- + @type lods: List[int] + @param lods: A list of lod indices that the blend shapes are contained within + + @type inputs: List[int] + @param inputs: The indices of inputs + + @type outputs: List[int] + @param outputs: The indices of outputs + """ + + lods: List[int] = field(default_factory=list) + inputs: List[int] = field(default_factory=list) + outputs: List[int] = field(default_factory=list) + + +@dataclass +class AnimatedMapsConditionalTable: + """ + A model class for holding data about animated maps + + Attributes + ---------- + @type lods: List[int] + @param lods: A list of lod indices that the blend shapes are contained within + + @type conditional_table: ConditionalTable + @param conditional_table: Data needed for animated maps + """ + + lods: List[int] = field(default_factory=list) + conditional_table: ConditionalTable = field(default_factory=ConditionalTable) + + +@dataclass +class JointGroups: + """ + A model class for storing data about joints + + Attributes + ---------- + @type joint_row_count: int + @param joint_row_count: The row count of the matrix that stores the joints data + + @type joint_column_count: int + @param joint_column_count: The column count of the matrix that stores the joints data + + @type joint_variable_attribute_indices: List[List[int]] + @param joint_variable_attribute_indices: List of joint variable attribute indices per LOD + + @type joint_groups: List[JointGroup] + @param joint_groups: The list of joint groups + """ + + joint_row_count: Optional[int] = field(default=None) + joint_column_count: Optional[int] = field(default=None) + joint_variable_attribute_indices: List[List[int]] = field(default_factory=list) + joint_groups: List[JointGroup] = field(default_factory=list) diff --git a/scripts/dnalib/definition.py b/scripts/dnalib/definition.py new file mode 100644 index 0000000..b64aa99 --- /dev/null +++ b/scripts/dnalib/definition.py @@ -0,0 +1,333 @@ +from dataclasses import dataclass, field +from typing import Dict, List, Optional, Tuple, cast + +from dna import BinaryStreamReader as DNAReader +from dna import MeshBlendShapeChannelMapping + +from ..model import Point3 +from .descriptor import Descriptor +from .layer import Layer + + +class Definition(Descriptor): + """ + A class used for reading and accessing the definition part of the DNA file + + Attributes + ---------- + @type reader: BinaryStreamReader + @param reader: The binary stream reader being used + + @type definition: DefinitionModel + @param definition: The object that holds the definition data read from the DNA file + + @type joints: Joints + @param joints: The data about joints + + @type blend_shape_channels: GeometryEntity + @param blend_shape_channels: The names and indices of blend shape channels + + @type animated_maps: GeometryEntity + @param animated_maps: The names and indices of animated maps + + @type meshes: GeometryEntity + @param meshes: The names and indices of the meshes + + @type gui_control_names: List[str] + @param gui_control_names: The list of gui control names + + @type raw_control_names: List[str] + @param raw_control_names: The list of raw control names + + @type mesh_blend_shape_channel_mapping: List[Tuple[int, int]] + @param mesh_blend_shape_channel_mapping: Mapping of mesh index to the blend shape channel index + + @type mesh_blend_shape_channel_mapping_indices_for_lod: List[List[int]] + @param mesh_blend_shape_channel_mapping_indices_for_lod: The list of blend shape channel mapping indices by lod + + @type neutral_joint_translations: List[Point3] + @param neutral_joint_translations: The list of neutral joint translations + + @type neutral_joint_rotations: List[Point3] + @param neutral_joint_rotations: The list of neutral joint rotations + """ + + def __init__(self, reader: DNAReader, layers: Optional[List[Layer]]) -> None: + super().__init__(reader, layers) + self.joints = Joints() + self.blend_shape_channels = GeometryEntity() + self.animated_maps = GeometryEntity() + self.meshes = GeometryEntity() + self.meshes_mapping: Dict[str, int] = {} + + self.gui_control_names: List[str] = [] + self.raw_control_names: List[str] = [] + + self.mesh_blend_shape_channel_mapping: List[Tuple[int, int]] = [] + self.mesh_blend_shape_channel_mapping_indices_for_lod: List[List[int]] = [] + + self.neutral_joint_translations: List[Point3] = [] + self.neutral_joint_rotations: List[Point3] = [] + self.definition_read = False + + def start_read(self) -> None: + super().start_read() + self.definition_read = False + + def is_read(self) -> bool: + return super().is_read() and self.definition_read + + def read(self) -> None: + """ + Starts reading in the definition part of the DNA + + @rtype: DefinitionModel + @returns: the instance of the created definition model + """ + super().read() + + if not self.definition_read and self.layer_enabled(Layer.definition): + self.definition_read = True + self.add_controls() + self.add_joints() + self.add_blend_shape_channels() + self.add_animated_maps() + self.add_meshes() + self.add_mesh_blend_shape_channel_mapping() + self.add_neutral_joints() + + def get_lod_count(self) -> int: + return cast(int, self.reader.getLODCount()) + + def get_gui_control_count(self) -> int: + return cast(int, self.reader.getGUIControlCount()) + + def get_gui_control_name(self, index: int) -> str: + return cast(str, self.reader.getGUIControlName(index)) + + def get_raw_control_count(self) -> int: + return cast(int, self.reader.getRawControlCount()) + + def get_raw_control_name(self, index: int) -> str: + return cast(str, self.reader.getRawControlName(index)) + + def get_raw_control_names(self) -> List[str]: + names = [] + for i in range(self.get_raw_control_count()): + names.append(self.get_raw_control_name(i)) + return names + + def get_neutral_joint_translation(self, index: int) -> Point3: + translation = cast(List[float], self.reader.getNeutralJointTranslation(index)) + return Point3(translation[0], translation[1], translation[2]) + + def get_neutral_joint_translation_xs(self) -> List[float]: + return cast(List[float], self.reader.getNeutralJointTranslationXs()) + + def get_neutral_joint_translation_ys(self) -> List[float]: + return cast(List[float], self.reader.getNeutralJointTranslationYs()) + + def get_neutral_joint_translation_zs(self) -> List[float]: + return cast(List[float], self.reader.getNeutralJointTranslationZs()) + + def get_neutral_joint_rotation(self, index: int) -> Point3: + translation = cast(List[float], self.reader.getNeutralJointRotation(index)) + return Point3(translation[0], translation[1], translation[2]) + + def get_neutral_joint_rotation_xs(self) -> List[float]: + return cast(List[float], self.reader.getNeutralJointRotationXs()) + + def get_neutral_joint_rotation_ys(self) -> List[float]: + return cast(List[float], self.reader.getNeutralJointRotationYs()) + + def get_neutral_joint_rotation_zs(self) -> List[float]: + return cast(List[float], self.reader.getNeutralJointRotationZs()) + + def get_mesh_blend_shape_channel_mapping_count(self) -> int: + return cast(int, self.reader.getMeshBlendShapeChannelMappingCount()) + + def get_mesh_blend_shape_channel_mapping( + self, index: int + ) -> MeshBlendShapeChannelMapping: + return cast( + MeshBlendShapeChannelMapping, + self.reader.getMeshBlendShapeChannelMapping(index), + ) + + def get_mesh_blend_shape_channel_mapping_for_lod(self, lod: int) -> List[int]: + return cast( + List[int], self.reader.getMeshBlendShapeChannelMappingIndicesForLOD(lod) + ) + + def get_joint_count(self) -> int: + return cast(int, self.reader.getJointCount()) + + def get_joint_name(self, index: int) -> str: + return cast(str, self.reader.getJointName(index)) + + def get_joint_parent_index(self, index: int) -> int: + return cast(int, self.reader.getJointParentIndex(index)) + + def get_joint_indices_for_lod(self, index: int) -> List[int]: + return cast(List[int], self.reader.getJointIndicesForLOD(index)) + + def get_blend_shape_channel_count(self) -> int: + return cast(int, self.reader.getBlendShapeChannelCount()) + + def get_blend_shape_channel_name(self, index: int) -> str: + return cast(str, self.reader.getBlendShapeChannelName(index)) + + def get_mesh_count(self) -> int: + return cast(int, self.reader.getMeshCount()) + + def get_mesh_name(self, index: int) -> str: + return cast(str, self.reader.getMeshName(index)) + + def get_mesh_indices_for_lod(self, index: int) -> List[int]: + return cast(List[int], self.reader.getMeshIndicesForLOD(index)) + + def get_blend_shape_channel_indices_for_lod(self, index: int) -> List[int]: + return cast(List[int], self.reader.getBlendShapeChannelIndicesForLOD(index)) + + def get_animated_map_count(self) -> int: + return cast(int, self.reader.getAnimatedMapCount()) + + def get_animated_map_name(self, index: int) -> str: + return cast(str, self.reader.getAnimatedMapName(index)) + + def get_animated_map_names(self) -> List[str]: + names = [] + for i in range(self.get_animated_map_count()): + names.append(self.get_animated_map_name(i)) + return names + + def get_animated_map_indices_for_lod(self, index: int) -> List[int]: + return cast(List[int], self.reader.getAnimatedMapIndicesForLOD(index)) + + def get_translation_unit(self) -> int: + return cast(int, self.reader.getTranslationUnit()) + + def get_rotation_unit(self) -> int: + return cast(int, self.reader.getRotationUnit()) + + def add_neutral_joints(self) -> None: + """Reads in the neutral joints part of the definition""" + + neutral_joint_translation_xs = self.get_neutral_joint_translation_xs() + neutral_joint_translation_ys = self.get_neutral_joint_translation_ys() + neutral_joint_translation_zs = self.get_neutral_joint_translation_zs() + neutral_joint_translation_count_x = len(neutral_joint_translation_xs) + for index in range(neutral_joint_translation_count_x): + self.neutral_joint_translations.append( + Point3( + x=neutral_joint_translation_xs[index], + y=neutral_joint_translation_ys[index], + z=neutral_joint_translation_zs[index], + ) + ) + neutral_joint_rotation_xs = self.get_neutral_joint_rotation_xs() + neutral_joint_rotation_ys = self.get_neutral_joint_rotation_ys() + neutral_joint_rotation_zs = self.get_neutral_joint_rotation_zs() + neutral_joint_rotation_count_x = len(neutral_joint_rotation_xs) + for index in range(neutral_joint_rotation_count_x): + self.neutral_joint_rotations.append( + Point3( + x=neutral_joint_rotation_xs[index], + y=neutral_joint_rotation_ys[index], + z=neutral_joint_rotation_zs[index], + ) + ) + + def add_mesh_blend_shape_channel_mapping(self) -> None: + """Reads in the mesh blend shape channel mapping""" + + for index in range(self.get_mesh_blend_shape_channel_mapping_count()): + mapping = self.get_mesh_blend_shape_channel_mapping(index) + self.mesh_blend_shape_channel_mapping.append( + (mapping.meshIndex, mapping.blendShapeChannelIndex) + ) + for lod in range(self.get_lod_count()): + self.mesh_blend_shape_channel_mapping_indices_for_lod.append( + self.get_mesh_blend_shape_channel_mapping_for_lod(lod) + ) + + def add_meshes(self) -> None: + """Reads in the meshes of the definition""" + + for index in range(self.get_mesh_count()): + mesh_name = self.get_mesh_name(index) + self.meshes.names.append(mesh_name) + self.meshes_mapping[mesh_name] = index + for index in range(self.get_lod_count()): + self.meshes.lod_indices.append(self.get_mesh_indices_for_lod(index)) + + def add_animated_maps(self) -> None: + """Reads in the animated maps of the definition""" + + for index in range(self.get_animated_map_count()): + self.animated_maps.names.append(self.get_animated_map_name(index)) + for index in range(self.get_lod_count()): + self.animated_maps.lod_indices.append( + self.get_animated_map_indices_for_lod(index) + ) + + def add_blend_shape_channels(self) -> None: + """Reads in the neutral joints part of the definition""" + + for index in range(self.get_blend_shape_channel_count()): + self.blend_shape_channels.names.append( + self.get_blend_shape_channel_name(index) + ) + for index in range(self.get_lod_count()): + self.blend_shape_channels.lod_indices.append( + self.get_blend_shape_channel_indices_for_lod(index) + ) + + def add_joints(self) -> None: + """Reads in the joints of the definition""" + + for index in range(self.get_joint_count()): + self.joints.names.append(self.get_joint_name(index)) + self.joints.parent_index.append(self.get_joint_parent_index(index)) + for index in range(self.get_lod_count()): + self.joints.lod_indices.append(self.get_joint_indices_for_lod(index)) + + def add_controls(self) -> None: + """Reads in the gui and raw controls of the definition""" + + for index in range(self.get_gui_control_count()): + self.gui_control_names.append(self.get_gui_control_name(index)) + for index in range(self.get_raw_control_count()): + self.raw_control_names.append(self.get_raw_control_name(index)) + + +@dataclass +class GeometryEntity: + """ + A model class for holding names and indices + + Attributes + ---------- + @type names: List[str] + @param names: List of names + + @type lod_indices: List[List[int]] + @param lod_indices: List of indices per lod + """ + + names: List[str] = field(default_factory=list) + lod_indices: List[List[int]] = field(default_factory=list) + + +@dataclass +class Joints(GeometryEntity): + """ + A model class for holding data about the joints + + Attributes + ---------- + @type parent_index: List[int] + @param parent_index: List of parent indices for each joint index + """ + + parent_index: List[int] = field(default_factory=list) diff --git a/scripts/dnalib/descriptor.py b/scripts/dnalib/descriptor.py new file mode 100644 index 0000000..c359702 --- /dev/null +++ b/scripts/dnalib/descriptor.py @@ -0,0 +1,129 @@ +from typing import Dict, List, Optional, Tuple + +from dna import BinaryStreamReader as DNAReader + +from ..dnalib.layer import Layer + + +class Descriptor: + """ + A class used for reading and accessing the descriptor part of the DNA file + + Attributes + ---------- + + @type name: str + @param name: The name of the character + + @type archetype: int + @param archetype: A value that represents the archetype of the character + + @type gender: int + @param gender: A value that represents the gender of the character + + @type age: int + @param age: The age of the character + + @type metadata: Dict[str, str] + @param metadata: Metadata stored for the character + + @type translation_unit: int + @param translation_unit: The translation unit that was used for creating the character + + @type rotation_unit: int + @param rotation_unit: The translation unit that was used for creating the character + + @type coordinate_system: Tuple[int, int, int] + @param coordinate_system: A tuple representing the coordinate system + + @type lod_count: int + @param lod_count: The number of LODs for the characters + + @type db_max_lod:int + @param db_max_lod: A LOD constraint representing the greatest LOD we wish wish to produce (ie. if the value is n, the potential LODs are 0, 1, .. n-1) + + @type db_complexity: str + @param db_complexity: Will be used in future + + @type db_name: str + @param db_name: DB identifier + """ + + def __init__(self, reader: DNAReader, layers: Optional[List[Layer]]) -> None: + self.reader = reader + self.layers = layers + self.name: Optional[str] = None + self.archetype: Optional[int] = None + self.gender: Optional[int] = None + self.age: Optional[int] = None + self.metadata: Dict[str, str] = {} + + self.translation_unit: Optional[int] = None + self.rotation_unit: Optional[int] = None + + self.coordinate_system: Optional[Tuple[int, int, int]] = None + + self.lod_count: Optional[int] = None + self.db_max_lod: Optional[int] = None + self.db_complexity: Optional[str] = None + self.db_name: Optional[str] = None + self.descriptor_read = False + + def start_read(self) -> None: + self.descriptor_read = False + + def is_read(self) -> bool: + return self.descriptor_read + + def layer_enabled(self, layer: Layer) -> bool: + return layer in self.layers or Layer.all in self.layers + + def read(self) -> None: + """ + Starts reading in the descriptor part of the DNA + + @rtype: DescriptorModel + @returns: the instance of the created descriptor model + """ + + if not self.descriptor_read and self.layer_enabled(Layer.descriptor): + self.descriptor_read = True + self.add_basic_data() + self.add_metadata() + self.add_geometry_data() + self.add_db_data() + + def add_basic_data(self) -> None: + """Reads in the character name, archetype, gender and age""" + + self.name = self.reader.getName() + self.archetype = self.reader.getArchetype() + self.gender = self.reader.getGender() + self.age = self.reader.getAge() + + def add_metadata(self) -> None: + """Reads in the metadata provided from the DNA file""" + + for i in range(self.reader.getMetaDataCount()): + key = self.reader.getMetaDataKey(i) + self.metadata[key] = self.reader.getMetaDataValue(key) + + def add_geometry_data(self) -> None: + """Sets the translation unit, rotation unit, and coordinate system from the DNA file""" + + self.translation_unit = self.reader.getTranslationUnit() + self.rotation_unit = self.reader.getRotationUnit() + coordinate_system = self.reader.getCoordinateSystem() + self.coordinate_system = ( + coordinate_system.xAxis, + coordinate_system.yAxis, + coordinate_system.zAxis, + ) + + def add_db_data(self) -> None: + """Reads in the db data from the DNA file""" + + self.lod_count = self.reader.getLODCount() + self.db_max_lod = self.reader.getDBMaxLOD() + self.db_complexity = self.reader.getDBComplexity() + self.db_name = self.reader.getDBName() diff --git a/scripts/dnalib/dnalib.py b/scripts/dnalib/dnalib.py new file mode 100644 index 0000000..27a1d0f --- /dev/null +++ b/scripts/dnalib/dnalib.py @@ -0,0 +1,250 @@ +from typing import List, Optional, Tuple + +from dna import BinaryStreamReader as DNAReader +from dna import DataLayer_All, FileStream, Status + +from ..common import DNAViewerError +from ..model import UV, BlendShape, Joint, Layout, Point3 +from .behavior import Behavior +from .geometry import Geometry +from .layer import Layer + + +class DNA(Behavior, Geometry): + """ + A class used for accessing data in DNA file. + + @type dna_path: str + @param dna_path: The path of the DNA file + + @type layers: Optional[List[Layer]] + @param layers: List of parts of DNA to be loaded. If noting is passed, whole DNA is going to be loaded. Same as + passing Layer.all. + """ + + def __init__(self, dna_path: str, layers: Optional[List[Layer]] = None) -> None: + self.path = dna_path + self.reader = self.create_reader(dna_path) + layers = layers or [Layer.all] + Behavior.__init__(self, self.reader, layers) + Geometry.__init__(self, self.reader, layers) + self.read() + + def create_reader(self, dna_path: str) -> DNAReader: + """ + Creates a stream reader needed for reading values from the DNA file. + + @type dna_path: str + @param dna_path: The path of the DNA file + + @rtype: DNA + @returns: The reader needed for reading values from the DNA file + """ + + stream = FileStream( + dna_path, FileStream.AccessMode_Read, FileStream.OpenMode_Binary + ) + + reader = DNAReader(stream, DataLayer_All) + reader.read() + if not Status.isOk(): + status = Status.get() + raise RuntimeError(f"Error loading DNA: {status.message}") + return reader + + def is_read(self) -> bool: + return Behavior.is_read(self) and Geometry.is_read(self) + + def read(self) -> None: + if not self.is_read(): + self.start_read() + Behavior.read(self) + Geometry.read(self) + + def read_all_neutral_joints(self) -> List[Joint]: + joints = [] + for i in range(self.get_joint_count()): + name = self.get_joint_name(i) + translation = self.get_neutral_joint_translation(i) + orientation = self.get_neutral_joint_rotation(i) + parent_name = self.get_joint_name(self.get_joint_parent_index(i)) + + joint = Joint( + name=name, + translation=translation, + orientation=orientation, + parent_name=parent_name, + ) + + joints.append(joint) + + return joints + + def get_all_skin_weights_joint_indices_for_mesh( + self, mesh_index: int + ) -> List[List[int]]: + return self.geometry_meshes[mesh_index].skin_weights.joint_indices + + def get_blend_shape_target_deltas_with_vertex_id( + self, mesh_index: int, blend_shape_target_index: int + ) -> List[Tuple[int, Point3]]: + blend_shape = self.geometry_meshes[mesh_index].blend_shapes[ + blend_shape_target_index + ] + indices = list(blend_shape.deltas.keys()) + + deltas: List[Point3] = [] + for i in indices: + deltas.append(blend_shape.deltas[i]) + + if not deltas: + return [] + + return list(zip(indices, deltas)) + + def get_all_skin_weights_values_for_mesh( + self, mesh_index: int + ) -> List[List[float]]: + skin_weight_values = [] + mesh = self.geometry_meshes[mesh_index] + for i in range(len(mesh.topology.positions)): + skin_weight_values.append(mesh.skin_weights.values[i]) + + return skin_weight_values + + def get_skin_weight_matrix_for_mesh( + self, mesh_index: int + ) -> List[List[Tuple[int, float]]]: + vertex_position_count = len(self.geometry_meshes[mesh_index].topology.positions) + + joint_indices = self.get_all_skin_weights_joint_indices_for_mesh(mesh_index) + if len(joint_indices) != vertex_position_count: + raise DNAViewerError( + "Number of joint indices and vertex count don't match!" + ) + + skin_weight_values = self.get_all_skin_weights_values_for_mesh(mesh_index) + + if len(skin_weight_values) != vertex_position_count: + raise DNAViewerError( + "Number of skin weight values and vertex count don't match!" + ) + if len(joint_indices) != len(skin_weight_values): + raise DNAViewerError( + "Number of skin weight values and joint indices count don't match for vertex!" + ) + + weight_matrix = [] + for indices, values in zip(joint_indices, skin_weight_values): + if not indices: + raise DNAViewerError( + "JointIndexArray for vertex can't be less than one!" + ) + vertex_weights = [] + for joint_index, skin_weight_value in zip(indices, values): + vertex_weights.append((joint_index, skin_weight_value)) + weight_matrix.append(vertex_weights) + return weight_matrix + + def get_vertex_texture_coordinates_for_mesh(self, mesh_index: int) -> List[UV]: + return self.geometry_meshes[mesh_index].topology.texture_coordinates + + def get_vertex_positions_for_mesh_index(self, mesh_index: int) -> List[Point3]: + return self.geometry_meshes[mesh_index].topology.positions + + def get_vertex_layout_positions_for_mesh_index(self, mesh_index: int) -> List[int]: + return [ + item.position_index + for item in self.geometry_meshes[mesh_index].topology.layouts + ] + + def get_faces(self, mesh_index: int) -> List[List[int]]: + return self.geometry_meshes[mesh_index].topology.face_vertex_layouts + + def get_polygon_faces_and_connects( + self, + mesh_index: int = None, + dna_faces: List[List[int]] = None, + dna_vertex_layout_positions: List[int] = None, + ) -> Tuple[List[int], List[int]]: + if mesh_index is None: + if None in (dna_faces, dna_vertex_layout_positions): + raise DNAViewerError( + "get_polygon_faces_and_connects -> Must provide either mesh_index or dna_faces and dna_vertex_layout_positions" + ) + if dna_faces is None: + dna_faces = self.get_faces(mesh_index) + if dna_vertex_layout_positions is None: + dna_vertex_layout_positions = ( + self.get_vertex_layout_positions_for_mesh_index(mesh_index) + ) + + polygon_faces = [] + polygon_connects = [] + for vertices_layout_index_array in dna_faces: + polygon_faces.append(len(vertices_layout_index_array)) + for vertex_layout_index_array in vertices_layout_index_array: + polygon_connects.append( + dna_vertex_layout_positions[vertex_layout_index_array] + ) + + return polygon_faces, polygon_connects + + def get_layouts_for_mesh_index(self, mesh_index: int) -> List[Layout]: + return self.geometry_meshes[mesh_index].topology.layouts + + def get_texture_coordinate_index(self, mesh_index: int, layout_id: int) -> int: + return ( + self.geometry_meshes[mesh_index] + .topology.layouts[layout_id] + .texture_coordinate_index + ) + + def has_blend_shapes(self, mesh_index: int) -> bool: + return ( + len([bs.channel for bs in self.geometry_meshes[mesh_index].blend_shapes]) + > 0 + ) + + def get_lowest_lod_containing_meshes( + self, mesh_indices: List[int] + ) -> Optional[int]: + unique_mesh_indices = set(mesh_indices) + for lod in range(self.get_lod_count()): + if any(list(unique_mesh_indices & set(self.get_mesh_indices_for_lod(lod)))): + return lod + return None + + def get_meshes_by_lods(self, mesh_indices: List[int]) -> List[List[int]]: + result_list = [] + for lod in range(self.get_lod_count()): + temp = list(set(mesh_indices) & set(self.get_mesh_indices_for_lod(lod))) + result_list.append(temp) + return result_list + + def get_all_meshes_grouped_by_lod(self) -> List[List[int]]: + """ + Gets the list of list of mesh indices grouped by the lod number. + + @type dna: DNA + @param dna: Instance of DNA. + + @rtype: List[List[int]] + @returns: The list of list of mesh indices grouped by the lod number + """ + + result: List[List[int]] = [] + + for lod in range(self.get_lod_count()): + mesh_indices = [] + for mesh_index in self.get_mesh_indices_for_lod(lod): + mesh_indices.append(mesh_index) + result.append(mesh_indices) + + return result + + def get_blend_shapes(self, mesh_index: int) -> List[BlendShape]: + return self.geometry_meshes[mesh_index].blend_shapes + + def get_mesh_id_from_mesh_name(self, mesh_name: str) -> Optional[int]: + return self.meshes_mapping.get(mesh_name, None) diff --git a/scripts/dnalib/geometry.py b/scripts/dnalib/geometry.py new file mode 100644 index 0000000..803d1ed --- /dev/null +++ b/scripts/dnalib/geometry.py @@ -0,0 +1,283 @@ +from typing import Dict, List, Optional, Tuple, cast + +from dna import BinaryStreamReader as DNAReader + +from ..model import UV, BlendShape, Layout, Mesh, Point3, SkinWeightsData, Topology +from .definition import Definition +from .layer import Layer + + +class Geometry(Definition): + def __init__(self, reader: DNAReader, layers: Optional[List[Layer]]) -> None: + super().__init__(reader, layers) + self.geometry_meshes: List[Mesh] = [] + self.geometry_read = False + + def start_read(self) -> None: + super().start_read() + self.geometry_read = False + + def is_read(self) -> bool: + return super().is_read() and self.geometry_read + + def read(self) -> None: + """ + Starts reading in the mesh from the geometry part of the DNA + """ + super().read() + + if not self.geometry_read and self.layer_enabled(Layer.geometry): + self.geometry_read = True + self.geometry_meshes = [] + for lod in range(self.get_lod_count()): + for mesh_index in self.get_mesh_indices_for_lod(lod): + self.geometry_meshes.append(self.add_mesh(mesh_index)) + + def get_maximum_influence_per_vertex(self, mesh_index: int) -> int: + return cast(int, self.reader.getMaximumInfluencePerVertex(meshIndex=mesh_index)) + + def get_vertex_position_count(self, mesh_index: int) -> int: + return cast(int, self.reader.getVertexPositionCount(mesh_index)) + + def get_skin_weights_values( + self, mesh_index: int, vertex_index: int + ) -> List[float]: + return cast( + List[float], + self.reader.getSkinWeightsValues( + meshIndex=mesh_index, vertexIndex=vertex_index + ), + ) + + def get_skin_weights_joint_indices( + self, mesh_index: int, vertex_index: int + ) -> List[int]: + return cast( + List[int], + self.reader.getSkinWeightsJointIndices( + meshIndex=mesh_index, vertexIndex=vertex_index + ), + ) + + def get_vertex_texture_coordinate_count(self, mesh_index: int) -> int: + return cast( + int, self.reader.getVertexTextureCoordinateCount(meshIndex=mesh_index) + ) + + def get_vertex_texture_coordinate( + self, mesh_index: int, texture_coordinate_index: int + ) -> Tuple[float, float]: + return cast( + Tuple[float, float], + self.reader.getVertexTextureCoordinate( + meshIndex=mesh_index, textureCoordinateIndex=texture_coordinate_index + ), + ) + + def get_face_count(self, mesh_index: int) -> int: + return cast(int, self.reader.getFaceCount(meshIndex=mesh_index)) + + def get_face_vertex_layout_indices( + self, mesh_index: int, face_index: int + ) -> List[int]: + return cast( + List[int], + self.reader.getFaceVertexLayoutIndices( + meshIndex=mesh_index, faceIndex=face_index + ), + ) + + def get_vertex_layout( + self, mesh_index: int, layout_index: int + ) -> Tuple[int, int, int]: + return cast( + Tuple[int, int, int], + self.reader.getVertexLayout(meshIndex=mesh_index, layoutIndex=layout_index), + ) + + def get_vertex_layout_count(self, mesh_index: int) -> int: + return cast(int, self.reader.getVertexLayoutCount(meshIndex=mesh_index)) + + def get_vertex_position( + self, mesh_index: int, vertex_index: int + ) -> Tuple[float, float, float]: + return cast( + Tuple[float, float, float], + self.reader.getVertexPosition( + meshIndex=mesh_index, vertexIndex=vertex_index + ), + ) + + def get_blend_shape_target_vertex_indices( + self, mesh_index: int, blend_shape_target_index: int + ) -> List[int]: + return cast( + List[int], + self.reader.getBlendShapeTargetVertexIndices( + meshIndex=mesh_index, blendShapeTargetIndex=blend_shape_target_index + ), + ) + + def get_blend_shape_target_delta_count( + self, mesh_index: int, blend_shape_target_index: int + ) -> int: + return cast( + int, + self.reader.getBlendShapeTargetDeltaCount( + meshIndex=mesh_index, blendShapeTargetIndex=blend_shape_target_index + ), + ) + + def get_blend_shape_target_delta( + self, mesh_index: int, blend_shape_target_index: int, delta_index: int + ) -> Tuple[int, int, int]: + return cast( + Tuple[int, int, int], + self.reader.getBlendShapeTargetDelta( + meshIndex=mesh_index, + blendShapeTargetIndex=blend_shape_target_index, + deltaIndex=delta_index, + ), + ) + + def get_blend_shape_target_count(self, mesh_index: int) -> int: + return cast(int, self.reader.getBlendShapeTargetCount(meshIndex=mesh_index)) + + def get_blend_shape_channel_index( + self, mesh_index: int, blend_shape_target_index: int + ) -> int: + return cast( + int, + self.reader.getBlendShapeChannelIndex( + meshIndex=mesh_index, blendShapeTargetIndex=blend_shape_target_index + ), + ) + + def add_mesh(self, mesh_index: int) -> Mesh: + mesh = Mesh() + mesh.name = self.get_mesh_name(mesh_index) + mesh.topology = self.add_mesh_topology(mesh_index) + mesh.skin_weights = self.add_mesh_skin_weights(mesh_index) + mesh.blend_shapes = self.add_mesh_blend_shapes(mesh_index) + return mesh + + def add_mesh_skin_weights(self, mesh_index: int) -> SkinWeightsData: + """Reads in the skin weights""" + skin_weights = SkinWeightsData() + for vertex_index in range(self.get_vertex_position_count(mesh_index)): + skin_weights.values.append( + self.get_skin_weights_values(mesh_index, vertex_index) + ) + skin_weights.joint_indices.append( + self.get_skin_weights_joint_indices(mesh_index, vertex_index) + ) + + return skin_weights + + def add_mesh_topology(self, mesh_index: int) -> Topology: + """Reads in the positions, texture coordinates, normals, layouts and face vertex layouts""" + topology = Topology() + topology.positions = self.add_positions(mesh_index) + topology.texture_coordinates = self.add_texture_coordinates(mesh_index) + topology.layouts = self.add_layouts(mesh_index) + topology.face_vertex_layouts = self.add_face_vertex_layouts(mesh_index) + return topology + + def add_face_vertex_layouts(self, mesh_index: int) -> List[List[int]]: + """Reads in the face vertex layouts""" + face_vertex_layouts = [] + + for face_index in range(self.get_face_count(mesh_index)): + face_vertex_layouts.append( + self.get_face_vertex_layout_indices(mesh_index, face_index) + ) + + return face_vertex_layouts + + def add_layouts(self, mesh_index: int) -> List[Layout]: + """Reads in the vertex layouts""" + layouts = [] + + for layout_index in range(self.get_vertex_layout_count(mesh_index)): + ( + position_id, + texture_coordinate_id, + _, + ) = self.get_vertex_layout(mesh_index, layout_index) + layouts.append( + Layout( + position_index=position_id, + texture_coordinate_index=texture_coordinate_id, + ) + ) + return layouts + + def add_texture_coordinates(self, mesh_index: int) -> List[UV]: + """Reads in the texture coordinates""" + texture_coordinates = [] + for texture_coordinate_index in range( + self.get_vertex_texture_coordinate_count(mesh_index) + ): + u, v = self.get_vertex_texture_coordinate( + mesh_index, texture_coordinate_index + ) + texture_coordinates.append(UV(u=u, v=v)) + return texture_coordinates + + def add_positions(self, mesh_index: int) -> List[Point3]: + """Reads in the vertex positions""" + + positions = [] + for vertex_index in range(self.get_vertex_position_count(mesh_index)): + x, y, z = self.get_vertex_position(mesh_index, vertex_index) + positions.append(Point3(x=x, y=y, z=z)) + return positions + + def read_target_deltas( + self, mesh_index: int, blend_shape_target_index: int + ) -> Dict[int, Point3]: + """ + Reads in the target deltas + + @rtype: Dict[int, Point3] + @returns: Mapping of vertex indices to positions + """ + + result: Dict[int, Point3] = {} + + vertices = self.get_blend_shape_target_vertex_indices( + mesh_index, blend_shape_target_index + ) + + blend_shape_target_delta_count = self.get_blend_shape_target_delta_count( + mesh_index, blend_shape_target_index + ) + for delta_index in range(blend_shape_target_delta_count): + x, y, z = self.get_blend_shape_target_delta( + mesh_index, blend_shape_target_index, delta_index + ) + result[vertices[delta_index]] = Point3(x=x, y=y, z=z) + return result + + def add_mesh_blend_shapes(self, mesh_index: int) -> List[BlendShape]: + """ + Reads in the blend shapes + + @type mesh_index: int + @param mesh_index: The mesh index + """ + + blend_shape_target_count = self.get_blend_shape_target_count(mesh_index) + blend_shapes = [] + for blend_shape_target_index in range(blend_shape_target_count): + blend_shapes.append( + BlendShape( + channel=self.get_blend_shape_channel_index( + mesh_index, blend_shape_target_index + ), + deltas=self.read_target_deltas( + mesh_index, blend_shape_target_index + ), + ) + ) + return blend_shapes diff --git a/scripts/dnalib/layer.py b/scripts/dnalib/layer.py new file mode 100644 index 0000000..1e9c641 --- /dev/null +++ b/scripts/dnalib/layer.py @@ -0,0 +1,9 @@ +from enum import Enum + + +class Layer(Enum): + descriptor = 1 + definition = 2 + behavior = 3 + geometry = 4 + all = 5 diff --git a/scripts/ui/Qt.py b/scripts/ui/Qt.py new file mode 100644 index 0000000..29200b6 --- /dev/null +++ b/scripts/ui/Qt.py @@ -0,0 +1,2156 @@ +"""Minimal Python 2 & 3 shim around all Qt bindings + +DOCUMENTATION + Qt.py was born in the film and visual effects industry to address + the growing need for the development of software capable of running + with more than one flavour of the Qt bindings for Python. + + Supported Binding: PySide, PySide2, PySide6, PyQt4, PyQt5 + + 1. Build for one, run with all + 2. Explicit is better than implicit + 3. Support co-existence + + Default resolution order: + - PySide6 + - PySide2 + - PyQt5 + - PySide + - PyQt4 + + Usage: + >> import sys + >> from Qt import QtWidgets + >> app = QtWidgets.QApplication(sys.argv) + >> button = QtWidgets.QPushButton("Hello World") + >> button.show() + >> app.exec_() + + All members of PySide2 are mapped from other bindings, should they exist. + If no equivalent member exist, it is excluded from Qt.py and inaccessible. + The idea is to highlight members that exist across all supported binding, + and guarantee that code that runs on one binding runs on all others. + + For more details, visit https://github.com/mottosso/Qt.py + +LICENSE + + See end of file for license (MIT, BSD) information. + +""" + +import os +import sys +import types +import shutil +import importlib +import json +import maya.OpenMayaUI as omui + + +__version__ = "1.4.1" + +# Enable support for `from Qt import *` +__all__ = [] + +# Flags from environment variables +QT_VERBOSE = bool(os.getenv("QT_VERBOSE")) +QT_PREFERRED_BINDING_JSON = os.getenv("QT_PREFERRED_BINDING_JSON", "") +QT_PREFERRED_BINDING = os.getenv("QT_PREFERRED_BINDING", "") +QT_SIP_API_HINT = os.getenv("QT_SIP_API_HINT") + +# Reference to Qt.py +Qt = sys.modules[__name__] +Qt.QtCompat = types.ModuleType("QtCompat") + +try: + long +except NameError: + # Python 3 compatibility + long = int + + +"""Common members of all bindings + +This is where each member of Qt.py is explicitly defined. +It is based on a "lowest common denominator" of all bindings; +including members found in each of the 4 bindings. + +The "_common_members" dictionary is generated using the +build_membership.sh script. + +""" + +_common_members = { + "QtCore": [ + "QAbstractAnimation", + "QAbstractEventDispatcher", + "QAbstractItemModel", + "QAbstractListModel", + "QAbstractTableModel", + "QAnimationGroup", + "QBasicTimer", + "QBitArray", + "QBuffer", + "QByteArray", + "QByteArrayMatcher", + "QChildEvent", + "QCoreApplication", + "QCryptographicHash", + "QDataStream", + "QDate", + "QDateTime", + "QDir", + "QDirIterator", + "QDynamicPropertyChangeEvent", + "QEasingCurve", + "QElapsedTimer", + "QEvent", + "QEventLoop", + "QFile", + "QFileInfo", + "QFileSystemWatcher", + "QGenericArgument", + "QGenericReturnArgument", + "QIODevice", + "QLibraryInfo", + "QLine", + "QLineF", + "QLocale", + "QMargins", + "QMetaClassInfo", + "QMetaEnum", + "QMetaMethod", + "QMetaObject", + "QMetaProperty", + "QMimeData", + "QModelIndex", + "QMutex", + "QMutexLocker", + "QObject", + "QParallelAnimationGroup", + "QPauseAnimation", + "QPersistentModelIndex", + "QPluginLoader", + "QPoint", + "QPointF", + "QProcess", + "QProcessEnvironment", + "QPropertyAnimation", + "QReadLocker", + "QReadWriteLock", + "QRect", + "QRectF", + "QResource", + "QRunnable", + "QSemaphore", + "QSequentialAnimationGroup", + "QSettings", + "QSignalMapper", + "QSize", + "QSizeF", + "QSocketNotifier", + "QSysInfo", + "QSystemSemaphore", + "QT_TRANSLATE_NOOP", + "QT_TR_NOOP", + "QT_TR_NOOP_UTF8", + "QTemporaryFile", + "QTextBoundaryFinder", + "QTextStream", + "QTextStreamManipulator", + "QThread", + "QThreadPool", + "QTime", + "QTimeLine", + "QTimer", + "QTimerEvent", + "QTranslator", + "QUrl", + "QVariantAnimation", + "QWaitCondition", + "QWriteLocker", + "QXmlStreamAttribute", + "QXmlStreamAttributes", + "QXmlStreamEntityDeclaration", + "QXmlStreamEntityResolver", + "QXmlStreamNamespaceDeclaration", + "QXmlStreamNotationDeclaration", + "QXmlStreamReader", + "QXmlStreamWriter", + "Qt", + "QtMsgType", + "qAbs", + "qAddPostRoutine", + "qCritical", + "qDebug", + "qFatal", + "qFuzzyCompare", + "qIsFinite", + "qIsInf", + "qIsNaN", + "qIsNull", + "qRegisterResourceData", + "qUnregisterResourceData", + "qVersion", + "qWarning", + ], + "QtGui": [ + "QAbstractTextDocumentLayout", + "QActionEvent", + "QBitmap", + "QBrush", + "QClipboard", + "QCloseEvent", + "QColor", + "QConicalGradient", + "QContextMenuEvent", + "QCursor", + "QDesktopServices", + "QDoubleValidator", + "QDrag", + "QDragEnterEvent", + "QDragLeaveEvent", + "QDragMoveEvent", + "QDropEvent", + "QFileOpenEvent", + "QFocusEvent", + "QFont", + "QFontDatabase", + "QFontInfo", + "QFontMetrics", + "QFontMetricsF", + "QGradient", + "QHelpEvent", + "QHideEvent", + "QHoverEvent", + "QIcon", + "QIconDragEvent", + "QIconEngine", + "QImage", + "QImageIOHandler", + "QImageReader", + "QImageWriter", + "QInputEvent", + "QInputMethodEvent", + "QIntValidator", + "QKeyEvent", + "QKeySequence", + "QLinearGradient", + "QMatrix2x2", + "QMatrix2x3", + "QMatrix2x4", + "QMatrix3x2", + "QMatrix3x3", + "QMatrix3x4", + "QMatrix4x2", + "QMatrix4x3", + "QMatrix4x4", + "QMouseEvent", + "QMoveEvent", + "QMovie", + "QPaintDevice", + "QPaintEngine", + "QPaintEngineState", + "QPaintEvent", + "QPainter", + "QPainterPath", + "QPainterPathStroker", + "QPalette", + "QPen", + "QPicture", + "QPixmap", + "QPixmapCache", + "QPolygon", + "QPolygonF", + "QQuaternion", + "QRadialGradient", + "QRegion", + "QResizeEvent", + "QSessionManager", + "QShortcutEvent", + "QShowEvent", + "QStandardItem", + "QStandardItemModel", + "QStatusTipEvent", + "QSyntaxHighlighter", + "QTabletEvent", + "QTextBlock", + "QTextBlockFormat", + "QTextBlockGroup", + "QTextBlockUserData", + "QTextCharFormat", + "QTextCursor", + "QTextDocument", + "QTextDocumentFragment", + "QTextFormat", + "QTextFragment", + "QTextFrame", + "QTextFrameFormat", + "QTextImageFormat", + "QTextInlineObject", + "QTextItem", + "QTextLayout", + "QTextLength", + "QTextLine", + "QTextList", + "QTextListFormat", + "QTextObject", + "QTextObjectInterface", + "QTextOption", + "QTextTable", + "QTextTableCell", + "QTextTableCellFormat", + "QTextTableFormat", + "QTouchEvent", + "QTransform", + "QValidator", + "QVector2D", + "QVector3D", + "QVector4D", + "QWhatsThisClickedEvent", + "QWheelEvent", + "QWindowStateChangeEvent", + "qAlpha", + "qBlue", + "qGray", + "qGreen", + "qIsGray", + "qRed", + "qRgb", + "qRgba" + ], + "QtHelp": [ + "QHelpContentItem", + "QHelpContentModel", + "QHelpContentWidget", + "QHelpEngine", + "QHelpEngineCore", + "QHelpIndexModel", + "QHelpIndexWidget", + "QHelpSearchEngine", + "QHelpSearchQuery", + "QHelpSearchQueryWidget", + "QHelpSearchResultWidget" + ], + "QtNetwork": [ + "QAbstractNetworkCache", + "QAbstractSocket", + "QAuthenticator", + "QHostAddress", + "QHostInfo", + "QLocalServer", + "QLocalSocket", + "QNetworkAccessManager", + "QNetworkAddressEntry", + "QNetworkCacheMetaData", + "QNetworkCookie", + "QNetworkCookieJar", + "QNetworkDiskCache", + "QNetworkInterface", + "QNetworkProxy", + "QNetworkProxyFactory", + "QNetworkProxyQuery", + "QNetworkReply", + "QNetworkRequest", + "QSsl", + "QTcpServer", + "QTcpSocket", + "QUdpSocket" + ], + "QtPrintSupport": [ + "QAbstractPrintDialog", + "QPageSetupDialog", + "QPrintDialog", + "QPrintEngine", + "QPrintPreviewDialog", + "QPrintPreviewWidget", + "QPrinter", + "QPrinterInfo" + ], + "QtSvg": [ + "QSvgGenerator", + "QSvgRenderer" + ], + "QtTest": [ + "QTest" + ], + "QtWidgets": [ + "QAbstractButton", + "QAbstractGraphicsShapeItem", + "QAbstractItemDelegate", + "QAbstractItemView", + "QAbstractScrollArea", + "QAbstractSlider", + "QAbstractSpinBox", + "QAction", + "QApplication", + "QBoxLayout", + "QButtonGroup", + "QCalendarWidget", + "QCheckBox", + "QColorDialog", + "QColumnView", + "QComboBox", + "QCommandLinkButton", + "QCommonStyle", + "QCompleter", + "QDataWidgetMapper", + "QDateEdit", + "QDateTimeEdit", + "QDial", + "QDialog", + "QDialogButtonBox", + "QDockWidget", + "QDoubleSpinBox", + "QErrorMessage", + "QFileDialog", + "QFileIconProvider", + "QFileSystemModel", + "QFocusFrame", + "QFontComboBox", + "QFontDialog", + "QFormLayout", + "QFrame", + "QGesture", + "QGestureEvent", + "QGestureRecognizer", + "QGraphicsAnchor", + "QGraphicsAnchorLayout", + "QGraphicsBlurEffect", + "QGraphicsColorizeEffect", + "QGraphicsDropShadowEffect", + "QGraphicsEffect", + "QGraphicsEllipseItem", + "QGraphicsGridLayout", + "QGraphicsItem", + "QGraphicsItemGroup", + "QGraphicsLayout", + "QGraphicsLayoutItem", + "QGraphicsLineItem", + "QGraphicsLinearLayout", + "QGraphicsObject", + "QGraphicsOpacityEffect", + "QGraphicsPathItem", + "QGraphicsPixmapItem", + "QGraphicsPolygonItem", + "QGraphicsProxyWidget", + "QGraphicsRectItem", + "QGraphicsRotation", + "QGraphicsScale", + "QGraphicsScene", + "QGraphicsSceneContextMenuEvent", + "QGraphicsSceneDragDropEvent", + "QGraphicsSceneEvent", + "QGraphicsSceneHelpEvent", + "QGraphicsSceneHoverEvent", + "QGraphicsSceneMouseEvent", + "QGraphicsSceneMoveEvent", + "QGraphicsSceneResizeEvent", + "QGraphicsSceneWheelEvent", + "QGraphicsSimpleTextItem", + "QGraphicsTextItem", + "QGraphicsTransform", + "QGraphicsView", + "QGraphicsWidget", + "QGridLayout", + "QGroupBox", + "QHBoxLayout", + "QHeaderView", + "QInputDialog", + "QItemDelegate", + "QItemEditorCreatorBase", + "QItemEditorFactory", + "QLCDNumber", + "QLabel", + "QLayout", + "QLayoutItem", + "QLineEdit", + "QListView", + "QListWidget", + "QListWidgetItem", + "QMainWindow", + "QMdiArea", + "QMdiSubWindow", + "QMenu", + "QMenuBar", + "QMessageBox", + "QPanGesture", + "QPinchGesture", + "QPlainTextDocumentLayout", + "QPlainTextEdit", + "QProgressBar", + "QProgressDialog", + "QPushButton", + "QRadioButton", + "QRubberBand", + "QScrollArea", + "QScrollBar", + "QSizeGrip", + "QSizePolicy", + "QSlider", + "QSpacerItem", + "QSpinBox", + "QSplashScreen", + "QSplitter", + "QSplitterHandle", + "QStackedLayout", + "QStackedWidget", + "QStatusBar", + "QStyle", + "QStyleFactory", + "QStyleHintReturn", + "QStyleHintReturnMask", + "QStyleHintReturnVariant", + "QStyleOption", + "QStyleOptionButton", + "QStyleOptionComboBox", + "QStyleOptionComplex", + "QStyleOptionDockWidget", + "QStyleOptionFocusRect", + "QStyleOptionFrame", + "QStyleOptionGraphicsItem", + "QStyleOptionGroupBox", + "QStyleOptionHeader", + "QStyleOptionMenuItem", + "QStyleOptionProgressBar", + "QStyleOptionRubberBand", + "QStyleOptionSizeGrip", + "QStyleOptionSlider", + "QStyleOptionSpinBox", + "QStyleOptionTab", + "QStyleOptionTabBarBase", + "QStyleOptionTabWidgetFrame", + "QStyleOptionTitleBar", + "QStyleOptionToolBar", + "QStyleOptionToolBox", + "QStyleOptionToolButton", + "QStyleOptionViewItem", + "QStylePainter", + "QStyledItemDelegate", + "QSwipeGesture", + "QSystemTrayIcon", + "QTabBar", + "QTabWidget", + "QTableView", + "QTableWidget", + "QTableWidgetItem", + "QTableWidgetSelectionRange", + "QTapAndHoldGesture", + "QTapGesture", + "QTextBrowser", + "QTextEdit", + "QTimeEdit", + "QToolBar", + "QToolBox", + "QToolButton", + "QToolTip", + "QTreeView", + "QTreeWidget", + "QTreeWidgetItem", + "QTreeWidgetItemIterator", + "QUndoView", + "QVBoxLayout", + "QWhatsThis", + "QWidget", + "QWidgetAction", + "QWidgetItem", + "QWizard", + "QWizardPage" + ], + "QtXml": [ + "QDomAttr", + "QDomCDATASection", + "QDomCharacterData", + "QDomComment", + "QDomDocument", + "QDomDocumentFragment", + "QDomDocumentType", + "QDomElement", + "QDomEntity", + "QDomEntityReference", + "QDomImplementation", + "QDomNamedNodeMap", + "QDomNode", + "QDomNodeList", + "QDomNotation", + "QDomProcessingInstruction", + "QDomText" + ] +} + +""" Missing members + +This mapping describes members that have been deprecated +in one or more bindings and have been left out of the +_common_members mapping. + +The member can provide an extra details string to be +included in exceptions and warnings. +""" + +_missing_members = { + "QtGui": { + "QMatrix": "Deprecated in PyQt5", + }, +} + + +def _qInstallMessageHandler(handler): + """Install a message handler that works in all bindings + + Args: + handler: A function that takes 3 arguments, or None + """ + def messageOutputHandler(*args): + # In Qt4 bindings, message handlers are passed 2 arguments + # In Qt5 bindings, message handlers are passed 3 arguments + # The first argument is a QtMsgType + # The last argument is the message to be printed + # The Middle argument (if passed) is a QMessageLogContext + if len(args) == 3: + msgType, logContext, msg = args + elif len(args) == 2: + msgType, msg = args + logContext = None + else: + raise TypeError( + "handler expected 2 or 3 arguments, got {0}".format(len(args))) + + if isinstance(msg, bytes): + # In python 3, some bindings pass a bytestring, which cannot be + # used elsewhere. Decoding a python 2 or 3 bytestring object will + # consistently return a unicode object. + msg = msg.decode() + + handler(msgType, logContext, msg) + + passObject = messageOutputHandler if handler else handler + if Qt.IsPySide or Qt.IsPyQt4: + return Qt._QtCore.qInstallMsgHandler(passObject) + elif Qt.IsPySide2 or Qt.IsPyQt5 or Qt.IsPySide6: + return Qt._QtCore.qInstallMessageHandler(passObject) + + +def _getcpppointer(object): + if hasattr(Qt, "_shiboken6"): + return getattr(Qt, "_shiboken6").getCppPointer(object)[0] + elif hasattr(Qt, "_shiboken2"): + return getattr(Qt, "_shiboken2").getCppPointer(object)[0] + elif hasattr(Qt, "_shiboken"): + return getattr(Qt, "_shiboken").getCppPointer(object)[0] + elif hasattr(Qt, "_sip"): + return getattr(Qt, "_sip").unwrapinstance(object) + raise AttributeError("'module' has no attribute 'getCppPointer'") + + +def _wrapinstance(ptr, base=None): + """Enable implicit cast of pointer to most suitable class + + This behaviour is available in sip per default. + + Based on http://nathanhorne.com/pyqtpyside-wrap-instance + + Usage: + This mechanism kicks in under these circumstances. + 1. Qt.py is using PySide 1 or 2. + 2. A `base` argument is not provided. + + See :func:`QtCompat.wrapInstance()` + + Arguments: + ptr (long): Pointer to QObject in memory + base (QObject, optional): Base class to wrap with. Defaults to QObject, + which should handle anything. + + """ + + assert isinstance(ptr, long), "Argument 'ptr' must be of type " + assert (base is None) or issubclass(base, Qt.QtCore.QObject), ( + "Argument 'base' must be of type ") + + if Qt.IsPyQt4 or Qt.IsPyQt5: + func = getattr(Qt, "_sip").wrapinstance + elif Qt.IsPySide2: + func = getattr(Qt, "_shiboken2").wrapInstance + elif Qt.IsPySide6: + func = getattr(Qt, "_shiboken6").wrapInstance + elif Qt.IsPySide: + func = getattr(Qt, "_shiboken").wrapInstance + else: + raise AttributeError("'module' has no attribute 'wrapInstance'") + + if base is None: + if Qt.IsPyQt4 or Qt.IsPyQt5: + base = Qt.QtCore.QObject + else: + q_object = func(long(ptr), Qt.QtCore.QObject) + meta_object = q_object.metaObject() + + while True: + class_name = meta_object.className() + + try: + base = getattr(Qt.QtWidgets, class_name) + except AttributeError: + try: + base = getattr(Qt.QtCore, class_name) + except AttributeError: + meta_object = meta_object.superClass() + continue + + break + + return func(long(ptr), base) + + +def _isvalid(object): + """Check if the object is valid to use in Python runtime. + + Usage: + See :func:`QtCompat.isValid()` + + Arguments: + object (QObject): QObject to check the validity of. + + """ + if hasattr(Qt, "_shiboken6"): + return getattr(Qt, "_shiboken6").isValid(object) + + elif hasattr(Qt, "_shiboken2"): + return getattr(Qt, "_shiboken2").isValid(object) + + elif hasattr(Qt, "_shiboken"): + return getattr(Qt, "_shiboken").isValid(object) + + elif hasattr(Qt, "_sip"): + return not getattr(Qt, "_sip").isdeleted(object) + + else: + raise AttributeError("'module' has no attribute isValid") + + +def _translate(context, sourceText, *args): + # In Qt4 bindings, translate can be passed 2 or 3 arguments + # In Qt5 bindings, translate can be passed 2 arguments + # The first argument is disambiguation[str] + # The last argument is n[int] + # The middle argument can be encoding[QtCore.QCoreApplication.Encoding] + try: + app = Qt.QtCore.QCoreApplication + except AttributeError: + raise NotImplementedError( + "Missing QCoreApplication implementation for {}".format( + Qt.__binding__ + ) + ) + + def get_arg(index): + try: + return args[index] + except IndexError: + pass + + n = -1 + encoding = None + + if len(args) == 3: + disambiguation, encoding, n = args + else: + disambiguation = get_arg(0) + n_or_encoding = get_arg(1) + + if isinstance(n_or_encoding, int): + n = n_or_encoding + else: + encoding = n_or_encoding + + if Qt.__binding__ in ("PySide2", "PySide6","PyQt5"): + sanitized_args = [context, sourceText, disambiguation, n] + else: + sanitized_args = [ + context, + sourceText, + disambiguation, + encoding or app.CodecForTr, + n, + ] + + return app.translate(*sanitized_args) + + +def _loadUi(uifile, baseinstance=None): + """Dynamically load a user interface from the given `uifile` + + This function calls `uic.loadUi` if using PyQt bindings, + else it implements a comparable binding for PySide. + + Documentation: + http://pyqt.sourceforge.net/Docs/PyQt5/designer.html#PyQt5.uic.loadUi + + Arguments: + uifile (str): Absolute path to Qt Designer file. + baseinstance (QWidget): Instantiated QWidget or subclass thereof + + Return: + baseinstance if `baseinstance` is not `None`. Otherwise + return the newly created instance of the user interface. + + """ + if hasattr(Qt, "_uic"): + return Qt._uic.loadUi(uifile, baseinstance) + + elif hasattr(Qt, "_QtUiTools"): + # Implement `PyQt5.uic.loadUi` for PySide(2) + + class _UiLoader(Qt._QtUiTools.QUiLoader): + """Create the user interface in a base instance. + + Unlike `Qt._QtUiTools.QUiLoader` itself this class does not + create a new instance of the top-level widget, but creates the user + interface in an existing instance of the top-level class if needed. + + This mimics the behaviour of `PyQt5.uic.loadUi`. + + """ + + def __init__(self, baseinstance): + super(_UiLoader, self).__init__(baseinstance) + self.baseinstance = baseinstance + self.custom_widgets = {} + + def _loadCustomWidgets(self, etree): + """ + Workaround to pyside-77 bug. + + From QUiLoader doc we should use registerCustomWidget method. + But this causes a segfault on some platforms. + + Instead we fetch from customwidgets DOM node the python class + objects. Then we can directly use them in createWidget method. + """ + + def headerToModule(header): + """ + Translate a header file to python module path + foo/bar.h => foo.bar + """ + # Remove header extension + module = os.path.splitext(header)[0] + + # Replace os separator by python module separator + return module.replace("/", ".").replace("\\", ".") + + custom_widgets = etree.find("customwidgets") + + if custom_widgets is None: + return + + for custom_widget in custom_widgets: + class_name = custom_widget.find("class").text + header = custom_widget.find("header").text + + try: + # try to import the module using the header as defined by the user + module = importlib.import_module(header) + except ImportError: + # try again, but use the customized conversion of a path to a module + module = importlib.import_module(headerToModule(header)) + + self.custom_widgets[class_name] = getattr(module, + class_name) + + def load(self, uifile, *args, **kwargs): + from xml.etree.ElementTree import ElementTree + + # For whatever reason, if this doesn't happen then + # reading an invalid or non-existing .ui file throws + # a RuntimeError. + etree = ElementTree() + etree.parse(uifile) + self._loadCustomWidgets(etree) + + widget = Qt._QtUiTools.QUiLoader.load( + self, uifile, *args, **kwargs) + + # Workaround for PySide 1.0.9, see issue #208 + widget.parentWidget() + + return widget + + def createWidget(self, class_name, parent=None, name=""): + """Called for each widget defined in ui file + + Overridden here to populate `baseinstance` instead. + + """ + + if parent is None and self.baseinstance: + # Supposed to create the top-level widget, + # return the base instance instead + return self.baseinstance + + # For some reason, Line is not in the list of available + # widgets, but works fine, so we have to special case it here. + if class_name in self.availableWidgets() + ["Line"]: + # Create a new widget for child widgets + widget = Qt._QtUiTools.QUiLoader.createWidget(self, + class_name, + parent, + name) + elif class_name in self.custom_widgets: + widget = self.custom_widgets[class_name](parent=parent) + else: + raise Exception("Custom widget '%s' not supported" + % class_name) + + if self.baseinstance: + # Set an attribute for the new child widget on the base + # instance, just like PyQt5.uic.loadUi does. + setattr(self.baseinstance, name, widget) + + return widget + + widget = _UiLoader(baseinstance).load(uifile) + Qt.QtCore.QMetaObject.connectSlotsByName(widget) + + return widget + + else: + raise NotImplementedError("No implementation available for loadUi") + + +"""Misplaced members + +These members from the original submodule are misplaced relative PySide2 + +NOTE: For bindings where a member is not replaced, they still + need to be added such that they are added to Qt.py + +""" +_misplaced_members = { + "PySide6": { + "QtGui.QUndoCommand": "QtWidgets.QUndoCommand", + "QtGui.QUndoGroup": "QtWidgets.QUndoGroup", + "QtGui.QUndoStack": "QtWidgets.QUndoStack", + "QtGui.QActionGroup": "QtWidgets.QActionGroup", + "QtCore.QStringListModel": "QtCore.QStringListModel", + "QtCore.Property": "QtCore.Property", + "QtCore.Signal": "QtCore.Signal", + "QtCore.Slot": "QtCore.Slot", + "QtCore.QAbstractProxyModel": "QtCore.QAbstractProxyModel", + "QtCore.QSortFilterProxyModel": "QtCore.QSortFilterProxyModel", + "QtCore.QItemSelection": "QtCore.QItemSelection", + "QtCore.QItemSelectionModel": "QtCore.QItemSelectionModel", + "QtCore.QItemSelectionRange": "QtCore.QItemSelectionRange", + "QtCore.QRegularExpression": "QtCore.QRegExp", + "QtStateMachine.QStateMachine": "QtCore.QStateMachine", + "QtStateMachine.QState": "QtCore.QState", + "QtGui.QRegularExpressionValidator": "QtGui.QRegExpValidator", + "QtGui.QShortcut": "QtWidgets.QShortcut", + "QtGui.QAction": "QtWidgets.QAction", + "QtUiTools.QUiLoader": ["QtCompat.loadUi", _loadUi], + "shiboken6.wrapInstance": ["QtCompat.wrapInstance", _wrapinstance], + "shiboken6.getCppPointer": ["QtCompat.getCppPointer", _getcpppointer], + "shiboken6.isValid": ["QtCompat.isValid", _isvalid], + "QtWidgets.qApp": "QtWidgets.QApplication.instance()", + "QtCore.QCoreApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtWidgets.QApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtCore.qInstallMessageHandler": [ + "QtCompat.qInstallMessageHandler", _qInstallMessageHandler + ], + "QtWidgets.QStyleOptionViewItem": "QtCompat.QStyleOptionViewItemV4", + }, + "PySide2": { + "QtWidgets.QUndoCommand": "QtWidgets.QUndoCommand", + "QtWidgets.QUndoGroup": "QtWidgets.QUndoGroup", + "QtWidgets.QUndoStack": "QtWidgets.QUndoStack", + "QtWidgets.QActionGroup": "QtWidgets.QActionGroup", + "QtCore.QStringListModel": "QtCore.QStringListModel", + + # Older versions of PySide2 still left this in QtGui, this accounts for those too + "QtGui.QStringListModel": "QtCore.QStringListModel", + + "QtCore.Property": "QtCore.Property", + "QtCore.Signal": "QtCore.Signal", + "QtCore.Slot": "QtCore.Slot", + "QtCore.QRegExp": "QtCore.QRegExp", + "QtWidgets.QShortcut": "QtWidgets.QShortcut", + "QtGui.QRegExpValidator": "QtGui.QRegExpValidator", + "QtCore.QAbstractProxyModel": "QtCore.QAbstractProxyModel", + "QtCore.QSortFilterProxyModel": "QtCore.QSortFilterProxyModel", + "QtCore.QItemSelection": "QtCore.QItemSelection", + "QtCore.QItemSelectionModel": "QtCore.QItemSelectionModel", + "QtCore.QItemSelectionRange": "QtCore.QItemSelectionRange", + "QtUiTools.QUiLoader": ["QtCompat.loadUi", _loadUi], + "shiboken2.wrapInstance": ["QtCompat.wrapInstance", _wrapinstance], + "shiboken2.getCppPointer": ["QtCompat.getCppPointer", _getcpppointer], + "shiboken2.isValid": ["QtCompat.isValid", _isvalid], + "QtWidgets.qApp": "QtWidgets.QApplication.instance()", + "QtCore.QCoreApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtWidgets.QApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtCore.qInstallMessageHandler": [ + "QtCompat.qInstallMessageHandler", _qInstallMessageHandler + ], + "QtWidgets.QStyleOptionViewItem": "QtCompat.QStyleOptionViewItemV4", + }, + "PyQt5": { + "QtWidgets.QUndoCommand": "QtWidgets.QUndoCommand", + "QtWidgets.QUndoGroup": "QtWidgets.QUndoGroup", + "QtWidgets.QUndoStack": "QtWidgets.QUndoStack", + "QtWidgets.QActionGroup": "QtWidgets.QActionGroup", + "QtCore.pyqtProperty": "QtCore.Property", + "QtCore.pyqtSignal": "QtCore.Signal", + "QtCore.pyqtSlot": "QtCore.Slot", + "QtCore.QAbstractProxyModel": "QtCore.QAbstractProxyModel", + "QtCore.QSortFilterProxyModel": "QtCore.QSortFilterProxyModel", + "QtCore.QStringListModel": "QtCore.QStringListModel", + "QtCore.QItemSelection": "QtCore.QItemSelection", + "QtCore.QItemSelectionModel": "QtCore.QItemSelectionModel", + "QtCore.QItemSelectionRange": "QtCore.QItemSelectionRange", + "uic.loadUi": ["QtCompat.loadUi", _loadUi], + "sip.wrapinstance": ["QtCompat.wrapInstance", _wrapinstance], + "sip.unwrapinstance": ["QtCompat.getCppPointer", _getcpppointer], + "sip.isdeleted": ["QtCompat.isValid", _isvalid], + "QtWidgets.qApp": "QtWidgets.QApplication.instance()", + "QtGui.QRegExpValidator": "QtGui.QRegExpValidator", + "QtCore.QRegExp": "QtCore.QRegExp", + "QtCore.QCoreApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtWidgets.QApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtCore.qInstallMessageHandler": [ + "QtCompat.qInstallMessageHandler", _qInstallMessageHandler + ], + "QtWidgets.QShortcut": "QtWidgets.QShortcut", + "QtWidgets.QStyleOptionViewItem": "QtCompat.QStyleOptionViewItemV4", + }, + "PySide": { + "QtGui.QUndoCommand": "QtWidgets.QUndoCommand", + "QtGui.QUndoGroup": "QtWidgets.QUndoGroup", + "QtGui.QUndoStack": "QtWidgets.QUndoStack", + "QtGui.QActionGroup": "QtWidgets.QActionGroup", + "QtCore.Property": "QtCore.Property", + "QtCore.Signal": "QtCore.Signal", + "QtCore.Slot": "QtCore.Slot", + "QtGui.QAbstractProxyModel": "QtCore.QAbstractProxyModel", + "QtGui.QSortFilterProxyModel": "QtCore.QSortFilterProxyModel", + "QtGui.QStringListModel": "QtCore.QStringListModel", + "QtGui.QItemSelection": "QtCore.QItemSelection", + "QtGui.QItemSelectionModel": "QtCore.QItemSelectionModel", + "QtGui.QItemSelectionRange": "QtCore.QItemSelectionRange", + "QtGui.QAbstractPrintDialog": "QtPrintSupport.QAbstractPrintDialog", + "QtGui.QRegExpValidator": "QtGui.QRegExpValidator", + "QtGui.QPageSetupDialog": "QtPrintSupport.QPageSetupDialog", + "QtGui.QPrintDialog": "QtPrintSupport.QPrintDialog", + "QtGui.QPrintEngine": "QtPrintSupport.QPrintEngine", + "QtGui.QPrintPreviewDialog": "QtPrintSupport.QPrintPreviewDialog", + "QtGui.QPrintPreviewWidget": "QtPrintSupport.QPrintPreviewWidget", + "QtGui.QPrinter": "QtPrintSupport.QPrinter", + "QtWidgets.QShortcut": "QtWidgets.QShortcut", + "QtGui.QPrinterInfo": "QtPrintSupport.QPrinterInfo", + "QtUiTools.QUiLoader": ["QtCompat.loadUi", _loadUi], + "shiboken.wrapInstance": ["QtCompat.wrapInstance", _wrapinstance], + "shiboken.unwrapInstance": ["QtCompat.getCppPointer", _getcpppointer], + "shiboken.isValid": ["QtCompat.isValid", _isvalid], + "QtGui.qApp": "QtWidgets.QApplication.instance()", + "QtCore.QRegExp": "QtCore.QRegExp", + "QtCore.QCoreApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtGui.QApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtCore.qInstallMsgHandler": [ + "QtCompat.qInstallMessageHandler", _qInstallMessageHandler + ], + "QtGui.QStyleOptionViewItemV4": "QtCompat.QStyleOptionViewItemV4", + }, + "PyQt4": { + "QtGui.QUndoCommand": "QtWidgets.QUndoCommand", + "QtGui.QUndoGroup": "QtWidgets.QUndoGroup", + "QtGui.QUndoStack": "QtWidgets.QUndoStack", + "QtGui.QActionGroup": "QtWidgets.QActionGroup", + "QtGui.QAbstractProxyModel": "QtCore.QAbstractProxyModel", + "QtGui.QSortFilterProxyModel": "QtCore.QSortFilterProxyModel", + "QtGui.QItemSelection": "QtCore.QItemSelection", + "QtGui.QStringListModel": "QtCore.QStringListModel", + "QtGui.QItemSelectionModel": "QtCore.QItemSelectionModel", + "QtCore.pyqtProperty": "QtCore.Property", + "QtCore.pyqtSignal": "QtCore.Signal", + "QtCore.pyqtSlot": "QtCore.Slot", + "QtGui.QItemSelectionRange": "QtCore.QItemSelectionRange", + "QtGui.QAbstractPrintDialog": "QtPrintSupport.QAbstractPrintDialog", + "QtGui.QRegExpValidator": "QtGui.QRegExpValidator", + "QtGui.QPageSetupDialog": "QtPrintSupport.QPageSetupDialog", + "QtGui.QPrintDialog": "QtPrintSupport.QPrintDialog", + "QtGui.QPrintEngine": "QtPrintSupport.QPrintEngine", + "QtWidgets.QShortcut": "QtWidgets.QShortcut", + "QtGui.QPrintPreviewDialog": "QtPrintSupport.QPrintPreviewDialog", + "QtGui.QPrintPreviewWidget": "QtPrintSupport.QPrintPreviewWidget", + "QtGui.QPrinter": "QtPrintSupport.QPrinter", + "QtGui.QPrinterInfo": "QtPrintSupport.QPrinterInfo", + "uic.loadUi": ["QtCompat.loadUi", _loadUi], + "sip.wrapinstance": ["QtCompat.wrapInstance", _wrapinstance], + "sip.unwrapinstance": ["QtCompat.getCppPointer", _getcpppointer], + "sip.isdeleted": ["QtCompat.isValid", _isvalid], + "QtCore.QString": "str", + "QtGui.qApp": "QtWidgets.QApplication.instance()", + "QtCore.QRegExp": "QtCore.QRegExp", + "QtCore.QCoreApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtGui.QApplication.translate": [ + "QtCompat.translate", _translate + ], + "QtCore.qInstallMsgHandler": [ + "QtCompat.qInstallMessageHandler", _qInstallMessageHandler + ], + "QtGui.QStyleOptionViewItemV4": "QtCompat.QStyleOptionViewItemV4", + } +} + +""" Compatibility Members + +This dictionary is used to build Qt.QtCompat objects that provide a consistent +interface for obsolete members, and differences in binding return values. + +{ + "binding": { + "classname": { + "targetname": "binding_namespace", + } + } +} +""" +_compatibility_members = { + "PySide6": { + "QWidget": { + "grab": "QtWidgets.QWidget.grab", + }, + "QHeaderView": { + "sectionsClickable": "QtWidgets.QHeaderView.sectionsClickable", + "setSectionsClickable": + "QtWidgets.QHeaderView.setSectionsClickable", + "sectionResizeMode": "QtWidgets.QHeaderView.sectionResizeMode", + "setSectionResizeMode": + "QtWidgets.QHeaderView.setSectionResizeMode", + "sectionsMovable": "QtWidgets.QHeaderView.sectionsMovable", + "setSectionsMovable": "QtWidgets.QHeaderView.setSectionsMovable", + }, + "QFileDialog": { + "getOpenFileName": "QtWidgets.QFileDialog.getOpenFileName", + "getOpenFileNames": "QtWidgets.QFileDialog.getOpenFileNames", + "getSaveFileName": "QtWidgets.QFileDialog.getSaveFileName", + }, + "QFont":{ + "setWeight": "QtGui.QFont.setWeight", + }, + "Qt": { + "MidButton": "QtCore.Qt.MiddleButton", + }, + }, + "PySide2": { + "QWidget": { + "grab": "QtWidgets.QWidget.grab", + }, + "QHeaderView": { + "sectionsClickable": "QtWidgets.QHeaderView.sectionsClickable", + "setSectionsClickable": + "QtWidgets.QHeaderView.setSectionsClickable", + "sectionResizeMode": "QtWidgets.QHeaderView.sectionResizeMode", + "setSectionResizeMode": + "QtWidgets.QHeaderView.setSectionResizeMode", + "sectionsMovable": "QtWidgets.QHeaderView.sectionsMovable", + "setSectionsMovable": "QtWidgets.QHeaderView.setSectionsMovable", + }, + "QFileDialog": { + "getOpenFileName": "QtWidgets.QFileDialog.getOpenFileName", + "getOpenFileNames": "QtWidgets.QFileDialog.getOpenFileNames", + "getSaveFileName": "QtWidgets.QFileDialog.getSaveFileName", + }, + "QFont":{ + "setWeight": "QtGui.QFont.setWeight", + }, + "Qt": { + "MidButton": "QtCore.Qt.MiddleButton", + }, + }, + "PyQt5": { + "QWidget": { + "grab": "QtWidgets.QWidget.grab", + }, + "QHeaderView": { + "sectionsClickable": "QtWidgets.QHeaderView.sectionsClickable", + "setSectionsClickable": + "QtWidgets.QHeaderView.setSectionsClickable", + "sectionResizeMode": "QtWidgets.QHeaderView.sectionResizeMode", + "setSectionResizeMode": + "QtWidgets.QHeaderView.setSectionResizeMode", + "sectionsMovable": "QtWidgets.QHeaderView.sectionsMovable", + "setSectionsMovable": "QtWidgets.QHeaderView.setSectionsMovable", + }, + "QFileDialog": { + "getOpenFileName": "QtWidgets.QFileDialog.getOpenFileName", + "getOpenFileNames": "QtWidgets.QFileDialog.getOpenFileNames", + "getSaveFileName": "QtWidgets.QFileDialog.getSaveFileName", + }, + "QFont":{ + "setWeight": "QtGui.QFont.setWeight", + }, + "Qt": { + "MidButton": "QtCore.Qt.MiddleButton", + }, + }, + "PySide": { + "QWidget": { + "grab": "QtWidgets.QPixmap.grabWidget", + }, + "QHeaderView": { + "sectionsClickable": "QtWidgets.QHeaderView.isClickable", + "setSectionsClickable": "QtWidgets.QHeaderView.setClickable", + "sectionResizeMode": "QtWidgets.QHeaderView.resizeMode", + "setSectionResizeMode": "QtWidgets.QHeaderView.setResizeMode", + "sectionsMovable": "QtWidgets.QHeaderView.isMovable", + "setSectionsMovable": "QtWidgets.QHeaderView.setMovable", + }, + "QFileDialog": { + "getOpenFileName": "QtWidgets.QFileDialog.getOpenFileName", + "getOpenFileNames": "QtWidgets.QFileDialog.getOpenFileNames", + "getSaveFileName": "QtWidgets.QFileDialog.getSaveFileName", + }, + "QFont":{ + "setWeight": "QtGui.QFont.setWeight", + }, + "Qt": { + "MidButton": "QtCore.Qt.MiddleButton", + }, + }, + "PyQt4": { + "QWidget": { + "grab": "QtWidgets.QPixmap.grabWidget", + }, + "QHeaderView": { + "sectionsClickable": "QtWidgets.QHeaderView.isClickable", + "setSectionsClickable": "QtWidgets.QHeaderView.setClickable", + "sectionResizeMode": "QtWidgets.QHeaderView.resizeMode", + "setSectionResizeMode": "QtWidgets.QHeaderView.setResizeMode", + "sectionsMovable": "QtWidgets.QHeaderView.isMovable", + "setSectionsMovable": "QtWidgets.QHeaderView.setMovable", + }, + "QFileDialog": { + "getOpenFileName": "QtWidgets.QFileDialog.getOpenFileName", + "getOpenFileNames": "QtWidgets.QFileDialog.getOpenFileNames", + "getSaveFileName": "QtWidgets.QFileDialog.getSaveFileName", + }, + "QFont":{ + "setWeight": "QtGui.QFont.setWeight", + }, + "Qt": { + "MidButton": "QtCore.Qt.MiddleButton", + }, + }, +} + + +def _apply_site_config(): + try: + import QtSiteConfig + except ImportError: + # If no QtSiteConfig module found, no modifications + # to _common_members are needed. + pass + else: + # Provide the ability to modify the dicts used to build Qt.py + if hasattr(QtSiteConfig, 'update_members'): + QtSiteConfig.update_members(_common_members) + + if hasattr(QtSiteConfig, 'update_misplaced_members'): + QtSiteConfig.update_misplaced_members(members=_misplaced_members) + + if hasattr(QtSiteConfig, 'update_compatibility_members'): + QtSiteConfig.update_compatibility_members( + members=_compatibility_members) + + +def _new_module(name): + return types.ModuleType(__name__ + "." + name) + + +def _import_sub_module(module, name): + """import_sub_module will mimic the function of importlib.import_module""" + module = __import__(module.__name__ + "." + name) + for level in name.split("."): + module = getattr(module, level) + return module + + +def _setup(module, extras): + """Install common submodules""" + + Qt.__binding__ = module.__name__ + + def _warn_import_error(exc, module): + msg = str(exc) + if "No module named" in msg: + return + _warn("ImportError(%s): %s" % (module, msg)) + + for name in list(_common_members) + extras: + try: + submodule = _import_sub_module( + module, name) + except ImportError as e: + try: + # For extra modules like sip and shiboken that may not be + # children of the binding. + submodule = __import__(name) + except ImportError as e2: + _warn_import_error(e, name) + _warn_import_error(e2, name) + continue + + setattr(Qt, "_" + name, submodule) + + if name not in extras: + # Store reference to original binding, + # but don't store speciality modules + # such as uic or QtUiTools + setattr(Qt, name, _new_module(name)) + + +def _reassign_misplaced_members(binding): + """Apply misplaced members from `binding` to Qt.py + + Arguments: + binding (dict): Misplaced members + + """ + + + for src, dst in _misplaced_members[binding].items(): + dst_value = None + + src_parts = src.split(".") + src_module = src_parts[0] + src_member = None + if len(src_parts) > 1: + src_member = src_parts[1:] + + if isinstance(dst, (list, tuple)): + dst, dst_value = dst + + dst_parts = dst.split(".") + dst_module = dst_parts[0] + dst_member = None + if len(dst_parts) > 1: + dst_member = dst_parts[1] + + + # Get the member we want to store in the namesapce. + if not dst_value: + try: + _part = getattr(Qt, "_" + src_module) + while src_member: + member = src_member.pop(0) + _part = getattr(_part, member) + dst_value = _part + except AttributeError: + # If the member we want to store in the namespace does not + # exist, there is no need to continue. This can happen if a + # request was made to rename a member that didn't exist, for + # example if QtWidgets isn't available on the target platform. + _log("Misplaced member has no source: {0}".format(src)) + continue + + try: + src_object = getattr(Qt, dst_module) + except AttributeError: + if dst_module not in _common_members: + # Only create the Qt parent module if its listed in + # _common_members. Without this check, if you remove QtCore + # from _common_members, the default _misplaced_members will add + # Qt.QtCore so it can add Signal, Slot, etc. + msg = 'Not creating missing member module "{m}" for "{c}"' + _log(msg.format(m=dst_module, c=dst_member)) + continue + # If the dst is valid but the Qt parent module does not exist + # then go ahead and create a new module to contain the member. + setattr(Qt, dst_module, _new_module(dst_module)) + src_object = getattr(Qt, dst_module) + # Enable direct import of the new module + sys.modules[__name__ + "." + dst_module] = src_object + + if not dst_value: + dst_value = getattr(Qt, "_" + src_module) + if src_member: + dst_value = getattr(dst_value, src_member) + + setattr( + src_object, + dst_member or dst_module, + dst_value + ) + + +def _build_compatibility_members(binding, decorators=None): + """Apply `binding` to QtCompat + + Arguments: + binding (str): Top level binding in _compatibility_members. + decorators (dict, optional): Provides the ability to decorate the + original Qt methods when needed by a binding. This can be used + to change the returned value to a standard value. The key should + be the classname, the value is a dict where the keys are the + target method names, and the values are the decorator functions. + + """ + + decorators = decorators or dict() + + # Allow optional site-level customization of the compatibility members. + # This method does not need to be implemented in QtSiteConfig. + try: + import QtSiteConfig + except ImportError: + pass + else: + if hasattr(QtSiteConfig, 'update_compatibility_decorators'): + QtSiteConfig.update_compatibility_decorators(binding, decorators) + + _QtCompat = type("QtCompat", (object,), {}) + + for classname, bindings in _compatibility_members[binding].items(): + attrs = {} + for target, binding in bindings.items(): + namespaces = binding.split('.') + try: + src_object = getattr(Qt, "_" + namespaces[0]) + except AttributeError as e: + _log("QtCompat: AttributeError: %s" % e) + # Skip reassignment of non-existing members. + # This can happen if a request was made to + # rename a member that didn't exist, for example + # if QtWidgets isn't available on the target platform. + continue + + # Walk down any remaining namespace getting the object assuming + # that if the first namespace exists the rest will exist. + for namespace in namespaces[1:]: + src_object = getattr(src_object, namespace) + + # decorate the Qt method if a decorator was provided. + if target in decorators.get(classname, []): + # staticmethod must be called on the decorated method to + # prevent a TypeError being raised when the decorated method + # is called. + src_object = staticmethod( + decorators[classname][target](src_object)) + + attrs[target] = src_object + + # Create the QtCompat class and install it into the namespace + compat_class = type(classname, (_QtCompat,), attrs) + setattr(Qt.QtCompat, classname, compat_class) + + +def _pyside6(): + """Initialise PySide6 + + These functions serve to test the existence of a binding + along with set it up in such a way that it aligns with + the final step; adding members from the original binding + to Qt.py + + """ + + import PySide6 as module + extras = ["QtUiTools"] + try: + import shiboken6 + extras.append("shiboken6") + except ImportError as e: + print("ImportError: %s" % e) + + _setup(module, extras) + Qt.__binding_version__ = module.__version__ + + if hasattr(Qt, "_shiboken6"): + Qt.QtCompat.wrapInstance = _wrapinstance + Qt.QtCompat.getCppPointer = _getcpppointer + Qt.QtCompat.delete = shiboken6.delete + + if hasattr(Qt, "_QtUiTools"): + Qt.QtCompat.loadUi = _loadUi + + if hasattr(Qt, "_QtCore"): + Qt.__qt_version__ = Qt._QtCore.qVersion() + Qt.QtCompat.dataChanged = ( + lambda self, topleft, bottomright, roles=None: + self.dataChanged.emit(topleft, bottomright, roles or []) + ) + + if hasattr(Qt, "_QtWidgets"): + Qt.QtCompat.setSectionResizeMode = \ + Qt._QtWidgets.QHeaderView.setSectionResizeMode + + def setWeight(func): + def wrapper(self, weight): + weight = { + 100: Qt._QtGui.QFont.Thin, + 200: Qt._QtGui.QFont.ExtraLight, + 300: Qt._QtGui.QFont.Light, + 400: Qt._QtGui.QFont.Normal, + 500: Qt._QtGui.QFont.Medium, + 600: Qt._QtGui.QFont.DemiBold, + 700: Qt._QtGui.QFont.Bold, + 800: Qt._QtGui.QFont.ExtraBold, + 900: Qt._QtGui.QFont.Black, + }.get(weight, Qt._QtGui.QFont.Normal) + + return func(self, weight) + + wrapper.__doc__ = func.__doc__ + wrapper.__name__ = func.__name__ + + return wrapper + + + decorators = { + "QFont": { + "setWeight": setWeight, + } + } + + _reassign_misplaced_members("PySide6") + _build_compatibility_members("PySide6", decorators) + + +def _pyside2(): + """Initialise PySide2 + + These functions serve to test the existence of a binding + along with set it up in such a way that it aligns with + the final step; adding members from the original binding + to Qt.py + + """ + + import PySide2 as module + extras = ["QtUiTools"] + try: + try: + # Before merge of PySide and shiboken + import shiboken2 + except ImportError: + # After merge of PySide and shiboken, May 2017 + from PySide2 import shiboken2 + extras.append("shiboken2") + except ImportError: + pass + + _setup(module, extras) + Qt.__binding_version__ = module.__version__ + + if hasattr(Qt, "_shiboken2"): + Qt.QtCompat.wrapInstance = _wrapinstance + Qt.QtCompat.getCppPointer = _getcpppointer + Qt.QtCompat.delete = shiboken2.delete + + if hasattr(Qt, "_QtUiTools"): + Qt.QtCompat.loadUi = _loadUi + + if hasattr(Qt, "_QtCore"): + Qt.__qt_version__ = Qt._QtCore.qVersion() + Qt.QtCompat.dataChanged = ( + lambda self, topleft, bottomright, roles=None: + self.dataChanged.emit(topleft, bottomright, roles or []) + ) + + if hasattr(Qt, "_QtWidgets"): + Qt.QtCompat.setSectionResizeMode = \ + Qt._QtWidgets.QHeaderView.setSectionResizeMode + + _reassign_misplaced_members("PySide2") + _build_compatibility_members("PySide2") + + +def _pyside(): + """Initialise PySide""" + + import PySide as module + extras = ["QtUiTools"] + try: + try: + # Before merge of PySide and shiboken + import shiboken + except ImportError: + # After merge of PySide and shiboken, May 2017 + from PySide import shiboken + extras.append("shiboken") + except ImportError: + pass + + _setup(module, extras) + Qt.__binding_version__ = module.__version__ + + if hasattr(Qt, "_shiboken"): + Qt.QtCompat.wrapInstance = _wrapinstance + Qt.QtCompat.getCppPointer = _getcpppointer + Qt.QtCompat.delete = shiboken.delete + + if hasattr(Qt, "_QtUiTools"): + Qt.QtCompat.loadUi = _loadUi + + if hasattr(Qt, "_QtGui"): + setattr(Qt, "QtWidgets", _new_module("QtWidgets")) + setattr(Qt, "_QtWidgets", Qt._QtGui) + if hasattr(Qt._QtGui, "QX11Info"): + setattr(Qt, "QtX11Extras", _new_module("QtX11Extras")) + Qt.QtX11Extras.QX11Info = Qt._QtGui.QX11Info + + Qt.QtCompat.setSectionResizeMode = Qt._QtGui.QHeaderView.setResizeMode + + if hasattr(Qt, "_QtCore"): + Qt.__qt_version__ = Qt._QtCore.qVersion() + Qt.QtCompat.dataChanged = ( + lambda self, topleft, bottomright, roles=None: + self.dataChanged.emit(topleft, bottomright) + ) + + _reassign_misplaced_members("PySide") + _build_compatibility_members("PySide") + + +def _pyqt5(): + """Initialise PyQt5""" + + import PyQt5 as module + extras = ["uic"] + + try: + # Relevant to PyQt5 5.11 and above + from PyQt5 import sip + extras += ["sip"] + except ImportError: + + try: + import sip + extras += ["sip"] + except ImportError: + sip = None + + _setup(module, extras) + if hasattr(Qt, "_sip"): + Qt.QtCompat.wrapInstance = _wrapinstance + Qt.QtCompat.getCppPointer = _getcpppointer + Qt.QtCompat.delete = sip.delete + + if hasattr(Qt, "_uic"): + Qt.QtCompat.loadUi = _loadUi + + if hasattr(Qt, "_QtCore"): + Qt.__binding_version__ = Qt._QtCore.PYQT_VERSION_STR + Qt.__qt_version__ = Qt._QtCore.QT_VERSION_STR + Qt.QtCompat.dataChanged = ( + lambda self, topleft, bottomright, roles=None: + self.dataChanged.emit(topleft, bottomright, roles or []) + ) + + if hasattr(Qt, "_QtWidgets"): + Qt.QtCompat.setSectionResizeMode = \ + Qt._QtWidgets.QHeaderView.setSectionResizeMode + + _reassign_misplaced_members("PyQt5") + _build_compatibility_members('PyQt5') + + +def _pyqt4(): + """Initialise PyQt4""" + + import sip + + # Validation of envivornment variable. Prevents an error if + # the variable is invalid since it's just a hint. + try: + hint = int(QT_SIP_API_HINT) + except TypeError: + hint = None # Variable was None, i.e. not set. + except ValueError: + raise ImportError("QT_SIP_API_HINT=%s must be a 1 or 2") + + for api in ("QString", + "QVariant", + "QDate", + "QDateTime", + "QTextStream", + "QTime", + "QUrl"): + try: + sip.setapi(api, hint or 2) + except AttributeError: + raise ImportError("PyQt4 < 4.6 isn't supported by Qt.py") + except ValueError: + actual = sip.getapi(api) + if not hint: + raise ImportError("API version already set to %d" % actual) + else: + # Having provided a hint indicates a soft constraint, one + # that doesn't throw an exception. + sys.stderr.write( + "Warning: API '%s' has already been set to %d.\n" + % (api, actual) + ) + + import PyQt4 as module + extras = ["uic"] + try: + import sip + extras.append(sip.__name__) + except ImportError: + sip = None + + _setup(module, extras) + if hasattr(Qt, "_sip"): + Qt.QtCompat.wrapInstance = _wrapinstance + Qt.QtCompat.getCppPointer = _getcpppointer + Qt.QtCompat.delete = sip.delete + + if hasattr(Qt, "_uic"): + Qt.QtCompat.loadUi = _loadUi + + if hasattr(Qt, "_QtGui"): + setattr(Qt, "QtWidgets", _new_module("QtWidgets")) + setattr(Qt, "_QtWidgets", Qt._QtGui) + if hasattr(Qt._QtGui, "QX11Info"): + setattr(Qt, "QtX11Extras", _new_module("QtX11Extras")) + Qt.QtX11Extras.QX11Info = Qt._QtGui.QX11Info + + Qt.QtCompat.setSectionResizeMode = \ + Qt._QtGui.QHeaderView.setResizeMode + + if hasattr(Qt, "_QtCore"): + Qt.__binding_version__ = Qt._QtCore.PYQT_VERSION_STR + Qt.__qt_version__ = Qt._QtCore.QT_VERSION_STR + Qt.QtCompat.dataChanged = ( + lambda self, topleft, bottomright, roles=None: + self.dataChanged.emit(topleft, bottomright) + ) + + _reassign_misplaced_members("PyQt4") + + # QFileDialog QtCompat decorator + def _standardizeQFileDialog(some_function): + """Decorator that makes PyQt4 return conform to other bindings""" + def wrapper(*args, **kwargs): + ret = (some_function(*args, **kwargs)) + + # PyQt4 only returns the selected filename, force it to a + # standard return of the selected filename, and a empty string + # for the selected filter + return ret, '' + + wrapper.__doc__ = some_function.__doc__ + wrapper.__name__ = some_function.__name__ + + return wrapper + + decorators = { + "QFileDialog": { + "getOpenFileName": _standardizeQFileDialog, + "getOpenFileNames": _standardizeQFileDialog, + "getSaveFileName": _standardizeQFileDialog, + } + } + _build_compatibility_members('PyQt4', decorators) + + +def _none(): + """Internal option (used in installer)""" + + Mock = type("Mock", (), {"__getattr__": lambda Qt, attr: None}) + + Qt.__binding__ = "None" + Qt.__qt_version__ = "0.0.0" + Qt.__binding_version__ = "0.0.0" + Qt.QtCompat.loadUi = lambda uifile, baseinstance=None: None + Qt.QtCompat.setSectionResizeMode = lambda *args, **kwargs: None + + for submodule in _common_members.keys(): + setattr(Qt, submodule, Mock()) + setattr(Qt, "_" + submodule, Mock()) + + +def _log(text): + if QT_VERBOSE: + sys.stdout.write("Qt.py [info]: %s\n" % text) + + +def _warn(text): + try: + sys.stderr.write("Qt.py [warning]: %s\n" % text) + except UnicodeDecodeError: + import locale + encoding = locale.getpreferredencoding() + sys.stderr.write("Qt.py [warning]: %s\n" % text.decode(encoding)) + + +def _convert(lines): + """Convert compiled .ui file from PySide2 to Qt.py + + Arguments: + lines (list): Each line of of .ui file + + Usage: + >> with open("myui.py") as f: + .. lines = _convert(f.readlines()) + + """ + + def parse(line): + line = line.replace("from PySide2 import", "from Qt import QtCompat,") + line = line.replace("QtWidgets.QApplication.translate", + "QtCompat.translate") + if "QtCore.SIGNAL" in line: + raise NotImplementedError("QtCore.SIGNAL is missing from PyQt5 " + "and so Qt.py does not support it: you " + "should avoid defining signals inside " + "your ui files.") + return line + + parsed = list() + for line in lines: + line = parse(line) + parsed.append(line) + + return parsed + + +def _cli(args): + """Qt.py command-line interface""" + import argparse + + parser = argparse.ArgumentParser() + parser.add_argument("--convert", + help="Path to compiled Python module, e.g. my_ui.py") + parser.add_argument("--compile", + help="Accept raw .ui file and compile with native " + "PySide2 compiler.") + parser.add_argument("--stdout", + help="Write to stdout instead of file", + action="store_true") + parser.add_argument("--stdin", + help="Read from stdin instead of file", + action="store_true") + + args = parser.parse_args(args) + + if args.stdout: + raise NotImplementedError("--stdout") + + if args.stdin: + raise NotImplementedError("--stdin") + + if args.compile: + raise NotImplementedError("--compile") + + if args.convert: + sys.stdout.write("#\n" + "# WARNING: --convert is an ALPHA feature.\n#\n" + "# See https://github.com/mottosso/Qt.py/pull/132\n" + "# for details.\n" + "#\n") + + # + # ------> Read + # + with open(args.convert) as f: + lines = _convert(f.readlines()) + + backup = "%s_backup%s" % os.path.splitext(args.convert) + sys.stdout.write("Creating \"%s\"..\n" % backup) + shutil.copy(args.convert, backup) + + # + # <------ Write + # + with open(args.convert, "w") as f: + f.write("".join(lines)) + + sys.stdout.write("Successfully converted \"%s\"\n" % args.convert) + + +class MissingMember(object): + """ + A placeholder type for a missing Qt object not + included in Qt.py + + Args: + name (str): The name of the missing type + details (str): An optional custom error message + """ + ERR_TMPL = ("{} is not a common object across PySide2 " + "and the other Qt bindings. It is not included " + "as a common member in the Qt.py layer") + + def __init__(self, name, details=''): + self.__name = name + self.__err = self.ERR_TMPL.format(name) + + if details: + self.__err = "{}: {}".format(self.__err, details) + + def __repr__(self): + return "<{}: {}>".format(self.__class__.__name__, self.__name) + + def __getattr__(self, name): + raise NotImplementedError(self.__err) + + def __call__(self, *a, **kw): + raise NotImplementedError(self.__err) + + +def _install(): + # Default order (customize order and content via QT_PREFERRED_BINDING) + default_order = ("PySide6", "PySide2", "PyQt5", "PySide", "PyQt4") + preferred_order = None + if QT_PREFERRED_BINDING_JSON: + # A per-vendor preferred binding customization was defined + # This should be a dictionary of the full Qt.py module namespace to + # apply binding settings to. The "default" key can be used to apply + # custom bindings to all modules not explicitly defined. If the json + # data is invalid this will raise a exception. + # Example: + # {"mylibrary.vendor.Qt": ["PySide2"], "default":["PyQt5","PyQt4"]} + try: + preferred_bindings = json.loads(QT_PREFERRED_BINDING_JSON) + except ValueError: + # Python 2 raises ValueError, Python 3 raises json.JSONDecodeError + # a subclass of ValueError + _warn("Failed to parse QT_PREFERRED_BINDING_JSON='%s'" + % QT_PREFERRED_BINDING_JSON) + _warn("Falling back to default preferred order") + else: + preferred_order = preferred_bindings.get(__name__) + # If no matching binding was used, optionally apply a default. + if preferred_order is None: + preferred_order = preferred_bindings.get("default", None) + if preferred_order is None: + # If a json preferred binding was not used use, respect the + # QT_PREFERRED_BINDING environment variable if defined. + preferred_order = list( + b for b in QT_PREFERRED_BINDING.split(os.pathsep) if b + ) + + order = preferred_order or default_order + + available = { + "PySide6": _pyside6, + "PySide2": _pyside2, + "PyQt5": _pyqt5, + "PySide": _pyside, + "PyQt4": _pyqt4, + "None": _none + } + + _log("Order: '%s'" % "', '".join(order)) + + # Allow site-level customization of the available modules. + _apply_site_config() + + found_binding = False + for name in order: + _log("Trying %s" % name) + + try: + available[name]() + found_binding = True + break + + except ImportError as e: + _log("ImportError: %s" % e) + + except KeyError: + _log("ImportError: Preferred binding '%s' not found." % name) + + if not found_binding: + # If not binding were found, throw this error + raise ImportError("No Qt binding were found.") + + # Install individual members + for name, members in _common_members.items(): + try: + their_submodule = getattr(Qt, "_%s" % name) + except AttributeError: + continue + + our_submodule = getattr(Qt, name) + + # Enable import * + __all__.append(name) + + # Enable direct import of submodule, + # e.g. import Qt.QtCore + sys.modules[__name__ + "." + name] = our_submodule + + for member in members: + # Accept that a submodule may miss certain members. + try: + their_member = getattr(their_submodule, member) + except AttributeError: + _log("'%s.%s' was missing." % (name, member)) + continue + + setattr(our_submodule, member, their_member) + + # Install missing member placeholders + for name, members in _missing_members.items(): + our_submodule = getattr(Qt, name) + + for member in members: + + # If the submodule already has this member installed, + # either by the common members, or the site config, + # then skip installing this one over it. + if hasattr(our_submodule, member): + continue + + placeholder = MissingMember("{}.{}".format(name, member), + details=members[member]) + setattr(our_submodule, member, placeholder) + + # Enable direct import of QtCompat + sys.modules[__name__ + ".QtCompat"] = Qt.QtCompat + + # Backwards compatibility + if hasattr(Qt.QtCompat, 'loadUi'): + Qt.QtCompat.load_ui = Qt.QtCompat.loadUi + + +_install() + +# Setup Binding Enum states +Qt.IsPySide6 = Qt.__binding__ == "PySide6" +Qt.IsPySide2 = Qt.__binding__ == 'PySide2' +Qt.IsPyQt5 = Qt.__binding__ == 'PyQt5' +Qt.IsPySide = Qt.__binding__ == 'PySide' +Qt.IsPyQt4 = Qt.__binding__ == 'PyQt4' + +"""Augment QtCompat + +QtCompat contains wrappers and added functionality +to the original bindings, such as the CLI interface +and otherwise incompatible members between bindings, +such as `QHeaderView.setSectionResizeMode`. + +""" + +Qt.QtCompat._cli = _cli +Qt.QtCompat._convert = _convert + +# Enable command-line interface +if __name__ == "__main__": + _cli(sys.argv[1:]) + + +# The MIT License (MIT) +# +# Copyright (c) 2016-2017 Marcus Ottosson +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# In PySide(2), loadUi does not exist, so we implement it +# +# `_UiLoader` is adapted from the qtpy project, which was further influenced +# by qt-helpers which was released under a 3-clause BSD license which in turn +# is based on a solution at: +# +# - https://gist.github.com/cpbotha/1b42a20c8f3eb9bb7cb8 +# +# The License for this code is as follows: +# +# qt-helpers - a common front-end to various Qt modules +# +# Copyright (c) 2015, Chris Beaumont and Thomas Robitaille +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the +# distribution. +# * Neither the name of the Glue project nor the names of its contributors +# may be used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Which itself was based on the solution at +# +# https://gist.github.com/cpbotha/1b42a20c8f3eb9bb7cb8 +# +# which was released under the MIT license: +# +# Copyright (c) 2011 Sebastian Wiesner +# Modifications by Charl Botha +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files +# (the "Software"),to deal in the Software without restriction, +# including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/scripts/ui/__init__.py b/scripts/ui/__init__.py new file mode 100644 index 0000000..3240337 --- /dev/null +++ b/scripts/ui/__init__.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from . import * \ No newline at end of file diff --git a/scripts/ui/behaviour.py b/scripts/ui/behaviour.py new file mode 100644 index 0000000..4c02206 --- /dev/null +++ b/scripts/ui/behaviour.py @@ -0,0 +1,233 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Behaviour UI Module for Plugin +行为系统UI模块 - 负责显示角色行为编辑界面和基础操作 +基本功能: +- Blendshape自动加载,刷新,筛选 +- 次级Blendshape自动加载,刷新,筛选 +- Blendshape批量导出和导入 +- Blendshape范围编辑 +- Blendshape镜像 +- Blendshape查找翻转目标 +- Blendshape重建 +- 表情控制器还原默认表情 +- 查找选择表情 +- 控制面板查找 +- 选择关联关节 +- 写入当前表情 +- 写入镜像表情 +""" + +#===================================== IMPORT MODULES ===================================== +from Qt import QtWidgets, QtCore, QtGui +from Qt.QtCompat import wrapInstance +from maya import OpenMayaUI as omui +import sys +import os + +#===================================== IMPORT FUNCTIONS =================================== +from scripts.utils import utils_behaviour as utils_behaviour +from scripts.ui import ui_utils + +#========================================== WIDGETS ========================================== +# 全局变量存储UI控件 +blendshape_tree = None +sub_blendshape_tree = None +blendshape_slider = None +blendshape_preview = None +behaviour_buttons = {} + +def widgets(): + """ + 创建行为系统UI控件 + """ + global blendshape_tree, sub_blendshape_tree, blendshape_slider, blendshape_preview, behaviour_buttons + + # 混合变形树形视图 + blendshape_tree = QtWidgets.QTreeWidget() + blendshape_tree.setHeaderLabels(["混合变形名称", "权重", "类型"]) + blendshape_tree.setMinimumHeight(200) + blendshape_tree.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + blendshape_tree.header().setSectionResizeMode(QtWidgets.QHeaderView.Stretch) # 列自动拉伸 + + # 次级混合变形树形视图 + sub_blendshape_tree = QtWidgets.QTreeWidget() + sub_blendshape_tree.setHeaderLabels(["次级混合变形", "权重", "目标"]) + sub_blendshape_tree.setMinimumHeight(150) + sub_blendshape_tree.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + sub_blendshape_tree.header().setSectionResizeMode(QtWidgets.QHeaderView.Stretch) # 列自动拉伸 + + # 混合变形滑块 + blendshape_slider = QtWidgets.QSlider(QtCore.Qt.Horizontal) + blendshape_slider.setMinimum(0) + blendshape_slider.setMaximum(100) + blendshape_slider.setValue(0) + blendshape_slider.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + + # 预览区域 + blendshape_preview = QtWidgets.QLabel("预览区域") + blendshape_preview.setAlignment(QtCore.Qt.AlignCenter) + blendshape_preview.setStyleSheet("background-color: #333333; color: white;") + blendshape_preview.setMinimumHeight(150) + blendshape_preview.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + # 功能按钮 - 设置统一的大小策略 + button_names = [ + "refresh_blendshapes", "refresh_sub_blendshapes", "export_blendshapes", "import_blendshapes", + "edit_range", "mirror_blendshape", "find_flip_target", "rebuild_blendshape", + "reset_controller", "find_expression", "find_control_panel", "select_related_joints", + "write_current_expression", "write_mirror_expression" + ] + + button_texts = { + "refresh_blendshapes": "刷新混合变形", + "refresh_sub_blendshapes": "刷新次级混合变形", + "export_blendshapes": "导出混合变形", + "import_blendshapes": "导入混合变形", + "edit_range": "范围编辑", + "mirror_blendshape": "混合变形镜像", + "find_flip_target": "查找翻转目标", + "rebuild_blendshape": "重建混合变形", + "reset_controller": "还原默认表情", + "find_expression": "查找选择表情", + "find_control_panel": "控制面板查找", + "select_related_joints": "选择关联关节", + "write_current_expression": "写入当前表情", + "write_mirror_expression": "写入镜像表情" + } + + for button_name in button_names: + behaviour_buttons[button_name] = QtWidgets.QPushButton(button_texts[button_name]) + behaviour_buttons[button_name].setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + behaviour_buttons[button_name].setMinimumWidth(120) + +#========================================== LAYOUTS ========================================== +def layouts(parent_tab=None): + """ + 创建行为系统UI布局 + + Args: + parent_tab: 父容器控件,由Main.py传入 + """ + # 获取父容器(在Main.py中创建的behaviour_tab) + if not parent_tab: + parent_tab = ui_utils.get_parent_widget("behaviour_tab") + if not parent_tab: + print("无法获取父容器,布局创建失败") + return + + # 创建主布局 + main_layout = parent_tab.layout() + if not main_layout: + main_layout = QtWidgets.QVBoxLayout(parent_tab) + main_layout.setContentsMargins(4, 4, 4, 4) + main_layout.setSpacing(4) + main_layout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint) # 设置布局约束为默认,允许自适应 + + # 创建主分割控件 + main_splitter = QtWidgets.QSplitter(QtCore.Qt.Horizontal) + + # 左侧区域 - 混合变形列表 + left_widget = QtWidgets.QWidget() + left_layout = QtWidgets.QVBoxLayout(left_widget) + left_layout.setContentsMargins(2, 2, 2, 2) + + # 混合变形列表区域 + blendshape_group = QtWidgets.QGroupBox("混合变形列表") + blendshape_layout = QtWidgets.QVBoxLayout(blendshape_group) + + # 添加刷新按钮 + refresh_layout = QtWidgets.QHBoxLayout() + refresh_layout.addWidget(behaviour_buttons["refresh_blendshapes"]) + refresh_layout.addWidget(behaviour_buttons["refresh_sub_blendshapes"]) + blendshape_layout.addLayout(refresh_layout) + + # 创建列表分割控件 + list_splitter = QtWidgets.QSplitter(QtCore.Qt.Vertical) + list_splitter.addWidget(blendshape_tree) + list_splitter.addWidget(sub_blendshape_tree) + blendshape_layout.addWidget(list_splitter) + + # 添加滑块 + slider_layout = QtWidgets.QHBoxLayout() + slider_layout.addWidget(QtWidgets.QLabel("权重:")) + slider_layout.addWidget(blendshape_slider) + slider_layout.addWidget(QtWidgets.QLabel("0")) + blendshape_layout.addLayout(slider_layout) + + left_layout.addWidget(blendshape_group) + + # 左侧按钮组 + left_buttons_layout = QtWidgets.QGridLayout() + left_buttons_layout.addWidget(behaviour_buttons["export_blendshapes"], 0, 0) + left_buttons_layout.addWidget(behaviour_buttons["import_blendshapes"], 0, 1) + left_buttons_layout.addWidget(behaviour_buttons["edit_range"], 1, 0) + left_buttons_layout.addWidget(behaviour_buttons["mirror_blendshape"], 1, 1) + left_buttons_layout.addWidget(behaviour_buttons["find_flip_target"], 2, 0) + left_buttons_layout.addWidget(behaviour_buttons["rebuild_blendshape"], 2, 1) + left_layout.addLayout(left_buttons_layout) + + # 右侧区域 - 预览和工具 + right_widget = QtWidgets.QWidget() + right_layout = QtWidgets.QVBoxLayout(right_widget) + right_layout.setContentsMargins(2, 2, 2, 2) + + # 预览区域 + preview_group = QtWidgets.QGroupBox("预览") + preview_layout = QtWidgets.QVBoxLayout(preview_group) + preview_layout.addWidget(blendshape_preview) + right_layout.addWidget(preview_group) + + # 右侧按钮组 + right_buttons_layout = QtWidgets.QGridLayout() + right_buttons_layout.addWidget(behaviour_buttons["reset_controller"], 0, 0) + right_buttons_layout.addWidget(behaviour_buttons["find_expression"], 0, 1) + right_buttons_layout.addWidget(behaviour_buttons["find_control_panel"], 1, 0) + right_buttons_layout.addWidget(behaviour_buttons["select_related_joints"], 1, 1) + right_buttons_layout.addWidget(behaviour_buttons["write_current_expression"], 2, 0) + right_buttons_layout.addWidget(behaviour_buttons["write_mirror_expression"], 2, 1) + right_layout.addLayout(right_buttons_layout) + + # 添加到主分割控件 + main_splitter.addWidget(left_widget) + main_splitter.addWidget(right_widget) + + # 设置分割比例 + main_splitter.setSizes([int(parent_tab.width() * 0.6), int(parent_tab.width() * 0.4)]) + + # 添加到主布局 + main_layout.addWidget(main_splitter) + +#========================================== CONNECTIONS ========================================== +def connections(): + """ + 连接行为系统UI信号和槽 + """ + # 连接按钮点击事件到占位函数 + behaviour_buttons["refresh_blendshapes"].clicked.connect(lambda: print("刷新混合变形功能待实现")) + behaviour_buttons["refresh_sub_blendshapes"].clicked.connect(lambda: print("刷新次级混合变形功能待实现")) + behaviour_buttons["export_blendshapes"].clicked.connect(lambda: print("导出混合变形功能待实现")) + behaviour_buttons["import_blendshapes"].clicked.connect(lambda: print("导入混合变形功能待实现")) + behaviour_buttons["edit_range"].clicked.connect(lambda: print("范围编辑功能待实现")) + behaviour_buttons["mirror_blendshape"].clicked.connect(lambda: print("混合变形镜像功能待实现")) + behaviour_buttons["find_flip_target"].clicked.connect(lambda: print("查找翻转目标功能待实现")) + behaviour_buttons["rebuild_blendshape"].clicked.connect(lambda: print("重建混合变形功能待实现")) + behaviour_buttons["reset_controller"].clicked.connect(lambda: print("还原默认表情功能待实现")) + behaviour_buttons["find_expression"].clicked.connect(lambda: print("查找选择表情功能待实现")) + behaviour_buttons["find_control_panel"].clicked.connect(lambda: print("控制面板查找功能待实现")) + behaviour_buttons["select_related_joints"].clicked.connect(lambda: print("选择关联关节功能待实现")) + behaviour_buttons["write_current_expression"].clicked.connect(lambda: print("写入当前表情功能待实现")) + behaviour_buttons["write_mirror_expression"].clicked.connect(lambda: print("写入镜像表情功能待实现")) + + # 连接树形视图选择事件 + blendshape_tree.itemSelectionChanged.connect(lambda: print("混合变形选择已更改")) + sub_blendshape_tree.itemSelectionChanged.connect(lambda: print("次级混合变形选择已更改")) + + # 连接滑块值变化事件 + blendshape_slider.valueChanged.connect(lambda value: print(f"混合变形权重已更改为: {value/100.0}")) + +#===================================== PLACEHOLDER FUNCTION =================================== +def behaviour_temp_function(): + return utils_behaviour.behaviour_temp_utils_function() \ No newline at end of file diff --git a/scripts/ui/definition.py b/scripts/ui/definition.py new file mode 100644 index 0000000..1950b12 --- /dev/null +++ b/scripts/ui/definition.py @@ -0,0 +1,197 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Definition UI Module for Plugin +定义系统UI模块 - 负责显示DNA定义编辑界面和基础操作 +基本功能: +- LOD, Meshes, Joints, Blendshape, AnimatedMap 加载和刷新 +- 写入: 写入关节默认位置,写入几何体,写入蒙皮,写入混合变形目标 +- 创建:创建混合变形,绑定蒙皮,取消蒙皮 +- 工具:重新定位头部关节,重新定位身体关节,重新定位全身关节,快速创建预设 +""" + +#===================================== IMPORT MODULES ===================================== +from Qt import QtWidgets, QtCore, QtGui +from Qt.QtCompat import wrapInstance +from maya import OpenMayaUI as omui +import sys +import os + +#===================================== IMPORT FUNCTIONS =================================== +from scripts.utils import utils_definition as utils_definition +from scripts.ui import ui_utils + +#========================================== WIDGETS ========================================== +# 全局变量存储UI控件 +definition_tabs = None +dna_elements = {} +definition_buttons = {} + +def widgets(): + """ + 创建定义系统UI控件 + """ + global definition_tabs, dna_elements, definition_buttons + + # 创建子标签页 + definition_tabs = QtWidgets.QTabWidget() + + # 创建各类元素列表 + dna_elements["lod_list"] = QtWidgets.QListWidget() + dna_elements["mesh_list"] = QtWidgets.QListWidget() + dna_elements["joint_list"] = QtWidgets.QListWidget() + dna_elements["blendshape_list"] = QtWidgets.QListWidget() + dna_elements["animmap_list"] = QtWidgets.QListWidget() + + # 创建元素信息面板 + dna_elements["element_info"] = QtWidgets.QTextEdit() + dna_elements["element_info"].setReadOnly(True) + + # 功能按钮 + definition_buttons["write_joint_defaults"] = QtWidgets.QPushButton("写入关节默认位置") + definition_buttons["write_geometry"] = QtWidgets.QPushButton("写入几何体") + definition_buttons["write_skinning"] = QtWidgets.QPushButton("写入蒙皮") + definition_buttons["write_blendshapes"] = QtWidgets.QPushButton("写入混合变形目标") + definition_buttons["create_blendshapes"] = QtWidgets.QPushButton("创建混合变形") + definition_buttons["bind_skin"] = QtWidgets.QPushButton("绑定蒙皮") + definition_buttons["unbind_skin"] = QtWidgets.QPushButton("取消蒙皮") + definition_buttons["reposition_head"] = QtWidgets.QPushButton("重新定位头部关节") + definition_buttons["reposition_body"] = QtWidgets.QPushButton("重新定位身体关节") + definition_buttons["reposition_all"] = QtWidgets.QPushButton("重新定位全身关节") + definition_buttons["quick_preset"] = QtWidgets.QPushButton("快速创建预设") + +#========================================== LAYOUTS ========================================== +def layouts(parent_tab=None): + """ + 创建定义系统UI布局 + + Args: + parent_tab: 父容器控件,由Main.py传入 + """ + # 获取父容器(在Main.py中创建的definition_tab) + if not parent_tab: + parent_tab = ui_utils.get_parent_widget("definition_tab") + if not parent_tab: + print("无法获取父容器,布局创建失败") + return + + # 创建主布局 + main_layout = parent_tab.layout() + if not main_layout: + print("父容器没有布局,布局创建失败") + return + + # 创建元素标签页 + elements_tab = QtWidgets.QWidget() + elements_layout = QtWidgets.QVBoxLayout(elements_tab) + + # 创建分割控件 + elements_splitter = QtWidgets.QSplitter(QtCore.Qt.Vertical) + + # 创建元素列表标签页 + lists_tabs = QtWidgets.QTabWidget() + + # 创建各类元素列表标签页 + lod_tab = QtWidgets.QWidget() + lod_layout = QtWidgets.QVBoxLayout(lod_tab) + lod_layout.addWidget(dna_elements["lod_list"]) + lists_tabs.addTab(lod_tab, "LOD") + + mesh_tab = QtWidgets.QWidget() + mesh_layout = QtWidgets.QVBoxLayout(mesh_tab) + mesh_layout.addWidget(dna_elements["mesh_list"]) + lists_tabs.addTab(mesh_tab, "Meshes") + + joint_tab = QtWidgets.QWidget() + joint_layout = QtWidgets.QVBoxLayout(joint_tab) + joint_layout.addWidget(dna_elements["joint_list"]) + lists_tabs.addTab(joint_tab, "Joints") + + blendshape_tab = QtWidgets.QWidget() + blendshape_layout = QtWidgets.QVBoxLayout(blendshape_tab) + blendshape_layout.addWidget(dna_elements["blendshape_list"]) + lists_tabs.addTab(blendshape_tab, "Blendshapes") + + animmap_tab = QtWidgets.QWidget() + animmap_layout = QtWidgets.QVBoxLayout(animmap_tab) + animmap_layout.addWidget(dna_elements["animmap_list"]) + lists_tabs.addTab(animmap_tab, "AnimatedMaps") + + # 信息面板 + info_group = QtWidgets.QGroupBox("元素信息") + info_layout = QtWidgets.QVBoxLayout(info_group) + info_layout.addWidget(dna_elements["element_info"]) + + # 添加到分割控件 + elements_splitter.addWidget(lists_tabs) + elements_splitter.addWidget(info_group) + elements_layout.addWidget(elements_splitter) + + # 创建工具标签页 + tools_tab = QtWidgets.QWidget() + tools_layout = QtWidgets.QVBoxLayout(tools_tab) + + # 创建工具分组 + write_group = QtWidgets.QGroupBox("写入") + write_layout = QtWidgets.QVBoxLayout(write_group) + write_layout.addWidget(definition_buttons["write_joint_defaults"]) + write_layout.addWidget(definition_buttons["write_geometry"]) + write_layout.addWidget(definition_buttons["write_skinning"]) + write_layout.addWidget(definition_buttons["write_blendshapes"]) + + create_group = QtWidgets.QGroupBox("创建") + create_layout = QtWidgets.QVBoxLayout(create_group) + create_layout.addWidget(definition_buttons["create_blendshapes"]) + create_layout.addWidget(definition_buttons["bind_skin"]) + create_layout.addWidget(definition_buttons["unbind_skin"]) + + tools_group = QtWidgets.QGroupBox("工具") + tools_layout2 = QtWidgets.QVBoxLayout(tools_group) + tools_layout2.addWidget(definition_buttons["reposition_head"]) + tools_layout2.addWidget(definition_buttons["reposition_body"]) + tools_layout2.addWidget(definition_buttons["reposition_all"]) + tools_layout2.addWidget(definition_buttons["quick_preset"]) + + # 添加到工具标签页 + tools_layout.addWidget(write_group) + tools_layout.addWidget(create_group) + tools_layout.addWidget(tools_group) + tools_layout.addStretch() + + # 添加标签页到主标签控件 + definition_tabs.addTab(elements_tab, "元素") + definition_tabs.addTab(tools_tab, "工具") + + # 添加到主布局 + main_layout.addWidget(definition_tabs) + +#========================================== CONNECTIONS ========================================== +def connections(): + """ + 连接定义系统UI信号和槽 + """ + # 连接按钮点击事件到占位函数 + definition_buttons["write_joint_defaults"].clicked.connect(lambda: print("写入关节默认位置功能待实现")) + definition_buttons["write_geometry"].clicked.connect(lambda: print("写入几何体功能待实现")) + definition_buttons["write_skinning"].clicked.connect(lambda: print("写入蒙皮功能待实现")) + definition_buttons["write_blendshapes"].clicked.connect(lambda: print("写入混合变形目标功能待实现")) + definition_buttons["create_blendshapes"].clicked.connect(lambda: print("创建混合变形功能待实现")) + definition_buttons["bind_skin"].clicked.connect(lambda: print("绑定蒙皮功能待实现")) + definition_buttons["unbind_skin"].clicked.connect(lambda: print("取消蒙皮功能待实现")) + definition_buttons["reposition_head"].clicked.connect(lambda: print("重新定位头部关节功能待实现")) + definition_buttons["reposition_body"].clicked.connect(lambda: print("重新定位身体关节功能待实现")) + definition_buttons["reposition_all"].clicked.connect(lambda: print("重新定位全身关节功能待实现")) + definition_buttons["quick_preset"].clicked.connect(lambda: print("快速创建预设功能待实现")) + + # 连接列表选择事件 + for key, widget in dna_elements.items(): + if isinstance(widget, QtWidgets.QListWidget): + widget.itemSelectionChanged.connect(lambda k=key: print(f"{k} 选择已更改")) + + # 连接标签页切换事件 + definition_tabs.currentChanged.connect(lambda index: print(f"切换到标签页: {definition_tabs.tabText(index)}")) + +#===================================== PLACEHOLDER FUNCTION =================================== +def definition_temp_function(): + utils_definition.definition_temp_utils_function \ No newline at end of file diff --git a/scripts/ui/geometry.py b/scripts/ui/geometry.py new file mode 100644 index 0000000..e8a7a74 --- /dev/null +++ b/scripts/ui/geometry.py @@ -0,0 +1,169 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Geometry UI Module for Plugin +几何模型UI模块 - 负责显示几何模型编辑界面和基础操作 +基本功能: +- 模型拾取以及加载 +- LOD模型分级过滤 +- LOD模型创建 +- 自动加载模型 +- 标准化命名 +- 自动分组 +- 生成面部配件(睫毛,舌头,泪腺 等) +- 修复接缝(修复法线) +- 修复点序 +""" + +#===================================== IMPORT MODULES ===================================== +from Qt import QtWidgets, QtCore, QtGui +from Qt.QtCompat import wrapInstance +from maya import OpenMayaUI as omui +import sys +import os + +#===================================== IMPORT FUNCTIONS =================================== +from scripts.utils import utils_geometry as utils_geometry +from scripts.ui import ui_utils + +#========================================== WIDGETS ========================================== +# 全局变量存储UI控件 +model_tree = None +lod_combo = None +model_buttons = {} +model_info_panel = None + +def widgets(): + """ + 创建几何模型UI控件 + """ + global model_tree, lod_combo, model_buttons, model_info_panel + + # LOD选择下拉菜单 + lod_combo = QtWidgets.QComboBox() + lod_combo.addItems(["LOD0", "LOD1", "LOD2", "LOD3", "LOD4"]) + lod_combo.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + lod_combo.setMinimumWidth(100) + + # 模型树形视图 + model_tree = QtWidgets.QTreeWidget() + model_tree.setHeaderLabels(["模型名称", "顶点数", "面数"]) + model_tree.setMinimumHeight(250) + model_tree.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + model_tree.header().setSectionResizeMode(QtWidgets.QHeaderView.Stretch) # 列自动拉伸 + + # 模型信息面板 + model_info_panel = QtWidgets.QTextEdit() + model_info_panel.setReadOnly(True) + model_info_panel.setMinimumHeight(100) + model_info_panel.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) + + # 功能按钮 - 设置统一的大小策略 + for button_name in ["load_model", "create_lod", "auto_load", "standardize_name", + "auto_group", "generate_accessories", "fix_seams", "fix_vertex_order"]: + model_buttons[button_name] = QtWidgets.QPushButton({ + "load_model": "加载模型", + "create_lod": "创建LOD", + "auto_load": "自动加载", + "standardize_name": "标准化命名", + "auto_group": "自动分组", + "generate_accessories": "生成面部配件", + "fix_seams": "修复接缝", + "fix_vertex_order": "修复点序" + }[button_name]) + model_buttons[button_name].setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + model_buttons[button_name].setMinimumWidth(120) + +#========================================== LAYOUTS ========================================== +def layouts(parent_tab=None): + """ + 创建几何模型UI布局 + + Args: + parent_tab: 父容器控件,由Main.py传入 + """ + # 获取父容器(在Main.py中创建的geometry_tab) + if not parent_tab: + parent_tab = ui_utils.get_parent_widget("geometry_tab") + if not parent_tab: + print("无法获取父容器,布局创建失败") + return + + # 创建主布局 + main_layout = parent_tab.layout() + if not main_layout: + main_layout = QtWidgets.QVBoxLayout(parent_tab) + main_layout.setContentsMargins(4, 4, 4, 4) + main_layout.setSpacing(4) + main_layout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint) # 设置布局约束为默认,允许自适应 + + # 创建分割控件 + splitter = QtWidgets.QSplitter(QtCore.Qt.Vertical) + + # 上部区域 - LOD选择和模型树 + top_widget = QtWidgets.QWidget() + top_layout = QtWidgets.QVBoxLayout(top_widget) + top_layout.setContentsMargins(0, 0, 0, 0) + + # LOD选择区域 + lod_layout = QtWidgets.QHBoxLayout() + lod_layout.addWidget(QtWidgets.QLabel("LOD级别:")) + lod_layout.addWidget(lod_combo) + lod_layout.addStretch() + top_layout.addLayout(lod_layout) + + # 模型树区域 + model_group = QtWidgets.QGroupBox("模型列表") + model_layout = QtWidgets.QVBoxLayout(model_group) + model_layout.addWidget(model_tree) + top_layout.addWidget(model_group) + + # 下部区域 - 模型信息 + model_info_group = QtWidgets.QGroupBox("模型信息") + model_info_layout = QtWidgets.QVBoxLayout(model_info_group) + model_info_layout.addWidget(model_info_panel) + + # 添加到分割控件 + splitter.addWidget(top_widget) + splitter.addWidget(model_info_group) + + # 按钮区域 + button_layout = QtWidgets.QGridLayout() + button_layout.addWidget(model_buttons["load_model"], 0, 0) + button_layout.addWidget(model_buttons["create_lod"], 0, 1) + button_layout.addWidget(model_buttons["auto_load"], 1, 0) + button_layout.addWidget(model_buttons["standardize_name"], 1, 1) + button_layout.addWidget(model_buttons["auto_group"], 2, 0) + button_layout.addWidget(model_buttons["generate_accessories"], 2, 1) + button_layout.addWidget(model_buttons["fix_seams"], 3, 0) + button_layout.addWidget(model_buttons["fix_vertex_order"], 3, 1) + + # 添加到主布局 + main_layout.addWidget(splitter) + main_layout.addLayout(button_layout) + +#========================================== CONNECTIONS ========================================== +def connections(): + """ + 连接几何模型UI信号和槽 + """ + # 连接按钮点击事件到占位函数 + model_buttons["load_model"].clicked.connect(lambda: print("加载模型功能待实现")) + model_buttons["create_lod"].clicked.connect(lambda: print("创建LOD功能待实现")) + model_buttons["auto_load"].clicked.connect(lambda: print("自动加载功能待实现")) + model_buttons["standardize_name"].clicked.connect(lambda: print("标准化命名功能待实现")) + model_buttons["auto_group"].clicked.connect(lambda: print("自动分组功能待实现")) + model_buttons["generate_accessories"].clicked.connect(lambda: print("生成面部配件功能待实现")) + model_buttons["fix_seams"].clicked.connect(lambda: print("修复接缝功能待实现")) + model_buttons["fix_vertex_order"].clicked.connect(lambda: print("修复点序功能待实现")) + + # 连接LOD选择事件 + lod_combo.currentIndexChanged.connect(lambda index: print(f"选择的LOD级别: {lod_combo.currentText()}")) + + # 连接模型树选择事件 + model_tree.itemSelectionChanged.connect(lambda: print("模型选择已更改")) + +#===================================== PLACEHOLDER FUNCTION =================================== +def geometry_temp_function(): + return utils_geometry.geometry_temp_utils_function() \ No newline at end of file diff --git a/scripts/ui/localization.py b/scripts/ui/localization.py new file mode 100644 index 0000000..0fb1177 --- /dev/null +++ b/scripts/ui/localization.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Localization module +""" +LANG = { + "en_US": { + }, + "zh_CN": { + } +} \ No newline at end of file diff --git a/scripts/ui/rigging.py b/scripts/ui/rigging.py new file mode 100644 index 0000000..50d9a8d --- /dev/null +++ b/scripts/ui/rigging.py @@ -0,0 +1,147 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Rigging UI Module for Plugin +绑定系统UI模块 - 负责显示骨骼绑定编辑界面和基础操作 +基本功能: +- DNA浏览器 +- 根据DNA导入骨骼 +- 根据DNA生成身体 +- DNA校准 +- 骨骼位置校准 +- 创建绑定 +- 复制蒙皮 +""" + +#===================================== IMPORT MODULES ===================================== +from Qt import QtWidgets, QtCore, QtGui +from Qt.QtCompat import wrapInstance +from maya import OpenMayaUI as omui +import sys +import os + +#===================================== IMPORT FUNCTIONS =================================== +from scripts.utils import utils_rigging as utils_rigging +from scripts.ui import ui_utils + +#========================================== WIDGETS ========================================== +# 全局变量存储UI控件 +dna_browser_tree = None +joint_list = None +dna_info_panel = None +rig_buttons = {} + +def widgets(): + """ + 创建绑定系统UI控件 + """ + global dna_browser_tree, joint_list, dna_info_panel, rig_buttons + + # DNA浏览器树形视图 + dna_browser_tree = QtWidgets.QTreeWidget() + dna_browser_tree.setHeaderLabels(["DNA文件", "版本", "修改日期"]) + dna_browser_tree.setMinimumHeight(200) + + # 关节列表 + joint_list = QtWidgets.QListWidget() + joint_list.setMinimumHeight(150) + + # DNA信息面板 + dna_info_panel = QtWidgets.QTextEdit() + dna_info_panel.setReadOnly(True) + dna_info_panel.setMinimumHeight(100) + + # 功能按钮 + rig_buttons["load_dna"] = QtWidgets.QPushButton("加载DNA") + rig_buttons["import_joints"] = QtWidgets.QPushButton("导入骨骼") + rig_buttons["generate_body"] = QtWidgets.QPushButton("生成身体") + rig_buttons["calibrate_dna"] = QtWidgets.QPushButton("DNA校准") + rig_buttons["calibrate_joints"] = QtWidgets.QPushButton("骨骼位置校准") + rig_buttons["create_binding"] = QtWidgets.QPushButton("创建绑定") + rig_buttons["copy_skinning"] = QtWidgets.QPushButton("复制蒙皮") + rig_buttons["save_dna"] = QtWidgets.QPushButton("保存DNA") + +#========================================== LAYOUTS ========================================== +def layouts(parent_tab=None): + """ + 创建绑定系统UI布局 + + Args: + parent_tab: 父容器控件,由Main.py传入 + """ + # 获取父容器(在Main.py中创建的rigging_tab) + if not parent_tab: + parent_tab = ui_utils.get_parent_widget("rigging_tab") + if not parent_tab: + print("无法获取父容器,布局创建失败") + return + + # 创建主布局 + main_layout = parent_tab.layout() + if not main_layout: + print("父容器没有布局,布局创建失败") + return + + # 创建分割控件 + splitter = QtWidgets.QSplitter(QtCore.Qt.Vertical) + + # 上部区域 - DNA浏览器 + dna_browser_group = QtWidgets.QGroupBox("DNA浏览器") + dna_browser_layout = QtWidgets.QVBoxLayout(dna_browser_group) + dna_browser_layout.addWidget(dna_browser_tree) + + # 中部区域 - 关节列表 + joint_list_group = QtWidgets.QGroupBox("骨骼列表") + joint_list_layout = QtWidgets.QVBoxLayout(joint_list_group) + joint_list_layout.addWidget(joint_list) + + # 下部区域 - DNA信息 + dna_info_group = QtWidgets.QGroupBox("DNA信息") + dna_info_layout = QtWidgets.QVBoxLayout(dna_info_group) + dna_info_layout.addWidget(dna_info_panel) + + # 添加到分割控件 + splitter.addWidget(dna_browser_group) + splitter.addWidget(joint_list_group) + splitter.addWidget(dna_info_group) + + # 按钮区域 + button_layout = QtWidgets.QGridLayout() + button_layout.addWidget(rig_buttons["load_dna"], 0, 0) + button_layout.addWidget(rig_buttons["import_joints"], 0, 1) + button_layout.addWidget(rig_buttons["generate_body"], 1, 0) + button_layout.addWidget(rig_buttons["calibrate_dna"], 1, 1) + button_layout.addWidget(rig_buttons["calibrate_joints"], 2, 0) + button_layout.addWidget(rig_buttons["create_binding"], 2, 1) + button_layout.addWidget(rig_buttons["copy_skinning"], 3, 0) + button_layout.addWidget(rig_buttons["save_dna"], 3, 1) + + # 添加到主布局 + main_layout.addWidget(splitter) + main_layout.addLayout(button_layout) + +#========================================== CONNECTIONS ========================================== +def connections(): + """ + 连接绑定系统UI信号和槽 + """ + # 连接按钮点击事件到占位函数 + rig_buttons["load_dna"].clicked.connect(lambda: print("加载DNA功能待实现")) + rig_buttons["import_joints"].clicked.connect(lambda: print("导入骨骼功能待实现")) + rig_buttons["generate_body"].clicked.connect(lambda: print("生成身体功能待实现")) + rig_buttons["calibrate_dna"].clicked.connect(lambda: print("DNA校准功能待实现")) + rig_buttons["calibrate_joints"].clicked.connect(lambda: print("骨骼位置校准功能待实现")) + rig_buttons["create_binding"].clicked.connect(lambda: print("创建绑定功能待实现")) + rig_buttons["copy_skinning"].clicked.connect(lambda: print("复制蒙皮功能待实现")) + rig_buttons["save_dna"].clicked.connect(lambda: print("保存DNA功能待实现")) + + # 连接树形视图选择事件 + dna_browser_tree.itemSelectionChanged.connect(lambda: print("DNA文件选择已更改")) + + # 连接关节列表选择事件 + joint_list.itemSelectionChanged.connect(lambda: print("骨骼选择已更改")) + +#===================================== PLACEHOLDER FUNCTION =================================== +def rigging_temp_function(): + return utils_rigging.rigging_temp_utils_function() \ No newline at end of file diff --git a/scripts/ui/style.qss b/scripts/ui/style.qss new file mode 100644 index 0000000..24512e8 --- /dev/null +++ b/scripts/ui/style.qss @@ -0,0 +1,321 @@ +/* Plugin 统一样式表 */ + +/* 全局样式 */ +QWidget { + font-family: "Microsoft YaHei", "SimHei", sans-serif; + font-size: 9pt; + color: #E0E0E0; + background-color: #333333; +} + +/* 菜单样式 */ +QMenuBar { + background-color: #2D2D30; + color: #E0E0E0; +} + +QMenuBar::item { + background-color: transparent; + padding: 5px 10px; +} + +QMenuBar::item:selected { + background-color: #007ACC; + color: white; +} + +QMenu { + background-color: #1E1E1E; + color: #E0E0E0; + border: 1px solid #3F3F46; +} + +QMenu::item { + padding: 5px 30px 5px 20px; +} + +QMenu::item:selected { + background-color: #007ACC; + color: white; +} + +/* 工具栏样式 */ +QToolBar { + background-color: #2D2D30; + border: 1px solid #3F3F46; + spacing: 3px; +} + +QToolBar::separator { + background-color: #3F3F46; + width: 1px; + height: 20px; +} + +/* 标签页样式 */ +QTabWidget::pane { + border: 1px solid #3F3F46; + background-color: #2D2D30; +} + +QTabBar::tab { + background-color: #252526; + color: #E0E0E0; + border: 1px solid #3F3F46; + border-bottom: none; + padding: 5px 10px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + min-width: 80px; +} + +QTabBar::tab:selected { + background-color: #007ACC; + color: white; +} + +QTabBar::tab:hover:!selected { + background-color: #3E3E40; +} + +/* 分组框样式 */ +QGroupBox { + border: 1px solid #3F3F46; + border-radius: 3px; + margin-top: 10px; + padding-top: 10px; + font-weight: bold; +} + +QGroupBox::title { + subcontrol-origin: margin; + subcontrol-position: top left; + padding: 0 5px; + color: #E0E0E0; +} + +/* 下拉框样式 */ +QComboBox { + background-color: #1E1E1E; + color: #E0E0E0; + border: 1px solid #3F3F46; + border-radius: 3px; + padding: 3px 18px 3px 3px; + min-width: 6em; +} + +QComboBox::drop-down { + subcontrol-origin: padding; + subcontrol-position: top right; + width: 15px; + border-left: 1px solid #3F3F46; +} + +QComboBox QAbstractItemView { + background-color: #1E1E1E; + color: #E0E0E0; + border: 1px solid #3F3F46; + selection-background-color: #264F78; + selection-color: white; +} + +/* 按钮样式 */ +QPushButton { + background-color: #0E639C; + color: white; + border: 1px solid #0E639C; + border-radius: 3px; + padding: 5px 10px; + min-width: 80px; +} + +QPushButton:hover { + background-color: #1177BB; + border: 1px solid #1177BB; +} + +QPushButton:pressed { + background-color: #00578A; + border: 1px solid #00578A; +} + +QPushButton:disabled { + background-color: #3F3F46; + color: #9D9D9D; + border: 1px solid #3F3F46; +} + +/* 输入框样式 */ +QLineEdit, QTextEdit, QPlainTextEdit { + background-color: #1E1E1E; + color: #E0E0E0; + border: 1px solid #3F3F46; + border-radius: 3px; + padding: 3px; + selection-background-color: #264F78; +} + +/* 单选框样式 */ +QRadioButton { + color: #E0E0E0; + spacing: 5px; +} + +QRadioButton::indicator { + width: 13px; + height: 13px; +} + +/* 复选框样式 */ +QCheckBox { + color: #E0E0E0; + spacing: 5px; +} + +QCheckBox::indicator { + width: 13px; + height: 13px; +} + +/* 滑块样式 */ +QSlider::groove:horizontal { + border: 1px solid #3F3F46; + height: 8px; + background: #1E1E1E; + margin: 2px 0; + border-radius: 4px; +} + +QSlider::handle:horizontal { + background: #007ACC; + border: 1px solid #007ACC; + width: 14px; + height: 14px; + margin: -4px 0; + border-radius: 7px; +} + +QSlider::handle:horizontal:hover { + background: #1177BB; + border: 1px solid #1177BB; +} + +/* 进度条样式 */ +QProgressBar { + border: 1px solid #3F3F46; + border-radius: 3px; + background-color: #1E1E1E; + text-align: center; + color: white; +} + +QProgressBar::chunk { + background-color: #007ACC; + width: 10px; +} + +/* 列表和树视图样式 */ +QTreeView, QListView, QTableView { + background-color: #1E1E1E; + alternate-background-color: #262626; + color: #E0E0E0; + border: 1px solid #3F3F46; + selection-background-color: #264F78; + selection-color: white; + outline: none; +} + +QTreeView::item, QListView::item, QTableView::item { + padding: 3px; +} + +QTreeView::item:selected, QListView::item:selected, QTableView::item:selected { + background-color: #264F78; + color: white; +} + +QTreeView::item:hover, QListView::item:hover, QTableView::item:hover { + background-color: #2A2D2E; +} + +QHeaderView::section { + background-color: #252526; + color: #E0E0E0; + padding: 3px; + border: 1px solid #3F3F46; +} + +/* 滚动条样式 */ +QScrollBar:vertical { + background-color: #1E1E1E; + width: 14px; + margin: 14px 0 14px 0; + border: 1px solid #3F3F46; +} + +QScrollBar::handle:vertical { + background-color: #3E3E42; + min-height: 20px; +} + +QScrollBar::add-line:vertical { + border: 1px solid #3F3F46; + background-color: #3E3E42; + height: 14px; + subcontrol-position: bottom; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:vertical { + border: 1px solid #3F3F46; + background-color: #3E3E42; + height: 14px; + subcontrol-position: top; + subcontrol-origin: margin; +} + +QScrollBar:horizontal { + background-color: #1E1E1E; + height: 14px; + margin: 0 14px 0 14px; + border: 1px solid #3F3F46; +} + +QScrollBar::handle:horizontal { + background-color: #3E3E42; + min-width: 20px; +} + +QScrollBar::add-line:horizontal { + border: 1px solid #3F3F46; + background-color: #3E3E42; + width: 14px; + subcontrol-position: right; + subcontrol-origin: margin; +} + +QScrollBar::sub-line:horizontal { + border: 1px solid #3F3F46; + background-color: #3E3E42; + width: 14px; + subcontrol-position: left; + subcontrol-origin: margin; +} + +/* 状态栏样式 */ +QStatusBar { + background-color: #007ACC; + color: white; +} + +QStatusBar::item { + border: none; +} + +/* 提示框样式 */ +QToolTip { + background-color: #2D2D30; + color: #E0E0E0; + border: 1px solid #3F3F46; + padding: 3px; +} diff --git a/scripts/ui/toolbar.py b/scripts/ui/toolbar.py new file mode 100644 index 0000000..dc29c09 --- /dev/null +++ b/scripts/ui/toolbar.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Toolbar UI Module for Plugin +工具栏UI模块 - 负责显示工具栏界面和基础操作 +基本功能: +- 加载预设 +- 保存预设 +- 导入DNA +- 导出DNA +- 创建RL4节点(用于切换DNA编辑的状态) +- 删除RL4节点(用于切换DNA编辑的状态) +""" + +#===================================== IMPORT MODULES ===================================== +from Qt import QtWidgets, QtCore, QtGui +from Qt.QtCompat import wrapInstance +from maya import OpenMayaUI as omui +import sys +import os + +#===================================== IMPORT FUNCTIONS =================================== +from scripts.utils import utils_toolbar as utils_toolbar +from scripts.ui import ui_utils + +#========================================== WIDGETS ========================================== +# 全局变量存储UI控件 +toolbar_buttons = {} +dna_dropdown = None +status_label = None + +def widgets(): + """ + 创建工具栏UI控件 + """ + global toolbar_buttons, dna_dropdown, status_label + + # 工具栏按钮 + toolbar_buttons["load_preset"] = QtWidgets.QPushButton("加载预设") + toolbar_buttons["load_preset"].setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + toolbar_buttons["load_preset"].setMinimumWidth(80) + + toolbar_buttons["save_preset"] = QtWidgets.QPushButton("保存预设") + toolbar_buttons["save_preset"].setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + toolbar_buttons["save_preset"].setMinimumWidth(80) + + toolbar_buttons["import_dna"] = QtWidgets.QPushButton("导入DNA") + toolbar_buttons["import_dna"].setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + toolbar_buttons["import_dna"].setMinimumWidth(80) + + toolbar_buttons["export_dna"] = QtWidgets.QPushButton("导出DNA") + toolbar_buttons["export_dna"].setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + toolbar_buttons["export_dna"].setMinimumWidth(80) + + toolbar_buttons["create_rl4"] = QtWidgets.QPushButton("创建RL4节点") + toolbar_buttons["create_rl4"].setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + toolbar_buttons["create_rl4"].setMinimumWidth(100) + + toolbar_buttons["delete_rl4"] = QtWidgets.QPushButton("删除RL4节点") + toolbar_buttons["delete_rl4"].setSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Fixed) + toolbar_buttons["delete_rl4"].setMinimumWidth(100) + + # DNA下拉菜单 + dna_dropdown = QtWidgets.QComboBox() + dna_dropdown.addItem("选择DNA文件...") + dna_dropdown.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + dna_dropdown.setMinimumWidth(150) + + # 状态标签 + status_label = QtWidgets.QLabel("就绪") + status_label.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignVCenter) + status_label.setSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Fixed) + +#========================================== LAYOUTS ========================================== +def layouts(parent_frame=None): + """ + 创建工具栏UI布局 + + Args: + parent_frame: 父容器控件,由Main.py传入 + """ + # 获取父容器(在Main.py中创建的toolbar_frame) + if not parent_frame: + parent_frame = ui_utils.get_parent_widget("toolbar_frame") + if not parent_frame: + print("无法获取父容器,布局创建失败") + return + + # 创建主布局 + main_layout = parent_frame.layout() + if not main_layout: + print("父容器没有布局,布局创建失败") + return + + # 创建工具栏布局 + toolbar_layout = QtWidgets.QHBoxLayout() + toolbar_layout.setContentsMargins(2, 2, 2, 2) + toolbar_layout.setSpacing(4) + toolbar_layout.setSizeConstraint(QtWidgets.QLayout.SetDefaultConstraint) # 设置布局约束为默认,允许自适应 + + # 添加按钮到工具栏 + toolbar_layout.addWidget(toolbar_buttons["load_preset"]) + toolbar_layout.addWidget(toolbar_buttons["save_preset"]) + toolbar_layout.addWidget(QtWidgets.QLabel("|")) + toolbar_layout.addWidget(toolbar_buttons["import_dna"]) + toolbar_layout.addWidget(toolbar_buttons["export_dna"]) + toolbar_layout.addWidget(QtWidgets.QLabel("|")) + toolbar_layout.addWidget(toolbar_buttons["create_rl4"]) + toolbar_layout.addWidget(toolbar_buttons["delete_rl4"]) + toolbar_layout.addWidget(QtWidgets.QLabel("|")) + toolbar_layout.addWidget(QtWidgets.QLabel("DNA文件:")) + toolbar_layout.addWidget(dna_dropdown) + toolbar_layout.addStretch() + toolbar_layout.addWidget(status_label) + + # 添加到主布局 + main_layout.addLayout(toolbar_layout) + +#========================================== CONNECTIONS ========================================== +def connections(): + """ + 连接工具栏UI信号和槽 + """ + # 连接按钮点击事件到占位函数 + toolbar_buttons["load_preset"].clicked.connect(lambda: print("加载预设功能待实现")) + toolbar_buttons["save_preset"].clicked.connect(lambda: print("保存预设功能待实现")) + toolbar_buttons["import_dna"].clicked.connect(lambda: print("导入DNA功能待实现")) + toolbar_buttons["export_dna"].clicked.connect(lambda: print("导出DNA功能待实现")) + toolbar_buttons["create_rl4"].clicked.connect(lambda: print("创建RL4节点功能待实现")) + toolbar_buttons["delete_rl4"].clicked.connect(lambda: print("删除RL4节点功能待实现")) + + # 连接下拉菜单选择事件 + dna_dropdown.currentIndexChanged.connect(lambda index: print(f"选择的DNA文件索引: {index}")) + +#===================================== PLACEHOLDER FUNCTION =================================== +def toolbar_temp_function(): + return utils_toolbar.toolbar_temp_utils_function() diff --git a/scripts/ui/ui_utils.py b/scripts/ui/ui_utils.py new file mode 100644 index 0000000..081afd7 --- /dev/null +++ b/scripts/ui/ui_utils.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +UI Utilities Module for Plugin +UI工具模块 - 提供UI相关的通用函数 +""" + +#===================================== IMPORT MODULES ===================================== +from Qt import QtWidgets, QtCore, QtGui +from Qt.QtCompat import wrapInstance +from maya import OpenMayaUI as omui +import sys +import os +import config +#===================================== UI UTILITY FUNCTIONS =================================== + +TOOL_NAME = config.TOOL_NAME + +def get_parent_widget(widget_name): + """ + 根据控件名称查找父容器控件 + + Args: + widget_name (str): 控件名称 + + Returns: + QWidget: 找到的父容器控件,如果未找到则返回None + """ + # 查找主窗口中的所有控件 + main_window = None + for widget in QtWidgets.QApplication.topLevelWidgets(): + if widget.objectName() == f"{TOOL_NAME}MainWindow" or widget.objectName().endswith("MainWindow"): + main_window = widget + break + + if not main_window: + print(f"无法找到主窗口,无法获取父容器: {widget_name}") + return None + + # 在主窗口中查找指定名称的控件 + found_widget = main_window.findChild(QtWidgets.QWidget, widget_name) + if found_widget: + return found_widget + + # 如果未找到精确匹配,尝试模糊匹配 + for child in main_window.findChildren(QtWidgets.QWidget): + if widget_name.lower() in child.objectName().lower(): + return child + + print(f"无法找到控件: {widget_name}") + return None + +def get_maya_main_window(): + """ + 获取Maya主窗口 + + Returns: + QWidget: Maya主窗口控件 + """ + main_window_ptr = omui.MQtUtil.mainWindow() + return wrapInstance(int(main_window_ptr), QtWidgets.QWidget) diff --git a/scripts/utils/__init__.py b/scripts/utils/__init__.py new file mode 100644 index 0000000..7756200 --- /dev/null +++ b/scripts/utils/__init__.py @@ -0,0 +1,4 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from . import * \ No newline at end of file diff --git a/scripts/utils/utils_behaviour.py b/scripts/utils/utils_behaviour.py new file mode 100644 index 0000000..f875941 --- /dev/null +++ b/scripts/utils/utils_behaviour.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Behaviour function module +""" + +#===================================== IMPORT MODULES ===================================== +import maya.cmds as cmds +import pymel.core as pm +import importlib +import sys +import os + +#========================================== FUNCTIONS ======================================== + +def behaviour_temp_utils_function(): + """ + Placeholder function for behaviour module + This function will be replaced with actual functionality in future updates + """ + print("Behaviour module initialized with placeholder function") + return True \ No newline at end of file diff --git a/scripts/utils/utils_definition.py b/scripts/utils/utils_definition.py new file mode 100644 index 0000000..493bf18 --- /dev/null +++ b/scripts/utils/utils_definition.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Definition function module +""" + +#===================================== IMPORT MODULES ===================================== +import maya.cmds as cmds +import pymel.core as pm +import importlib +import sys +import os + +#========================================== FUNCTIONS ======================================== + +def definition_temp_utils_function(): + """ + Placeholder function for definition module + This function will be replaced with actual functionality in future updates + """ + print("Definition module initialized with placeholder function") + return True diff --git a/scripts/utils/utils_geometry.py b/scripts/utils/utils_geometry.py new file mode 100644 index 0000000..a27933a --- /dev/null +++ b/scripts/utils/utils_geometry.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Geometry function module +""" + +#===================================== IMPORT MODULES ===================================== +import maya.cmds as cmds +import pymel.core as pm +import importlib +import sys +import os + +#========================================== FUNCTIONS ======================================== + +def geometry_temp_utils_function(): + """ + Placeholder function for geometry module + This function will be replaced with actual functionality in future updates + """ + print("Geometry module initialized with placeholder function") + return True \ No newline at end of file diff --git a/scripts/utils/utils_rigging.py b/scripts/utils/utils_rigging.py new file mode 100644 index 0000000..6d40052 --- /dev/null +++ b/scripts/utils/utils_rigging.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +Rigging function module +""" + +#===================================== IMPORT MODULES ===================================== +import maya.cmds as cmds +import pymel.core as pm +import importlib +import sys +import os + +#========================================== FUNCTIONS ======================================== + +def rigging_temp_utils_function(): + """ + Placeholder function for rigging module + This function will be replaced with actual functionality in future updates + """ + print("Rigging module initialized with placeholder function") + return True \ No newline at end of file diff --git a/scripts/utils/utils_toolbar.py b/scripts/utils/utils_toolbar.py new file mode 100644 index 0000000..bc4b6a6 --- /dev/null +++ b/scripts/utils/utils_toolbar.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +#===================================== IMPORT MODULES ===================================== +import maya.cmds as cmds +import pymel.core as pm +import importlib +import sys +import os + +#========================================== FUNCTIONS ======================================== + +def toolbar_temp_utils_function(): + """ + Placeholder function for toolbar module + This function will be replaced with actual functionality in future updates + """ + print("Toolbar module initialized with placeholder function") + return True \ No newline at end of file