alc.cookbook¶
The recipe system. See Cookbook — Recipes for the concepts.
alc.cookbook ¶
Recipe ¶
Bases: BaseModel
category
property
¶
parse the RECIPE_CATEGORIES dictionary and figure out what "category" the current recipe "type" falls under Returns:
active_steps
property
¶
The steps the system should actually act on. Disabled steps stay in
self.steps (so the cookbook editor can toggle them back on) but are
ignored everywhere they'd be run, counted, or shown as work-to-do.
relative_path
property
¶
" Returns the relative path of the pathObject related to this cookbook recipe.
heal_legacy_data
classmethod
¶
Intercepts raw dictionary data before validation to fix legacy files.
Source code in alc\cookbook\recipe.py
steps_for ¶
The steps this asset actually owes — the list every runner works from.
Narrows :attr:active_steps by each step's parent_filter, so one
recipe can serve chr/prp/env/drs without any step having to branch on
"what am I looking at". A prop's dsn build simply never sees the T-pose
check; it isn't pending, it isn't failed, it isn't there.
target may be a PathObject, a path string, or a bare category.
Source code in alc\cookbook\recipe.py
to_dict ¶
Custom dict method to handle nested RecipeStep objects.
Source code in alc\cookbook\recipe.py
save ¶
Saves the recipe to its standardized location as a JSON file. Creates directories if they don't exist.
Source code in alc\cookbook\recipe.py
delete ¶
update_registry ¶
update the registry with the recipe path. Args: software: category: recipe_path:
Returns:
Source code in alc\cookbook\recipe.py
resolve
classmethod
¶
Resolve a recipe with the cross-DCC fallback chain.
Tries, in order, returning the first that loads:
{software}/{recipe_type}/{task}— the DCC, task-specific recipe{software}/{recipe_type}/default— the DCC generic recipealchemy/{recipe_type}/{task}— shared DCC-less, task-specificalchemy/{recipe_type}/default— shared DCC-less default
This is what lets one task cookbook thread the whole arc: a blender/rig
task routes its DCC phases (build/render/publish) to the blender recipes,
while its DCC-less phases (start/review) fall through to the shared
alchemy recipes. Mirrors PathObject.start's
alchemy/start/{task} → alchemy/start/default lookup, generalised to
every phase and every DCC. Returns None if nothing resolves.
Source code in alc\cookbook\recipe.py
load_from_file
classmethod
¶
Loads a Recipe object from a JSON file.
Source code in alc\cookbook\recipe.py
load ¶
Instance method: Hydrates the current instance with data from disk using its own software, recipe_type, and task.
Source code in alc\cookbook\recipe.py
edit_step ¶
Edits a step in self.steps with the given key and value. Args: step_name: key: value:
Returns:
Source code in alc\cookbook\recipe.py
reorder_steps ¶
Reorder the steps in the self.steps list according to the given list of names. This also updates the 'order' attribute of each step to reflect its new position.
Source code in alc\cookbook\recipe.py
run ¶
Executes all steps defined within this recipe sequence in order.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scene_file
|
str
|
Absolute path to the active working file asset (.blend, .ma, etc.) |
required |
deadline
|
bool
|
If True, submit to the Deadline farm instead of running preflights locally. |
False
|
dependency_ids
|
list[str] | None
|
Upstream Deadline job IDs the submitted job should wait on. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
RunResult |
'RunResult'
|
.success (bool, truthy via bool) plus .messages for the |
'RunResult'
|
agent chat panel. |
Source code in alc\cookbook\recipe.py
submit_to_deadline ¶
submit_to_deadline(
scene_file: str,
*,
priority: int = 50,
dependency_ids: list[str] | None = None
) -> str | None
Submit each step as its own chained Deadline job (granular path).
dependency_ids seeds the chain so the first required step waits on an
upstream task. Returns the last required step's job id so the caller can
chain the next task/recipe onto this one.
Source code in alc\cookbook\recipe.py
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | |
RecipeStep ¶
Bases: BaseModel
parent_filters
property
¶
The asset categories this step is for — empty means "all of them".
filter_label
property
¶
Human-readable filter for the UI — '' when the step is universal.
is_creative
property
¶
Artist-driven authoring — the 'art' phase or an ART-typed step. This is the work Alchemy does NOT automate (the sculpt, the paint), so it gets no time estimate.
is_chore
property
¶
A repeatable technical task we estimate and automate — everything that isn't creative authoring or a UI separator.
expected_manual_hours
property
¶
Blended manual effort: min + (max - min) * likelihood-of-worst-case.
normalize_parent_filter_value
classmethod
¶
A step may serve several categories, so the field accepts a list as
readily as a string and always lands as the canonical "chr, prp".
Normalizing here means the create form, the editor chips and legacy
recipe JSON (which wrote the literal "None") all store one spelling.
Source code in alc\cookbook\step.py
normalize_module_and_import
classmethod
¶
Intercepts the module string. If it's an import statement, it cleans 'module' and sets 'import_string'.
Source code in alc\cookbook\step.py
set_import_logic_and_hydrate ¶
Ensures import_string is populated and hydrations occur.
Source code in alc\cookbook\step.py
normalize_effort_defaults ¶
Normalize unset effort/frequency stats (stored as 0) to the studio defaults on load, so the time-savings numbers are always meaningful.
Source code in alc\cookbook\step.py
applies_to ¶
True when this step should run for the given asset.
target may be a PathObject, a path string, or a bare category. See
:func:step_applies — this is the object-level wrapper of it.
Source code in alc\cookbook\step.py
get_source_code ¶
Reads the raw source from disk for the editor.
Source code in alc\cookbook\step.py
get_doc_string ¶
Returns:
Source code in alc\cookbook\step.py
replace_doc_string ¶
Returns:
Source code in alc\cookbook\step.py
create ¶
Returns:
Source code in alc\cookbook\step.py
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | |
run ¶
The Execution Engine: Dynamically imports and runs the 'run()' function from the cookbook file.
Source code in alc\cookbook\step.py
load_py
classmethod
¶
Creates and hydrates a full RecipeStep object directly from a physical script file on disk and its adjacent recipe metadata.