fieldofview / cura-customjobprefix Goto Github PK
View Code? Open in Web Editor NEWA Cura plugin that lets the user set a custom print job prefix
License: GNU Affero General Public License v3.0
A Cura plugin that lets the user set a custom print job prefix
License: GNU Affero General Public License v3.0
Cura can only add a prefix to the job name. It would be nice if the plugin could add a postfix too.
It would be nice to have one variable ({date_year}
) that contains the whole date time.
like:
2020-04-28_11:41
2020-04-28T11:41
20200428-1141
You might want to check https://tools.ietf.org/html/rfc3339.
But I don't know if we need/want time-second
and time-offset
. (2020-04-28T09:45:42+00:00
)
I chose this config option:
Prefix: {date_year}-{date_month}-{date_day}
Expected path:
2020-06-29_test.gcode
Actual path:
20-06-29_test.gcode
Please use full-length 4-digit year representations.
The 90's called, they want to work on the Y2K problem again 😄
I have been testing this field and it names it as 800 instead of 80 (80mm/s is what I have).
Good job btw.
Is it possible to add a Cura version tag to the naming convention ? {cura_version}
This because of testing purposes and identification when using more then one Cura version to overcome some slicing bugs that are not in older version ?
Thanks in advance.
Would it be possible to add {profile_name} to the list of available replacement patterns? I don't like the way that Cura handles materials, so I use profiles for everything, so I have a profile name that probably already resembles the prefix that you are adding. I now am adding it manually when I save my files, but doing it automatically would be a huge benefit.
Thank you!
Its not a big deal unless you grab infill. 10 % infill shows as 100 in the file name.
it does this for all the parameters I am grabbing.
here is a file name example I have:
Vandy_skullfinal_.012Lay_.04Noz_100In_78G_11H_26M
Machine name_model_layerheight should be .12 not .012_again the Zero, its a .4 nozzle not a .04_ 10 percent infill but says its 100, the rest is great.
I would like to use a 4-digit year variable.
In fact I think this should be the default for {date_year}
.
Bit I don't want to argue if the existing variable should be changed. 😉
https://user-images.githubusercontent.com/95840103/147363086-148a063d-adda-400e-baaf-999639067458.mov
cura.log
just what my title says. I save gcode or project and Cura changes the name of the project/print job.
It would be nice if you could save more than one prefix definition and change between them.
So you could have one prefix definition for your standard projects.
And one (or more) when you experiment with your settings. (see #10 )
A simple solution could be to have two (or more) text fields with radio buttons in front of them to select the current prefix definition.
(just a quick mockup):
Hi!
I'm finding this plugin very handy, but I'm missing having those two values on my filenames.
Could it be added in future releases?
Thank you very much.
The {material flow} option doesn't include a leading 0 if less than 100. So, 98% is displayed as 98. When sorting by alpha, that puts it after of something like 101 because 1 is less than 9, but I'd like it to by the whole number value. A preceding 0 makes it compare 098 vs 101 and the 98% would come first.
I chose these config options:
Prefix: {printer_name_full}
Postfix: {date_year}-{date_month}-{date_day}
Path: foo/
Expected path:
foo/LittlePrinter_test_20-06-29.gcode
Actual path:
foo//LittlePrinter_test_20-06-29.gcode
While double-slashes might be handled without problems on most systems, especially embedded platforms will throw an error in this case.
Hi! I use your plugin for a while now. I print custom costume parts that often needs to be scaled. Most of the time I forgot the scale of the last print. Is it possible to add the scale in percent to the postfixes?
As the title says, it'd be nice if the plugin had a way to disable the filename prefix entirely.
Nice plugin, thanks for it.
Just a suggestion: having {print_time_minutes} in "2 digits" format would be nice
I did a test with
"{print_time_minutes}": str(self._print_information.currentPrintTime.minutes).zfill(2),
and it seems to be fine...
I want to know how to change _ between the prefix and job name to something smaller like . or ,
Anyone know how I can do this?
e.g. 1hr38min_Benchy -> 1hr38min.Benchy
Hey there,
I've recently found that if I insert a space before the postfix pattern, that space gets removed (both from the project name, and the extension's settings) when a new project is opened (i.e. via opening a .3mf and picking the 'Open as Project" option.
My extension configuration is:
Prefix: (none)
Postfix: " {printer_type}" (ignore the quotes, they're just so you can see the space I put in)
Path: (none)
Enable prefix and postfix - Yes
Add '_' between jobname parts - No
Sanitise jobname parts - No
Any help with or resolution of this issue would be much appreciated!
When changing the prefix, the actual job name of the slice is not changed accordingly. These are my reproduction steps:
{layer_height}x
and confirm the dialogue.Expected result:
0.1x_cube
.Actual result:
UMS5_cube
.This only reproduces in Cura 3.6 and 4.0. In 4.1+ it works fine. In 3.5 it crashes as per #4.
I’ve just updated the plugin to the latest version, now when I save a file that already has a prefix on it, the extension is adding it again.
For example I have a the prefix on my printer set as “CR10S” and a file called "CR10S_Skull_Small_30mm.3mf”, when I come to save the file the extension is now adding CR10S_ again so the file name is CR10S_CR10S_Skull_Small_30mm.3mf” this didn’t use to be the case with the old version.
I went in to the settings and re-Typed in the prefix of CR10S but it still happens, I’m using Cura under macOS Catalina.
Would it be possible to add a feature to this plugin that would let you set the default exported filetype in Cura?
Default Cura doesn't seem to have the option and I initially (wrongly) assumed that's what postfix was supposed to do.
I understand now that it isn't, but thought it would fit the function of this plugin quite nicely. Do you think you would be willing to implement functionality which would set the Cura default "Save As" filetype so you could select gcode, ufp, x3g, etc?
I notice the X3G plugin somehow manages to do this, but I can't pin down how. I really just want to be able to save my files in UFP format for Klipper/Octoprint, and I don't like the Octoprint integration, and it's annoying to constantly have to change the filetype every time I save something.
Hello,
Can you also add the possibility to add the nozzle size in the filename ?
Thank you.
It would be nice if there was an easy way to copy the variable names you want to use.
Currently you cannot select and Ctrl+C
the variable names in the dialog.
If this is not possible in the dialog, maybe add a list of the available variables to the README.md
and add a link in the dialog.
For now I use the source code.
https://github.com/fieldOfView/Cura-CustomJobPrefix/blob/master/PrintInformationPatches.py#L75
I don't know if it is a problem with the new version of Cura, which is what I suspect.
I'm totally fine with spaces in my file names, so "project {material flow} {material type}" is fine. No underscores at all needed.
After this commit in cura git, critical error:
SHA-1: fa4d1ba1fbe4685dbab21825c7fa0bcbdc889b36, &Номер ревизии ветви: 5022
Don't strip accents from job name
No idea why this was there in the first place. Our archeology attempts couldn't
find out as to why it was introduced. We suspect an issue with other Qt versions.At least now ロボット.stl will not be mangled into ロホット.gcode upon saving (and
german bears into bars)
Traceback (most recent call last): File "C:/Users/name/AppData/Roaming/cura/4.8/plugins/CustomJobPrefix/CustomJobPrefix/PrintInformationPatches.py", line 120, in _triggerJobNameUpdate self._updateJobName() File "C:/Users/name/AppData/Roaming/cura/4.8/plugins/CustomJobPrefix/CustomJobPrefix/PrintInformationPatches.py", line 129, in _updateJobName base_name = self._print_information._stripAccents(self._print_information._base_name) AttributeError: 'PrintInformation' object has no attribute '_stripAccents'
Hello,
As talked on reddit, here is an issue for adding infill and print speed in available variable.
Thanks again for this plugins, it's very usefull.
Add the possibility to remove punctuations from jobname
Just to add a log about the sensitivity of the name editing.
If it's possible to manage it within your plugin :)
Could you please add the ability to add a leading zero if the value is below a certain point? For material flow, sometimes it's 99 or less and sometimes it's 100 or greater. Computers will sort the 100 before the 99 even though to us, the 99 should come first. A leading zero, 099, would solve that.
Also, can you please add print temperature to the variables?
For context, I name my files "thing t### f###", example: "cube t215 f099"
This plug-in makes Cura 3.5.1 crash when opening the dialogue to change the prefix. Reproduce steps:
Cura then crashes with the following error in the log:
2019-11-08 16:09:17,845 - ERROR - [MainThread] UM.Qt.QtApplication.createQmlComponent [507]: file:///home/cherubim/.local/share/cura/3.5/plugins/CustomJobPrefix/CustomJobPrefix/PrefixDialog.qml:10:1: module "Cura" version 1.1 is not installed
2019-11-08 16:09:17,849 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [65]: An uncaught error has occurred!
2019-11-08 16:09:17,851 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [68]: Traceback (most recent call last):
2019-11-08 16:09:17,853 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [68]: File "/build/3.5/build/inst/lib/python3.5/site-packages/UM/Qt/Bindings/ExtensionModel.py", line 51, in subMenuTriggered
2019-11-08 16:09:17,855 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [68]: File "/build/3.5/build/inst/lib/python3.5/site-packages/UM/Extension.py", line 38, in activateMenuItem
2019-11-08 16:09:17,856 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [68]: File "/home/cherubim/.local/share/cura/3.5/plugins/CustomJobPrefix/CustomJobPrefix/CustomJobPrefix.py", line 46, in showNameDialog
2019-11-08 16:09:17,858 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [68]: self._create_profile_window.show()
2019-11-08 16:09:17,860 - CRITICAL - [MainThread] cura.CrashHandler.__init__ [68]: AttributeError: 'NoneType' object has no attribute 'show'
I think you might need to import a lower version of Cura
in your QML?
Can we have Line Width and Wall Thickness please? Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.