Export Collada layers

SketchUp currently exports to Collada v1.4, I think.

(1) SketchUp misnamed it’s “layers”, as they are not really like geometric CAD layers. They are instead visibility behavior property “sheets” that can be shared by multiple objects.

Layers in SketchUp do not “own” entities (ie, no entities collection.) Instead, geometric collection objects (groups or components) have a property that points at which layer to use for visibility behavior.

(2) Looking at the spec, there is not much said about the Collada element called “<layer>”, except that it has no attributes, and holds only a string name. These <layer> elements are child elements of <render> elements, which are referenced by “layer” attributes (containing name lists) of <node> elements.

So you would need to look at: Class: Sketchup::Layer — SketchUp Ruby API Documentation
and think what properties should be exported, and into what Collada element ?

I really do not see anywhere in the Collada schema where objects are described, but their visibility is switched off. So exporting SketchUp layers may not translate well at all.
In addition, I do not see a “library_layers” collection-type element for the main “<COLLADA>” element.
So, what would Collada layers be used for anyway ?

I’ll guess (from reading some things in the specs,) that Collada’s layer concept is of layered compositing passes during rendering. This is not what the normal modeler thinks of when using layers in SketchUp.


Once again I point you toward the link to the Collada v1.4 Specification I give in this post:

1 Like