Make scene layer random seeds reproducible
This commit is contained in:
@@ -15980,6 +15980,32 @@ def smoke_node_scene_chain_registration() -> None:
|
||||
_expect(node_name in sxcp_nodes.NODE_DISPLAY_NAME_MAPPINGS, f"{node_name} missing from display registry")
|
||||
|
||||
nodes = sxcp_nodes.NODE_CLASS_MAPPINGS
|
||||
random_seed_options = nodes["SxCPSceneLayerSeedOptions"]().build(
|
||||
"softcore_branch",
|
||||
"random",
|
||||
123456789,
|
||||
"content_pose",
|
||||
"same_for_all_rows",
|
||||
"replace_layer",
|
||||
)[0]
|
||||
fixed_seed_options = nodes["SxCPSceneLayerSeedOptions"]().build(
|
||||
"softcore_branch",
|
||||
"fixed",
|
||||
123456789,
|
||||
"content_pose",
|
||||
"same_for_all_rows",
|
||||
"replace_layer",
|
||||
)[0]
|
||||
random_seed_item = json.loads(random_seed_options)["items"][0]
|
||||
fixed_seed_item = json.loads(fixed_seed_options)["items"][0]
|
||||
_expect(
|
||||
random_seed_item.get("seed") == 123456789,
|
||||
"Scene random layer seed should use the visible node seed",
|
||||
)
|
||||
_expect(
|
||||
random_seed_item.get("seed") == fixed_seed_item.get("seed"),
|
||||
"Scene random and fixed layer seeds should match when the visible seed matches",
|
||||
)
|
||||
scene, start_summary, _start_metadata = nodes["SxCPSceneStart"]().build(
|
||||
1,
|
||||
41,
|
||||
|
||||
Reference in New Issue
Block a user