Fix for #8 'Operator Presets don't exists from Release 4.2' #11

Merged
Nika Kutsniashvili merged 2 commits from linux_dr/add_mesh_BoltFactory:losborn_ISSUE8_missing_presets into main 2024-08-20 22:39:56 +02:00
9 changed files with 308 additions and 0 deletions
Showing only changes of commit e18daa282e - Show all commits

View File

@ -17,10 +17,22 @@ import bpy
def register(): def register():
import os
Boltfactory.register() Boltfactory.register()
# Part of 4.3 may be back-ported to 4.2.
if register_preset_path := getattr(bpy.utils, "register_preset_path", None):
register_preset_path(os.path.join(os.path.dirname(__file__)))
def unregister(): def unregister():
import os
# Part of 4.3 may be back-ported to 4.2.
if unregister_preset_path := getattr(bpy.utils, "unregister_preset_path", None):
unregister_preset_path(os.path.join(os.path.dirname(__file__)))
Boltfactory.unregister() Boltfactory.unregister()

View File

@ -0,0 +1,37 @@
import bpy
op = bpy.context.active_operator
op.bf_Model_Type = 'bf_Model_Bolt'
op.bf_Head_Type = 'bf_Head_Hex'
op.bf_Bit_Type = 'bf_Bit_None'
op.bf_Nut_Type = 'bf_Nut_Hex'
op.bf_Shank_Length = 0.0/1000.0
op.bf_Shank_Dia = 3.0/1000.0
op.bf_Phillips_Bit_Depth = 1.1431535482406616/1000.0
op.bf_Allen_Bit_Depth = 1.5/1000.0
op.bf_Allen_Bit_Flat_Distance = 2.5/1000.0
op.bf_Torx_Bit_Depth = 1.5/1000.0
op.bf_Torx_Size_Type = 'bf_Torx_T10'
op.bf_Hex_Head_Height = 2.0/1000.0
op.bf_Hex_Head_Flat_Distance = 5.5/1000.0
op.bf_12_Point_Head_Height = 3.0/1000.0
op.bf_12_Point_Head_Flat_Distance = 3.0/1000.0
op.bf_12_Point_Head_Flange_Dia = 5.72/1000.0
op.bf_CounterSink_Head_Dia = 6.300000190734863/1000.0
op.bf_Cap_Head_Height = 3.0/1000.0
op.bf_Cap_Head_Dia = 5.5/1000.0
op.bf_Dome_Head_Dia = 5.599999904632568/1000.0
op.bf_Pan_Head_Dia = 5.599999904632568/1000.0
op.bf_Philips_Bit_Dia = 1.8199999332427979/1000.0
op.bf_Thread_Length = 6.0/1000.0
op.bf_Major_Dia = 3.0/1000.0
op.bf_Pitch = 0.3499999940395355/1000.0
op.bf_Minor_Dia = 2.6211137771606445/1000.0
op.bf_Crest_Percent = 12.5
op.bf_Root_Percent = 25
op.bf_Div_Count = 36
op.bf_Hex_Nut_Height = 2.4000000953674316/1000.0
op.bf_Hex_Nut_Flat_Distance = 5.5/1000.0
op.bf_12_Point_Nut_Height = 3.0/1000.0
op.bf_12_Point_Nut_Flat_Distance = 3.0/1000.0
op.bf_12_Point_Nut_Flange_Dia = 5.72/1000.0

View File

@ -0,0 +1,37 @@
import bpy
op = bpy.context.active_operator
op.bf_Model_Type = 'bf_Model_Bolt'
op.bf_Head_Type = 'bf_Head_Hex'
op.bf_Bit_Type = 'bf_Bit_None'
op.bf_Nut_Type = 'bf_Nut_Hex'
op.bf_Shank_Length = 0.0/1000.0
op.bf_Shank_Dia = 3.0/1000.0
op.bf_Phillips_Bit_Depth = 1.1431535482406616/1000.0
op.bf_Allen_Bit_Depth = 1.5/1000.0
op.bf_Allen_Bit_Flat_Distance = 2.5/1000.0
op.bf_Torx_Bit_Depth = 1.5/1000.0
op.bf_Torx_Size_Type = 'bf_Torx_T10'
op.bf_Hex_Head_Height = 2.0/1000.0
op.bf_Hex_Head_Flat_Distance = 5.5/1000.0
op.bf_12_Point_Head_Height = 3.0/1000.0
op.bf_12_Point_Head_Flat_Distance = 3.0/1000.0
op.bf_12_Point_Head_Flange_Dia = 5.72/1000.0
op.bf_CounterSink_Head_Dia = 6.300000190734863/1000.0
op.bf_Cap_Head_Height = 3.0/1000.0
op.bf_Cap_Head_Dia = 5.5/1000.0
op.bf_Dome_Head_Dia = 5.599999904632568/1000.0
op.bf_Pan_Head_Dia = 5.599999904632568/1000.0
op.bf_Philips_Bit_Dia = 1.8199999332427979/1000.0
op.bf_Thread_Length = 6.0/1000.0
op.bf_Major_Dia = 3.0/1000.0
op.bf_Pitch = 0.3499999940395355/1000.0
op.bf_Minor_Dia = 2.6211137771606445/1000.0
op.bf_Crest_Percent = 12.5
op.bf_Root_Percent = 25
op.bf_Div_Count = 36
op.bf_Hex_Nut_Height = 2.4000000953674316/1000.0
op.bf_Hex_Nut_Flat_Distance = 5.5/1000.0
op.bf_12_Point_Nut_Height = 3.0/1000.0
op.bf_12_Point_Nut_Flat_Distance = 3.0/1000.0
op.bf_12_Point_Nut_Flange_Dia = 5.72/1000.0

View File

@ -0,0 +1,37 @@
import bpy
op = bpy.context.active_operator
op.bf_Model_Type = 'bf_Model_Bolt'
op.bf_Head_Type = 'bf_Head_Hex'
op.bf_Bit_Type = 'bf_Bit_None'
op.bf_Nut_Type = 'bf_Nut_Hex'
op.bf_Shank_Length = 0.0/1000.0
op.bf_Shank_Dia = 4.0/1000.0
op.bf_Phillips_Bit_Depth = 1.6330764293670654/1000.0
op.bf_Allen_Bit_Depth = 2.0/1000.0
op.bf_Allen_Bit_Flat_Distance = 3.0/1000.0
op.bf_Torx_Bit_Depth = 2.0/1000.0
op.bf_Torx_Size_Type = 'bf_Torx_T20'
op.bf_Hex_Head_Height = 2.799999952316284/1000.0
op.bf_Hex_Head_Flat_Distance = 7.0/1000.0
op.bf_12_Point_Head_Height = 4.0/1000.0
op.bf_12_Point_Head_Flat_Distance = 4.0/1000.0
op.bf_12_Point_Head_Flange_Dia = 7.22/1000.0
op.bf_CounterSink_Head_Dia = 9.399999618530273/1000.0
op.bf_Cap_Head_Height = 4.0/1000.0
op.bf_Cap_Head_Dia = 7.0/1000.0
op.bf_Dome_Head_Dia = 8.0/1000.0
op.bf_Pan_Head_Dia = 8.0/1000.0
op.bf_Philips_Bit_Dia = 2.5999999046325684/1000.0
op.bf_Thread_Length = 8.0/1000.0
op.bf_Major_Dia = 4.0/1000.0
op.bf_Pitch = 0.5/1000.0
op.bf_Minor_Dia = 3.4587340354919434/1000.0
op.bf_Crest_Percent = 12.5
op.bf_Root_Percent = 25
op.bf_Div_Count = 36
op.bf_Hex_Nut_Height = 3.200000047683716/1000.0
op.bf_Hex_Nut_Flat_Distance = 7.0/1000.0
op.bf_12_Point_Nut_Height = 4.0/1000.0
op.bf_12_Point_Nut_Flat_Distance = 4.0/1000.0
op.bf_12_Point_Nut_Flange_Dia = 7.22/1000.0

View File

@ -0,0 +1,37 @@
import bpy
op = bpy.context.active_operator
op.bf_Model_Type = 'bf_Model_Bolt'
op.bf_Head_Type = 'bf_Head_Hex'
op.bf_Bit_Type = 'bf_Bit_None'
op.bf_Nut_Type = 'bf_Nut_Hex'
op.bf_Shank_Length = 0.0/1000.0
op.bf_Shank_Dia = 5.0/1000.0
op.bf_Phillips_Bit_Depth = 1.9392783641815186/1000.0
op.bf_Allen_Bit_Depth = 2.5/1000.0
op.bf_Allen_Bit_Flat_Distance = 4.0/1000.0
op.bf_Torx_Bit_Depth = 2.5/1000.0
op.bf_Torx_Size_Type = 'bf_Torx_T25'
op.bf_Hex_Head_Height = 3.5/1000.0
op.bf_Hex_Head_Flat_Distance = 8.0/1000.0
op.bf_12_Point_Head_Height = 5.0/1000.0
op.bf_12_Point_Head_Flat_Distance = 5.0/1000.0
op.bf_12_Point_Head_Flange_Dia = 8.72/1000.0
op.bf_CounterSink_Head_Dia = 10.399999618530273/1000.0
op.bf_Cap_Head_Height = 5.0/1000.0
op.bf_Cap_Head_Dia = 8.5/1000.0
op.bf_Dome_Head_Dia = 9.5/1000.0
op.bf_Pan_Head_Dia = 9.5/1000.0
op.bf_Philips_Bit_Dia = 3.0875000953674316/1000.0
op.bf_Thread_Length = 10.0/1000.0
op.bf_Major_Dia = 5.0/1000.0
op.bf_Pitch = 0.5/1000.0
op.bf_Minor_Dia = 4.458734035491943/1000.0
op.bf_Crest_Percent = 12.5
op.bf_Root_Percent = 25
op.bf_Div_Count = 36
op.bf_Hex_Nut_Height = 4.0/1000.0
op.bf_Hex_Nut_Flat_Distance = 8.0/1000.0
op.bf_12_Point_Nut_Height = 5.0/1000.0
op.bf_12_Point_Nut_Flat_Distance = 5.0/1000.0
op.bf_12_Point_Nut_Flange_Dia = 8.72/1000.0

View File

@ -0,0 +1,37 @@
import bpy
op = bpy.context.active_operator
op.bf_Model_Type = 'bf_Model_Bolt'
op.bf_Head_Type = 'bf_Head_Hex'
op.bf_Bit_Type = 'bf_Bit_None'
op.bf_Nut_Type = 'bf_Nut_Hex'
op.bf_Shank_Length = 0.0/1000.0
op.bf_Shank_Dia = 6.0/1000.0
op.bf_Phillips_Bit_Depth = 2.4496147632598877/1000.0
op.bf_Allen_Bit_Depth = 3.0/1000.0
op.bf_Allen_Bit_Flat_Distance = 5.0/1000.0
op.bf_Torx_Bit_Depth = 3.0/1000.0
op.bf_Torx_Size_Type = 'bf_Torx_T30'
op.bf_Hex_Head_Height = 4.0/1000.0
op.bf_Hex_Head_Flat_Distance = 10.0/1000.0
op.bf_12_Point_Head_Height = 6.0/1000.0
op.bf_12_Point_Head_Flat_Distance = 6.0/1000.0
op.bf_12_Point_Head_Flange_Dia = 10.22/1000.0
op.bf_CounterSink_Head_Dia = 12.600000381469727/1000.0
op.bf_Cap_Head_Height = 6.0/1000.0
op.bf_Cap_Head_Dia = 10.0/1000.0
op.bf_Dome_Head_Dia = 12.0/1000.0
op.bf_Pan_Head_Dia = 12.0/1000.0
op.bf_Philips_Bit_Dia = 3.9000000953674316/1000.0
op.bf_Thread_Length = 12.0/1000.0
op.bf_Major_Dia = 6.0/1000.0
op.bf_Pitch = 0.75/1000.0
op.bf_Minor_Dia = 5.188100814819336/1000.0
op.bf_Crest_Percent = 12.5
op.bf_Root_Percent = 25
op.bf_Div_Count = 36
op.bf_Hex_Nut_Height = 5.0/1000.0
op.bf_Hex_Nut_Flat_Distance = 10.0/1000.0
op.bf_12_Point_Nut_Height = 6.0/1000.0
op.bf_12_Point_Nut_Flat_Distance = 6.0/1000.0
op.bf_12_Point_Nut_Flange_Dia = 10.22/1000.0

View File

@ -0,0 +1,37 @@
import bpy
op = bpy.context.active_operator
op.bf_Model_Type = 'bf_Model_Bolt'
op.bf_Head_Type = 'bf_Head_Hex'
op.bf_Bit_Type = 'bf_Bit_None'
op.bf_Nut_Type = 'bf_Nut_Hex'
op.bf_Shank_Length = 0.0/1000.0
op.bf_Shank_Dia = 8.0/1000.0
op.bf_Phillips_Bit_Depth = 3.266152858734131/1000.0
op.bf_Allen_Bit_Depth = 4.0/1000.0
op.bf_Allen_Bit_Flat_Distance = 6.0/1000.0
op.bf_Torx_Bit_Depth = 4.0/1000.0
op.bf_Torx_Size_Type = 'bf_Torx_T40'
op.bf_Hex_Head_Height = 5.300000190734863/1000.0
op.bf_Hex_Head_Flat_Distance = 13.0/1000.0
op.bf_12_Point_Head_Height = 8.0/1000.0
op.bf_12_Point_Head_Flat_Distance = 8.0/1000.0
op.bf_12_Point_Head_Flange_Dia = 13.27/1000.0
op.bf_CounterSink_Head_Dia = 17.299999237060547/1000.0
op.bf_Cap_Head_Height = 8.0/1000.0
op.bf_Cap_Head_Dia = 13.5/1000.0
op.bf_Dome_Head_Dia = 16.0/1000.0
op.bf_Pan_Head_Dia = 16.0/1000.0
op.bf_Philips_Bit_Dia = 5.199999809265137/1000.0
op.bf_Thread_Length = 16.0/1000.0
op.bf_Major_Dia = 8.0/1000.0
op.bf_Pitch = 1.0/1000.0
op.bf_Minor_Dia = 6.917468070983887/1000.0
op.bf_Crest_Percent = 12.5
op.bf_Root_Percent = 25
op.bf_Div_Count = 36
op.bf_Hex_Nut_Height = 6.5/1000.0
op.bf_Hex_Nut_Flat_Distance = 13.0/1000.0
op.bf_12_Point_Nut_Height = 8.0/1000.0
op.bf_12_Point_Nut_Flat_Distance = 8.0/1000.0
op.bf_12_Point_Nut_Flange_Dia = 13.27/1000.0

View File

@ -0,0 +1,37 @@
import bpy
op = bpy.context.active_operator
op.bf_Model_Type = 'bf_Model_Bolt'
op.bf_Head_Type = 'bf_Head_Hex'
op.bf_Bit_Type = 'bf_Bit_None'
op.bf_Nut_Type = 'bf_Nut_Hex'
op.bf_Shank_Length = 0.0/1000.0
op.bf_Shank_Dia = 10.0/1000.0
op.bf_Phillips_Bit_Depth = 4.082691192626953/1000.0
op.bf_Allen_Bit_Depth = 5.0/1000.0
op.bf_Allen_Bit_Flat_Distance = 8.0/1000.0
op.bf_Torx_Bit_Depth = 5.0/1000.0
op.bf_Torx_Size_Type = 'bf_Torx_T50'
op.bf_Hex_Head_Height = 6.400000095367432/1000.0
op.bf_Hex_Head_Flat_Distance = 17.0/1000.0
op.bf_12_Point_Head_Height = 10.0/1000.0
op.bf_12_Point_Head_Flat_Distance = 10.0/1000.0
op.bf_12_Point_Head_Flange_Dia = 16.27/1000.0
op.bf_CounterSink_Head_Dia = 20.0/1000.0
op.bf_Cap_Head_Height = 10.0/1000.0
op.bf_Cap_Head_Dia = 16.0/1000.0
op.bf_Dome_Head_Dia = 20.0/1000.0
op.bf_Pan_Head_Dia = 20.0/1000.0
op.bf_Philips_Bit_Dia = 6.5/1000.0
op.bf_Thread_Length = 20.0/1000.0
op.bf_Major_Dia = 10.0/1000.0
op.bf_Pitch = 1.25/1000.0
op.bf_Minor_Dia = 8.646835327148438/1000.0
op.bf_Crest_Percent = 12.5
op.bf_Root_Percent = 25
op.bf_Div_Count = 36
op.bf_Hex_Nut_Height = 8.0/1000.0
op.bf_Hex_Nut_Flat_Distance = 17.0/1000.0
op.bf_12_Point_Nut_Height = 10.0/1000.0
op.bf_12_Point_Nut_Flat_Distance = 10.0/1000.0
op.bf_12_Point_Nut_Flange_Dia = 16.27/1000.0

View File

@ -0,0 +1,37 @@
import bpy
op = bpy.context.active_operator
op.bf_Model_Type = 'bf_Model_Bolt'
op.bf_Head_Type = 'bf_Head_Hex'
op.bf_Bit_Type = 'bf_Bit_None'
op.bf_Nut_Type = 'bf_Nut_Hex'
op.bf_Shank_Length = 33.0/1000.0
op.bf_Shank_Dia = 12.0/1000.0
op.bf_Phillips_Bit_Depth = 4.899229526519775/1000.0
op.bf_Allen_Bit_Depth = 6.0/1000.0
op.bf_Allen_Bit_Flat_Distance = 10.0/1000.0
op.bf_Torx_Bit_Depth = 6.0/1000.0
op.bf_Torx_Size_Type = 'bf_Torx_T55'
op.bf_Hex_Head_Height = 7.5/1000.0
op.bf_Hex_Head_Flat_Distance = 19.0/1000.0
op.bf_12_Point_Head_Height = 12.0/1000.0
op.bf_12_Point_Head_Flat_Distance = 12.0/1000.0
op.bf_12_Point_Head_Flange_Dia = 18.27/1000.0
op.bf_CounterSink_Head_Dia = 22.0/1000.0
op.bf_Cap_Head_Height = 12.0/1000.0
op.bf_Cap_Head_Dia = 18.5/1000.0
op.bf_Dome_Head_Dia = 24.0/1000.0
op.bf_Pan_Head_Dia = 24.0/1000.0
op.bf_Philips_Bit_Dia = 7.800000190734863/1000.0
op.bf_Thread_Length = 32.0/1000.0
op.bf_Major_Dia = 12.0/1000.0
op.bf_Pitch = 1.5/1000.0
op.bf_Minor_Dia = 10.376201629638672/1000.0
op.bf_Crest_Percent = 12.5
op.bf_Root_Percent = 25
op.bf_Div_Count = 36
op.bf_Hex_Nut_Height = 10.0/1000.0
op.bf_Hex_Nut_Flat_Distance = 19.0/1000.0
op.bf_12_Point_Nut_Height = 12.0/1000.0
op.bf_12_Point_Nut_Flat_Distance = 12.0/1000.0
op.bf_12_Point_Nut_Flange_Dia = 18.27/1000.0