mcneel / glTF-IO

glTF exporter for Rhinoceros. Supports: mode-text, mode-binary, binary-draco, materials, and textures.
MIT License
8 stars 2 forks source link

Create new projects not tied to the Rhino build #13

Open jrz371 opened 1 year ago

jrz371 commented 1 year ago

Currently the Import_glTF and Export_glTF projects are tied into the Rhino build. New import/export projects should be made referencing the glTF-Loader/Newtonsoft.Json/RhinoCommon nuget packages so other developers can build the plugins on their own machines and load them into Rhino.

visose commented 1 year ago

My suggestion to fix the root cause of the problem:

jrz371 commented 1 year ago

I have a branch broken off here that adds support for building by a third party

https://github.com/mcneel/glTF-IO/tree/joshua/ThirdPartyBuild

The sources are linked and the project file use Nuget packages. My only reason for not merging it is the RhinoCommon nuget packages don't yet have some SDK additions and they won't compile.

visose commented 1 year ago

I see you are creating the projects in the same way as in my fork, by individually linking the relevant .cs files from other project folders. I only did it this way to minimize the amount of changes needed to get it working, but I wouldn't do it like this in your case.

I would restructure the solution so you have one project as a "library" project with no reference to Rhino Plugin and Command, and the plugin projects then consume this project, but also can be used by third parties.

This will be easier to mantain, as adding/moving/renaming files will break new the projects with linked files, and as a side effect will also help to structure the project better.