synthpic2.recipe.prototypes
¶
Prototype module.
Submodules¶
Package Contents¶
Classes¶
This class allows to get and set feature values. These features can either be |
|
Prototype for particle geometry. |
|
Prototype definition for a material. |
|
Prototype definition for a measurement technique. |
- class synthpic2.recipe.prototypes.Feature¶
This class allows to get and set feature values. These features can either be custom-defined, or link to a property of a Blender object.
- property value: Any¶
- name: str¶
- blender_link: str | None¶
- _target_: str | None = 'synthpic2.recipe.prototypes.Feature'¶
- _value: Any | None¶
- __post_init__() None ¶
Gets called after the init routine.
- _validate_blender_link() None ¶
Validate the blender_link property.
- Raises:
ValueError: raised if the blender_link property is invalid
- _sanitize_blender_link() None ¶
Sanitize the blender_link property.
- _parse_blender_link() tuple[Any, InterfaceType, KeyType] ¶
Extract the attributes from blender_link and assign it to value.
- static _get_node_value(node: Any, interface: InterfaceType, key: KeyType) Any ¶
- static _set_node_value(node: Any, interface: InterfaceType, key: KeyType, value: Any) None ¶
- static _parse_node_interface_and_key(regex_match: re.Match) tuple[InterfaceType, int | str] ¶
- update_blender_link(renaming_maps: Dict[str, synthpic2.custom_types.RenamingMap]) None ¶
- class synthpic2.recipe.prototypes.GeometryPrototype¶
Bases:
_AppendablePrototype
Prototype for particle geometry.
- property _registry: synthpic2.recipe.registries.Registry¶
- _target_: str = 'synthpic2.recipe.prototypes.GeometryPrototype'¶
- name_in_blend_file: str = 'GeometryPrototype'¶
- __attrs_post_init__() None ¶
Define attributes that are not accessible via Hydra.
- append() None ¶
Append a GeometryPrototype, store it in the ‘GeometryPrototypes’ collection and hide said collection.
- class synthpic2.recipe.prototypes.MaterialPrototype¶
Bases:
_AppendablePrototype
Prototype definition for a material.
- property _registry: synthpic2.recipe.registries.Registry¶
- _target_: str = 'synthpic2.recipe.prototypes.MaterialPrototype'¶
- name_in_blend_file: str = 'MaterialPrototype'¶
- __attrs_post_init__() None ¶
Define attributes that are not accessible via Hydra.
- class synthpic2.recipe.prototypes.MeasurementTechniquePrototype¶
Bases:
_Prototype
,synthpic2.recipe.render_preparation_mixin.RenderPreparationMixin
Prototype definition for a measurement technique.
- property _registry: synthpic2.recipe.registries.Registry¶
- _target_: str = 'synthpic2.recipe.prototypes.MeasurementTechniquePrototype'¶
- measurement_volume_object_name: str = 'MeasurementVolume'¶
- background_object_name: str | None¶
- hideable_object_names: List[str] | None¶
- __attrs_post_init__() None ¶
- _add_render_features() None ¶
- initialize() None ¶
Open the blend file that is associated with the prototype.
- setup_after_invocation() None ¶
Setup steps to be executed after the MeasurementTechniquePrototype has been invoked as part of a MeasurementTechniqueBlueprint.
- _fix_common_user_errors() None ¶
Fix common user errors, such as no active object or measurement technique being in edit mode.
- _validate() None ¶
Validate that the specified blend file sticks to the conventions of synthPIC2.
- Raises:
- ConventionError: if there is no scene named ‘Scene’ in the measurement
technique prototype
- ConventionError: if there is no collection named ‘MeasurementTechnique’ in
the measurement technique prototype
- ConventionError: if there is no camera in the measurement technique
prototype
- _prepare_categorical_rendering_mode() None ¶
- _hide_hideable_objects() None ¶
- _prepare_real_rendering_mode() None ¶
- _prepare_stylized_rendering_mode() None ¶
- _prepare_stylized_xray_rendering_mode() None ¶
- _prepare_normal_map_rendering_mode() None ¶
- _prepare_depth_map_rendering_mode() None ¶