Fix crash when using Imaginate tool (#1064)

Fix crash when using imaginate tool
This commit is contained in:
0HyperCube
2023-03-02 21:14:12 +00:00
committed by Keavon Chambers
parent 66ec85a3c9
commit 7e37fb41a4
5 changed files with 7 additions and 9 deletions

View File

@@ -121,7 +121,9 @@ impl NodeGraphExecutor {
let get = |name: &str| IMAGINATE_NODE.inputs.iter().position(|input| input.name == name).unwrap_or_else(|| panic!("Input {name} not found"));
let transform: DAffine2 = self.compute_input(&network, &imaginate_node, get("Transform"), Cow::Borrowed(&image_frame))?;
// Get the node graph layer
let layer = document.document_legacy.layer(&layer_path).map_err(|e| format!("No layer: {e:?}"))?;
let transform = layer.transform;
let resolution: Option<glam::DVec2> = self.compute_input(&network, &imaginate_node, get("Resolution"), Cow::Borrowed(&image_frame))?;
let resolution = resolution.unwrap_or_else(|| {