Page MenuHome

Fix T61179: .obj import splits same group into multiple objects

Authored by Jacques Lucke (JacquesLucke) on Feb 4 2019, 5:17 PM.



@Bastien Montagne (mont29), I'm not sure if this change contradicts what you did in rBA9448cef00d1b3.
Please take a look.

The problem of the file in T61179 is that the same group starts multiple times.
I'm not sure what the standard way of parsing this is.

Also on this page ( it says that g group1 group2 ...
is allowed. So the same face can belong to multiple groups.
Looks like this is currently not handled in the importer, not sure how often this case exists.

Diff Detail

rBA Blender Add-ons
Build Status
Buildable 2833
Build 2833: arc lint + arc unit

Event Timeline

I have slightly mixed feelings here… Thing is, splitting groups into different objects is not 'supposed' to happen, I guess that was added to cope with applications exporting actual objects as groups, or something like that…

(Not sure why 'split by group' is enabled by default in importer, actually :/ ).

I think correct way to do it would be to separate 'object' and 'group' components, and only use unique_name thingy on 'object' part? Otherwise, if you have several objects with same group names, you're going to have a very weird result.

As for multiple groups per face, afaik we never supported that at all, neither on import nor on export (we actually go through 'smart' piece of code to find which vgroup 'wins' a face, in the exporter…).

Yeah, splitting by group by default does not make much sense because you can also split by objects.
Splitting by group does not much sense... Maybe we should just create a face map for every group and get rid of the split-by-group functionality completely?
This could be a different more generic operator in Blender that splits by face-map (I've never actually used face maps before, so I'm only guessing what it is).

Should I change the default as "fix" for the report?

I’ll try to implement my 'decouple object/group name parts' idea, but disabling 'split groups' as default option is also a good thing to do imho, yes.