Jump to content

awit

Member
  • Posts

    10
  • Joined

  • Last visited

Personal Information

  • 3D printer
    Other 3D printer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

awit's Achievements

0

Reputation

  1. I have created plugins, I have some post-processing scripts also, but they are not relevant to the current issue. I am not entirely sure I understand. Plugins can be executed in the order of them loading, or being executed all at once, when all of them finish loading? Not without modifying code. I will try the alphabetical workaround, but I would be glad for any information regarding the code modification.
  2. Hi! I have created 2 plugins, X and Y, and I want them to process the gcode sequentially - first X, then Y. However, when I set up both of them, and they work properly on their own, the issue I am facing is that Cura seems to firstly focus on plugin Y, then X, which produces the wrong result. My question is if there is a setting, which can assign a priority to plugins, ie. Cura starts with the most 'important' plugin first. I could merge them into one plugin, and ensure the proper order, but I also want to use them separately. Best regards, AW
  3. @ahoeben Hi, how to query a user-defined setting? retraction_amount = Application.getInstance().getGlobalContainerStack().getProperty( "retraction_amount", "value" ) The above code gives me the 'default' value, not the updated value, which I changed in Cura, and I was wondering how to access the InstanceStack (?), where user-defined settings are kept. Thanks in advance!
  4. I am aware and very thankful, I looked through the plugins you wrote at least several times. I just wanted to provide the source of the code I used. I greatly appreciate the opportunity to ask questions. I was wondering if Cura.CuraApplication and UM.Application can be used interchangeably or is one a newer version of the other? As I based on the Z-Offset plugin, I used the UM imports. For now my understanding of the various imports, and the code structure of Cura in general, is very limited (before asking the recent question I tried to find the answer here). From my initial question I have settled to create a folder with the __init__.py, .json and python scripts; and paste it to the plugin directory of Cura. So every change is followed by the restart of Cura and the various imports are unresolved.
  5. This is the approach I found in the Z-Offset plugin: self._application = Application.getInstance()
  6. With a slight change it started working: extruder_stack = self._application.getInstance().getExtruderManager().getActiveExtruderStacks()[0] Thanks!
  7. Hi @ahoeben, I have made some progress in the plugin development process, however, I am temporarily stuck on the following issue. For one of the functions, I have to access the value of a setting (in this case - the value of retraction that has been set by the user) directly from Cura, so that I can use it as a variable inside of the function. I have used the following lines of code: global_container_stack = self._application.getGlobalContainerStack() if not global_container_stack: return # get the retraction value retraction = global_container_stack.getProperty("retraction_amount", "value") However, this returns the value of 6.5, which I assume is the default; and not the correct value set by me in Cura. I have read about the stack and how Cura retrieves values. I think that somehow it skips the user settings and goes right into the definitions. Taking a look at the .cfg files, I noticed two files being updated together whenever I make changes. One is named custom_myProfileName and the other custom_extruder1_myProfileName. The first one contains comparatively less settings, whereas the second one contains all the custom ones. Is it possible that my code returns the value for the case of the first .cfg file, where the retraction_amount has not been saved? If so, what would be the solution for this issue. Best regards, AW
  8. Thanks for the quick reply! As I understand it, I should just create the plugin folder with __init__.py, main .py file and a json file and paste it to the Cura 'plugins' folder? Shouldn't I somehow 'build' it (I read about curapackage / curaplugin files)? My main goal is to update a plugin made by someone else in the past, ScalableExtraPrime, for the current Cura version.
  9. Hi everyone! I was wondering if anybody could direct me / give me some advice on how to start the development of a custom plugin for Cura 4.13.1. I have read a lot of forum posts and the general instructions on the official github concerning plugins, packages, Uranium, etc. However, I am not sure where to start. For instance - how to set up a framework, what do I need to write/build and test a plugin? I would greatly appreciate any information that could push me forwards in this endeavour. AW
×
×
  • Create New...