@Pascal_Schon wrote:
Hi,
For a project, I need to write my own
CustomRenderMeshProvider
for which also a properties page is added. The only problem is, that theCustomRenderMeshProvider2
class is only little documented and I found only one example where one tried to write his own render mesh provider:https://discourse.mcneel.com/t/how-to-keep-texture-mapping-result/60303
The problem is, that this is already a very old post and that it’s written in C++, but I have to develop in C#.
I already have created a class, which inherits from
CustomRenderMeshProvider
and overloads theBuildCustomMeshes
andWillBuildCustomMeshes
methods, as well as the properties page UI, but now I’m stuck at passing the parameters to the render mesh provider. In this post it is described, that I need to call theSetCustomRenderMeshParameter
andGetCustomRenderMeshParameter
methods of the Rhino objects I want to add parameters to get them in theBuildCustomMeshes
method. For those methods, the provider ID needs to be passed as the first argument, but where do I get it? I already tried to use the GUID of the provider class type (viatypeof(MyRenderMeshProvider).GUID
), but it didn’t work. I set one value and immediately tried to read it again, but it always returns the default value.My current solution is to add the parameters as custom user data to the Rhino objects such that I’m able to save the state when closing the Rhino project.
Is there any more description of how to do it?
Thanks for your help already,
Pascal
Posts: 2
Participants: 2