diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e518c74..df279b3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,8 +1,8 @@ name: Rust_lib on: - push: - branches: [ "main" ] + #push: + # branches: [ "main" ] release: types: - created diff --git a/blender_addon/hallr_collision.py b/blender_addon/hallr_collision.py index bd7b1d6..e89c0fd 100644 --- a/blender_addon/hallr_collision.py +++ b/blender_addon/hallr_collision.py @@ -205,7 +205,7 @@ def VIEW3D_MT_collision_menu_item(self, context): def register(): bpy.utils.register_class(OBJECT_OT_hallr_collision) - bpy.types.VIEW3D_MT_mesh_add.append(VIEW3D_MT_collision_menu_item) + bpy.types.VIEW3D_MT_object_convert.append(VIEW3D_MT_collision_menu_item) def unregister(): @@ -214,10 +214,10 @@ def unregister(): except (RuntimeError, NameError): pass - bpy.types.VIEW3D_MT_mesh_add.remove(VIEW3D_MT_collision_menu_item) - for f in bpy.types.VIEW3D_MT_mesh_add._dyn_ui_initialize(): + bpy.types.VIEW3D_MT_object_convert.remove(VIEW3D_MT_collision_menu_item) + for f in bpy.types.VIEW3D_MT_object_convert._dyn_ui_initialize(): if f.__name__ == VIEW3D_MT_collision_menu_item.__name__: - bpy.types.VIEW3D_MT_mesh_add.remove(f) + bpy.types.VIEW3D_MT_object_convert.remove(f) if __name__ == "__main__": diff --git a/misc/ffi_test.py b/misc/ffi_test.py index 1d3cabf..8a77c0e 100644 --- a/misc/ffi_test.py +++ b/misc/ffi_test.py @@ -32,13 +32,13 @@ class ProcessResult(ctypes.Structure): system = platform.system() -library_extension = ".dylib" # Default to macOS +library_name = "libhallr.dylib" # Default to macOS if system == "Linux": - library_extension = ".so" + library_name = "libhallr.so" elif system == "Windows": - library_extension = ".dll" + library_name = "hallr.dll" -rust_lib = ctypes.cdll.LoadLibrary("./blender_addon_exported/lib/libhallr" + library_extension) +rust_lib = ctypes.cdll.LoadLibrary("./blender_addon_exported/lib/" + library_name) rust_lib.process_geometry.argtypes = [ctypes.POINTER(Vector3), ctypes.c_size_t, ctypes.POINTER(ctypes.c_size_t), ctypes.c_size_t, ctypes.POINTER(StringMap)]