From 29fd2336247f1d2b4c0b8835b8801134468d3f71 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Wed, 22 Nov 2023 23:35:56 +0100 Subject: [PATCH 01/23] init hip_rs --- .../redshift/nodes/hip_rs_generator.py | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py diff --git a/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py b/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py new file mode 100644 index 00000000..49889e3d --- /dev/null +++ b/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py @@ -0,0 +1,61 @@ +from copy import copy +from lifeblood.basenode import BaseNodeWithTaskRequirements +from lifeblood.enums import NodeParameterType +from lifeblood.processingcontext import ProcessingContext +from lifeblood.invocationjob import InvocationJob, InvocationEnvironment +from lifeblood.text import filter_by_pattern + +from lifeblood_stock_houdini_helpers.rop_base_node import RopBaseNode + +from typing import Iterable, Optional + + +def node_class(): + return HipRsGenerator + + +class HipRsGenerator(RopBaseNode): + @classmethod + def label(cls) -> str: + return 'rs scene generator' + + @classmethod + def tags(cls) -> Iterable[str]: + return 'hip', 'houdini', 'redshift', 'rs', 'generator', 'render', 'stock' + + @classmethod + def type_name(cls) -> str: + return 'hip_rs_generator' + + def __init__(self, name): + super(HipRsGenerator, self).__init__(name) + ui = self.get_ui() + with ui.initializing_interface_lock(): + ui.color_scheme().set_main_color(0.5, 0.25, 0.125) + + ui.parameter('scene file output').set_value("`config['global_scratch_location']`/`node.name`/`task.name`_`task.id`/usd/`node.name`_$F4") + + skip_param = ui.parameter('skip if exists') + skip_param.set_value(False) + skip_param.set_locked(True) + skip_param.set_hidden(True) + + ui.add_separator() + + with ui.parameters_on_same_line_block(): + use_custom = ui.add_parameter('use custom usd attr for img', 'Custom USD prim/attr for output image', NodeParameterType.BOOL, False) + ui.add_parameter('custom usd attr for img', None, NodeParameterType.STRING, '/Render/Products/renderproduct/productName') + + def _take_parm_name(self, context) -> str: + return 'take' + + def _parms_to_set_before_render(self, context) -> dict: + return {'RS_archive_enable': True, + 'RS_renderToMPlay': False, + 'RS_archive_createDirs': True} + + def _scene_file_parm_name(self, context) -> str: + return 'RS_archive_file' + + def _image_path_parm_name(self, context) -> str: + return 'RS_outputFileNamePrefix' From 6199438e65baa40a2ec98423a6fbb9365eabe8f6 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Thu, 23 Nov 2023 17:02:51 +0100 Subject: [PATCH 02/23] redshift nodes and docs --- docs/source/nodes.rst | 2 + .../nodes/stock/redshift/hip_rs_generator.rst | 49 +++++++++++++++++++ docs/source/nodes/stock/redshift/redshift.rst | 37 ++++++++++++++ .../redshift/nodes/hip_rs_generator.py | 31 ++++++------ .../stock_nodes/redshift/nodes/redshift.py | 4 ++ 5 files changed, 107 insertions(+), 16 deletions(-) create mode 100644 docs/source/nodes/stock/redshift/hip_rs_generator.rst create mode 100644 docs/source/nodes/stock/redshift/redshift.rst diff --git a/docs/source/nodes.rst b/docs/source/nodes.rst index ab3e2616..1d775f66 100644 --- a/docs/source/nodes.rst +++ b/docs/source/nodes.rst @@ -33,3 +33,5 @@ Nodes nodes/stock/houdini/mantra nodes/stock/matrixnotifier nodes/stock/telegram_client/telegram_notifier + nodes/stock/redshift/redshift + nodes/stock/redshift/hip_rs_generator diff --git a/docs/source/nodes/stock/redshift/hip_rs_generator.rst b/docs/source/nodes/stock/redshift/hip_rs_generator.rst new file mode 100644 index 00000000..cda66134 --- /dev/null +++ b/docs/source/nodes/stock/redshift/hip_rs_generator.rst @@ -0,0 +1,49 @@ +.. _nodes/stock/redshift/hip_rs_generator: + +==================== +Houdini Redshift ROP +==================== + +Produces Redshift Scene Decscription files (.rs files) from given redshift ROP node. + +These .rs files can be rendered with :ref:`redshift node` + +Parameters +========== + +.. include:: nodes/standard_resource_requirements.rst + +.. include:: nodes/standard_hip_file_masking.rst + +:Hip File Path: + Houdini ``.hip`` file to render rop from +:Rop Node Path: + Node path in the hip file to the Redshift ROP node to render +:Set These Attribs As Context: + Attributes that match this mask will be set as context attributes in houdini session (will be accessible with ``@attrib_name`` syntax) +:Scene Description File Path: + Where to save Redshift Scene file (.rs file) +:Skip If Result Already Exists: + If file at ``Scene Description File Path`` already exists - skip the work +:Generate Children For Skipped: + If the work is skipped - this checkbox determines if child task should still be generated or not +:Attributes To Copy To Children: + Attributes on the main task that match this pattern will be copied to children. + +Attributes Set +============== + +Main Task +--------- + +None + +Spawned Children Tasks +---------------------- + +:file: + Set to the path to .rs scene produced +:frames: + List of frames, sublist of parent frames list, (most probably a single frame) that this child task represents + +Additionally - any attributes copied from parent diff --git a/docs/source/nodes/stock/redshift/redshift.rst b/docs/source/nodes/stock/redshift/redshift.rst new file mode 100644 index 00000000..dd9f1fc3 --- /dev/null +++ b/docs/source/nodes/stock/redshift/redshift.rst @@ -0,0 +1,37 @@ +.. _nodes/stock/redshift/redshift: + +======== +Redshift +======== + +Renders given .rs file with redshift renderer + +Parameters +========== + +:rs file path: + path to the rs file to be rendered +:output image file path: + path where to save beauty pass. All AOVs if enabled will be saved to the base directory of this file + + .. note:: + Due to redshift implementation specifics, redshift will first render to temporary location, + and only after that files will be moved to their final destination. So you have to make sure + you have enough space in the temporary location for some number of frames that are going to render in parallel + +:skip if result already exists: + if set - if ``output image file path`` file already exists - render will be skipped + + .. warning:: + Current limitation: when frames are skipped - ``files`` attribute is not set to AOV paths, + as AOVs paths are only received from rendering process. + +Attributes Set +============== + +When render is done, the following attributes are set: + +:file: + set to path of the rendered beauty pass image +:files: + set to a list of paths to all AOVs produced by the render diff --git a/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py b/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py index 49889e3d..5e864077 100644 --- a/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py +++ b/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py @@ -15,9 +15,13 @@ def node_class(): class HipRsGenerator(RopBaseNode): + @classmethod + def description(cls) -> str: + return 'Generates Redshift scene descriptions (.rs files) from a given houdini redshift ROP node.\n' + @classmethod def label(cls) -> str: - return 'rs scene generator' + return 'hip rs generator' @classmethod def tags(cls) -> Iterable[str]: @@ -32,27 +36,22 @@ def __init__(self, name): ui = self.get_ui() with ui.initializing_interface_lock(): ui.color_scheme().set_main_color(0.5, 0.25, 0.125) + ui.parameter('scene file output').set_value("`config['global_scratch_location']`/`node.name`/`task.name`_`task.id`/rs_scenes/`node.name`.$F4.rs") - ui.parameter('scene file output').set_value("`config['global_scratch_location']`/`node.name`/`task.name`_`task.id`/usd/`node.name`_$F4") - - skip_param = ui.parameter('skip if exists') - skip_param.set_value(False) - skip_param.set_locked(True) - skip_param.set_hidden(True) - - ui.add_separator() - - with ui.parameters_on_same_line_block(): - use_custom = ui.add_parameter('use custom usd attr for img', 'Custom USD prim/attr for output image', NodeParameterType.BOOL, False) - ui.add_parameter('custom usd attr for img', None, NodeParameterType.STRING, '/Render/Products/renderproduct/productName') + ui.parameter('worker cpu cost').set_value(0.5) + ui.parameter('worker mem cost').set_value(1.0) + ui.parameter('worker gpu cost').set_value(1) + ui.parameter('worker gpu mem cost').set_value(2.0) def _take_parm_name(self, context) -> str: return 'take' def _parms_to_set_before_render(self, context) -> dict: - return {'RS_archive_enable': True, - 'RS_renderToMPlay': False, - 'RS_archive_createDirs': True} + return { + 'RS_archive_enable': True, + 'RS_renderToMPlay': False, + 'RS_archive_createDirs': True + } def _scene_file_parm_name(self, context) -> str: return 'RS_archive_file' diff --git a/src/lifeblood/stock_nodes/redshift/nodes/redshift.py b/src/lifeblood/stock_nodes/redshift/nodes/redshift.py index 5e9be3c2..d9513ffa 100644 --- a/src/lifeblood/stock_nodes/redshift/nodes/redshift.py +++ b/src/lifeblood/stock_nodes/redshift/nodes/redshift.py @@ -12,6 +12,10 @@ def node_class(): class Redshift(BaseNodeWithTaskRequirements): + @classmethod + def description(cls) -> str: + return 'Renders given Redshift scene descriptions (.rs files) using redshift\n' + @classmethod def label(cls) -> str: return 'redshift' From c6e2f77b093b5ee37c6fff91323d2f16e0c41146 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:05:07 +0100 Subject: [PATCH 03/23] introduce dependencies metadata --- src/lifeblood/pluginloader.py | 91 ++++++++++++++++++++++++++++++++--- 1 file changed, 84 insertions(+), 7 deletions(-) diff --git a/src/lifeblood/pluginloader.py b/src/lifeblood/pluginloader.py index 3b040740..b800966b 100644 --- a/src/lifeblood/pluginloader.py +++ b/src/lifeblood/pluginloader.py @@ -12,7 +12,39 @@ from .snippets import NodeSnippetData from . import logging, plugin_info -from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, Set, Sequence +from typing import Any, Callable, Dict, FrozenSet, List, Optional, Tuple, Type, Union, Set, Sequence + + +class PackageMetadata: + def __init__(self, path: Path, category: str): + self.__path = path + self.__name = path.stem + self.__category = category + self.__deps: Set[str] = set() + + if path.is_dir() and (meta_path := path / 'meta.toml').exists(): + with open(meta_path, 'r') as f: + metadata = toml.load(f) + if depdata := metadata.get('dependencies'): + if not isinstance(depdata, list): + raise RuntimeError('dependencies must be a list of strings') + self.__deps = set(depdata) + if namedata := metadata.get('name'): + if not isinstance(namedata, str): + raise RuntimeError('name must be a string') + self.__name = namedata + + def name(self) -> str: + return self.__name + + def path(self) -> Path: + return self.__path + + def category(self) -> str: + return self.__category + + def dependency_names(self) -> FrozenSet[str]: + return frozenset(self.__deps) class PluginNodeDataProvider(NodeDataProvider): @@ -49,17 +81,61 @@ def __init__(self, plugin_paths: Sequence[Tuple[Path, str]]): self.__plugins = {} self.__loaded_package_paths: List[Path] = [] - # load all plugins + + already_loaded_package_names: Set[str] = set() + packages_to_install = [] + package_names_to_install = set() for plugin_path, plugin_category in reversed(plugin_paths): + # gather all plugins for filepath in plugin_path.iterdir(): + if filepath.name.startswith('__'): # skip anything starting with __ + continue if filepath.is_dir(): - self._install_package(filepath, plugin_category) - self.__loaded_package_paths.insert(0, filepath) + package = PackageMetadata(filepath, plugin_category) + packages_to_install.append(package) + package_names_to_install.add(package.name()) else: if filepath.suffix != '.py': continue + # install single nodes straight away, before any package self._install_node(filepath, plugin_category) + # load all packages + package_load_queue = list(packages_to_install) + packages_to_insert_after: Dict[str, List[PackageMetadata]] = {} + for i, package in enumerate(package_load_queue): + if package.name() in already_loaded_package_names: + self.logger.error(f'failed to load package "{package.name()}" at "{package.path()}" because of name collision. skipping...') + continue + dep_names = package.dependency_names() + if dep_names.intersection(already_loaded_package_names).union(dep_names.intersection(package_names_to_install)) != dep_names: + self.logger.error(f'cannot load package "{package.name()}" at "{package.path()}" because dependencies are not satisfied. skipping...') + continue + need_to_delay = False + for dep_name in dep_names: + if dep_name not in already_loaded_package_names: + # we do NOT just push it in the end, cuz we try to preserve load order. + # the last "custom" package RELIES on being the last + packages_to_insert_after.setdefault(dep_name, []).append(package) # delay loading of this package + need_to_delay = True + break + if need_to_delay: + continue + + self._install_package(package) + already_loaded_package_names.add(package.name()) + self.__loaded_package_paths.insert(0, package.path()) + # check if some deps are now satisfied + if dep_list := packages_to_insert_after.pop(package.name(), None): + for d, dep in enumerate(dep_list): + package_load_queue.insert(i + 1 + d, dep) + + if packages_to_insert_after: # can happen if some packages failed, so their dependants cannot be loaded + for package in (x for v in packages_to_insert_after.values() for x in v): + self.logger.error(f'failed to load package "{package.name()}" at "{package.path()}" because at least one of it\'s dependencies failed to load too') + + self.logger.debug('package inverted load order is: %s', self.__loaded_package_paths) + self.logger.info('loaded node types:\n\t' + '\n\t'.join(self.__plugins.keys())) self.logger.info('loaded node presets:\n\t' + '\n\t'.join(f'{pkg}::{label}' for pkg, pkgdata in self.__presets.items() for label in pkgdata.keys())) @@ -110,7 +186,7 @@ def _install_node(self, filepath: Path, plugin_category: str, parent_package=Non # TODO: what if it's overriding existing module? sys.modules[modpath] = mod - def _install_package(self, package_path: Path, plugin_category: str): + def _install_package(self, package: PackageMetadata): """ package structure: [package_name:dir] @@ -141,7 +217,8 @@ def _install_package(self, package_path: Path, plugin_category: str): :param plugin_category: :return: """ - package_name = package_path.name + package_name = package.name() + package_path = package.path() if package_name not in self.__package_locations: # read logic of this up self.__package_locations[package_name] = package_path # add extra bin paths @@ -176,7 +253,7 @@ def _install_package(self, package_path: Path, plugin_category: str): for filepath in nodes_path.iterdir(): if filepath.suffix != '.py': continue - self._install_node(filepath, plugin_category, package_path) + self._install_node(filepath, package.category(), package_path) # install presets presets_path = package_path / 'presets' From 8ac81b6514fbc7a6fe32cec6bad688263df8de29 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:05:34 +0100 Subject: [PATCH 04/23] update redshift nodes --- src/lifeblood/stock_nodes/redshift/meta.toml | 3 + .../redshift/nodes/hip_rs_generator.py | 8 +- .../stock_nodes/redshift/nodes/redshift.py | 3 +- .../stock_nodes/redshift/presets/redshift.lbp | 751 ++++++++++++++++++ 4 files changed, 756 insertions(+), 9 deletions(-) create mode 100644 src/lifeblood/stock_nodes/redshift/meta.toml create mode 100644 src/lifeblood/stock_nodes/redshift/presets/redshift.lbp diff --git a/src/lifeblood/stock_nodes/redshift/meta.toml b/src/lifeblood/stock_nodes/redshift/meta.toml new file mode 100644 index 00000000..637d600e --- /dev/null +++ b/src/lifeblood/stock_nodes/redshift/meta.toml @@ -0,0 +1,3 @@ +dependencies = [ + "houdini", +] diff --git a/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py b/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py index 5e864077..abed6c9c 100644 --- a/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py +++ b/src/lifeblood/stock_nodes/redshift/nodes/hip_rs_generator.py @@ -1,5 +1,4 @@ from copy import copy -from lifeblood.basenode import BaseNodeWithTaskRequirements from lifeblood.enums import NodeParameterType from lifeblood.processingcontext import ProcessingContext from lifeblood.invocationjob import InvocationJob, InvocationEnvironment @@ -35,14 +34,9 @@ def __init__(self, name): super(HipRsGenerator, self).__init__(name) ui = self.get_ui() with ui.initializing_interface_lock(): - ui.color_scheme().set_main_color(0.5, 0.25, 0.125) + ui.color_scheme().set_main_color(0.788, 0.18, 0.18) ui.parameter('scene file output').set_value("`config['global_scratch_location']`/`node.name`/`task.name`_`task.id`/rs_scenes/`node.name`.$F4.rs") - ui.parameter('worker cpu cost').set_value(0.5) - ui.parameter('worker mem cost').set_value(1.0) - ui.parameter('worker gpu cost').set_value(1) - ui.parameter('worker gpu mem cost').set_value(2.0) - def _take_parm_name(self, context) -> str: return 'take' diff --git a/src/lifeblood/stock_nodes/redshift/nodes/redshift.py b/src/lifeblood/stock_nodes/redshift/nodes/redshift.py index d9513ffa..d82c8165 100644 --- a/src/lifeblood/stock_nodes/redshift/nodes/redshift.py +++ b/src/lifeblood/stock_nodes/redshift/nodes/redshift.py @@ -1,4 +1,3 @@ -from copy import copy from lifeblood.node_plugin_base import BaseNodeWithTaskRequirements from lifeblood.enums import NodeParameterType from lifeblood.nodethings import ProcessingResult, ProcessingError @@ -32,7 +31,7 @@ def __init__(self, name): super(Redshift, self).__init__(name) ui = self.get_ui() with ui.initializing_interface_lock(): - ui.color_scheme().set_main_color(0.5, 0.25, 0.125) + ui.color_scheme().set_main_color(0.788, 0.18, 0.18) ui.add_parameter('rs path', 'rs file path', NodeParameterType.STRING, "`task['file']`") ui.add_parameter('image path', 'output image file path', NodeParameterType.STRING, "`task['outimage']`") ui.add_parameter('skip if exists', 'skip if result already exists', NodeParameterType.BOOL, False) diff --git a/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp b/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp new file mode 100644 index 00000000..00e7117c --- /dev/null +++ b/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp @@ -0,0 +1,751 @@ +{ + "nodes": [ + { + "tmpid": 0, + "type": "hip_rs_generator", + "name": "generate rs", + "parameters": { + "__requirements__.priority_adjustment": { + "name": "__requirements__.priority_adjustment", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0.5649999976158142, + "expr": null, + "__dataclass__": "ParamData" + }, + "__requirements__.f_min_res_0": { + "name": "__requirements__.f_min_res_0", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 2.0, + "expr": "task['requirements']['cpu']['min']", + "__dataclass__": "ParamData" + }, + "__requirements__.f_pref_res_0": { + "name": "__requirements__.f_pref_res_0", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 4.0, + "expr": "task['requirements']['cpu']['pref']", + "__dataclass__": "ParamData" + }, + "__requirements__.f_min_res_1": { + "name": "__requirements__.f_min_res_1", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 2.0, + "expr": "task['requirements']['cmem']['min']", + "__dataclass__": "ParamData" + }, + "__requirements__.f_pref_res_1": { + "name": "__requirements__.f_pref_res_1", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0.5, + "expr": "task['requirements']['cmem']['pref']", + "__dataclass__": "ParamData" + }, + "__requirements__.worker_groups": { + "name": "__requirements__.worker_groups", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "", + "expr": null, + "__dataclass__": "ParamData" + }, + "__requirements__.worker_type": { + "name": "__requirements__.worker_type", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0, + "expr": null, + "__dataclass__": "ParamData" + }, + "hip path": { + "name": "hip path", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "`task['hipfile']`", + "expr": null, + "__dataclass__": "ParamData" + }, + "mask as different hip": { + "name": "mask as different hip", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": false, + "expr": null, + "__dataclass__": "ParamData" + }, + "mask hip path": { + "name": "mask hip path", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "`task.get('hipfile_orig', task['hipfile'])`", + "expr": null, + "__dataclass__": "ParamData" + }, + "driver path": { + "name": "driver path", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "`task['hipdriver']`", + "expr": null, + "__dataclass__": "ParamData" + }, + "attrs to context": { + "name": "attrs to context", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "", + "expr": null, + "__dataclass__": "ParamData" + }, + "scene file output": { + "name": "scene file output", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "`config['global_scratch_location']`/`node.name`/`task.name`_`task.id`/rs_scenes/`node.name`.$F4.rs", + "expr": null, + "__dataclass__": "ParamData" + }, + "skip if exists": { + "name": "skip if exists", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": false, + "expr": null, + "__dataclass__": "ParamData" + }, + "gen for skipped": { + "name": "gen for skipped", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": true, + "expr": null, + "__dataclass__": "ParamData" + }, + "attrs": { + "name": "attrs", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "requirements_render", + "expr": null, + "__dataclass__": "ParamData" + } + }, + "pos": [ + 4580.303530900657, + 1786.2739305753025 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 1, + "type": "split_waiter", + "name": "wait for all split parts", + "parameters": { + "wait for all": { + "name": "wait for all", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": true, + "expr": null, + "__dataclass__": "ParamData" + }, + "transfer_attribs": { + "name": "transfer_attribs", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 1, + "expr": null, + "__dataclass__": "ParamData" + }, + "src_attr_name_0": { + "name": "src_attr_name_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "images", + "expr": null, + "__dataclass__": "ParamData" + }, + "transfer_type_0": { + "name": "transfer_type_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "extend", + "expr": null, + "__dataclass__": "ParamData" + }, + "dst_attr_name_0": { + "name": "dst_attr_name_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "images", + "expr": null, + "__dataclass__": "ParamData" + }, + "sort_by_0": { + "name": "sort_by_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "frames", + "expr": null, + "__dataclass__": "ParamData" + }, + "reversed_0": { + "name": "reversed_0", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": false, + "expr": null, + "__dataclass__": "ParamData" + } + }, + "pos": [ + 4583.981089337652, + 2560.5255375361307 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 2, + "type": "null", + "name": "out redshift", + "parameters": {}, + "pos": [ + 4585.264515235215, + 2704.2892083839133 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 3, + "type": "parent_children_waiter", + "name": "wait for children", + "parameters": { + "recursive": { + "name": "recursive", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": false, + "expr": null, + "__dataclass__": "ParamData" + }, + "transfer_attribs": { + "name": "transfer_attribs", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 1, + "expr": null, + "__dataclass__": "ParamData" + }, + "src_attr_name_0": { + "name": "src_attr_name_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "file", + "expr": null, + "__dataclass__": "ParamData" + }, + "transfer_type_0": { + "name": "transfer_type_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "extend", + "expr": null, + "__dataclass__": "ParamData" + }, + "dst_attr_name_0": { + "name": "dst_attr_name_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "images", + "expr": null, + "__dataclass__": "ParamData" + }, + "sort_by_0": { + "name": "sort_by_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "frames", + "expr": null, + "__dataclass__": "ParamData" + }, + "reversed_0": { + "name": "reversed_0", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": false, + "expr": null, + "__dataclass__": "ParamData" + } + }, + "pos": [ + 4581.638451503372, + 2414.014892015606 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 4, + "type": "framerange_splitter", + "name": "split framerange", + "parameters": { + "chunk size": { + "name": "chunk size", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 10, + "expr": "task.get('framechunk_size', 10)", + "__dataclass__": "ParamData" + } + }, + "pos": [ + 4581.996971985054, + 1642.9750451563123 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 5, + "type": "null", + "name": "IN REDSHIFT", + "parameters": {}, + "pos": [ + 4582.124925071043, + 1504.4279029767154 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 6, + "type": "redshift", + "name": "redshift render rs", + "parameters": { + "__requirements__.priority_adjustment": { + "name": "__requirements__.priority_adjustment", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0.0, + "expr": null, + "__dataclass__": "ParamData" + }, + "__requirements__.f_min_res_0": { + "name": "__requirements__.f_min_res_0", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 2.0, + "expr": "task['requirements_render']['cpu']['min']", + "__dataclass__": "ParamData" + }, + "__requirements__.f_pref_res_0": { + "name": "__requirements__.f_pref_res_0", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 4.0, + "expr": "task['requirements_render']['cpu']['pref']", + "__dataclass__": "ParamData" + }, + "__requirements__.f_min_res_1": { + "name": "__requirements__.f_min_res_1", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0.5, + "expr": "task['requirements_render']['cmem']['min']", + "__dataclass__": "ParamData" + }, + "__requirements__.f_pref_res_1": { + "name": "__requirements__.f_pref_res_1", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0.5, + "expr": "task['requirements_render']['cmem']['pref']", + "__dataclass__": "ParamData" + }, + "__requirements__.worker_groups": { + "name": "__requirements__.worker_groups", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "", + "expr": null, + "__dataclass__": "ParamData" + }, + "__requirements__.worker_type": { + "name": "__requirements__.worker_type", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0, + "expr": null, + "__dataclass__": "ParamData" + }, + "rs path": { + "name": "rs path", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "`task['file']`", + "expr": null, + "__dataclass__": "ParamData" + }, + "image path": { + "name": "image path", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "`task['outimage']`", + "expr": null, + "__dataclass__": "ParamData" + }, + "skip if exists": { + "name": "skip if exists", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": false, + "expr": null, + "__dataclass__": "ParamData" + } + }, + "pos": [ + 4705.150219959042, + 2096.180477567481 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 7, + "type": "set_attrib", + "name": "save rs file path for deletion", + "parameters": { + "attr_count": { + "name": "attr_count", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 1, + "expr": null, + "__dataclass__": "ParamData" + }, + "name_0": { + "name": "name_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "rsfile", + "expr": null, + "__dataclass__": "ParamData" + }, + "type_0": { + "name": "type_0", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 3, + "expr": null, + "__dataclass__": "ParamData" + }, + "svalue_0": { + "name": "svalue_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "`task['file']`", + "expr": null, + "__dataclass__": "ParamData" + }, + "ivalue_0": { + "name": "ivalue_0", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0, + "expr": null, + "__dataclass__": "ParamData" + }, + "fvalue_0": { + "name": "fvalue_0", + "type": { + "value": 2, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0.0, + "expr": null, + "__dataclass__": "ParamData" + }, + "bvalue_0": { + "name": "bvalue_0", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": false, + "expr": null, + "__dataclass__": "ParamData" + }, + "rf1value_0": { + "name": "rf1value_0", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0, + "expr": null, + "__dataclass__": "ParamData" + }, + "rf2value_0": { + "name": "rf2value_0", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 9, + "expr": null, + "__dataclass__": "ParamData" + }, + "rf3value_0": { + "name": "rf3value_0", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 1, + "expr": null, + "__dataclass__": "ParamData" + } + }, + "pos": [ + 4705.07476313525, + 1966.3527812801685 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 8, + "type": "fileops", + "name": "delete rs file", + "parameters": { + "on workers": { + "name": "on workers", + "type": { + "value": 1, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": false, + "expr": null, + "__dataclass__": "ParamData" + }, + "item count": { + "name": "item count", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 1, + "expr": null, + "__dataclass__": "ParamData" + }, + "path_0": { + "name": "path_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "`task['rsfile']`", + "expr": null, + "__dataclass__": "ParamData" + }, + "op_0": { + "name": "op_0", + "type": { + "value": 3, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": "rm", + "expr": null, + "__dataclass__": "ParamData" + } + }, + "pos": [ + 4704.903907894983, + 2236.7178859566125 + ], + "__dataclass__": "NodeData" + }, + { + "tmpid": 9, + "type": "killer", + "name": "kill unused", + "parameters": {}, + "pos": [ + 4750.981089337652, + 2560.5255375361307 + ], + "__dataclass__": "NodeData" + } + ], + "connections": [ + { + "tmpout": 3, + "out_name": "main", + "tmpin": 1, + "in_name": "main", + "__dataclass__": "ConnData" + }, + { + "tmpout": 5, + "out_name": "main", + "tmpin": 4, + "in_name": "main", + "__dataclass__": "ConnData" + }, + { + "tmpout": 4, + "out_name": "main", + "tmpin": 0, + "in_name": "main", + "__dataclass__": "ConnData" + }, + { + "tmpout": 6, + "out_name": "main", + "tmpin": 8, + "in_name": "main", + "__dataclass__": "ConnData" + }, + { + "tmpout": 7, + "out_name": "main", + "tmpin": 6, + "in_name": "main", + "__dataclass__": "ConnData" + }, + { + "tmpout": 8, + "out_name": "main", + "tmpin": 3, + "in_name": "children", + "__dataclass__": "ConnData" + }, + { + "tmpout": 0, + "out_name": "main", + "tmpin": 3, + "in_name": "main", + "__dataclass__": "ConnData" + }, + { + "tmpout": 0, + "out_name": "spawned", + "tmpin": 7, + "in_name": "main", + "__dataclass__": "ConnData" + }, + { + "tmpout": 1, + "out_name": "main", + "tmpin": 2, + "in_name": "main", + "__dataclass__": "ConnData" + }, + { + "tmpout": 3, + "out_name": "children", + "tmpin": 9, + "in_name": "main", + "__dataclass__": "ConnData" + } + ], + "label": "redshift setup", + "tags": [], + "__NodeSnippetData__": "==3*E==", + "__format_version__": [ + 1, + 0, + 0 + ] +} \ No newline at end of file From 85c500efe3c75f67ed255e8250ac7c6f41c3e5b5 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:23:40 +0100 Subject: [PATCH 05/23] use all available GPU by default for redshift --- .../stock_nodes/redshift/presets/redshift.lbp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp b/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp index 00e7117c..f16400b3 100644 --- a/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp +++ b/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp @@ -455,6 +455,26 @@ "expr": null, "__dataclass__": "ParamData" }, + "__requirements__.min_dev_0": { + "name": "__requirements__.min_dev_0", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 0, + "expr": null, + "__dataclass__": "ParamData" + }, + "__requirements__.pref_dev_0": { + "name": "__requirements__.pref_dev_0", + "type": { + "value": 0, + "__NodeParameterType__": "==3*E==" + }, + "uvalue": 99, + "expr": null, + "__dataclass__": "ParamData" + }, "rs path": { "name": "rs path", "type": { From 50e3c22eee6ef3603570f35e658158adfea2d173 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Sat, 18 Jan 2025 16:43:23 +0100 Subject: [PATCH 06/23] redshift submitter --- .../INDEX__SECTION | 14 + .../Sections.list | 4 + .../houdini.hdalibrary | 0 .../Contents.dir/.OPdummydefs | Bin 0 -> 10124 bytes .../Contents.dir/.OPfallbacks | 2 + .../Contents.dir/Contents.createtimes | 4 + .../Contents.dir/Contents.mime | 879 ++++++++++++++++++ .../Contents.dir/Contents.modtimes | 4 + .../Contents.dir/Sections.list | 2 + .../CreateScript | 14 + .../DialogScript | 280 ++++++ .../ExtraFileOptions | 22 + .../Help | 0 .../InternalFileOptions | 10 + .../PythonModule | 24 + .../Sections.list | 10 + .../Tools.shelf | 23 + .../TypePropertiesOptions | 14 + 18 files changed, 1306 insertions(+) create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/INDEX__SECTION create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/Sections.list create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/houdini.hdalibrary create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPdummydefs create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPfallbacks create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.createtimes create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.modtimes create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Sections.list create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/CreateScript create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/ExtraFileOptions create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Help create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/InternalFileOptions create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PythonModule create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Sections.list create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Tools.shelf create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/TypePropertiesOptions diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/INDEX__SECTION b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/INDEX__SECTION new file mode 100644 index 00000000..170faa4b --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/INDEX__SECTION @@ -0,0 +1,14 @@ +Operator: lifeblood::lifeblood_redshift_submitter::1.0 +Label: Lifeblood Redshift Submitter +Path: oplib:/lifeblood::Driver/lifeblood_redshift_submitter::1.0?lifeblood::Driver/lifeblood_redshift_submitter::1.0 +Icon: opdef:/lifeblood::Driver/lifeblood_submitter::1.0.0?IconSVG +Table: Driver +License: +Extra: +User: +Inputs: 0 to 1 +Subnet: true +Python: false +Empty: false +Modified: Tue Nov 5 19:08:56 2024 + diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/Sections.list b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/Sections.list new file mode 100644 index 00000000..a71ee584 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/Sections.list @@ -0,0 +1,4 @@ +"" +INDEX__SECTION INDEX_SECTION +houdini.hdalibrary houdini.hdalibrary +lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0 lifeblood::Driver/lifeblood_redshift_submitter::1.0 diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/houdini.hdalibrary b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/houdini.hdalibrary new file mode 100644 index 00000000..e69de29b diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPdummydefs b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPdummydefs new file mode 100644 index 0000000000000000000000000000000000000000..c158d5d7abe8ebd57d8b735c0cd295024399b179 GIT binary patch literal 10124 zcmdT~-EP}96i&8bScC0mx4U7~7EOx5vy=1(E{36Pf+9eW0&%ex7zT~DXj?5U8WNp0 z2=W$tnLW(jW#>>PMM;$8#CEzeNTl!_^8E9BW^#Ob_--Q`U&HGU$ESx!@BH4;%Qwfb zPgC0Fz0pJeDZKwU7PBCX!qzyTJnY9bzS!8+cF*ANL z>rX-{S={Y*TJ2UlU3>rE(Zd)2z!sbE{SAEIH!Heb^Xgc<@zaSGMqaUq#o>VTv^)Hvoqfa5ZofHuetdFtw!OW*ahIe5Nunf@p@@m)O7mI@BcU@XCRBz4%J~Hu zVH~Ms!PeI07J(7b3Ar7^&r`o%rL&`0 z%y1f2#ewSL)APq+5U?m^#u+8ZNeQF#FbVsdN!m|$MgA#`C)UO|Wj1G@*kC4EwmDM! zG-0^N=z^0*>KTgy7Ux&I7hx2!PcpZHeVU3`f-n&=L%1?;b!x>*MxZh;FR5NP%;8w@ zq}6KWmqkM9Z-k>oHTunCQc%%&Ej@lR3C1^rm_f=BNs|v5RbEV0B>OWdMPyWfYNsT)7KMclxIL$0Iey}IC`H76fXk^SUrHthdI3w^>Z*{a9 z7%o)8?U!ZL#}suKke}8jgm6NRSZr)4W|eKi{?h|n`xrcoS#U|(q|;s~+)ZYw6JsDa zr&Cq*R*joX?Z<)!1DZ%5+y^HLw9Ld|u3;wOVK3uYYTSh={ojSW4_l%~(a1b|-_HDln3A`mG^PpkMK zA!Z>GMof}$N@x_2d~ObHU*; zq^UC_qiIJJvcbv(JM1?}>-rvzSfol_q+MIxd#`)z)p#0*A`az6=0lT_O5qeKm$|g3 zhg{GMiCT_+l9rX?z!^tOaN3xT zj#uTjg!P4^0{6#JM4Rbs1ztj;mlQ^YpW%iQ-Tv5L8b3bn`%v)h=nU%OD44|Z>4QBOC^ z`vgDG5f7hupE4;+%O^R?zP*w;r`!jh)}{sU%xdz&1+vkImFETA#juZK77_1~s8UZ8 znr#0{KnHSF_N>)r@*n(AKODE~=pkRq(fQt*8gRRARvLT(j)uBkCZn&}1FWOo24^}z zHE9ciT;9ChtbCtDUxc&N3F;{F+x1qTFXgQYa8-3yTB+r1l{LAAZEL;BmBQ5l-1%}x zyEdo{TMUOwuo^^~c2J@kO+p4@23@|?PHSw%{@Y;dLfBfj1cy0DGA5xpRtIvKhWrL_ zyMYz5G=VGRsY(u{RibhvHf0a;)POA{Hv=xkwE*Z+d~o130x!kb48F>!2^TJN7~uNy zuDIhO`CyP#V>VRaDHN~Mp$bzW&sx*LF0xXV*B~uatPyP?)8`G4LSU;1kQfJlP;m3{Vuk%OKEu`Pcpp5|tNAS-Bv524kj0oA1gvV34e8i=r%KZ?%2$p8QV literal 0 HcmV?d00001 diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPfallbacks b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPfallbacks new file mode 100644 index 00000000..9ae3319a --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPfallbacks @@ -0,0 +1,2 @@ +lifeblood::Driver/lifeblood_submitter::1.0.0 /home/xapkohheh/git/dev_fhs/projects_py/lifeblood/dcc_plugins/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda +lifeblood::Driver/lifeblood_submitter::1.0.0 otls/Driver-lifeblood_submitter-1.0.0.hda diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.createtimes b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.createtimes new file mode 100644 index 00000000..1b440e94 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.createtimes @@ -0,0 +1,4 @@ +{ + "hdaroot/lifeblood_submitter.def":1730829848, + "hdaroot.def":1730829942 +} diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime new file mode 100644 index 00000000..abfed453 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime @@ -0,0 +1,879 @@ +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY" + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename=".OPfallbacks" +Content-Type: application/external-reference + +.OPfallbacks + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename=".OPdummydefs" +Content-Type: application/external-reference + +.OPdummydefs + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="node_type" +Content-Type: text/plain + +Driver + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot.init" +Content-Type: text/plain + +type = lifeblood::lifeblood_redshift_submitter::1.0 +matchesdef = 0 + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot.def" +Content-Type: text/plain + +comment "" +position -2.61601 -1.75948 +connectornextid 0 +flags = lock off model off template off footprint off xray off bypass off display off render off highlight off unload off savedata off compress on colordefault on exposed on +outputsNamed3 +{ +} +inputsNamed3 +{ +} +inputs +{ +} +stat +{ + create -1 + modify -1 + author xapkohheh@localhost + access 0777 +} +color UT_Color RGB 0.8 0.8 0.8 +delscript "" +exprlanguage hscript +end + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot.userdata" +Content-Type: text/plain + +{ + "___Version___":{ + "type":"string", + "value":"" + } +} + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot.inp" +Content-Type: text/plain + +1 +0 0 6 2 0 __NO_OWNER_NETWORK_BOX__ "FROMOUTPUT" + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot/lifeblood_submitter.init" +Content-Type: text/plain + +type = lifeblood::lifeblood_submitter::1.0.0 +matchesdef = 1 + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot/lifeblood_submitter.def" +Content-Type: text/plain + +comment "" +position 0 5.2176 +connectornextid 0 +flags = lock off model off template off footprint off xray off bypass off display on render on highlight off unload off savedata off compress on colordefault on exposed on +outputsNamed3 +{ +} +inputsNamed3 +{ +} +inputs +{ +} +stat +{ + create -1 + modify -1 + author xapkohheh@localhost + access 0777 +} +color UT_Color RGB 0.8 0.8 0.8 +delscript "" +exprlanguage hscript +end + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot/lifeblood_submitter.spareparmdef" +Content-Type: text/plain + + group { + name "_hidden2" + label "_hidden" + invisibletab + + parm { + name "execute" + baseparm + label "Render" + joinnext + export none + } + parm { + name "renderdialog" + baseparm + label "Controls..." + nolabel + export none + } + } + + parm { + name "submit" + baseparm + label "create task" + export none + } + parm { + name "sch_ip" + baseparm + label "ip" + joinnext + export none + } + parm { + name "sch_port" + baseparm + label "port" + nolabel + export none + } + groupcollapsible { + name "broadcast_parameters2" + label "broadcast parameters" + + parm { + name "brd_ip" + baseparm + label "broadcast ip" + joinnext + export none + } + parm { + name "brd_port" + baseparm + label "port" + nolabel + export none + } + parm { + name "brd_timeout" + baseparm + label "timeout (sec)" + export none + } + parm { + name "brd_identifier" + baseparm + label "identifier" + export none + } + } + + parm { + name "broadcast_listen" + baseparm + label "Listen to Scheduler's broadcast to get ip and port" + export none + } + parm { + name "node_name" + baseparm + label "node name" + export none + } + parm { + name "task_name" + baseparm + label "task name" + export none + } + parm { + name "priority" + baseparm + label "task group priority" + export none + } + parm { + name "sepparm" + label "Separator" + type separator + default { "" } + } + parm { + name "f" + label "Start/End/Inc" + type integer + size 3 + default { "$FSTART" "$FEND" "1" } + range { -1 1 } + parmtag { "script_callback_language" "python" } + } + parm { + name "framechunk_size" + label "Frame Chunk Size" + type integer + default { "10" } + help "number of frames per single rs generation task" + range { 1! 20 } + parmtag { "script_callback_language" "python" } + } + parm { + name "roppath" + label "Redshift Node To Render" + type oppath + default { "" } + parmtag { "opfilter" "!!ROP!!" } + parmtag { "oprelative" "." } + parmtag { "script_callback_language" "python" } + } + group { + name "resmanagement_group" + label "Resource Requirements" + + groupsimple { + name "resmanagement" + label "RS Generation" + + parm { + name "res_cpucount" + label "Cpu cores (min/pref)" + type vector2 + size 2 + default { "2" "4" } + range { 0.1! 32 } + parmtag { "script_callback_language" "python" } + } + parm { + name "res_cpumem" + label "Cpu RAM GB (min/pref)" + type vector2 + size 2 + default { "0.5" "0" } + range { 0.1! 128 } + parmtag { "script_callback_language" "python" } + } + parm { + name "res_gpucount" + label "Gpu count (min/pref)" + type vector2 + invisible + size 2 + default { "0" "0" } + range { 0.1! 2 } + parmtag { "script_callback_language" "python" } + } + parm { + name "res_gpumem" + label "Gpu RAM GB (min/pref)" + type vector2 + invisible + size 2 + default { "0" "0" } + range { 0.1! 16 } + parmtag { "script_callback_language" "python" } + } + } + + groupsimple { + name "resmanagement_redshift" + label "Redshift Rendering" + + parm { + name "res_m_cpucount" + label "Cpu cores (min/pref)" + type vector2 + size 2 + default { "2" "4" } + range { 0.1! 32 } + parmtag { "script_callback_language" "python" } + } + parm { + name "res_m_cpumem" + label "Cpu RAM GB (min/pref)" + type vector2 + size 2 + default { "0.5" "0" } + range { 0.1! 128 } + parmtag { "script_callback_language" "python" } + } + parm { + name "res_m_gpucount" + label "Gpu count (min/pref)" + type vector2 + invisible + size 2 + default { "0" "0" } + range { 0.1! 2 } + parmtag { "script_callback_language" "python" } + } + parm { + name "res_m_gpumem" + label "Gpu RAM GB (min/pref)" + type vector2 + invisible + size 2 + default { "0" "0" } + range { 0.1! 16 } + parmtag { "script_callback_language" "python" } + } + } + + } + + group { + name "resmanagement_group_1" + label "Attributes" + + multiparm { + name "attribs" + label "attributes" + baseparm + default 1 + parmtag { "multistartoffset" "0" } + + parm { + name "enable_#" + baseparm + label "name" + joinnext + export none + } + parm { + name "attr_name_#" + baseparm + label "name" + nolabel + joinnext + export none + } + parm { + name "attr_type_#" + baseparm + label "type" + nolabel + joinnext + export none + } + parm { + name "val_int_#" + baseparm + label "value" + nolabel + joinnext + export none + } + parm { + name "val_flt_#" + baseparm + label "value" + nolabel + joinnext + export none + } + parm { + name "val_str_#" + baseparm + label "value" + nolabel + export none + } + parm { + name "val_jsn_#" + baseparm + label "value" + nolabel + export none + } + parm { + name "val_bln_#" + baseparm + label "value" + nolabel + export none + } + multiscroll { + name "val_lst_#" + label "list values count" + baseparm + hidewhen "{ attr_type_# != list }" + parmtag { "multistartoffset" "0" } + + parm { + name "lst_attr_type_#_#" + baseparm + label "type" + nolabel + joinnext + export none + } + parm { + name "lst_val_int_#_#" + baseparm + label "value" + nolabel + joinnext + export none + } + parm { + name "lst_val_flt_#_#" + baseparm + label "value" + nolabel + joinnext + export none + } + parm { + name "lst_val_str_#_#" + baseparm + label "value" + nolabel + joinnext + export none + } + parm { + name "lst_val_bln_#_#" + baseparm + label "value" + nolabel + export none + } + } + + } + + } + + group { + name "resmanagement_group_2" + label "Environment resolver" + + parm { + name "env_resolver_name" + baseparm + label "Environment Resolver Name" + export none + } + multiparm { + name "env_resolver_args" + label "environment resolver parameters" + baseparm + default 2 + parmtag { "multistartoffset" "0" } + + parm { + name "env_arg_name_#" + baseparm + label "name" + joinnext + export none + } + parm { + name "env_arg_val_#" + baseparm + label "value" + export none + } + } + + } + + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot/lifeblood_submitter.chn" +Content-Type: text/plain + +{ + channel env_arg_name_0 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = \"user\" language = python } + } + channel env_arg_val_0 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "import getpass +return getpass.getuser()" language = python } + } + channel env_arg_name_1 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "import sys +return \"package.houdini.py%d_%d\" % (sys.version_info.major, sys.version_info.minor)" language = python } + } + channel env_arg_val_1 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "\"~=\" + hou.applicationVersionString()" language = python } + } + channel val_jsn_3 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "node = hou.pwd() + +start, end, inc = node.parmTuple('f').eval() +if int(start) == start and int(end) == end and int(inc) == inc: + start, end, inc = int(start), int(end), int(inc) + +frames = [] +assert start <= end +assert inc > 0 + +while start <= end: + frames.append(start) + start += inc + +return repr(frames)" language = python } + } + channel val_jsn_4 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "import json +n = hou.pwd() +return json.dumps({'cpu': {'min': n.evalParm('res_cpucountx'), + 'pref': n.evalParm('res_cpucounty')}, + 'cmem': {'min': n.evalParm('res_cpumemx'), + 'pref': n.evalParm('res_cpumemy')}}) +" language = python } + } + channel val_jsn_5 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "import json +n = hou.pwd() +return json.dumps({'cpu': {'min': n.evalParm('res_m_cpucountx'), + 'pref': n.evalParm('res_m_cpucounty')}, + 'cmem': {'min': n.evalParm('res_m_cpumemx'), + 'pref': n.evalParm('res_m_cpumemy')}}) +" language = python } + } + channel val_int_2 { + lefttype = extend + righttype = extend + flags = 0 + segment { length = 0 expr = ch(\"framechunk_size\") } + } + channel sch_ip { + lefttype = extend + righttype = extend + defaultString = \"127.0.0.1\" + flags = 0 + segment { length = 0 expr = chs(\"../sch_ip\") } + } + channel sch_port { + lefttype = extend + righttype = extend + default = 1384 + flags = 0 + segment { length = 0 value = 1384 1384 expr = ch(\"../sch_port\") } + } + channel brd_ip { + lefttype = extend + righttype = extend + defaultString = \"0.0.0.0\" + flags = 0 + segment { length = 0 expr = chs(\"../brd_ip\") } + } + channel brd_port { + lefttype = extend + righttype = extend + default = 34305 + flags = 0 + segment { length = 0 value = 34305 34305 expr = ch(\"../brd_port\") } + } + channel brd_timeout { + lefttype = extend + righttype = extend + default = 15 + flags = 0 + segment { length = 0 value = 15 15 expr = ch(\"../brd_timeout\") } + } + channel brd_identifier { + lefttype = extend + righttype = extend + defaultString = \"lifeblood_scheduler\" + flags = 0 + segment { length = 0 expr = chs(\"../brd_identifier\") } + } + channel broadcast_listen { + lefttype = extend + righttype = extend + flags = 0 + segment { length = 0 expr = ch(\"../broadcast_listen\") } + } + channel node_name { + lefttype = extend + righttype = extend + defaultString = "\"IN REDSHIFT\"" + flags = 0 + segment { length = 0 expr = chs(\"../node_name\") } + } + channel task_name { + lefttype = extend + righttype = extend + defaultString = \"$OS\" + flags = 0 + segment { length = 0 expr = chs(\"../task_name\") } + } + channel priority { + lefttype = extend + righttype = extend + default = 50 + flags = 0 + segment { length = 0 value = 50 50 expr = ch(\"../priority\") } + } + channel f1 { + lefttype = extend + righttype = extend + default = 1 + flags = 0 + segment { length = 0 value = 1 1 expr = ch(\"../f1\") } + } + channel f2 { + lefttype = extend + righttype = extend + default = 240 + flags = 0 + segment { length = 0 value = 240 240 expr = ch(\"../f2\") } + } + channel f3 { + lefttype = extend + righttype = extend + default = 1 + flags = 0 + segment { length = 0 value = 1 1 expr = ch(\"../f3\") } + } + channel framechunk_size { + lefttype = extend + righttype = extend + default = 10 + flags = 0 + segment { length = 0 value = 10 10 expr = ch(\"../framechunk_size\") } + } + channel roppath { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { length = 0 expr = chsop(\"../roppath\") } + } + channel res_cpucountx { + lefttype = extend + righttype = extend + default = 2 + flags = 0 + segment { length = 0 value = 2 2 expr = ch(\"../res_cpucountx\") } + } + channel res_cpucounty { + lefttype = extend + righttype = extend + default = 4 + flags = 0 + segment { length = 0 value = 4 4 expr = ch(\"../res_cpucounty\") } + } + channel res_cpumemx { + lefttype = extend + righttype = extend + default = 0.5 + flags = 0 + segment { length = 0 value = 0.5 0.5 expr = ch(\"../res_cpumemx\") } + } + channel res_cpumemy { + lefttype = extend + righttype = extend + flags = 0 + segment { length = 0 expr = ch(\"../res_cpumemy\") } + } + channel res_m_cpucountx { + lefttype = extend + righttype = extend + default = 2 + flags = 0 + segment { length = 0 value = 2 2 expr = ch(\"../res_m_cpucountx\") } + } + channel res_m_cpucounty { + lefttype = extend + righttype = extend + default = 4 + flags = 0 + segment { length = 0 value = 4 4 expr = ch(\"../res_m_cpucounty\") } + } + channel res_m_cpumemx { + lefttype = extend + righttype = extend + default = 0.5 + flags = 0 + segment { length = 0 value = 0.5 0.5 expr = ch(\"../res_m_cpumemx\") } + } + channel res_m_cpumemy { + lefttype = extend + righttype = extend + flags = 0 + segment { length = 0 expr = ch(\"../res_m_cpumemy\") } + } + } + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot/lifeblood_submitter.parm" +Content-Type: text/plain + +{ +version 0.8 +execute [ 0 locks=0 ] ( 0 ) +renderdialog [ 0 locks=0 ] ( 0 ) +_hidden [ 0 locks=0 ] ( 0 ) +submit [ 0 locks=0 ] ( 0 ) +sch_ip [ 0 locks=0 ] ( [ sch_ip 127.0.0.1 ] ) +sch_port [ 0 locks=0 ] ( [ sch_port 1384 ] ) +broadcast_parameters [ 0 locks=0 ] ( 0 ) +brd_ip [ 0 locks=0 ] ( [ brd_ip 0.0.0.0 ] ) +brd_port [ 0 locks=0 ] ( [ brd_port 34305 ] ) +brd_timeout [ 0 locks=0 ] ( [ brd_timeout 15 ] ) +brd_identifier [ 0 locks=0 ] ( [ brd_identifier lifeblood_scheduler ] ) +broadcast_listen [ 0 locks=0 ] ( [ broadcast_listen 0 ] ) +node_name [ 0 locks=0 ] ( [ node_name "" ] ) +task_name [ 0 locks=0 ] ( [ task_name $OS ] ) +priority [ 0 locks=0 ] ( [ priority 50 ] ) +folder0 [ 0 locks=0 ] ( 0 0 ) +attribs [ 0 locks=0 ] ( 6 ) +env_resolver_name [ 0 locks=0 ] ( StandardEnvironmentResolver ) +env_resolver_args [ 0 locks=0 ] ( 2 ) +enable_0 [ 0 locks=0 ] ( "on" ) +attr_name_0 [ 0 locks=0 ] ( hipfile ) +attr_type_0 [ 0 locks=0 ] ( "str" ) +val_int_0 [ 0 locks=0 ] ( 0 ) +val_flt_0 [ 0 locks=0 ] ( 0 ) +val_str_0 [ 0 locks=0 ] ( $HIPFILE ) +val_jsn_0 [ 0 locks=0 ] ( "" ) +val_bln_0 [ 0 locks=0 ] ( "off" ) +val_lst_0 [ 0 locks=0 ] ( 0 ) +env_arg_name_0 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_name_0 "" ] ) +env_arg_val_0 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_val_0 "" ] ) +env_arg_name_1 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_name_1 "" ] ) +env_arg_val_1 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_val_1 "" ] ) +_hidden2 [ 0 locks=0 ] ( 0 ) +broadcast_parameters2 [ 0 locks=0 ] ( 0 ) +sepparm [ 0 locks=0 ] ( ) +f [ 0 locks=0 ] ( [ f1 0 ] [ f2 0 ] [ f3 1 ] ) +framechunk_size [ 0 locks=0 ] ( [ framechunk_size 10 ] ) +roppath [ 0 locks=0 ] ( [ roppath "" ] ) +resmanagement_group [ 0 locks=0 ] ( 0 0 0 ) +resmanagement [ 0 locks=0 ] ( 1 ) +res_cpucount [ 0 locks=0 ] ( [ res_cpucountx 2 ] [ res_cpucounty 4 ] ) +res_cpumem [ 0 locks=0 ] ( [ res_cpumemx 0.5 ] [ res_cpumemy 0 ] ) +res_gpucount [ 0 locks=0 ] ( 0 0 ) +res_gpumem [ 0 locks=0 ] ( 0 0 ) +resmanagement_redshift [ 0 locks=0 ] ( 0 ) +res_m_cpucount [ 0 locks=0 ] ( [ res_m_cpucountx 2 ] [ res_m_cpucounty 4 ] ) +res_m_cpumem [ 0 locks=0 ] ( [ res_m_cpumemx 0.5 ] [ res_m_cpumemy 0 ] ) +res_m_gpucount [ 0 locks=0 ] ( 0 0 ) +res_m_gpumem [ 0 locks=0 ] ( 0 0 ) +enable_1 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) +attr_name_1 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( hipdriver ) +attr_type_1 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "str" ) +val_int_1 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_flt_1 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_str_1 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( `chsop(\"roppath\")` ) +val_jsn_1 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( "" ) +val_bln_1 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) +val_lst_1 [ 0 locks=0 ] ( 0 ) +enable_2 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) +attr_name_2 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( framechunk_size ) +attr_type_2 [ 8 locks=0 autoscope=0 autosel=4294967295 ] ( "int" ) +val_int_2 [ 8 locks=0 autoscope=0 autosel=4294967295 ] ( [ val_int_2 0 ] ) +val_flt_2 [ 8 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_str_2 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) +val_jsn_2 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( "" ) +val_bln_2 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) +val_lst_2 [ 0 locks=0 ] ( 0 ) +enable_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) +attr_name_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( frames ) +attr_type_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "json" ) +val_int_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_flt_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_str_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) +val_jsn_3 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ val_jsn_3 "" ] ) +val_bln_3 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) +val_lst_3 [ 0 locks=0 ] ( 0 ) +enable_4 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) +attr_name_4 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( requirements ) +attr_type_4 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "json" ) +val_int_4 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_flt_4 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_str_4 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) +val_jsn_4 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ val_jsn_4 "" ] ) +val_bln_4 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) +val_lst_4 [ 0 locks=0 ] ( 0 ) +enable_5 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "on" ) +attr_name_5 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( requirements_render ) +attr_type_5 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "json" ) +val_int_5 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_flt_5 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( 0 ) +val_str_5 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "" ) +val_jsn_5 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( [ val_jsn_5 "" ] ) +val_bln_5 [ 0 locks=0 autoscope=0 autosel=4294967295 ] ( "off" ) +val_lst_5 [ 0 locks=0 ] ( 0 ) +} + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot/lifeblood_submitter.userdata" +Content-Type: text/plain + +{ + "___Version___":{ + "type":"string", + "value":"" + } +} + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY +Content-Disposition: attachment; filename="hdaroot.net" +Content-Type: text/plain + +1 + +--HOUDINIMIMEBOUNDARY0xD3ADD339-0x00000F49-0x56B122C9-0x00000001HOUDINIMIMEBOUNDARY-- diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.modtimes b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.modtimes new file mode 100644 index 00000000..8ba46e1c --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.modtimes @@ -0,0 +1,4 @@ +{ + "hdaroot/lifeblood_submitter.def":1730830199, + "hdaroot.def":1730830128 +} diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Sections.list b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Sections.list new file mode 100644 index 00000000..49f2c152 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Sections.list @@ -0,0 +1,2 @@ +"" +Contents.mime Contents.mime diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/CreateScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/CreateScript new file mode 100644 index 00000000..c8e18c77 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/CreateScript @@ -0,0 +1,14 @@ +# Automatically generated script +\set noalias = 1 +# +# Creation script for lifeblood::lifeblood_redshift_submitter::1.0 operator +# + +if ( "$arg1" == "" ) then + echo This script is intended as a creation script + exit +endif + +# Node $arg1 (lifeblood::Driver/lifeblood_redshift_submitter::1.0) +opexprlanguage -s hscript $arg1 +opuserdata -n '___Version___' -v '' $arg1 diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript new file mode 100644 index 00000000..6833518d --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript @@ -0,0 +1,280 @@ +# Dialog script for lifeblood::lifeblood_redshift_submitter::1.0 automatically generated + +{ + name lifeblood::lifeblood_redshift_submitter::1.0 + script lifeblood::lifeblood_redshift_submitter::1.0 + label "Lifeblood Redshift Submitter" + + help { + "" + } + + inputlabel 1 "Input #1" + + parm { + name "execute" + baseparm + label "Render" + invisible + joinnext + export none + } + parm { + name "renderdialog" + baseparm + label "Controls..." + nolabel + invisible + export none + } + import { + label submitter + source "op:./lifeblood_submitter" + enable 1 + + parm { + name "submit" + label "create task" + type button + default { "0" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "submit" } + parmtag { "script_callback" "hou.phm().submit_btn_callback(hou.pwd())" } + parmtag { "script_callback_language" "python" } + } + parm { + name "sch_ip" + label "ip" + type string + joinnext + default { "127.0.0.1" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "sch_ip" } + parmtag { "script_callback_language" "python" } + } + parm { + name "sch_port" + label "port" + type integer + nolabel + default { "1384" } + range { 0 10 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "sch_port" } + parmtag { "script_callback_language" "python" } + } + groupcollapsible { + name "folder2" + label "broadcast parameters" + grouptag { "import_source" "op:./lifeblood_submitter" } + grouptag { "import_token" "broadcast_parameters2:broadcast parameters" } + + parm { + name "brd_ip" + label "broadcast ip" + type string + joinnext + default { "0.0.0.0" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "brd_ip" } + parmtag { "script_callback_language" "python" } + } + parm { + name "brd_port" + label "port" + type integer + nolabel + default { "34305" } + range { 0 10 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "brd_port" } + parmtag { "script_callback_language" "python" } + } + parm { + name "brd_timeout" + label "timeout (sec)" + type integer + default { "15" } + range { 1! 20 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "brd_timeout" } + parmtag { "script_callback_language" "python" } + } + parm { + name "brd_identifier" + label "identifier" + type string + default { "lifeblood_scheduler" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "brd_identifier" } + parmtag { "script_callback_language" "python" } + } + } + + parm { + name "broadcast_listen" + label "Listen to Scheduler's broadcast to get ip and port" + type button + default { "0" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "broadcast_listen" } + parmtag { "script_callback_language" "python" } + } + parm { + name "node_name" + label "node name" + type string + default { "IN REDSHIFT" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "node_name" } + parmtag { "script_callback_language" "python" } + } + parm { + name "task_name" + label "task name" + type string + default { "$OS" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "task_name" } + parmtag { "script_callback_language" "python" } + } + parm { + name "priority" + label "task group priority" + type float + default { "50" } + range { 0! 100 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "priority" } + parmtag { "script_callback_language" "python" } + } + parm { + name "sepparm" + label "Separator" + type separator + default { "" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "sepparm" } + } + parm { + name "f" + label "Start/End/Inc" + type integer + size 3 + default { [ "$FSTART" hscript-expr ] [ "$FEND" hscript-expr ] "1" } + range { -1 1 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "f" } + parmtag { "script_callback_language" "python" } + } + parm { + name "framechunk_size" + label "Frame Chunk Size" + type integer + default { "10" } + help "number of frames per single rs generation task" + range { 1! 20 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "framechunk_size" } + parmtag { "script_callback_language" "python" } + } + parm { + name "roppath" + label "Redshift Node To Render" + type oppath + default { "" } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "roppath" } + parmtag { "opfilter" "!!ROP!!" } + parmtag { "script_callback_language" "python" } + } + group { + name "folder3" + label "Resource Requirements" + grouptag { "import_source" "op:./lifeblood_submitter" } + grouptag { "import_token" "resmanagement_group:Resource Requirements" } + + groupsimple { + name "folder6" + label "RS Generation" + grouptag { "import_source" "op:./lifeblood_submitter" } + grouptag { "import_token" "resmanagement:RS Generation" } + + parm { + name "res_cpucount" + label "Cpu cores (min/pref)" + type vector2 + size 2 + default { "2" "4" } + range { 0.1! 32 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "res_cpucount" } + parmtag { "script_callback_language" "python" } + } + parm { + name "res_cpumem" + label "Cpu RAM GB (min/pref)" + type vector2 + size 2 + default { "0.5" "0.1" } + range { 0.1! 128 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "res_cpumem" } + parmtag { "script_callback_language" "python" } + } + } + + groupsimple { + name "folder7" + label "Redshift Rendering" + grouptag { "import_source" "op:./lifeblood_submitter" } + grouptag { "import_token" "resmanagement_redshift:Redshift Rendering" } + + parm { + name "res_m_cpucount" + label "Cpu cores (min/pref)" + type vector2 + size 2 + default { "2" "4" } + range { 0.1! 32 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "res_m_cpucount" } + parmtag { "script_callback_language" "python" } + } + parm { + name "res_m_cpumem" + label "Cpu RAM GB (min/pref)" + type vector2 + size 2 + default { "0.5" "0.1" } + range { 0.1! 128 } + parmtag { "autoscope" "0000000000000000" } + parmtag { "import_source" "op:./lifeblood_submitter" } + parmtag { "import_token" "res_m_cpumem" } + parmtag { "script_callback_language" "python" } + } + } + + } + + } + +} diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/ExtraFileOptions b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/ExtraFileOptions new file mode 100644 index 00000000..6caeb582 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/ExtraFileOptions @@ -0,0 +1,22 @@ +{ + "PythonModule/Cursor":{ + "type":"intarray", + "value":[18,48] + }, + "PythonModule/IsExpr":{ + "type":"bool", + "value":false + }, + "PythonModule/IsPython":{ + "type":"bool", + "value":true + }, + "PythonModule/IsScript":{ + "type":"bool", + "value":true + }, + "PythonModule/Source":{ + "type":"string", + "value":"" + } +} diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Help b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Help new file mode 100644 index 00000000..e69de29b diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/InternalFileOptions b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/InternalFileOptions new file mode 100644 index 00000000..222988aa --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/InternalFileOptions @@ -0,0 +1,10 @@ +{ + "nodeconntype":{ + "type":"bool", + "value":false + }, + "nodeparmtype":{ + "type":"bool", + "value":false + } +} diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PythonModule b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PythonModule new file mode 100644 index 00000000..3552380d --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PythonModule @@ -0,0 +1,24 @@ +import hou + + +def submit_btn_callback(node): + # validate + ropnode = node.parm('roppath').evalAsNode() + if ropnode is None: + hou.ui.displayMessage( + 'Redshift node is not selected', + severity=hou.severityType.Error, + title='you forgot to select node to render' + ) + return + if (rop_type_name := ropnode.type().nameComponents()[2]) != 'Redshift_ROP': + hou.ui.displayMessage( + f'Specify a Redshift node to render. instead I see "{rop_type_name}"', + severity=hou.severityType.Error, + title='Invalid node type to render' + ) + return + + # submit + inner = node.node('lifeblood_submitter') + inner.hdaModule().submit_button_callback(inner) \ No newline at end of file diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Sections.list b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Sections.list new file mode 100644 index 00000000..2cd14533 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Sections.list @@ -0,0 +1,10 @@ +"" +DialogScript DialogScript +CreateScript CreateScript +InternalFileOptions InternalFileOptions +Contents.gz Contents.gz +TypePropertiesOptions TypePropertiesOptions +Help Help +Tools.shelf Tools.shelf +PythonModule PythonModule +ExtraFileOptions ExtraFileOptions diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Tools.shelf b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Tools.shelf new file mode 100644 index 00000000..84472877 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Tools.shelf @@ -0,0 +1,23 @@ + + + + + + + ROP + + + $HDA_TABLE_AND_NAME + + Lifeblood + + + Redshift + + + diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/TypePropertiesOptions b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/TypePropertiesOptions new file mode 100644 index 00000000..a6d52acf --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/TypePropertiesOptions @@ -0,0 +1,14 @@ +CheckExternal := 1; +ContentsCompressionType := 1; +ForbidOutsideParms := 1; +GzipContents := 1; +LockContents := 1; +MakeDefault := 1; +ParmsFromVfl := 0; +PrefixDroppedParmLabel := 0; +PrefixDroppedParmName := 0; +SaveCachedCode := 0; +SaveIcon := 1; +SaveSpareParms := 0; +UnlockOnCreate := 0; +UseDSParms := 1; From c32c2a08738be2f666c84d29937f61c457fafee8 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Sat, 18 Jan 2025 16:43:40 +0100 Subject: [PATCH 07/23] fail on error --- dcc_plugins_workspace/build_blender.sh | 1 + dcc_plugins_workspace/build_houdini.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/dcc_plugins_workspace/build_blender.sh b/dcc_plugins_workspace/build_blender.sh index 94f520f7..c0cc1ea3 100755 --- a/dcc_plugins_workspace/build_blender.sh +++ b/dcc_plugins_workspace/build_blender.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e -o pipefail OUT=../dcc_plugins/blender pushd $(dirname $0) diff --git a/dcc_plugins_workspace/build_houdini.sh b/dcc_plugins_workspace/build_houdini.sh index 536ba17c..88ac43fa 100755 --- a/dcc_plugins_workspace/build_houdini.sh +++ b/dcc_plugins_workspace/build_houdini.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +set -e -o pipefail OUT=../dcc_plugins/houdini From 3140f9b35b2dfb6837f76dec875022b93d2a9263 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Sat, 18 Jan 2025 16:44:02 +0100 Subject: [PATCH 08/23] require minimum 1 GPU --- src/lifeblood/stock_nodes/redshift/presets/redshift.lbp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp b/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp index f16400b3..86e6c5fc 100644 --- a/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp +++ b/src/lifeblood/stock_nodes/redshift/presets/redshift.lbp @@ -461,7 +461,7 @@ "value": 0, "__NodeParameterType__": "==3*E==" }, - "uvalue": 0, + "uvalue": 1, "expr": null, "__dataclass__": "ParamData" }, From 5f22d45c58fb13e88e13d74d5bd03095d7dfc3b7 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Mon, 27 Jan 2025 22:16:02 +0100 Subject: [PATCH 09/23] print some text on no args --- tests/nodes/data/mock_redshift/redshiftCmdLine | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/nodes/data/mock_redshift/redshiftCmdLine b/tests/nodes/data/mock_redshift/redshiftCmdLine index a719f983..be192fdc 100755 --- a/tests/nodes/data/mock_redshift/redshiftCmdLine +++ b/tests/nodes/data/mock_redshift/redshiftCmdLine @@ -5,6 +5,14 @@ import os import random import time +# TODO: this text is incorrect, find a real redshift and take the real text +noarg_text = '''Redshift Command-Line Renderer (version 3.0.39 - API: 3026) +Copyright 2020 Redshift Rendering Technologies + +Querying texture cache buget from preferences.xml: 32 GB +Querying cache path from REDSHIFT_CACHEPATH: /some/cache/path +No GPUs were selected in the command line, using all devices +''' prefix = '''Redshift Command-Line Renderer (version 3.0.39 - API: 3026) Copyright 2020 Redshift Rendering Technologies @@ -231,6 +239,7 @@ def mock_render(args: list, do_crap_myself=False): if __name__ == '__main__': if len(sys.argv) < 2: + print(noarg_text) sys.exit(2) mock_render(sys.argv[1:]) From 01a3436d9994a176805fd862bbaa2e05bc690316 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Mon, 27 Jan 2025 22:16:32 +0100 Subject: [PATCH 10/23] add automatic redshift package requirement --- .../Contents.dir/.OPdummydefs | Bin 10124 -> 0 bytes .../Contents.dir/.OPfallbacks | 2 -- .../Contents.dir/Contents.mime | 25 +++++++++++++++++- .../DialogScript | 22 +++++++++++++++ .../ExtraFileOptions | 22 ++++++++++++++- .../PreFirstCreate | 11 ++++++++ .../Sections.list | 1 + 7 files changed, 79 insertions(+), 4 deletions(-) delete mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPdummydefs delete mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPfallbacks create mode 100644 dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PreFirstCreate diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPdummydefs b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPdummydefs deleted file mode 100644 index c158d5d7abe8ebd57d8b735c0cd295024399b179..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10124 zcmdT~-EP}96i&8bScC0mx4U7~7EOx5vy=1(E{36Pf+9eW0&%ex7zT~DXj?5U8WNp0 z2=W$tnLW(jW#>>PMM;$8#CEzeNTl!_^8E9BW^#Ob_--Q`U&HGU$ESx!@BH4;%Qwfb zPgC0Fz0pJeDZKwU7PBCX!qzyTJnY9bzS!8+cF*ANL z>rX-{S={Y*TJ2UlU3>rE(Zd)2z!sbE{SAEIH!Heb^Xgc<@zaSGMqaUq#o>VTv^)Hvoqfa5ZofHuetdFtw!OW*ahIe5Nunf@p@@m)O7mI@BcU@XCRBz4%J~Hu zVH~Ms!PeI07J(7b3Ar7^&r`o%rL&`0 z%y1f2#ewSL)APq+5U?m^#u+8ZNeQF#FbVsdN!m|$MgA#`C)UO|Wj1G@*kC4EwmDM! zG-0^N=z^0*>KTgy7Ux&I7hx2!PcpZHeVU3`f-n&=L%1?;b!x>*MxZh;FR5NP%;8w@ zq}6KWmqkM9Z-k>oHTunCQc%%&Ej@lR3C1^rm_f=BNs|v5RbEV0B>OWdMPyWfYNsT)7KMclxIL$0Iey}IC`H76fXk^SUrHthdI3w^>Z*{a9 z7%o)8?U!ZL#}suKke}8jgm6NRSZr)4W|eKi{?h|n`xrcoS#U|(q|;s~+)ZYw6JsDa zr&Cq*R*joX?Z<)!1DZ%5+y^HLw9Ld|u3;wOVK3uYYTSh={ojSW4_l%~(a1b|-_HDln3A`mG^PpkMK zA!Z>GMof}$N@x_2d~ObHU*; zq^UC_qiIJJvcbv(JM1?}>-rvzSfol_q+MIxd#`)z)p#0*A`az6=0lT_O5qeKm$|g3 zhg{GMiCT_+l9rX?z!^tOaN3xT zj#uTjg!P4^0{6#JM4Rbs1ztj;mlQ^YpW%iQ-Tv5L8b3bn`%v)h=nU%OD44|Z>4QBOC^ z`vgDG5f7hupE4;+%O^R?zP*w;r`!jh)}{sU%xdz&1+vkImFETA#juZK77_1~s8UZ8 znr#0{KnHSF_N>)r@*n(AKODE~=pkRq(fQt*8gRRARvLT(j)uBkCZn&}1FWOo24^}z zHE9ciT;9ChtbCtDUxc&N3F;{F+x1qTFXgQYa8-3yTB+r1l{LAAZEL;BmBQ5l-1%}x zyEdo{TMUOwuo^^~c2J@kO+p4@23@|?PHSw%{@Y;dLfBfj1cy0DGA5xpRtIvKhWrL_ zyMYz5G=VGRsY(u{RibhvHf0a;)POA{Hv=xkwE*Z+d~o130x!kb48F>!2^TJN7~uNy zuDIhO`CyP#V>VRaDHN~Mp$bzW&sx*LF0xXV*B~uatPyP?)8`G4LSU;1kQfJlP;m3{Vuk%OKEu`Pcpp5|tNAS-Bv524kj0oA1gvV34e8i=r%KZ?%2$p8QV diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPfallbacks b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPfallbacks deleted file mode 100644 index 9ae3319a..00000000 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/.OPfallbacks +++ /dev/null @@ -1,2 +0,0 @@ -lifeblood::Driver/lifeblood_submitter::1.0.0 /home/xapkohheh/git/dev_fhs/projects_py/lifeblood/dcc_plugins/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda -lifeblood::Driver/lifeblood_submitter::1.0.0 otls/Driver-lifeblood_submitter-1.0.0.hda diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime index abfed453..44b050c7 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime @@ -538,6 +538,27 @@ return \"package.houdini.py%d_%d\" % (sys.version_info.major, sys.version_info.m length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "\"~=\" + hou.applicationVersionString()" language = python } } + channel env_arg_name_2 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "\"package.\" + hou.pwd().node(\"..\").evalParm(\"rs_pkg_name\")" language = python } + } + channel env_arg_val_2 { + lefttype = extend + righttype = extend + defaultString = \"\" + flags = 0 + segment { options = { autoslope ai ao } + + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "if hasattr(hou.session, '_lifeblood__rs_ver_str'): + return '~=' + hou.session._lifeblood__rs_ver_str + +return 'error! cannot autodetect'" language = python } + } channel val_jsn_3 { lefttype = extend righttype = extend @@ -781,7 +802,7 @@ priority [ 0 locks=0 ] ( [ priority 50 ] ) folder0 [ 0 locks=0 ] ( 0 0 ) attribs [ 0 locks=0 ] ( 6 ) env_resolver_name [ 0 locks=0 ] ( StandardEnvironmentResolver ) -env_resolver_args [ 0 locks=0 ] ( 2 ) +env_resolver_args [ 0 locks=0 ] ( 3 ) enable_0 [ 0 locks=0 ] ( "on" ) attr_name_0 [ 0 locks=0 ] ( hipfile ) attr_type_0 [ 0 locks=0 ] ( "str" ) @@ -795,6 +816,8 @@ env_arg_name_0 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_name_0 " env_arg_val_0 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_val_0 "" ] ) env_arg_name_1 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_name_1 "" ] ) env_arg_val_1 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_val_1 "" ] ) +env_arg_name_2 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_name_2 "" ] ) +env_arg_val_2 [ 0 locks=0 autoscope=1 autosel=4294967295 ] ( [ env_arg_val_2 "" ] ) _hidden2 [ 0 locks=0 ] ( 0 ) broadcast_parameters2 [ 0 locks=0 ] ( 0 ) sepparm [ 0 locks=0 ] ( ) diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript index 6833518d..36aa7df6 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript @@ -201,6 +201,7 @@ parmtag { "import_source" "op:./lifeblood_submitter" } parmtag { "import_token" "roppath" } parmtag { "opfilter" "!!ROP!!" } + parmtag { "oprelative" "." } parmtag { "script_callback_language" "python" } } group { @@ -275,6 +276,27 @@ } + group { + name "folder3_1" + label "Redshift Package" + + parm { + name "rs_pkg_name" + label "Name" + type string + joinnext + default { "redshift" } + parmtag { "script_callback_language" "python" } + } + parm { + name "rs_pkg_ver" + label "Version" + type string + default { [ "if hasattr(hou.session, '_lifeblood__rs_ver_str'):\n return hou.session._lifeblood__rs_ver_str\n\nreturn 'error! cannot autodetect'" python ] } + parmtag { "script_callback_language" "python" } + } + } + } } diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/ExtraFileOptions b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/ExtraFileOptions index 6caeb582..6e422e4c 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/ExtraFileOptions +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/ExtraFileOptions @@ -1,7 +1,27 @@ { + "PreFirstCreate/Cursor":{ + "type":"intarray", + "value":[10,1] + }, + "PreFirstCreate/IsExpr":{ + "type":"bool", + "value":false + }, + "PreFirstCreate/IsPython":{ + "type":"bool", + "value":true + }, + "PreFirstCreate/IsScript":{ + "type":"bool", + "value":true + }, + "PreFirstCreate/Source":{ + "type":"string", + "value":"" + }, "PythonModule/Cursor":{ "type":"intarray", - "value":[18,48] + "value":[18,1] }, "PythonModule/IsExpr":{ "type":"bool", diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PreFirstCreate b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PreFirstCreate new file mode 100644 index 00000000..623c23b4 --- /dev/null +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PreFirstCreate @@ -0,0 +1,11 @@ +import subprocess +import re + +out, _ = subprocess.Popen(['redshiftCmdLine'], stdout=subprocess.PIPE).communicate() + +node_type = kwargs['type'] +for line in out.splitlines(): + m = re.search(r'version (\d+)\.(\d+)(?:\.(\d+))', line.decode()) + if m: + hou.session._lifeblood__rs_ver_str = f'{m.group(1)}.{m.group(2)}.{m.group(3) or 0}' + break \ No newline at end of file diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Sections.list b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Sections.list index 2cd14533..6a32a0fa 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Sections.list +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Sections.list @@ -7,4 +7,5 @@ TypePropertiesOptions TypePropertiesOptions Help Help Tools.shelf Tools.shelf PythonModule PythonModule +PreFirstCreate PreFirstCreate ExtraFileOptions ExtraFileOptions From c98b44fd6df3e2d11c7a4e1d9f6decdb3d8e243f Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Mon, 27 Jan 2025 23:30:20 +0100 Subject: [PATCH 11/23] submitter ux improvement autolisten if ip not set unset ip by default ignore env res args with empty names --- .../DialogScript | 2 +- .../DialogScript | 2 +- .../DialogScript | 2 +- .../DialogScript | 2 +- .../Contents.dir/Contents.mime | 2 +- .../DialogScript | 13 ++++++++- .../DialogScript | 2 +- .../PythonModule | 28 +++++++++++++++++-- .../DialogScript | 2 +- 9 files changed, 44 insertions(+), 11 deletions(-) diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_cache_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__cache__submitter_8_81.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_cache_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__cache__submitter_8_81.0/DialogScript index b6ce7147..31757d8a 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_cache_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__cache__submitter_8_81.0/DialogScript +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_cache_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__cache__submitter_8_81.0/DialogScript @@ -48,7 +48,7 @@ label "ip" type string joinnext - default { "127.0.0.1" } + default { "" } parmtag { "autoscope" "0000000000000000" } parmtag { "import_source" "op:./lifeblood_submitter" } parmtag { "import_token" "sch_ip" } diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_distributed_flip_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__distributed__flip__submitter_8_81.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_distributed_flip_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__distributed__flip__submitter_8_81.0/DialogScript index 94ec52cb..23ef2d6f 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_distributed_flip_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__distributed__flip__submitter_8_81.0/DialogScript +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_distributed_flip_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__distributed__flip__submitter_8_81.0/DialogScript @@ -48,7 +48,7 @@ label "ip" type string joinnext - default { "127.0.0.1" } + default { "" } parmtag { "autoscope" "0000000000000000" } parmtag { "import_source" "op:./lifeblood_submitter" } parmtag { "import_token" "sch_ip" } diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_karma_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__karma__submitter_8_81.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_karma_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__karma__submitter_8_81.0/DialogScript index d38bef08..e0eed36b 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_karma_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__karma__submitter_8_81.0/DialogScript +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_karma_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__karma__submitter_8_81.0/DialogScript @@ -47,7 +47,7 @@ label "ip" type string joinnext - default { "127.0.0.1" } + default { "" } parmtag { "autoscope" "0000000000000000" } parmtag { "import_source" "op:./lifeblood_submitter" } parmtag { "import_token" "sch_ip" } diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_mantra_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__mantra__submitter_8_81.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_mantra_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__mantra__submitter_8_81.0/DialogScript index 886412d6..8ac7cfc1 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_mantra_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__mantra__submitter_8_81.0/DialogScript +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_mantra_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__mantra__submitter_8_81.0/DialogScript @@ -48,7 +48,7 @@ label "ip" type string joinnext - default { "127.0.0.1" } + default { "" } parmtag { "autoscope" "0000000000000000" } parmtag { "import_source" "op:./lifeblood_submitter" } parmtag { "import_token" "sch_ip" } diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime index 44b050c7..3cf6a2ed 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/Contents.dir/Contents.mime @@ -545,7 +545,7 @@ return \"package.houdini.py%d_%d\" % (sys.version_info.major, sys.version_info.m flags = 0 segment { options = { autoslope ai ao } - length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "\"package.\" + hou.pwd().node(\"..\").evalParm(\"rs_pkg_name\")" language = python } + length = 0 accel = 0.33333333333333331 0.33333333333333331 expr = "ifs(ch(\"../rs_pkg_do\"), \"package.\" + chs(\"../rs_pkg_name\"), \"\")" language = hscript } } channel env_arg_val_2 { lefttype = extend diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript index 36aa7df6..0b508ddb 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/DialogScript @@ -48,7 +48,7 @@ label "ip" type string joinnext - default { "127.0.0.1" } + default { "" } parmtag { "autoscope" "0000000000000000" } parmtag { "import_source" "op:./lifeblood_submitter" } parmtag { "import_token" "sch_ip" } @@ -280,12 +280,22 @@ name "folder3_1" label "Redshift Package" + parm { + name "rs_pkg_do" + label "Require package" + type toggle + joinnext + default { "1" } + parmtag { "script_callback_language" "python" } + } parm { name "rs_pkg_name" label "Name" type string + nolabel joinnext default { "redshift" } + disablewhen "{ rs_pkg_do == 0 }" parmtag { "script_callback_language" "python" } } parm { @@ -293,6 +303,7 @@ label "Version" type string default { [ "if hasattr(hou.session, '_lifeblood__rs_ver_str'):\n return hou.session._lifeblood__rs_ver_str\n\nreturn 'error! cannot autodetect'" python ] } + disablewhen "{ rs_pkg_do == 0 }" parmtag { "script_callback_language" "python" } } } diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda/lifeblood_8_8Driver_1lifeblood__submitter_8_81.0.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda/lifeblood_8_8Driver_1lifeblood__submitter_8_81.0.0/DialogScript index 0e2610a0..9f68c72c 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda/lifeblood_8_8Driver_1lifeblood__submitter_8_81.0.0/DialogScript +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda/lifeblood_8_8Driver_1lifeblood__submitter_8_81.0.0/DialogScript @@ -43,7 +43,7 @@ label "ip" type string joinnext - default { "127.0.0.1" } + default { "" } parmtag { "script_callback_language" "python" } } parm { diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda/lifeblood_8_8Driver_1lifeblood__submitter_8_81.0.0/PythonModule b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda/lifeblood_8_8Driver_1lifeblood__submitter_8_81.0.0/PythonModule index df41c934..2a69c0c3 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda/lifeblood_8_8Driver_1lifeblood__submitter_8_81.0.0/PythonModule +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_submitter-1.0.0.hda/lifeblood_8_8Driver_1lifeblood__submitter_8_81.0.0/PythonModule @@ -7,6 +7,17 @@ except ImportError: def submit_button_callback(node): + # first - check for trivial error if user have not set up scheduler address + if node.evalParm("sch_ip").strip() == '': # default "invalid" value + if hou.ui.displayMessage( + 'You haven\'t set up scheduler address.\nDo you want to listen for scheduler\'s broadcast?', + buttons=('Yes', 'Cancel'), + default_choice=0, + close_choice=1) == 1: + return + if not fill_address_from_broadcast(node): + return + if hou.hipFile.hasUnsavedChanges(): if hou.ui.displayMessage('scene has unsaved changes, save and continue?', buttons=('Ok', 'Cancel'), severity=hou.severityType.Warning, @@ -48,7 +59,11 @@ def submit(node): env_args = {} env_name = node.evalParm('env_resolver_name') for i in range(node.parm('env_resolver_args').evalAsInt()): - env_args[node.evalParm('env_arg_name_%d' % i)] = node.evalParm('env_arg_val_%d' % i) + arg_name = node.evalParm('env_arg_name_%d' % i) + # skip empty names + if arg_name.strip() == '': + continue + env_args[arg_name] = node.evalParm('env_arg_val_%d' % i) task.set_environment_resolver(env_name, env_args) for i in range(node.parm('attribs').evalAsInt()): @@ -131,15 +146,22 @@ def fill_address_from_broadcast(node): ip, port = address_from_broadcast(node) except hou.OperationInterrupted: if hou.isUIAvailable(): - hou.ui.displayMessage('waiting interrupted', severity=hou.severityType.Warning) + # this try-except block here is to workaround a bug in some hou builds + # that reraises OperationInterrupted exception + try: + hou.ui.displayMessage('waiting interrupted', severity=hou.severityType.Warning) + except hou.OperationInterrupted: + pass else: print('waiting interrupted') + return False if ip is None: if hou.isUIAvailable(): hou.ui.displayMessage('did not receive a broadcast within timeout', severity=hou.severityType.Warning) else: print('did not receive a broadcast within timeout') - return + return False assert port is not None node.parm('sch_ip').set(ip) node.parm('sch_port').set(port) + return True diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_wedge_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__wedge__submitter_8_81.0/DialogScript b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_wedge_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__wedge__submitter_8_81.0/DialogScript index b993bd48..b0e6dcae 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_wedge_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__wedge__submitter_8_81.0/DialogScript +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_wedge_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__wedge__submitter_8_81.0/DialogScript @@ -48,7 +48,7 @@ label "ip" type string joinnext - default { "127.0.0.1" } + default { "" } parmtag { "autoscope" "0000000000000000" } parmtag { "import_source" "op:./lifeblood_submitter" } parmtag { "import_token" "sch_ip" } From 3116ffa8929d00368481184cd4f89c61ba3bff41 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Wed, 29 Jan 2025 20:57:24 +0100 Subject: [PATCH 12/23] use redshift_dev tag for GPU devices --- .../stock_nodes/redshift/nodes/redshift.py | 24 +++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/src/lifeblood/stock_nodes/redshift/nodes/redshift.py b/src/lifeblood/stock_nodes/redshift/nodes/redshift.py index d82c8165..43456948 100644 --- a/src/lifeblood/stock_nodes/redshift/nodes/redshift.py +++ b/src/lifeblood/stock_nodes/redshift/nodes/redshift.py @@ -48,12 +48,25 @@ def process_task(self, context) -> ProcessingResult: # TODO!!! in case of skip existing "files" is not filled with AOVs !!! script = 'import os\n' \ + 'from lifeblood_connection import get_provided_devices\n' \ 'import sys\n' \ 'from subprocess import Popen, PIPE\n' \ 'import tempfile\n' \ 'import shutil\n' \ 'import lifeblood_connection as lbc\n' \ '\n' \ + 'def _get_gpu_number_args():\n' \ + ' provided_devices = get_provided_devices()\n' \ + ' if "{gpu_dev_type}" not in provided_devices:\n' \ + ' return []\n' \ + ' redshift_devices = [dev_tags["redshift_dev"] for _, dev_tags in get_provided_devices().get("{gpu_dev_type}", {{}}).items() if "redshift_dev" in dev_tags]\n' \ + ' redshift_devices = [x for dev in redshift_devices for x in ("-device", dev)]\n' \ + ' \n' \ + ' if len(redshift_devices) == 0:\n' \ + ' raise RuntimeError("redshift cannot render without redshift device tags set on GPU devices")\n' \ + ' \n' \ + ' return redshift_devices\n' \ + '\n' \ 'out_beauty = {out_beauty}\n' \ 'if {skip_if_exists} and os.path.exists(out_beauty):\n' \ " print('image file already exists, skipping work')\n" \ @@ -63,7 +76,7 @@ def process_task(self, context) -> ProcessingResult: "\n" \ 'temp_render_dir = tempfile.mkdtemp(prefix="redshift_")\n' \ "output_files = []\n" \ - "p = Popen(['redshiftCmdLine', {rspath}, '-oip', temp_render_dir], stdout=PIPE)\n" \ + "p = Popen(['redshiftCmdLine', {rspath}, '-oip', temp_render_dir] + _get_gpu_number_args(), stdout=PIPE)\n" \ 'while p.poll() is None:\n' \ ' full_line = False\n' \ ' part_parts = []\n' \ @@ -110,9 +123,12 @@ def process_task(self, context) -> ProcessingResult: 'print("all done")\n' \ "sys.exit()\n" \ '' \ - .format(skip_if_exists=repr(context.param_value('skip if exists')), # for now we cannot know output image until after render - rspath=repr(context.param_value('rs path')), - out_beauty=repr(context.param_value('image path'))) + .format( + skip_if_exists=repr(context.param_value('skip if exists')), # for now we cannot know output image until after render + rspath=repr(context.param_value('rs path')), + out_beauty=repr(context.param_value('image path')), + gpu_dev_type='gpu', + ) invoc = InvocationJob(['python', ':/rsccall.py']) invoc.set_extra_file('rsccall.py', script) From 995ff3606f00ee9fd38654ef24c5fbc44e24ffe3 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Thu, 30 Jan 2025 23:03:27 +0100 Subject: [PATCH 13/23] add simple json dict serde methods --- src/lifeblood/worker_resource_definition.py | 32 +++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/lifeblood/worker_resource_definition.py b/src/lifeblood/worker_resource_definition.py index 28e82259..f9d439cb 100644 --- a/src/lifeblood/worker_resource_definition.py +++ b/src/lifeblood/worker_resource_definition.py @@ -23,8 +23,40 @@ class WorkerResourceDefinition: label: str # nicer looking user facing name default: Union[float, int] = 0 + def to_json_dict(self) -> dict: + return { + 'name': self.name, + 'type': self.type.value, + 'description': self.description, + 'label': self.label, + 'default': self.default, + } + + @classmethod + def from_json_dict(cls, data: dict) -> "WorkerResourceDefinition": + return WorkerResourceDefinition( + data['name'], + WorkerResourceDataType(data['type']), + data['description'], + data['label'], + data['default'], + ) + @dataclass class WorkerDeviceTypeDefinition: name: str resources: Tuple[WorkerResourceDefinition, ...] + + def to_json_dict(self) -> dict: + return { + 'name': self.name, + 'res': [x.to_json_dict() for x in self.resources] + } + + @classmethod + def from_json_dict(cls, data: dict) -> "WorkerDeviceTypeDefinition": + return WorkerDeviceTypeDefinition( + data['name'], + tuple(WorkerResourceDefinition.from_json_dict(res) for res in data['res']), + ) From 70f533a55fbeec84c0d0f9fae364bb943f58cdbd Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Thu, 30 Jan 2025 23:06:23 +0100 Subject: [PATCH 14/23] add get_resource_configuration command --- src/lifeblood/scheduler_message_processor.py | 16 ++++++++++++++++ .../scheduler_message_processor_client.py | 13 +++++++++++++ 2 files changed, 29 insertions(+) diff --git a/src/lifeblood/scheduler_message_processor.py b/src/lifeblood/scheduler_message_processor.py index c4ba3de6..cbffc3e1 100644 --- a/src/lifeblood/scheduler_message_processor.py +++ b/src/lifeblood/scheduler_message_processor.py @@ -28,6 +28,7 @@ def command_mapping(self) -> Dict[str, Callable[[dict, CommandJsonMessageClient, 'pulse': self._command_pulse, 'what_is_my_address': self._command_what_is_my_address, '_pulse3way_': self._command_pulse3way, # TODO: remove this when handlers are implemented + 'resource_defs': self._command_resource_definitions, # worker-specific 'worker.ping': self._command_ping, 'worker.done': self._command_done, @@ -163,6 +164,21 @@ async def _command_pulse3way(self, args: dict, client: CommandJsonMessageClient, msg2 = await client.receive_message() await client.send_message_as_json({'phase': 2}) + async def _command_resource_definitions(self, args: dict, client: CommandJsonMessageClient, original_message: Message): + """ + returns keys: + resources: + device_types: + """ + ress = self.__scheduler.config_provider.hardware_resource_definitions() + defs = self.__scheduler.config_provider.hardware_device_type_definitions() + + data = { + 'resources': [r.to_json_dict() for r in ress], + 'device_types': [d.to_json_dict() for d in defs], + } + await client.send_message_as_json(data) + # worker task message forwarding async def _command_forward_invocation_message(self, args: dict, client: CommandJsonMessageClient, original_message: Message): """ diff --git a/src/lifeblood/scheduler_message_processor_client.py b/src/lifeblood/scheduler_message_processor_client.py index 72850d49..41cca57a 100644 --- a/src/lifeblood/scheduler_message_processor_client.py +++ b/src/lifeblood/scheduler_message_processor_client.py @@ -11,6 +11,7 @@ from .net_messages.impl.clients import CommandJsonMessageClient from .net_messages.address import AddressChain from .net_messages.exceptions import MessageReceiveTimeoutError +from .worker_resource_definition import WorkerResourceDefinition, WorkerDeviceTypeDefinition from typing import List, Optional, Set, Tuple @@ -114,6 +115,18 @@ async def say_hello(self, address_to_advertise: AddressChain, worker_type: Worke reply = await self.__client.receive_message() return (await reply.message_body_as_json())['db_uid'] + async def get_resource_configuration(self) -> Tuple[Tuple[WorkerResourceDefinition, ...], Tuple[WorkerDeviceTypeDefinition, ...]]: + """ + get list of resources and device types that scheduler defines + """ + await self.__client.send_command('resource_defs', {}) + reply = await self.__client.receive_message() + reply_body = await reply.message_body_as_json() + print(reply_body) + resources = tuple(WorkerResourceDefinition.from_json_dict(res_data) for res_data in reply_body['resources']) + devices = tuple(WorkerDeviceTypeDefinition.from_json_dict(dev_data) for dev_data in reply_body['device_types']) + return resources, devices + async def say_bye(self, address_of_worker: str): await self.__client.send_command('worker.bye', { 'worker_addr': str(address_of_worker) From 5ae00396282f8e66c160e1a5fb1590c312f701bd Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Thu, 30 Jan 2025 23:43:33 +0100 Subject: [PATCH 15/23] ensure devices provided to invocation are only those defined in scheduler --- src/lifeblood/worker_core.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lifeblood/worker_core.py b/src/lifeblood/worker_core.py index d2bc4165..7c424b80 100644 --- a/src/lifeblood/worker_core.py +++ b/src/lifeblood/worker_core.py @@ -31,6 +31,7 @@ from .net_messages.address import AddressChain, DirectAddress from .net_messages.exceptions import MessageTransferError from .defaults import worker_start_port as default_worker_start_port +from .worker_resource_definition import WorkerResourceDefinition, WorkerDeviceTypeDefinition from .worker_runtime_pythonpath import lifeblood_connection import inspect @@ -156,6 +157,8 @@ def __init__(self, scheduler_addr: AddressChain, *, self.__ping_interval = scheduler_ping_interval self.__ping_missed_threshold = scheduler_ping_miss_threshold self.__ping_missed = 0 + self.__scheduler_resource_defs: Tuple[WorkerResourceDefinition, ...] = () + self.__scheduler_device_defs: Tuple[WorkerDeviceTypeDefinition, ...] = () self.__scheduler_addr = scheduler_addr self.__scheduler_pinger = None self.__components_stop_event = asyncio.Event() @@ -266,9 +269,11 @@ async def start(self): # re-normalize addresses self.__scheduler_addr, self.__my_addr_for_scheduler = await client.get_normalized_addresses() self.__scheduler_db_uid = await client.say_hello(self.__my_addr_for_scheduler, self.__worker_type, self.__my_resources, metadata) + self.__scheduler_resource_defs, self.__scheduler_device_defs = await client.get_resource_configuration() except MessageTransferError as e: self.__logger.error('error connecting to scheduler during start') abort_start = True + self.__logger.debug('scheduler connected') # # and report to the pool try: @@ -416,7 +421,9 @@ async def run_task(self, task: Invocation, report_to: AddressChain): env['LIFEBLOOD_RUNTIME_TID'] = task.task_id() env['LIFEBLOOD_RUNTIME_SCHEDULER_ADDR'] = self.__local_invocation_server_address_string - env['LBDEV_TYPES'] = ','.join({dev_type for dev_type, _, _ in self.__my_resources.devices()}) + # only announce devices that scheduler declares + device_types_supported_by_scheduler = set(x.name for x in self.__scheduler_device_defs) + env['LBDEV_TYPES'] = ','.join({dev_type for dev_type, _, _ in self.__my_resources.devices() if dev_type in device_types_supported_by_scheduler}) for dev_type, dev_name_list in task.resources_to_use().devices.items(): for i, dev_name in enumerate(dev_name_list): env[f'LBDEV_TYPE{i}'] = dev_type @@ -815,6 +822,8 @@ async def _reintroduce_ourself(): self.__logger.debug('saying hello') self.__scheduler_db_uid = await client.say_hello(addr, self.__worker_type, self.__my_resources, metadata) self.__logger.debug('reintroduce done') + self.__scheduler_resource_defs, self.__scheduler_device_defs = await client.get_resource_configuration() + self.__logger.debug('updated res/dev definitions') break except Exception: self.__logger.exception('failed to reintroduce myself. sleeping a bit and retrying') From c083d8f08132e79cf50cabfbdf97b7b325c2daaf Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Sat, 1 Feb 2025 18:40:51 +0100 Subject: [PATCH 16/23] test: redshift render should go fine without GPU device definitions, but fail with definition if no gpus provided --- tests/nodes/test_redshift.py | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/tests/nodes/test_redshift.py b/tests/nodes/test_redshift.py index 7880934b..1d23fd05 100644 --- a/tests/nodes/test_redshift.py +++ b/tests/nodes/test_redshift.py @@ -1,10 +1,35 @@ from pathlib import Path from lifeblood_testing_common.nodes_common import TestCaseBase +from lifeblood.invocationjob import Invocation +from lifeblood.worker_core import WorkerCore +from lifeblood.worker_resource_definition import WorkerResourceDefinition, WorkerDeviceTypeDefinition class RedshiftTestCase(TestCaseBase): - async def test_redshift_node(self): - await self._helper_test_render_node('redshift', 'rs', 'redshiftCmdLine', Path(__file__).parent / 'data' / 'mock_redshift') + async def test_redshift_node_no_gpu_defined(self): + await self._helper_test_render_node( + 'redshift', + 'rs', + 'redshiftCmdLine', + Path(__file__).parent / 'data' / 'mock_redshift', + device_type_definitions=(), + ) # TODO: add check for 'files' attr (when redshift node is fixed to be able to set them on "skip existing") + + async def test_redshift_node_gpu_defined_but_not_provided(self): + # when gpu is defined, but no device is provided to the invocation - error must be thrown + def done_logic(worker: WorkerCore, task: Invocation): + self.assertEqual(1, task.exit_code()) + + await self._helper_test_render_node( + 'redshift', + 'rs', + 'redshiftCmdLine', + Path(__file__).parent / 'data' / 'mock_redshift', + special_task_done_logic=done_logic, + skip_outfile_check=True, + expected_task_exit_code=1, + device_type_definitions=(WorkerDeviceTypeDefinition('gpu', ()),), + ) From adb8e50b586af9a4fbdd6c13d4ea37a0b8f4355e Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Sat, 1 Feb 2025 18:41:45 +0100 Subject: [PATCH 17/23] more flexibility for common testing functions --- src/lifeblood_testing_common/nodes_common.py | 48 +++++++++++++------ ...eduler_config_provider_default_override.py | 4 +- 2 files changed, 36 insertions(+), 16 deletions(-) diff --git a/src/lifeblood_testing_common/nodes_common.py b/src/lifeblood_testing_common/nodes_common.py index 405e5535..b39173ed 100644 --- a/src/lifeblood_testing_common/nodes_common.py +++ b/src/lifeblood_testing_common/nodes_common.py @@ -205,6 +205,7 @@ async def _helper_test_worker_node(self, runcode: Optional[str] = None, worker_count: int = 1, tasks_to_complete=None, + expected_task_exit_code=0, **kwargs): """ generic logic runner helper. @@ -260,7 +261,7 @@ def _side_effect(task: Invocation, stdout: str, stderr: str): print(f'finished {task.task_id()} out: {stdout}') print(f'finished {task.task_id()} err: {stderr}') print(f'exit code: {task.exit_code()}') - side_effect_was_good = side_effect_was_good and 0 == task.exit_code() + side_effect_was_good = side_effect_was_good and expected_task_exit_code == task.exit_code() if task_done_logic: try: task_done_logic(task) @@ -305,7 +306,20 @@ async def _logic(sched: Scheduler, workers: List[Worker], tmp_script_path: str, return await self._helper_test_worker_node(_logic) - async def _helper_test_render_node(self, node_type_name, scn_ext, command, bin_rel_path): + async def _helper_test_render_node( + self, + node_type_name, + scn_ext, + command, + bin_rel_path, + special_task_done_logic=None, + skip_outfile_check=False, + expected_task_exit_code=0, + **kwargs + ): + """ + kwargs are forwarded to _helper_test_worker_node (which forwards it to scheduler constructor + """ the_worker = None tmpdir = tempfile.mkdtemp(prefix='test_render_') try: @@ -374,22 +388,26 @@ async def _logic(scheduler, workers, tmp_script_path, done_waiter): if res.attributes_to_set: updated_attrs.update(res.attributes_to_set) - self.assertTrue(os.path.exists(out_exr_path)) - self.assertEqual(out_exr_path, updated_attrs.get('file')) + if not skip_outfile_check: + self.assertTrue(os.path.exists(out_exr_path)) + self.assertEqual(out_exr_path, updated_attrs.get('file')) - with open(out_exr_path, 'rb') as f: - post_contents = f.read() - if pre_contents is not None and skip_existing: - self.assertEqual(pre_contents, post_contents) - if pre_contents is None or not skip_existing: - line_ok, line_args, line_fname = post_contents.splitlines(keepends=False) - self.assertEqual(b'ok', line_ok) - self.assertEqual(scn_filepath.encode(), line_fname) + with open(out_exr_path, 'rb') as f: + post_contents = f.read() + if pre_contents is not None and skip_existing: + self.assertEqual(pre_contents, post_contents) + if pre_contents is None or not skip_existing: + line_ok, line_args, line_fname = post_contents.splitlines(keepends=False) + self.assertEqual(b'ok', line_ok) + self.assertEqual(scn_filepath.encode(), line_fname) return _logic def _task_done_logic(task: Invocation): - self.assertEqual(100.0, the_worker.task_status()) + if special_task_done_logic: + special_task_done_logic(the_worker, task) + else: + self.assertEqual(100.0, the_worker.task_status()) for skip_exist, pre_exist in ((False, False), (True, False), (True, True)): print(f'testing with: skip_exist={skip_exist}') @@ -401,7 +419,9 @@ def _task_done_logic(task: Invocation): f.write('some preexisting contents that is not the same as husk mock outputs') await self._helper_test_worker_node( _logic_gen(skip_exist), - task_done_logic=_task_done_logic if not skip_exist or not pre_exist else lambda *args, **kwargs: None + task_done_logic=_task_done_logic if not skip_exist or not pre_exist else lambda *args, **kwargs: None, + expected_task_exit_code=expected_task_exit_code if not skip_exist or not pre_exist else 0, + **kwargs ) if os.path.exists(out_exr_path): os.unlink(out_exr_path) diff --git a/src/lifeblood_testing_common/scheduler_config_provider_default_override.py b/src/lifeblood_testing_common/scheduler_config_provider_default_override.py index e5ecfe04..5a678581 100644 --- a/src/lifeblood_testing_common/scheduler_config_provider_default_override.py +++ b/src/lifeblood_testing_common/scheduler_config_provider_default_override.py @@ -83,7 +83,7 @@ def node_configuration(self, node_type_id: str) -> dict: } def hardware_resource_definitions(self) -> Tuple[WorkerResourceDefinition, ...]: - return self.__resource_definitions or super().hardware_resource_definitions() + return self.__resource_definitions if self.__resource_definitions is not None else super().hardware_resource_definitions() def hardware_device_type_definitions(self) -> Tuple[WorkerDeviceTypeDefinition, ...]: - return self.__device_type_definitions or super().hardware_device_type_definitions() + return self.__device_type_definitions if self.__device_type_definitions is not None else super().hardware_device_type_definitions() From 12f85aa1189017b96decd12b9c191caa1774ab95 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Sat, 1 Feb 2025 19:17:39 +0100 Subject: [PATCH 18/23] if scheduler declares a device type but a worker has no config for it - still provide info that 0 devices of given type are provided instead of misleadingly declaring declaring as if device type is not declared at all --- src/lifeblood/worker_core.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lifeblood/worker_core.py b/src/lifeblood/worker_core.py index 7c424b80..cd0fcf0d 100644 --- a/src/lifeblood/worker_core.py +++ b/src/lifeblood/worker_core.py @@ -423,8 +423,11 @@ async def run_task(self, task: Invocation, report_to: AddressChain): # only announce devices that scheduler declares device_types_supported_by_scheduler = set(x.name for x in self.__scheduler_device_defs) - env['LBDEV_TYPES'] = ','.join({dev_type for dev_type, _, _ in self.__my_resources.devices() if dev_type in device_types_supported_by_scheduler}) + env['LBDEV_TYPES'] = ','.join({dev_type for dev_type in device_types_supported_by_scheduler}) for dev_type, dev_name_list in task.resources_to_use().devices.items(): + # do not provide any info on configured devices that are not declared by scheduler + if dev_type not in device_types_supported_by_scheduler: + continue for i, dev_name in enumerate(dev_name_list): env[f'LBDEV_TYPE{i}'] = dev_type env[f'LBDEV_NAME{i}'] = dev_name From 67c71f8e7bcc674d4a2c7f149ca34d9b0d3fe288 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Sat, 1 Feb 2025 21:13:06 +0100 Subject: [PATCH 19/23] add Devices section --- docs/source/nodes/stock/redshift/redshift.rst | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/source/nodes/stock/redshift/redshift.rst b/docs/source/nodes/stock/redshift/redshift.rst index dd9f1fc3..82c7df27 100644 --- a/docs/source/nodes/stock/redshift/redshift.rst +++ b/docs/source/nodes/stock/redshift/redshift.rst @@ -35,3 +35,25 @@ When render is done, the following attributes are set: set to path of the rendered beauty pass image :files: set to a list of paths to all AOVs produced by the render + +Devices +======= + +This node understands the following device types: + +:gpu: + + Treated as Redshift Device (GPU) + + tags used: + + - ``redshift_dev`` - has format ```` + + Redshift device number is how redshift internally distinguishes one GPU from another. + The value of this tag is passed directly to redshiftCmdLine ``-device`` argument value. + + Run ``redshiftCmdLine -listdevices`` to get a list of GPUs and numbers as Redshift recognizes them. + + With single GPU machine setup the value will most definitely be simply ``0`` + + Example values: ``0``, ``1`` or ``2`` \ No newline at end of file From c12d7edfbcc0819dae0576bd28f286d5164fec34 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Mon, 3 Feb 2025 23:52:14 +0100 Subject: [PATCH 20/23] add flush after all stdout writes --- src/lifeblood/stock_nodes/redshift/nodes/redshift.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lifeblood/stock_nodes/redshift/nodes/redshift.py b/src/lifeblood/stock_nodes/redshift/nodes/redshift.py index 43456948..e214bbd7 100644 --- a/src/lifeblood/stock_nodes/redshift/nodes/redshift.py +++ b/src/lifeblood/stock_nodes/redshift/nodes/redshift.py @@ -57,6 +57,7 @@ def process_task(self, context) -> ProcessingResult: '\n' \ 'def _get_gpu_number_args():\n' \ ' provided_devices = get_provided_devices()\n' \ + ' print(provided_devices)\n' \ ' if "{gpu_dev_type}" not in provided_devices:\n' \ ' return []\n' \ ' redshift_devices = [dev_tags["redshift_dev"] for _, dev_tags in get_provided_devices().get("{gpu_dev_type}", {{}}).items() if "redshift_dev" in dev_tags]\n' \ @@ -91,6 +92,7 @@ def process_task(self, context) -> ProcessingResult: ' if part.startswith(b"Saving: "):\n' \ ' output_files.append(part[8:].strip())\n' \ ' sys.stdout.buffer.write(part) # "promote" to stdout\n' \ + ' sys.stdout.flush()\n' \ '\n' \ 'if not output_files:\n' \ ' sys.exit(1)\n' \ @@ -107,12 +109,14 @@ def process_task(self, context) -> ProcessingResult: 'print("copying locally rendered files to final destination...")\n' \ 'final_output_files = []\n' \ 'sys.stdout.buffer.write(f"copying to {{out_beauty}}\\n".encode("UTF-8"))\n' \ + 'sys.stdout.flush()\n' \ 'cleancopy(output_files[0], out_beauty)\n' \ 'final_output_files.append(out_beauty)\n' \ 'out_beauty_dir = os.path.dirname(out_beauty)\n' \ 'for file_path in output_files:\n' \ ' file_path_dst = os.path.join(out_beauty_dir, os.path.basename(file_path))\n' \ ' sys.stdout.buffer.write(f"copying to {{file_path_dst}}\\n".encode("UTF-8"))\n' \ + ' sys.stdout.flush()\n' \ ' cleancopy(file_path, file_path_dst)\n' \ ' final_output_files.append(file_path_dst)\n' \ '\n' \ From 09f0570a34c7bd0927c7f1eeda891ef171b2c490 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Tue, 4 Feb 2025 00:00:50 +0100 Subject: [PATCH 21/23] add CREATE_NO_WINDOW flag on windows to redshiftCmdLine call --- .../PreFirstCreate | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PreFirstCreate b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PreFirstCreate index 623c23b4..dcb39120 100644 --- a/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PreFirstCreate +++ b/dcc_plugins_workspace/houdini/otls/Driver-lifeblood_redshift_submitter-1.0.hda/lifeblood_8_8Driver_1lifeblood__redshift__submitter_8_81.0/PreFirstCreate @@ -1,7 +1,14 @@ +import hou import subprocess import re +import sys -out, _ = subprocess.Popen(['redshiftCmdLine'], stdout=subprocess.PIPE).communicate() + +CREATE_NO_WINDOW = 0x08000000 +flags = 0 +if sys.platform == 'win32': + flags = CREATE_NO_WINDOW +out, _ = subprocess.Popen(['redshiftCmdLine'], stdout=subprocess.PIPE, creationflags=flags).communicate() node_type = kwargs['type'] for line in out.splitlines(): From 16ea942d5f311b2005b51b9df66cc5d3c63c0d24 Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Tue, 4 Feb 2025 00:01:34 +0100 Subject: [PATCH 22/23] do NOT call get_config on module level --- src/lifeblood/shared_lazy_sqlite_connection.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lifeblood/shared_lazy_sqlite_connection.py b/src/lifeblood/shared_lazy_sqlite_connection.py index f72090e2..c26b05b9 100644 --- a/src/lifeblood/shared_lazy_sqlite_connection.py +++ b/src/lifeblood/shared_lazy_sqlite_connection.py @@ -62,14 +62,17 @@ def _invoke_close_callbacks(self): class ConnectionPool: - default_period = get_config('scheduler').get_option_noasync('shared_connection.keep_open_period', 0.0125) - get_logger('lazy_connection_pool').debug(f'using default open period: {default_period}') + default_period: Optional[float] = None def __init__(self): self.connection_cache: Dict[tuple, ConnectionPoolEntry] = {} self.pool_lock = asyncio.Lock() - self.keep_open_period = self.default_period self.__logger = get_logger('shared_aiosqlite_connection') + # TODO: should not be using get_config here, scheduler's data provider should be used instead + if ConnectionPool.default_period is None: + ConnectionPool.default_period = get_config('scheduler').get_option_noasync('shared_connection.keep_open_period', 0.0125) + self.__logger.debug(f'using default open period: {ConnectionPool.default_period}') + self.keep_open_period = ConnectionPool.default_period self.__my_loop = asyncio.get_running_loop() def is_in_this_loop(self, loop=None): From b208d5e5f5c267632f57a21263052bec216b54cc Mon Sep 17 00:00:00 2001 From: pedohorse <13556996+pedohorse@users.noreply.github.com> Date: Tue, 4 Feb 2025 00:05:26 +0100 Subject: [PATCH 23/23] add existance check before rm since we now fail on fail... --- dcc_plugins_workspace/build_houdini.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dcc_plugins_workspace/build_houdini.sh b/dcc_plugins_workspace/build_houdini.sh index 88ac43fa..398d5b13 100755 --- a/dcc_plugins_workspace/build_houdini.sh +++ b/dcc_plugins_workspace/build_houdini.sh @@ -22,7 +22,9 @@ rsync -arhv --exclude=__pycache__ --exclude="*.pyc" ../src/lifeblood_client $OUT rsync -arhv --exclude=__pycache__ --exclude="*.pyc" ../src/lifeblood_client $OUT/python3.11libs pushd $OUT -rm ../houdini.zip +if [ -f ../houdini.zip ]; then + rm ../houdini.zip +fi zip -r ../houdini.zip . --exclude "*__pycache__/" --exclude "*.pyc" --exclude "*.md" popd