From 776ad69b53aea7f74eb4c6bc24ea2864cc0e616f Mon Sep 17 00:00:00 2001 From: Kevin harrington Date: Sat, 2 Nov 2024 11:48:07 -0400 Subject: [PATCH] Fix the setting of the parameter when the file is loaded --- .../bowlerstudio/scripting/cadoodle/AddFromFile.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle/AddFromFile.java b/src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle/AddFromFile.java index b9d557ac..40340454 100644 --- a/src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle/AddFromFile.java +++ b/src/main/java/com/neuronrobotics/bowlerstudio/scripting/cadoodle/AddFromFile.java @@ -54,7 +54,10 @@ public List process(List incoming) { // ArrayListargs = new ArrayList<>(); // args.addAll(Arrays.asList(getName() )); ArrayList collect = new ArrayList<>(); - List flattenedCSGs = ScriptingEngine.flaten(getFile(), CSG.class, null); + File file = getFile(); + String pathname = file.getAbsolutePath(); + getParameter(pathname).setStrValue(pathname); + List flattenedCSGs = ScriptingEngine.flaten(file, CSG.class, null); com.neuronrobotics.sdk.common.Log.error("Initial Loading " + getStrValue()); for (int i = 0; i < flattenedCSGs.size(); i++) { CSG csg = flattenedCSGs.get(i); @@ -128,7 +131,8 @@ public File getFile() { StringParameter loc = new StringParameter("CaDoodle_File_Location", "NotSet", new ArrayList()); File parentFile = new File(loc.getStrValue()).getParentFile(); File file = new File(getStrValue()); - return new File(parentFile.getAbsolutePath()+DownloadManager.delim()+file.getName()); + String pathname = parentFile.getAbsolutePath()+DownloadManager.delim()+file.getName(); + return new File(pathname); } private String getStrValue() {