Allow inline scene camera profiles
This commit is contained in:
@@ -623,6 +623,54 @@ def smoke_row_camera_policy() -> None:
|
||||
"Library camera layout" in str(updated_explicit_profile.get("camera_scene_directive", "")),
|
||||
"explicit scene_camera_profile_key should override text-matched scene profile",
|
||||
)
|
||||
inline_profile_row = {
|
||||
"prompt": "A generated adult prompt. Composition: vertical polished mirror view with bag and shoes visible. Avoid: low quality.",
|
||||
"caption": "sxcppnl7, generated adult prompt, polished mirror view with bag and shoes visible, illustration",
|
||||
"scene_text": "private room with soft daylight",
|
||||
"scene_entry": {
|
||||
"slug": "greenhouse_room",
|
||||
"prompt": "private room with soft daylight",
|
||||
"camera_profile": {
|
||||
"key": "glass_conservatory",
|
||||
"family": "greenhouse",
|
||||
"layout_label": "Glass conservatory camera layout",
|
||||
"place": "glass conservatory",
|
||||
"foreground": "plant shelf edge, fern leaves, and iron table corner",
|
||||
"midground": "glass panes, iron ribs, and potted palms",
|
||||
"background": "hanging vines, greenhouse windows, and layered plant depth",
|
||||
"detail_label": "conservatory details",
|
||||
"composition": {
|
||||
"woman": "glass conservatory frame with the woman beside fern leaves and greenhouse depth behind her",
|
||||
"default": "glass conservatory frame with the subjects beside fern leaves and greenhouse depth behind them",
|
||||
},
|
||||
},
|
||||
},
|
||||
"composition": "polished mirror view with bag and shoes visible",
|
||||
"subject_type": "woman",
|
||||
"women_count": 1,
|
||||
"men_count": 0,
|
||||
}
|
||||
updated_inline_profile = row_camera.apply_camera_config(
|
||||
inline_profile_row,
|
||||
_orbit_camera(horizontal_angle=45, vertical_angle=30, zoom=5.0),
|
||||
compact_labels=pb.CAMERA_COMPACT_LABELS,
|
||||
)
|
||||
inline_scene = _expect_text(
|
||||
"row_camera_policy.inline_profile_scene",
|
||||
updated_inline_profile.get("camera_scene_directive"),
|
||||
40,
|
||||
)
|
||||
inline_composition = _expect_text(
|
||||
"row_camera_policy.inline_profile_composition",
|
||||
updated_inline_profile.get("composition"),
|
||||
20,
|
||||
)
|
||||
inline_profile = updated_inline_profile.get("scene_camera_profile") if isinstance(updated_inline_profile.get("scene_camera_profile"), dict) else {}
|
||||
_expect("Glass conservatory camera layout" in inline_scene, "inline scene camera profile did not drive camera layout")
|
||||
_expect(updated_inline_profile.get("scene_camera_profile_key") == "glass_conservatory", "inline profile key was not exposed")
|
||||
_expect(inline_profile.get("family") == "greenhouse", "inline profile family was not exposed")
|
||||
_expect("glass conservatory" in inline_composition.lower(), "inline profile did not drive composition cleanup")
|
||||
_expect("bag" not in inline_composition.lower() and "shoes" not in inline_composition.lower(), "inline profile composition leaked unrelated props")
|
||||
|
||||
|
||||
def smoke_config_route_location_theme() -> None:
|
||||
|
||||
Reference in New Issue
Block a user