Page MenuHome

BoltFactory saving preset error
Closed, ResolvedPublic

Description

No need for system info don't guess. When saving a preset, the minor thread diameter (inside diameter) is not saving. I don't know python so i can't fix. Also, would it be possible to make a toggle to convert to imperial units of measure? I hate converting them.

Event Timeline

add_mesh_BoltFactory has its own preset system which doesn't allow for the addons path not to be writable by the user (which can happen in some cases).

Sapling addon has the same issue. (theres a bug reported about this too)

Bastien Montagne (mont29) lowered the priority of this task from 90 to Normal.Apr 25 2014, 6:05 PM

I have confirmed the issue. It also affects Phillips bit depth.
I am working on a solution.

Brendon Murphy (meta-androcto) triaged this task as 50 priority.May 21 2014, 5:29 PM

HI, i think there's some confusion here.
Bolt Factory has a list of inbuilt presets, read only that work ok, I think.
The actual error is in:

class add_mesh_bolt(bpy.types.Operator):

""""""
bl_idname = "mesh.bolt_add"
bl_label = "Add Bolt"
bl_options = {'REGISTER', 'UNDO', 'PRESET'}
bl_description = "adds many types of Bolts"

Blender's inbuilt PRESET function is not picking up several settings when saving.
Is there a limitation on the amount of settings saved? In theory, It should be working, but is not.

hi, I'll confirm the minor thread not saving using the bl_options preset consistently.
It also would appear that, due to the complexity of settings, in some use cases, pitch will fail also.
I can test this more but I'm still undecided if this is a bug or limitation.

I understand what is happening here.

When the Blender preset is run, the script sets all the values for thread pitch,size etc. Then the last thing it does is set the Bolt factory preset button. Which resets everything back to the default Bolt factory Mx preset, overriding the user presets.

What I would like to do is get rid of the Bolt factory preset and load all the settings into Blender preset system.

Is there any way that the Bolt factory Presets can be saved into the Blender preset system. So that when the user first uses bolt factory they already have the Mx presets available.

@Aaron Keith (spudmn) Yes, we can include presets with addons,

In this case the layout would look like...

Addons eg release/scripts/addons

  • addons/add_mesh_BoltFactory - addon dir
  • addons/presets/operator/mesh.bolt_add/some_preset.py - presets ...
  • addons/presets/operator/mesh.bolt_add/another_bolt.py

hi, I've tested this out & indeed removing the 'presets system from bolt factory. using the internal presets system only solves the presets issues nicely.
I'll discuss on irc to add fix before or after 2.75 release.

Brendon Murphy (meta-androcto) changed the task status from Unknown Status to Resolved.May 24 2015, 12:37 PM

fix for presets not working:
https://developer.blender.org/rBA14cafb606c88b79c9901be7f7abbb44f147ee5f3

There is one 'Feature Request' outstanding: add generic scale button.
Hopefully Aaron can add this after release.

I'm closing this report.