[Addon] Export weights to Maya (.dsw format)

I got fed up with Maya quirks yesterday and decided I’ll be doing my skinning in Blender, as much as possible. The exporter writes vertex group weights and coordinates in the Dora Skin Weights format (required), for import to Maya. It primarily fills a corner case wherein you have a complex rig in Maya, and fbx import/export is time-cost prohibitive. Skin to a proxy armature in Blender, and export weights to Maya. Of course this assumes you’re not happy with doing the skinning in Maya itself…

A simple script, but hopefully someone finds it mildly useful. Makes sure your weights are normalized prior to export.

Edit: 2.8x script now supports Blender import. Import/mesh vert group data must match exactly in name and count. Group order can be arbitrary. Does not clean up zero weights or unused bones.

2.7x Addon
2.8x Addon

3 Likes

Thank you DerekWatts. Blender-Maya users will be very happy. Dora skin Weights format I am using very often.

Hi @DerekWatts

Is there a way to update this?

It currently returns an errror in 2.81

Warning: class EXPORT_WEIGHTS_OT_dsw contains a property which should be an annotation!
\Text.001:106
    assign as a type annotation: EXPORT_WEIGHTS_OT_dsw.filter_glob
Traceback (most recent call last):
  File "\Text.001", line 116, in <module>
  File "\Text.001", line 107, in register
AttributeError: 'RNA_Types' object has no attribute 'INFO_MT_file_export'
Error: Python script failed, check the message in the system console

Hey, thanks for the reminder! I’ve updated the first post with a 2.8 friendly version.

2 Likes

@DerekWatts

Thanks for the update. Appreciate it alot.
Just wondering, do you have a Blender Equivalent of the Import or Export Weights?

For instance, if I have

  1. Blender A file with outdated mesh but updated weights
  2. Blender B file with updated mesh but outdated weights.

Assuming the mesh retained its point order, it would be just an easy Export then Import weights in Maya.

But in Blender. I have to reimport the mesh to another blender file then reconnect the Armature Modifier, which is a bit clunky IMO.

So do you have a Blender Equivalent of the Import or Export Weights like in Maya?

Thanks

Unfortunately, this addon was never meant to work as a complete or well-rounded tool. All this does is export weights in a DSW readable format. I didn’t have a need for a DSW importer, so I never scripted one, unfortunately. I only set this up to ease my workload at my job and then threw it out here as an afterthought. Tbh, I don’t even remember why I thought other people would want this.

That said, if I were trying to copy weights from two objects in a state like you describe, I’d copy/paste Object-A into File-B, and use the data transfer modifier to copy vertex group data onto Object-B. If the two objects share the same vertex count/order, use “Topology” as the mapping method. Otherwise, you can still use some form of proximity mapping. Make sure you hit “Generate Data Layers” if the vertex groups don’t already exist. Then just apply. It’s pretty simple to use, but not what you’d expect if you’re coming from Maya.

If this is something you’d actually find useful, I’m sure the script could be changed to accommodate importing DSW weights fairly quickly.

1 Like

@bentraje 2.8x script has been updated to support importation. I decided to keep it strict so that it did not accidentally damage any mesh data or hierarchy.

Names must match exactly
Vert counts must match exactly
Group/bone counts must match exactly
It will abort otherwise.

I haven’t tested this extensively, so let me know if you run into issues. Cheers.

2 Likes

Hi @DerekWatts

Apologies for the late response.
I can confirm it works as expected.

Probably, the suggestion I have so far is to spit out a list of mismatch attributes. For instance, what joints are mismatched in the weight groups, etc.

Thank you again. Have a great day ahead!

1 Like