yasmin_editor.editor_gui.model_factories module

Helpers for resolving plugin metadata and constructing editor models.

The main editor window needs to translate plugin-manager entries into concrete state models, but that mapping logic does not need to live inside a Qt mixin. Keeping it here makes plugin resolution and model creation easy to test without booting the full editor.

yasmin_editor.editor_gui.model_factories.create_container_model(name: str, *, is_concurrence: bool, outcomes: list[str] | None = None, remappings: dict[str, str] | None = None, start_state: str | None = None, default_outcome: str | None = None, description: str = '', parameter_mappings: dict[str, str] | None = None) StateMachine | Concurrence

Create one state-machine or concurrence model for the editor.

yasmin_editor.editor_gui.model_factories.create_leaf_model(name: str, plugin_info: Any, *, description: str = '', remappings: dict[str, str] | None = None, parameter_mappings: dict[str, str] | None = None, outcomes: list[str] | None = None) State

Create one leaf-state model from plugin metadata.

yasmin_editor.editor_gui.model_factories.iter_leaf_outcome_names(plugin_info: Any, overrides: list[str] | None = None) list[str]

Return the outcome names that should be attached to a leaf model.

yasmin_editor.editor_gui.model_factories.plugin_type_to_state_type(plugin_type: str | None) str | None

Map plugin-manager plugin types onto serialized model state types.

yasmin_editor.editor_gui.model_factories.resolve_plugin_info_for_model(plugin_manager: Any, model: State) Any

Resolve the plugin-manager entry that best matches one state model.