Skip to content

Commit a737ad4

Browse files
committed
Only create the addon zip on releases
1 parent a62ad68 commit a737ad4

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

Diff for: .github/workflows/rust.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Rust_lib
22

33
on:
4-
push:
5-
branches: [ "main" ]
4+
#push:
5+
# branches: [ "main" ]
66
release:
77
types:
88
- created

Diff for: blender_addon/hallr_collision.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def VIEW3D_MT_collision_menu_item(self, context):
205205

206206
def register():
207207
bpy.utils.register_class(OBJECT_OT_hallr_collision)
208-
bpy.types.VIEW3D_MT_mesh_add.append(VIEW3D_MT_collision_menu_item)
208+
bpy.types.VIEW3D_MT_object_convert.append(VIEW3D_MT_collision_menu_item)
209209

210210

211211
def unregister():
@@ -214,10 +214,10 @@ def unregister():
214214
except (RuntimeError, NameError):
215215
pass
216216

217-
bpy.types.VIEW3D_MT_mesh_add.remove(VIEW3D_MT_collision_menu_item)
218-
for f in bpy.types.VIEW3D_MT_mesh_add._dyn_ui_initialize():
217+
bpy.types.VIEW3D_MT_object_convert.remove(VIEW3D_MT_collision_menu_item)
218+
for f in bpy.types.VIEW3D_MT_object_convert._dyn_ui_initialize():
219219
if f.__name__ == VIEW3D_MT_collision_menu_item.__name__:
220-
bpy.types.VIEW3D_MT_mesh_add.remove(f)
220+
bpy.types.VIEW3D_MT_object_convert.remove(f)
221221

222222

223223
if __name__ == "__main__":

Diff for: misc/ffi_test.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ class ProcessResult(ctypes.Structure):
3232

3333

3434
system = platform.system()
35-
library_extension = ".dylib" # Default to macOS
35+
library_name = "libhallr.dylib" # Default to macOS
3636
if system == "Linux":
37-
library_extension = ".so"
37+
library_name = "libhallr.so"
3838
elif system == "Windows":
39-
library_extension = ".dll"
39+
library_name = "hallr.dll"
4040

41-
rust_lib = ctypes.cdll.LoadLibrary("./blender_addon_exported/lib/libhallr" + library_extension)
41+
rust_lib = ctypes.cdll.LoadLibrary("./blender_addon_exported/lib/" + library_name)
4242
rust_lib.process_geometry.argtypes = [ctypes.POINTER(Vector3), ctypes.c_size_t,
4343
ctypes.POINTER(ctypes.c_size_t), ctypes.c_size_t,
4444
ctypes.POINTER(StringMap)]

0 commit comments

Comments
 (0)