Collade export: object "name" attribute not exported


#1

The DAE (collade) exporter in Rhino doesn’t seem to export the “name” property.

Reproduce:

  1. create a new file in Rhino
  2. create a cube
  3. name the cube “Cube”
  4. export the cube to Collada (cube.dae)
  5. open cube.dae in a text editor:

There are 5 nodes in “visual_scene” element. The first 4 are the camera’s for which the “name” attribute is exported. The fifth, our cube, however is missing the name=“Cube” attribute.

Besides objects, the attribute is also not exported for materials and lights, and possibly other objects.

Use case: I am using collada to export to blender to make renderings. Blender uses the “id” att to name objects when the “name” at is missing. As the “ids” are generated UUIDs by Rhino when exported, it is hard to find objects in Blender, although everything is there!


Implementation note: when exporting to DAE, Rhino could possible generate names for unnamed subpart objects in Rhino. For examples the geomtetry that is exported for the Cube node above, could be auto-named “Cube-mesh” or “Cube-geometry”. This way, those objects have nice names in Blender as well.


Rhino 5 for Mac WIP Build 5E140w
(Nathan 'jesterKing' Letwory) #2

Best would be to ensure the node tag gets a name attribute when an object has a given name. I just ensure this by adding an attribute name with value “Cube”, Blender imports that just nicely.

Autogenerating names won’t always work well though, except for maybe using object type as string. For instance using the _Box command gives a "
closed extrusion without a name.

That object type is probably already better than the UUID, though (:

/Nathan ‘jesterKing’ blender dev

P.S. note than in the dae you’ll see that the geometry tag does have a name attribute.


(Nathan 'jesterKing' Letwory) #3

https://mcneel.myjetbrains.com/youtrack/issue/RH-40221


(Brian James) #4

Thanks for the report. This has been fixed in the v6 WIP but that’s not yet a public Mac build. https://mcneel.myjetbrains.com/youtrack/issue/RH-39779

For what it’s worth, I like to give objects materials with unique material names and no spaces within Rhino and then export OBJ. Then I can use the materials to select and organize part(s) in Blender. That might be a workflow you could use as well in the meantime.


(Nathan 'jesterKing' Letwory) #5

@BrianJ that is for the geometry tag, which isn’t enough. The name attribute should also be applied to the node tag (the tag that realizes an item like a geometry in a scene). The YT item I created is for exactly that.

Tagging @tim also to make him aware of the issue.


(Brian James) #6

Okay, thanks… I misunderstood the report.


(Nathan 'jesterKing' Letwory) #7

It is related though, so understandable (:

I think I have a patch ready for this - on Rhino WIP. I’ll tag @tim in it when done, so he can backport it (I have no idea how and where).


#8

Hi guys,

Thanks for the answers. Is the work in progress v6 version available for beta testing?

To help make sure we understand eachother 100%, I’d like to attach a cube_v532_export.dae and cube_desired_export.dae. Is there a way where I can upload files?

Thanks for the quick responses!


(Nathan 'jesterKing' Letwory) #9

While editing your post check the toolbar for the editing area. Find the upload icon (a drive with protruding arrow).

I work mainly in the Windows Rhino WIP version, you can download it from the serengeti section on this forum.

I have a patch ready that I will be merging into master soon. It adds the name attributes for node tags of lights and geometry objects.


(Brian James) #10

On Windows yes but not yet on Mac. The Mac Rhino WIP which you can get if you have a Rhino for Mac license is still based on v5. @dan may know more about when the v6 WIP for Mac will be available.


(Dan Belcher) #11

This bug should be fixed in the next RhinoWIP for Rhino 5 for Mac…perhaps as early as next Tuesday.


(Dan Belcher) #12

This issue should be fixed in the latest RhinoWIP (5E140w). Please give it a try.