Jump to content

Recommended Posts

Posted (edited) · Adding custom material settings

Hello. I'm trying to add custom material settings (namely Young, Poisson and shear coefficients) to be used by another part of my plugin. I don't mind putting them in any location of the attached screenshot.

 

I've been checking the code in Cura, Uranium and fieldOfView's MaterialSettingsPlugin. From what I understand, Cura comes with a massive list of settings in which I can set their visibility, but I can't add or remove items. Is there something I'm missing? Thanks.

SettingsLocations.PNG

Edited by Tyronnosaurus
  • Link to post
    Share on other sites

    Posted · Adding custom material settings

    And Cura-ZOffsetPlugin too, though the Linear Advance one is a bit nicer because it uses a "familiar" json file instead of a dict.

     

    Note that the method I use in both plugins is not officially sanctioned. There is some "illegal" access to "private" variables, and it is a bit of a magic incantation that seems to work. It might break at any Cura update, though the method of adding settings has been fairly stable so far. I did my best to document how it works.

    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · Adding custom material settings

    For showing the settings in the Print Settings on the Materials pane of the preferences, I recommend using my Material Settings plugin. That requires even more "illegal" hacking to "copy" into your own plugin and it will be hard to make something that can be run side-by-side with that plugin.

    Edited by ahoeben
  • Link to post
    Share on other sites

    Posted · Adding custom material settings

    Hey ahoeben, thanks for answering and for your work in those plugins. I've made the basic functionality work (adding new profile parameters like in Linear Advance Plugin) and it works perfectly.

     

    Right now I was coincidentally looking into the Material Settings Plugin and wondering if it was worth it to do the same, considering future compatibility issues. I'd prefer having the settings associated to a material rather than a profile, but as a compromise I can simply use the Material Settings Plugin in parallel and, if it eventually breaks, my plugin will still work with the settings in the profile menu.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.9 stable released!
        Here comes Cura 5.9 and in this stable release we have lots of material and printer profiles for UltiMaker printers, including the newly released Sketch Sprint. Additionally, scarf seams have been introduced alongside even more print settings and improvements.  Check out the rest of this article to find out the details on all of that and more
        • 5 replies
      • Introducing the UltiMaker Factor 4
        We are happy to announce the next evolution in the UltiMaker 3D printer lineup: the UltiMaker Factor 4 industrial-grade 3D printer, designed to take manufacturing to new levels of efficiency and reliability. Factor 4 is an end-to-end 3D printing solution for light industrial applications
        • 4 replies
    ×
    ×
    • Create New...