Layers or Groups in Exporter

Jul 30, 2013 at 1:59 AM
I'm looking at implementing an Exporter that can write 'named layers' (aka 'groups' ) that are defined when the model is created.

At the moment, I'm not entirely sure where to start.

Our code is creating objects using ExtrudedVisual3d and QuadVisual3d which end up as direct children of the viewport.

I was thinking I could create a nested structure of ModelVisual3d elements under the viewport, each of which contains a set of children which make up that layer. But this wouldn't know about the 'name' of that layer.

Similarly, when exporting the decendant exporter class is not called until the base class has traversed down to the Geometry3dModel, at which point it's unaware of the ModelVisual3d which it belongs to.

The obj exporter is the only exporter that I can see which exports groups, but it creates a new group for each GeometryModel3d, which is not what I want in this case.

Should I be looking at Dependency Properties/Attached Properties to achieve this? But where to put them?

Clues? Suggestions?
Sep 8, 2013 at 6:48 AM
Yes, attached properties can be used to set the name of the groups. We could add this property into the library and implement support for it in the exporters. I understand the obj exporter also need some refactoring related to the grouping.