-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post Processing passes wrong name #7190
Comments
Please check the alpha1 change log for post-processing script changes, namely G-code post-processor framework has been extended: #6042 The generated G-code may be locked for reading due to the G-code viewer, thus P2PP shall open the G-code for reading only or to make a copy of it first. |
Hi
Alpha 123 were working just fine it is in beta that the problem sees to occur. the filenae passed to the script does have a pp extension while the file saved in the tep store does not have that sae extension.
also seems that the namenof the output
mask is not always correctly applied so the code gets a gcode extension while
mcfx was requested.
the program does not use or alter
any of the environment variables as part of its processing
so I donnot think the suggestion will solve this problem
…Sent from my iPhone
On 29 Oct 2021, at 10:13, Vojtěch Bubník ***@***.***> wrote:
Please check the alpha1 change log for post-processing script changes, namely
G-code post-processor framework has been extended: #6042
New environment variable SLIC3R_PP_HOST contains one of "File", "PrusaLink", "Repetier", "SL1Host", "OctoPrint", "FlashAir", "Duet", "AstroBox" ...
New environment variable SLIC3R_PP_OUTPUT_NAME contains the name of the G-code file including path (for SLIC3R_PP_HOST == "File") or a name that will be given to the file after it is upload to the host (PrusaLink, Octoprint ...)
The post-processing script may suggest a new output file name (likely based on SLIC3R_PP_OUTPUT_NAME) by saving it as a single line into a new "output name" temp file. The "output name" file name is created by suffixing the input G-code file name with ".output_name".
The generated G-code may be locked for reading due to the G-code viewer, thus P2PP shall open the G-code for reading only or to make a copy of it first.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Didn't you update your system? Maybe the .pp extension is trimmed by the operating system? Does alpha3 work for you on the same system? |
I did update my od this week but alpha 3 has been running until last night without problems
it is with the installation of Beta 1 that the issues started.
The PP is no longer there hence the name passed to the script is incorrect
I tried to see what is in the environment vars but there is nothing there that would help in this situation
I could trim off the pp, but that would mean that the general compatibility between earlier versions gets impaired
The file saved is from PS2.4 I have not touched it at that point as I cannot open it.
… On 29 Oct 2021, at 11:49, Vojtěch Bubník ***@***.***> wrote:
MacOS Monterey
Didn't you update your system? Maybe the .pp extension is trimmed by the operating system?
Does alpha3 work for you on the same system?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJPLIHEG7XCLOZRTWB3UJJ33RANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Please provide us with your 3MF and possibly a hint on how to install your post-processor. BTW are you the post-processor author? |
HI,
yes, I am the author of P2PP
installation instructions of the plugin on https://github.com/tomvandeneede/p2pp/tree/dev <https://github.com/tomvandeneede/p2pp/tree/dev> readme (dmg file on Dropbox, latest version for PS2.4 is 1.00.205 under development)
Let me know if anything is missing
… On 29 Oct 2021, at 13:25, Vojtěch Bubník ***@***.***> wrote:
Please provide us with your 3MF and possibly a hint on how to install your post-processor.
BTW are you the post-processor author?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJIF777HQU5J6JNU54TUJKHCHANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
a 3MF file that calls your PP please |
this one should use the pp
… On 29 Oct 2021, at 14:50, Vojtěch Bubník ***@***.***> wrote:
a 3MF file that calls your PP please
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJNF76ZUNARK7U7RHTLUJKRBLANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
sorry nothing attached. You may want to zip the 3mf or change its extension |
Did some further testing and I figured the mismatch was due to a missing wait so the pp ran in background instead of blocking mode
BUT
I mde a small processing script
ls -las $1 >/Users/tomvandeneede/Desktop/out.pp
sleep 10
and this shows that during this time both gcode and gcode.pp are stored
after the script started it continued running in background while PS was already taking away the pp file
the geocode file however stayed untouched in the temp folder. not sure if that is meant to be
regards
… On 29 Oct 2021, at 15:08, Vojtěch Bubník ***@***.***> wrote:
sorry nothing attached. You may want to zip the 3mf or change its extension
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJIOGFVBHPMLM3DKVVDUJKTETANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
PrusaSlicer expects that the post processing script does its thing on the G-code until its process finishes. If you do start another process to work with the G-code "offline", than PrusaSlicer has no way of knowing it. Do you do that? |
Nope, the problem with the file not found is solved but making it synchronous, but still there is a .gcode and a .gcode.pp fill-in the temp directory.
The .pp goes away after processing the .gcode remains…. is that on purpose?
… On 30 Oct 2021, at 11:05, Vojtěch Bubník ***@***.***> wrote:
PrusaSlicer expects that the post processing script does its thing on the G-code until its process finishes. If you do start another process to work with the G-code "offline", than PrusaSlicer has no way of knowing it. Do you do that?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJIF3XTFZ2RZ4TRTTDLUJO7NNANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Would you please provide your 3MF? It contains the launch command for your post-processing script. Thanks a bunch. |
I have tried to reproduce on several systems and the behaviour is strange: Palette 3 processing script needs a special output file format names .mcfx (not a plain gcode file, binary format) when putting an output pattern .mxfc, some people get the desired.mcfx, others get the correctly processed file but with with a filename with a .gcode suffix. The processing script does not handle any of the environment variables at this point (planning to in a later release). So the filename seems to be passed ok, processing happens ok, but the final output file gets the wrong filename. Should I raise a new issue and close this one as they are not really the same. The oridginal issue was solely due to async processing. |
On Ubuntu 20.04 the post processing script runs in /tmp/ folder instead on the folder I saved the *.gcode file |
Inside the Python PostProcessing Script you can use:
|
No need for that. I just process the temp file and generate the output to the temp file.
Just getting reports from people that the output file is named incorrectly.
This could either due to the template not being applied correctl.
In P2PP I only use the temp file…so the wrong output file name appears to be something from PS
… On 6 Nov 2021, at 13:18, foreachthing ***@***.***> wrote:
Inside the Python PostProcessing Script you can use:
(no need to pass it manually, PS does it with this env-var)
from os import getenv
## get envvar from PrusaSlicer
env_slicer_pp_output_name = str(getenv('SLIC3R_PP_OUTPUT_NAME'))
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJJOO2YKLZS77RU4BETUKUMJ7ANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
After "export to SD Card", in the /tmp/ folder I have two files: In the folder I "export to SD Card" the gcode (from gui) is saved only the "original gcode" |
@tomvandeneede Would you please provide a single 3MF please? This is the fifth time I am asking you to do me the favor of providing me with a single 3MF to save my time invested into troubleshooting your problem. Thank you. I think the issue is that your "script" is a Windows GUI application, not a Windows command line application, thus PrusaSlicer likely does not wait for your process to finish. I think this is a feature of Windows system. Please |
This is why we provide two PrusaSlicer binaries on Windows: prusa-slicer.exe and prusa-slicer-console.exe. In fact the two only differ in a single bit in the application EXE header. We pack the complete application into a DLL, which is then launched by these two wrappers differing in EXE header only, one indicating a GUI application and the other indicating a command line application. The source code to generate these wrappers is here: |
Not sure why reference to Windows here… I only get reports from MAC users with this issue
… On 8 Nov 2021, at 12:55, Vojtěch Bubník ***@***.***> wrote:
This is why we provide two PrusaSlicer binaries on Windows: prusa-slicer.exe and prusa-slicer-console.exe. In fact the two only differ in a single bit in the application EXE header. We pack the complete application into a DLL, which is then launched by these two wrappers differing in EXE header only, one indicating a GUI application and the other indicating a command line application.
The source code to generate these wrappers is here:
https://github.com/prusa3d/PrusaSlicer/blob/master/src/CMakeLists.txt <https://github.com/prusa3d/PrusaSlicer/blob/master/src/CMakeLists.txt>
https://github.com/prusa3d/PrusaSlicer/blob/master/src/PrusaSlicer_app_msvc.cpp <https://github.com/prusa3d/PrusaSlicer/blob/master/src/PrusaSlicer_app_msvc.cpp>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJOIVEVEIFOMDSYRTJDUK63ETANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Not sure, but please read the replied
I uploaded the 3MF file already 3 times
The issueue with the async has been resolved was indeed the guy app trying to run asynchronously
All post processing goes just fine, only the filename at the end seems to differ from the filename provided in the templated form in the output options.
So in the pp script I am getting a .pp file name and I store my resulting file in that very same place. With some users the output filename is .gcode while they have .mcfx defined in their settings
There is no apparent reason for this. I haven’t been able to reproduce the issue but have had several reports from script users
… On 8 Nov 2021, at 12:53, Vojtěch Bubník ***@***.***> wrote:
@tomvandeneede <https://github.com/tomvandeneede> Would you please provide a single 3MF please? This is the fifth time I am asking you to do me the favor of providing me with a single 3MF to save my time invested into troubleshooting your problem. Thank you.
I think the issue is that your "script" is a Windows GUI application, not a Windows command line application, thus PrusaSlicer likely does not wait for your process to finish. I think this is a feature of Windows system. Please
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJLPXK4HAJZQ7F3ODPLUK623RANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
sorry no time to further help on this. I just relayed information received from other users. The whole postprocessing system has gotten way more messy than it should be ... I hope somebody does get the benefit of these changes... I will close this issues not resolved but don't know what to do if no responses are read any only 3MF files are asked.... |
@tomvandeneede I am sorry that I disappointed you, however my schedule is tight. With all respect, it may be I overlooked your 3MF attached to this issue, but I don't see it. Please paste the hyperlink to the 3MF that you managed to attach into this issue. A 3MF helps us to replicate your workflow exactly, it helps us a lot. If you did not manage to attach a 3MF to this issue, you may pass it through drop box for example, there are multiple ways to do it. |
Is this remaining issue platform specific? OSX only? |
Hi,
don’t worry but closing for the same reason. I can attach the 3MF but I don’t see the problem in my setup so there really is not much use.
Was said users see .gcode while their output template specifies .mcfx. All processing in between happens just fine so it could be on either end of PS24
If I ever recover more info I will let you know.
Anyway
PS24 has broken with a lot of traditional stuff in the output file (like the tower brim and other stuff now being done differently so I had my fair share of misery with this new version already. Only have 24 hours in a day as well and once of other support cases that wait my answer
… On 8 Nov 2021, at 13:23, Vojtěch Bubník ***@***.***> wrote:
I will close this issues not resolved but don't know what to do if no responses are read any only 3MF files are asked....
@tomvandeneede <https://github.com/tomvandeneede> I am sorry that I disappointed you, however my schedule is tight.
With all respect, it may be I overlooked your 3MF attached to this issue, but I don't see it. Please paste the hyperlink to the 3MF that you managed to attach into this issue. A 3MF helps us to replicate your workflow exactly, it helps us a lot.
If you did not manage to attach a 3MF to this issue, you may pass it through drop box for example, there are multiple ways to do it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJMQATFRKN7ZTKJNAYDUK66LDANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
just FYI we identified the problem if the extension is not .gcode and the computer does not have show extensions enabled, the default .gcode extension is used even though you have selected something else
So if your template says uuuu.mcfx the output file is uuuu.mcfx.gcode
When show filename extension is enabled, the correct name is used
Could be due to setting the .gcode filter in the box which is ok for most output files except if you need special filenames like P3 and some others do
… On 8 Nov 2021, at 13:23, Vojtěch Bubník ***@***.***> wrote:
I will close this issues not resolved but don't know what to do if no responses are read any only 3MF files are asked....
@tomvandeneede <https://github.com/tomvandeneede> I am sorry that I disappointed you, however my schedule is tight.
With all respect, it may be I overlooked your 3MF attached to this issue, but I don't see it. Please paste the hyperlink to the 3MF that you managed to attach into this issue. A 3MF helps us to replicate your workflow exactly, it helps us a lot.
If you did not manage to attach a 3MF to this issue, you may pass it through drop box for example, there are multiple ways to do it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJMQATFRKN7ZTKJNAYDUK66LDANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
If I understand it correctly, the issue is OSX specific only and it is connected with the system default file output dialog that PrusaSlicer opens when exporting a G-code, which forces a wrong (default) extension? BTW this is not a new issue, IMHO this is how PrusaSlicer on OSX always worked. We need to list out the allowed extensions in the file dialog API explicitly to work on OSX. |
I confirm that in PrusaSlicer 2.4 Beta2 the issue on Kubuntu is not fixed. |
Looks like indeed you are handling this.
Will see if I can further refine why it seems to work when you enable to show the extensions.
… On 29 Nov 2021, at 12:49, Vojtěch Bubník ***@***.***> wrote:
@tomvandeneede <https://github.com/tomvandeneede>
I assume you set a filter on the save as dialog from the OS. could you make that filter match the extension that was set for the output file.
I think that is what I do. I asked @kocikdav <https://github.com/kocikdav> some weeks ago to verify on OSX, as we seem to have the issue on OSX only.
This is the code that is supposed to add the custom extension to the template.
wxString file_wildcards(FileType file_type, const std::string &custom_extension)
{
static const std::string defaults[FT_SIZE] = {
/* FT_STL */ "STL files (*.stl)|*.stl;*.STL",
/* FT_OBJ */ "OBJ files (*.obj)|*.obj;*.OBJ",
/* FT_AMF */ "AMF files (*.amf)|*.zip.amf;*.amf;*.AMF;*.xml;*.XML",
/* FT_3MF */ "3MF files (*.3mf)|*.3mf;*.3MF;",
/* FT_GCODE */ "G-code files (*.gcode, *.gco, *.g, *.ngc)|*.gcode;*.GCODE;*.gco;*.GCO;*.g;*.G;*.ngc;*.NGC",
/* FT_MODEL */ "Known files (*.stl, *.obj, *.amf, *.xml, *.3mf, *.prusa)|*.stl;*.STL;*.obj;*.OBJ;*.amf;*.AMF;*.xml;*.XML;*.3mf;*.3MF",
/* FT_PROJECT */ "Project files (*.3mf, *.amf)|*.3mf;*.3MF;*.amf;*.AMF",
/* FT_GALLERY */ "Known files (*.stl, *.obj)|*.stl;*.STL;*.obj;*.OBJ",
/* FT_INI */ "INI files (*.ini)|*.ini;*.INI",
/* FT_SVG */ "SVG files (*.svg)|*.svg;*.SVG",
/* FT_TEX */ "Texture (*.png, *.svg)|*.png;*.PNG;*.svg;*.SVG",
/* FT_SL1 */ "Masked SLA files (*.sl1, *.sl1s)|*.sl1;*.SL1;*.sl1s;*.SL1S",
// Workaround for OSX file picker, for some reason it always saves with the 1st extension.
/* FT_SL1S */ "Masked SLA files (*.sl1s, *.sl1)|*.sl1s;*.SL1S;*.sl1;*.SL1",
};
std::string out = defaults[file_type];
if (! custom_extension.empty()) {
// Find the custom extension in the template.
if (out.find(std::string("*") + custom_extension + ",") == std::string::npos && out.find(std::string("*") + custom_extension + ")") == std::string::npos) {
// The custom extension was not found in the template.
// Append the custom extension to the wildcards, so that the file dialog would not add the default extension to it.
boost::replace_first(out, ")|", std::string(", *") + custom_extension + ")|");
out += std::string(";*") + custom_extension;
}
}
return from_u8(out);
}
@kocikdav <https://github.com/kocikdav> what was the result of your investigation?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJOHKXKPQM2MUZLXZXDUONSDFANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I've never seen a .gcode.pp or gcode.pp.gcode file in my folder. I've always gotten .gcode in the end (plus my copied pre-modified bumpfan.bk file). I'll look through release notes, but I don't recall seeing any compat busters for post-processing output filename changes. Did I miss something? BTW, not OSX here, I'm in native Windows 10. |
I found why I have a problem. See the filename argument sent from two different PrusaSlicer vserions: v2.4 above and v2.3 below. 2 problems.
Again, why? Doesn't post-processing mean AFTER everything else is done? The whole purpose of my script to make a copy is to allow me to compare the old and new to make sure the script did what I wanted it to. |
From PrusaSlicer 2.4.0-alpha1:
|
Because someone thought it'd be better (and faster; yes it is faster ... BUT!!!) to do "post-processing" before the file gets copied to his/her sd-card. @bubnikv please don't take it personally!!!! It's just frustration. My script works now (THANKS to you PS-guys for helping!). I just hate to see other people struggling with the same thing. |
@foreachthing I don't understand why you are so vocal about it. Why don't you just update your scripts? I should send you guys an invoice for the hours spent on it. |
I did some more experiments on OSX. It seems as if the problem was, that if one does not enter an extension to the file dialog input field, the default file extension is applied. The default file extension is the first one in the template list. If one adds an extension that is contained in the list (and we are making sure programmatically that the file extension IS in the list if it was provided as part of the output file template), then everything works and the file is saved using the non-default extension. Now what is weird is that one would expect if the save file dialog is opened with a path that contains a non-default file extension which is still in the template list (we are making sure it is the case), then the file dialog would rememeber the extension. But that is not the case and the extension is thrown away by the file dialog and substituted with the default one. We will try to redo the routine which handles the file extension template list to put the one that is contained in the output file name template parameter to the first place. That should solve this particular issue for good. |
thanks for looking into this. If not, would it be possible to add *.mcfx as a Palette3 output file in the default list?
I understand that you cannot do that for all extension but it would be a good workaround
… On 29 Nov 2021, at 14:19, Vojtěch Bubník ***@***.***> wrote:
@tomvandeneede <https://github.com/tomvandeneede>
I did some more experiments on OSX. It seems as if the problem was, that if one does not enter an extension to the file dialog input field, the default file extension is applied. The default file extension is the first one in the template list. If one adds an extension that is contained in the list (and we are making sure programmatically that the file extension IS in the list if it was provided as part of the output file template), then everything works and the file is saved using the non-default extension.
Now what is weird is that one would expect if the save file dialog is opened with a path that contains a non-default file extension which is still in the template list (we are making sure it is the case), then the file dialog would rememeber the extension. But that is not the case and the extension is thrown away by the file dialog and substituted with the default one.
We will try to redo the routine which handles the file extension template list to put the one that is contained in the output file name template parameter to the first place. That should solve this particular issue for good.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJKZGVAPEKODDEK4UD3UON4X5ANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@tomvandeneede We can whitelist your extension, but I am starting to be positive (and I am also COVID positive) about the solution. |
sorry to hear! take care of your health first!
… On 29 Nov 2021, at 15:07, Vojtěch Bubník ***@***.***> wrote:
@tomvandeneede <https://github.com/tomvandeneede> We can whitelist your extension, but I am starting to be positive (and I am also COVID positive) about the solution.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJOGQJ5DMKMECU3YOCDUOOCIZANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@tomvandeneede I think the OSX file output dialog issue should be fixed with e7cc12b
I need to pipe it through the build server and test. However on Windows the code seems to be doing what it should. |
When opening a "Save" file dialog with a default output file name, OSX file dialog strips the provided extension and replaces it with the default extension. This causes issues with a custom file output template, where a non-default file extension is specified. This commit changes the function to generate file dialog templates so that if a default extension is provided, it is emitted as first into the extension template. Fixes Post Processing passes wrong name #7190
@tomvandeneede Thus for the fix to work, you will need to specify your custom file extension in output file template. |
@foreachthing The post processing script handling is now technically sound and well defined, better than before if you ask me. We need to document it well. We may add a check for existence of the input / output G-code file and emit an explanation, why PrusaSlicer complains that the file is missing. |
@tomvandeneede |
Yes. The first parameter expected by the script is the global path including the gcode file name. I modified the python script to print the file name he gets from PrusaSlicer and this is the result: the expected file name was this: |
@magnificu |
How can I pass this to python? |
In python:
import os
try:
os.environ[“SLICER_PP_OUTPUT_NAME”]
except KeyError:
# do some stuff here if the environment var is not set
further info:
https://www.askpython.com/python/environment-variables-in-python
… On 30 Nov 2021, at 08:41, magnificu ***@***.***> wrote:
@foreachthing <https://github.com/foreachthing> This should give you the correct output filename: env_slicer_pp_output_name = str(getenv('SLIC3R_PP_OUTPUT_NAME')). The passed parameter is the temp filename.
How can I pass this to python?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AK6CHJLRAVINDIWTAYC6KZTUOR537ANCNFSM5G5SN5SQ>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
@xorza I can change my script I think easy enough, but for the record, I'll echo what others have said about post-processing being actually post. Pre and Post? Toggle? The env vars are a really nice addition, but doesn't fix the root confusion. There should be a note in the GUI to advise, especially of a change. Not a tooltip either, that's too subtle for this type of thing imoho. Do appreciate all the hard work all of you do. I've been where all you contributors are before. Truly, Thank You. --sg000 |
BTW https://manual.slic3r.org/advanced/post-processing
It was always stated in the manual, that the post-processor shall modify the G-code in place. |
@foreachthing https://github.com/foreachthing This should give you the correct output filename: env_slicer_pp_output_name = str(getenv('SLIC3R_PP_OUTPUT_NAME')). The passed parameter is the temp filename. How can I pass this to python? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#7190 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK6CHJLRAVINDIWTAYC6KZTUOR537ANCNFSM5G5SN5SQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. Thank you for your feedback. |
Thank you. |
That's the "new and improofed" post processing. Better get used to it. :-\ |
I think we can close this issue now. The original OSX issue was fixed with e7cc12b and @tomvandeneede was passed a build for testing, while no response was received. The post processing script was documented with Closing. |
Version
Version 2.4.0-beta1+x64
Operating system type + version
MacOS Monterey
3D printer brand / version + firmware version (if known)
Prusa MK3S
Behavior
Running P2PP post processing script for Palette3 from Mosaic
Script gets the file name
/var/folders/fl/3n88wwgj01j2nbvs26tzs8lr0000gn/T/.43983.gcode.pp
in the folder I find the following file
2712 -rw-r--r-- 1 tomvandeneede staff 1388386 Oct 28 20:40 .43983.gcode
Seems that the .pp extension is missing in the name of the output file.
This still worked ok in Alpha 3
No new feature request
The text was updated successfully, but these errors were encountered: