Crash.Plugins
1.4.0-beta
dotnet add package Crash.Plugins --version 1.4.0-beta
NuGet\Install-Package Crash.Plugins -Version 1.4.0-beta
<PackageReference Include="Crash.Plugins" Version="1.4.0-beta" />
paket add Crash.Plugins --version 1.4.0-beta
#r "nuget: Crash.Plugins, 1.4.0-beta"
// Install Crash.Plugins as a Cake Addin #addin nuget:?package=Crash.Plugins&version=1.4.0-beta&prerelease // Install Crash.Plugins as a Cake Tool #tool nuget:?package=Crash.Plugins&version=1.4.0-beta&prerelease
Crash Plugin SDK
Welcome to Crash Plugin Development.
Crash Plugins is currently in beta. The API is liable to change based on user feedback and will likely not be finalised and stable until mid-late 2024. Please don't rely on any Crash Plugins for now.
That being said, if you're here to have fun, you'll be right at home!
Getting Started
Clone or fork the CrashPluginExample from https://github.com/crashcloud/CrashPluginExample.
Concepts
Plugin assembly
The Crash Plugin must be built into a .mup
assembly. As some plugins are created for Rhino using C++ I made Crash require a separate DLL so these Plugins can create a separate C# DLL to consume anything required. Whilst it might make sense for some plugins to include Crash inside their main plugin, I'd like to make Crash separate and available for every plugin. You should include these in your .yak
package (or at least distribute next to your .rhp
) so that Crash can find them.
Changes
Changes are how we capture a change during Rhinos runtime. This can be a box being transformed, a Grasshopper component being added to the canvas, or anything you need to communicate to other users of the Shared Model. These changes can even be completely independent of the Rhino Doc.
Change Definition
The Change Definition describes how the changes are drawn, if at all, how they are categorised and what actions can be taken with the changes.
Change Create Action
Change Create Actions define the circumstances in which a Change is created. This could be a Box being moved, deleted, selected, or even a completely unique event in your Plugin!
Change Receive Action
Change Receive Actions define how changes get created locally when a Change is received from the server that matches the description of the Change Definition.
Events
If you do want to subscribe to custom events and let crash know, you MUST forward the event to crashDoc.Dispatcher.NotifyServerAsync
. It is recommended, if you can, to create your own custom event args as this will make it easier for you to capture that change in your custom ChangeCreateAction
. DO NOT subscribe to the default Rhino Events. These are already captured by Crash. If Crash is missing a Rhino Event you would like subscribed to, please open a PR and add it.
Contributing
If you like or dislike the way the plugin API works, have requests, questions or more, please post on the Discourse Forums under the Multi-user
category https://discourse.mcneel.com/c/plug-ins/multi-user/163.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- RhinoCommon (>= 7.21.22208.13001)
-
All Frameworks
- BidirectionalMap (>= 1.0.0)
- Crash.Changes (>= 1.2.0)
- Microsoft.CodeAnalysis.Common (>= 4.8.0)
- Microsoft.VisualStudio.Threading (>= 17.5.22)
- System.Drawing.Common (>= 7.0.0)
- System.Text.Json (>= 7.0.2)
-
net7.0
- RhinoCommon (>= 8.3.24009.15001)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.4.0-beta | 98 | 1/13/2024 |