What method defines the rhino version in a plugin?
nathanletwory
(Nathan 'jesterKing' Letwory)
February 28, 2019, 5:50pm
2
For a .NET plug-in your assembly should have a set of attributes. As a simple example check the RhinoPbrMaterial plug-in assembly info:
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Rhino.PlugIns;
[assembly: PlugInDescription(DescriptionType.Address, "3670 Woodland Park Avenue North\r\nSeattle, WA 98103")]
[assembly: PlugInDescription(DescriptionType.Country, "United States")]
[assembly: PlugInDescription(DescriptionType.Email, "devsupport@mcneel.com")]
[assembly: PlugInDescription(DescriptionType.Phone, "206-545-6877")]
[assembly: PlugInDescription(DescriptionType.Fax, "206-545-7321")]
[assembly: PlugInDescription(DescriptionType.Organization, "Robert McNeel & Associates")]
[assembly: PlugInDescription(DescriptionType.UpdateUrl, "https://github.com/mcneel/RhinoPbrMaterial")]
[assembly: PlugInDescription(DescriptionType.WebSite, "http://www.rhino3d.com/")]
// Icons should be Windows .ico files and contain 32-bit images in the following sizes: 16, 24, 32, 48, and 256.
// This is a Rhino 6-only description.
[assembly: PlugInDescription(DescriptionType.Icon, "RhinoPbrMaterial.EmbeddedResources.plugin-utility.ico")]
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
This file has been truncated. show original
Other than referencing the RhinoCommon.dll and deriving your plug-in class from Rhino.PlugIns.PlugIn
(or one of its deriving classes) there is no explicit rhino version being implemented in .NET plug-ins.
1 Like
Thanks Nathan,
Just one stupid question if I may: Why are these put in square brackets?
nathanletwory
(Nathan 'jesterKing' Letwory)
February 28, 2019, 6:03pm
4
Those are attributes, in this particular case assembly attributes.
I found this post on attributes in IronPython
1 Like
On to decorations it’s Christmas again.