Jump to content

Daniel26

Dormant
  • Posts

    34
  • Joined

  • Last visited

Everything posted by Daniel26

  1. Hello, I've wrote a plugin for Cura 4.x. This worked well. Now, with Cure 5.0 I have to update my plugin. The only thing I have to change is the sdk version in the plugins.json. So I set "supported_sdk_versions": ["7.0.0", "8.0.0"]" there, set the "Version" one up and uploaded the zip. But then, I only get as eror message "null(null)" and the package is still in the draft status? Can anybody tell me, where the error is? What did I wrong? Regards Daniel
  2. Hi, I developed a plugin for cura 4. Now, with Cura5, my plugin is gone. Where can I find my plugin to update it? Regards Daniel
  3. I answered that. I didn't realise that there is another plugin folder. But I think its a bug in Cura. All the Plugins before the Console Logger are also not Logged. Perhaps the logging starts with the ConsoleLoggerPlugin? The Renaming this Plugin so it is loaded at first would make sense. But I found another bug that crashes Cura completely. Thanks for your patience. Regards Daniel
  4. Ok, found the source of my problems... Cura registers the plugins in alphabetical order. The log starts at "C", the amf-reader was not listed in the log, but it was loaded. So I renamed my plugin-folder to something starting with "Z". And then I saw errors in the logile. I had some missing imports. Thats all. After I corrected that the plugin was loaded fine. My plugin simply was loaded before the logging starts.....
  5. I start cura simply from windows with a double click on the icons. What else do you need? I will try to answer the questions. The source of the plugin is here: https://github.com/Spanni26/Cura/tree/master/plugins/ChituWriter
  6. Ok, tried it now with the logger, but still no message in the logs: #Copyright (c) 2018 Ultimaker B.V. #Cura is released under the terms of the LGPLv3 or higher. import sys from UM.Logger import Logger try: from . import ChituCodeWriter except ImportError: Logger.log("w", "Could not import ChituCodeWriter") from UM.i18n import i18nCatalog #To translate the file format description. from UM.Mesh.MeshWriter import MeshWriter #For the binary mode flag. i18n_catalog = i18nCatalog("cura") def getMetaData(): Logger.log("w", "--- get metadata of ChituCodeWriter ---") if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} return { "mesh_writer": { "output": [ { "mime_type": "text/chitu-g-code", "mode": MeshWriter.OutputMode.TextMode, "extension": "gcode", "description": i18n_catalog.i18nc("@item:inlistbox", "Chitu gcode") } ] } } def register(app): Logger.log("w", "--- register ChituCodeWriter ---") if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} else: return { "mesh_writer": ChituCodeWriter.ChituCodeWriter() } Nothing in the logs. I also have no such mime type in the save-as-dialog. Frustrating... Regards Daniel
  7. Ok, thanks. Will try the logger. The file are in a seprate folder in the plugins dir.
  8. { "name": "Chitu code Writer", "author": "Spanni26", "version": "1.0.0", "description": "Adds chitu code to gcode", "api": "7.1", "i18n-catalog": "cura" } Yes, see above.
  9. Here the __init__.py: #Copyright (c) 2018 Ultimaker B.V. #Cura is released under the terms of the LGPLv3 or higher. import sys from UM.Logger import Logger try: from . import ChituCodeWriter except ImportError: Logger.log("w", "Could not import ChituCodeWriter") from UM.i18n import i18nCatalog #To translate the file format description. from UM.Mesh.MeshWriter import MeshWriter #For the binary mode flag. i18n_catalog = i18nCatalog("cura") def getMetaData(): print("Loading chitu_mods metadata") if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} return { "mesh_writer": { "output": [ { "mime_type": "text/chitu-g-code", "mode": MeshWriter.OutputMode.TextMode, "extension": "gcode", "description": i18n_catalog.i18nc("@item:inlistbox", "Chitu gcode") } ] } } def register(app): if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} else: print("fregistering chitu_mods") return { "mesh_writer": ChituCodeWriter.ChituCodeWriter() } Cura.log is attached. Thanks for your time cura.log
  10. Hmmm, my Plugin seems not to be registered. I put a simple "print" to the register and the getMetaData function, but I can't find the output in any log. Any idea?
  11. No Prob, thanks. I will try to figure it out. Sadly, there is no documentation about that.
  12. So, If I understand correctly: The file generated from ufp is "piped thru" the Script that creates the gcode? So with the order of the fileformats I can control the order the plugins are used? Nope. There are only additional M-Commands included in the gcode-file. So I only wan't one file.
  13. To Use the UFPWriter I have to "save as" and select "UFP"? If yes, this is not what I wan't. If I add a Tronxy printer the gcode simply has also "run thru" my plugin ans should be saved as gcode.
  14. It adds e.g. a Screenshot to the gcode so the part is shown on the touchscreen of the printer. The timestamps also have a special format. I tried to submit a post process script, but they won't include it in the cura release. They advised me to write a mesh writer plugin and to submit it to the plugin database.
  15. Hello, filename is "tronxy_base_extruder_0.def.json". But it also failes if I set machine to "tronxy_base_extruder_0" Regards Daniel
  16. Hello, I try to implement my own extruder definition. But the test at github claims about a machine_id, which cannot be found. { "version": 2, "name": "Extruder 1", "inherits": "fdmextruder", "metadata": { "machine": "tronxy_base_extruder", "position": "0" }, "overrides": { "extruder_nr": { "default_value": 0 }, "machine_nozzle_size": { "default_value": 0.4 }, "material_diameter": { "default_value": 2.75 } } } Can anybody explain me this? Regards Daniel
  17. Ok. Thats for testing. What I wan't: if printer is a tronxy, the g-code should be created, that g-code hat to be modified by my plugin. How can I do that? Is that done by "file_formats": "text/x-gcode;text/chitu-g-code" in the printers definition? Sorry for that stupid questions, but I can't find any info about "Mesh_writer" Plugins. Regards Daniel
  18. Sorry, here is the complete __init__.py import sys from UM.Logger import Logger try: from . import ChituCodeWriter except ImportError: Logger.log("w", "Could not import ChituCodeWriter") from UM.i18n import i18nCatalog #To translate the file format description. from UM.Mesh.MeshWriter import MeshWriter #For the binary mode flag. i18n_catalog = i18nCatalog("cura") def getMetaData(): if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} return { "mesh_writer": { "output": [ { "mime_type": "text/chitu-g-code", "mode": MeshWriter.OutputMode.TextMode, "extension": "chitu", "description": i18n_catalog.i18nc("@item:inlistbox", "Chitu Code") } ] } } def register(app): if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} return { "mesh_writer": ChituCodeWriter.ChituCodeWriter() } How can I be sure that the new mimetype is known by cura? I don't see any signs that my plugin is used. Regards Daniel
  19. Hello, I wrote a plugin which I wan't to start by a new mimetype. But how do I register that mimetype? My __init__.py in the plugins directory: def getMetaData(): if "ChituCodeWriter.ChituCodeWriter" not in sys.modules: return {} return { "mesh_writer": { "output": [ { "mime_type": "text/chitu-g-code", "mode": MeshWriter.OutputMode.TextMode, "extension": "chitu", "description": i18n_catalog.i18nc("@item:inlistbox", "chitu addons") } ] } } Is that really enough so I can call that plugin via the printers definition with "file_formats": "text/x-gcode;text/chitu-g-code", Regards Daniel
  20. Ok, found it. Specified Version as a string in a file in inherit.
  21. Hello, I try to create a printerdefinition, but somethin seems to be not correct. The log says: 2020-03-22 20:07:18,375 - INFO - [MainThread] cura.Settings.MachineManager.addMachine [342]: Trying to add a machine with the definition id [tronxy_xy2_pro] 2020-03-22 20:07:18,419 - ERROR - [MainThread] UM.Logger.logException [98]: Exception: Error when loading container tronxy_xy2_pro: Definition uses version 2 but expected version 2 2020-03-22 20:07:18,424 - ERROR - [MainThread] UM.Logger.logException [102]: Traceback (most recent call last): 2020-03-22 20:07:18,428 - ERROR - [MainThread] UM.Logger.logException [102]: File "X:\4.5-exe\build\inst\lib\python3.5\site-packages\UM\Settings\ContainerRegistry.py", line 183, in findContainers 2020-03-22 20:07:18,433 - ERROR - [MainThread] UM.Logger.logException [102]: File "C:\Program Files\Ultimaker Cura 4.5\plugins\LocalContainerProvider\LocalContainerProvider.py", line 68, in loadContainer 2020-03-22 20:07:18,438 - ERROR - [MainThread] UM.Logger.logException [102]: container.deserialize(f.read(), file_path) 2020-03-22 20:07:18,442 - ERROR - [MainThread] UM.Logger.logException [102]: File "X:\4.5-exe\build\inst\lib\python3.5\site-packages\UM\Settings\DefinitionContainer.py", line 292, in deserialize 2020-03-22 20:07:18,446 - ERROR - [MainThread] UM.Logger.logException [102]: File "X:\4.5-exe\build\inst\lib\python3.5\site-packages\UM\Settings\DefinitionContainer.py", line 243, in readAndValidateSerialized 2020-03-22 20:07:18,450 - ERROR - [MainThread] UM.Logger.logException [102]: File "X:\4.5-exe\build\inst\lib\python3.5\site-packages\UM\Settings\DefinitionContainer.py", line 397, in _resolveInheritance 2020-03-22 20:07:18,456 - ERROR - [MainThread] UM.Logger.logException [102]: File "X:\4.5-exe\build\inst\lib\python3.5\site-packages\UM\Settings\DefinitionContainer.py", line 409, in _verifyJson 2020-03-22 20:07:18,460 - ERROR - [MainThread] UM.Logger.logException [102]: UM.Settings.DefinitionContainer.IncorrectDefinitionVersionError: Definition uses version 2 but expected version 2 2020-03-22 20:07:18,467 - WARNING - [MainThread] cura.Settings.CuraStackBuilder.createMachine [36]: Definition tronxy_xy2_pro was not found! 2020-03-22 20:07:18,473 - WARNING - [MainThread] cura.Settings.MachineManager.addMachine [355]: Failed creating a new machine! Any Ideas whats wrong here? The definitions can't be attached :( Regards Daniel
  22. I've written a postProcessScript which add a preview and the time infos for the chitu boards. How is the best way to get it ino cura? Is is in my private git repo.
  23. But doesn't this biolate the GPL? Atm. I have a Slicer with compiled pyc. I decompiled it, took the code I needed an made a PostProcessScript of it. But I'm a little concerned of there reaction.
  24. So there are no closed source cura versions for customer companies who bought and modified it?
×
×
  • Create New...